From e195147106a5024640e792971ba84cf521389955 Mon Sep 17 00:00:00 2001 From: Marc Stammerjohann Date: Sun, 14 Apr 2019 01:25:39 +0200 Subject: [PATCH] feat(html): floating label in item and as label --- README.md | 4 +- package.json | 8 +- snippets/angular/html-utils.json | 114 ++++++++++++++++++ snippets/{ => angular}/html.json | 156 ++++++------------------- snippets/{ => angular}/typescript.json | 0 5 files changed, 158 insertions(+), 124 deletions(-) create mode 100644 snippets/angular/html-utils.json rename snippets/{ => angular}/html.json (91%) rename snippets/{ => angular}/typescript.json (100%) diff --git a/README.md b/README.md index 6b59ea8..91d5d0f 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ Type part of a snippet, press enter, and the snippet unfolds. | `i-item-badge` | `` w/ `` | | `i-item-checkbox` | `` w/ `` | | `i-item-divider` | `` w/ `` | +| `i-item-floating-label` | `` w/ `

` and `

` wrapped by `` | | `i-item-group` | `` w/ `` and `` | | `i-item-icon` | `` w/ `` | | `i-item-input` | `` w/ `` | @@ -94,8 +95,9 @@ Type part of a snippet, press enter, and the snippet unfolds. | `i-item-radio` | `` w/ `` | | `i-item-toggle` | `` w/ `` | | `i-label` | `` | +| `i-label-floating` | `` w/ `

` and `

` | | `i-label-position` | `` w/ position selection | -| `i-list` | `` w/ two `` | +| `i-list` | `` | | `i-list-header` | `` | | `i-list-input` | `` w/ two `` | | `i-menu` | `` w/ `` and `` | diff --git a/package.json b/package.json index 3ffa8e1..a6a8091 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,11 @@ "snippets": [ { "language": "html", - "path": "./snippets/html.json" + "path": "./snippets/angular/html.json" + }, + { + "language": "html", + "path": "./snippets/angular/html-utils.json" }, { "language": "scss", @@ -42,7 +46,7 @@ }, { "language": "typescript", - "path": "./snippets/typescript.json" + "path": "./snippets/angular/typescript.json" } ] }, diff --git a/snippets/angular/html-utils.json b/snippets/angular/html-utils.json new file mode 100644 index 0000000..ffdcb3e --- /dev/null +++ b/snippets/angular/html-utils.json @@ -0,0 +1,114 @@ +{ + "click": { + "prefix": "i-click", + "body": [ + "(click)=\"${1:onClick()}\"" + ], + "description": "(click) event" + }, + "color": { + "prefix": "i-color", + "body": [ + "color=\"${1|primary,secondary,tertiary,success,warning,danger,light,medium,dark|}\"" + ], + "description": "(click) event" + }, + "ion-hide": { + "prefix": "i-hide", + "body": [ + "ion-hide" + ], + "description": "CSS Utilities Hide Element Class - must be added to class" + }, + "ion-hide-breakpoints": { + "prefix": "i-hide-breakpoints", + "body": [ + "ion-hide-${1|sm,md,lg,xl|}-${2|up,down|}" + ], + "description": "CSS Utilities Hide Element with Display Breakpoints - must be added to class" + }, + "ion-hide-sm": { + "prefix": "i-hide-sm", + "body": [ + "ion-hide-sm-${1|up,down|}" + ], + "description": "CSS Utilities Hide Element sm - must be added to class. Applies the modifier to the element when min-width: 576px (up) or max-width: 576px (down)." + }, + "ion-hide-md": { + "prefix": "i-hide-md", + "body": [ + "ion-hide-md-${1|up,down|}" + ], + "description": "CSS Utilities Hide Element md - must be added to class. Applies the modifier to the element when min-width: 768px (up) or max-width: 768px (down)." + }, + "ion-hide-lg": { + "prefix": "i-hide-lg", + "body": [ + "ion-hide-lg-${1|up,down|}" + ], + "description": "CSS Utilities Hide Element lg - must be added to class. Applies the modifier to the element when min-width: 992px (up) or max-width: 992px (down)." + }, + "ion-hide-xl": { + "prefix": "i-hide-xl", + "body": [ + "ion-hide-xl-${1|up,down|}" + ], + "description": "CSS Utilities Hide Element xl - must be added to class. Applies the modifier to the element when min-width: 1200px (up) or max-width: 1200px (down)." + }, + "ion-margin": { + "prefix": "i-margin", + "body": [ + "ion-margin" + ], + "description": "CSS Utilities Element Margin - must be added to class" + }, + "ion-margin-type": { + "prefix": "i-margin-type", + "body": [ + "ion-margin-${1|top,start,end,bottom,vertical,horizontal|}" + ], + "description": "CSS Utilities Element Margin Type - must be added to class" + }, + "ion-no-margin": { + "prefix": "i-no-margin", + "body": [ + "ion-no-margin" + ], + "description": "CSS Utilities Element No Margin - must be added to class" + }, + "ion-padding": { + "prefix": "i-padding", + "body": [ + "ion-padding" + ], + "description": "CSS Utilities Element Padding - must be added to class" + }, + "ion-padding-type": { + "prefix": "i-padding-type", + "body": [ + "ion-padding-${1|top,start,end,bottom,vertical,horizontal|}" + ], + "description": "CSS Utilities Element Padding Type - must be added to class" + }, + "ion-no-padding": { + "prefix": "i-no-padding", + "body": [ + "ion-no-padding" + ], + "description": "CSS Utilities Element No Padding - must be added to class" + }, + "scrollEvents": { + "prefix": "i-scrollEvents", + "body": [ + "[scrollEvents]=\"${1|true,false|}\"" + ], + "description": "Ionic [scrollEvents] binding for " + }, + "slot": { + "prefix": "i-slot", + "body": [ + "slot=\"${1|start,end,primary,secondary|}\"" + ], + "description": "Ionic slot property" + } +} \ No newline at end of file diff --git a/snippets/html.json b/snippets/angular/html.json similarity index 91% rename from snippets/html.json rename to snippets/angular/html.json index 478dc2c..38c1a0a 100644 --- a/snippets/html.json +++ b/snippets/angular/html.json @@ -291,8 +291,8 @@ "prefix": "i-datetime", "body": [ "", - "${1:Date}", - "", + "\t${1:Date}", + "\t", "" ], "description": "" @@ -438,48 +438,6 @@ ], "description": "" }, - "ion-hide": { - "prefix": "i-hide", - "body": [ - "ion-hide" - ], - "description": "CSS Utilities Hide Element Class - must be added to class" - }, - "ion-hide-breakpoints": { - "prefix": "i-hide-breakpoints", - "body": [ - "ion-hide-${1|sm,md,lg,xl|}-${2|up,down|}" - ], - "description": "CSS Utilities Hide Element with Display Breakpoints - must be added to class" - }, - "ion-hide-sm": { - "prefix": "i-hide-sm", - "body": [ - "ion-hide-sm-${1|up,down|}" - ], - "description": "CSS Utilities Hide Element sm - must be added to class. Applies the modifier to the element when min-width: 576px (up) or max-width: 576px (down)." - }, - "ion-hide-md": { - "prefix": "i-hide-md", - "body": [ - "ion-hide-md-${1|up,down|}" - ], - "description": "CSS Utilities Hide Element md - must be added to class. Applies the modifier to the element when min-width: 768px (up) or max-width: 768px (down)." - }, - "ion-hide-lg": { - "prefix": "i-hide-lg", - "body": [ - "ion-hide-lg-${1|up,down|}" - ], - "description": "CSS Utilities Hide Element lg - must be added to class. Applies the modifier to the element when min-width: 992px (up) or max-width: 992px (down)." - }, - "ion-hide-xl": { - "prefix": "i-hide-xl", - "body": [ - "ion-hide-xl-${1|up,down|}" - ], - "description": "CSS Utilities Hide Element xl - must be added to class. Applies the modifier to the element when min-width: 1200px (up) or max-width: 1200px (down)." - }, "ion-icon": { "prefix": "i-icon", "body": [ @@ -542,6 +500,15 @@ ], "description": " w/ " }, + "ion-item-button": { + "prefix": "i-item-button", + "body": [ + "", + "\t${3:Click me}", + "" + ], + "description": " w/ " + }, "ion-item-checkbox": { "prefix": "i-item-checkbox", "body": [ @@ -561,6 +528,18 @@ ], "description": " w/ " }, + "ion-item-floating-label": { + "prefix": "i-item-floating-label", + "body": [ + "", + "\t", + "\t\t

${1:Pizza}

", + "\t\t

${2:Hawaii}

", + "\t
", + "
" + ], + "description": " w/

and

wrapped by " + }, "ion-item-group": { "prefix": "i-item-group", "body": [ @@ -688,6 +667,16 @@ ], "description": "" }, + "ion-label-floating": { + "prefix": "i-label-floating", + "body": [ + "", + "\t

${1:Pizza}

", + "\t

${2:Hawaii}

", + "
" + ], + "description": " w/

and

" + }, "ion-label-position": { "prefix": "i-label-position", "body": [ @@ -699,15 +688,10 @@ "prefix": "i-list", "body": [ "", - "\t", - "\t\t${1:Peperoni}", - "\t", - "\t", - "\t\t${2:Hawaii}", - "\t", + "\t$0", "" ], - "description": " w/ two " + "description": "" }, "ion-list-header": { "prefix": "i-list-header", @@ -742,27 +726,6 @@ ], "description": "" }, - "ion-margin": { - "prefix": "i-margin", - "body": [ - "ion-margin" - ], - "description": "CSS Utilities Element Margin - must be added to class" - }, - "ion-margin-type": { - "prefix": "i-margin-type", - "body": [ - "ion-margin-${1|top,start,end,bottom,vertical,horizontal|}" - ], - "description": "CSS Utilities Element Margin Type - must be added to class" - }, - "ion-no-margin": { - "prefix": "i-no-margin", - "body": [ - "ion-no-margin" - ], - "description": "CSS Utilities Element No Margin - must be added to class" - }, "ion-menu": { "prefix": "i-menu", "body": [ @@ -814,27 +777,6 @@ ], "description": "" }, - "ion-padding": { - "prefix": "i-padding", - "body": [ - "ion-padding" - ], - "description": "CSS Utilities Element Padding - must be added to class" - }, - "ion-padding-type": { - "prefix": "i-padding-type", - "body": [ - "ion-padding-${1|top,start,end,bottom,vertical,horizontal|}" - ], - "description": "CSS Utilities Element Padding Type - must be added to class" - }, - "ion-no-padding": { - "prefix": "i-no-padding", - "body": [ - "ion-no-padding" - ], - "description": "CSS Utilities Element No Padding - must be added to class" - }, "ion-radio": { "prefix": "i-radio", "body": [ @@ -1250,33 +1192,5 @@ "" ], "description": " with header function" - }, - "click": { - "prefix": "i-click", - "body": [ - "(click)=\"${1:onClick()}\"" - ], - "description": "(click) event" - }, - "color": { - "prefix": "i-color", - "body": [ - "color=\"${1|primary,secondary,tertiary,success,warning,danger,light,medium,dark|}\"" - ], - "description": "(click) event" - }, - "scrollEvents": { - "prefix": "i-scrollEvents", - "body": [ - "[scrollEvents]=\"${1|true,false|}\"" - ], - "description": "Ionic [scrollEvents] binding for " - }, - "slot": { - "prefix": "i-slot", - "body": [ - "slot=\"${1|start,end,primary,secondary|}\"" - ], - "description": "Ionic slot property" } } \ No newline at end of file diff --git a/snippets/typescript.json b/snippets/angular/typescript.json similarity index 100% rename from snippets/typescript.json rename to snippets/angular/typescript.json