From 3a702bd9a7cd93a86800c9e9d9b4755bf392622f Mon Sep 17 00:00:00 2001 From: Jacek Karczmarczyk Date: Thu, 25 Oct 2018 10:02:51 +0700 Subject: [PATCH 01/14] fix: missing mdi in codepen fixes #648 --- src/examples/windows/onboarding.vue | 6 ++++++ src/examples/windows/usage.vue | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/examples/windows/onboarding.vue b/src/examples/windows/onboarding.vue index 7b6c91acc..d0503f19d 100644 --- a/src/examples/windows/onboarding.vue +++ b/src/examples/windows/onboarding.vue @@ -82,3 +82,9 @@ } } + + + { + "css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] + } + diff --git a/src/examples/windows/usage.vue b/src/examples/windows/usage.vue index 4fceabb74..ca0fef814 100644 --- a/src/examples/windows/usage.vue +++ b/src/examples/windows/usage.vue @@ -69,3 +69,9 @@ }) } + + + { + "css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] + } + From ed3a69d7af46c33c37a83bf426557ac9c8f8a28d Mon Sep 17 00:00:00 2001 From: Jacek Karczmarczyk Date: Thu, 25 Oct 2018 10:19:39 +0700 Subject: [PATCH 02/14] fix: add spaces to default value JSON to allow wrapping --- src/components/helpers/Parameters.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/helpers/Parameters.vue b/src/components/helpers/Parameters.vue index 4a3fbcf7f..29e5ddf8e 100644 --- a/src/components/helpers/Parameters.vue +++ b/src/components/helpers/Parameters.vue @@ -231,7 +231,7 @@ return this.genTypescriptDef(props) }, genDefault (value) { - if (typeof value !== 'string') return JSON.stringify(value) + if (typeof value !== 'string') return JSON.stringify(value, null, 2) else return value }, genTypescriptDef (obj) { From 6444da7ada53885371efe1631272859437fbaaeb Mon Sep 17 00:00:00 2001 From: Jacek Karczmarczyk Date: Thu, 25 Oct 2018 10:49:14 +0700 Subject: [PATCH 03/14] feat: label slot example for text-field and selection controls fixes #600 --- src/data/components.json | 4 +- src/examples/selection-controls/labelSlot.vue | 42 +++++++++++++++++++ src/examples/text-fields/labelSlot.vue | 11 +++++ src/lang/en/components/SelectionControls.json | 4 ++ src/lang/en/components/TextFields.json | 4 ++ .../es-MX/components/SelectionControls.json | 6 ++- src/lang/ko/components/SelectionControls.json | 4 ++ src/lang/ru/components/SelectionControls.json | 4 ++ .../zhHans/components/SelectionControls.json | 4 ++ 9 files changed, 81 insertions(+), 2 deletions(-) create mode 100755 src/examples/selection-controls/labelSlot.vue create mode 100755 src/examples/text-fields/labelSlot.vue diff --git a/src/data/components.json b/src/data/components.json index 038958c0e..244f1ef27 100644 --- a/src/data/components.json +++ b/src/data/components.json @@ -549,7 +549,8 @@ "switchesBoolean", "switchesArray", "switchesStates", - "switchesColors" + "switchesColors", + "labelSlot" ], "spec": false }, @@ -669,6 +670,7 @@ "clearable", "iconEvents", "iconSlots", + "labelSlot", "characterCounter", "password", "validation", diff --git a/src/examples/selection-controls/labelSlot.vue b/src/examples/selection-controls/labelSlot.vue new file mode 100755 index 000000000..b3ab38832 --- /dev/null +++ b/src/examples/selection-controls/labelSlot.vue @@ -0,0 +1,42 @@ + + + diff --git a/src/examples/text-fields/labelSlot.vue b/src/examples/text-fields/labelSlot.vue new file mode 100755 index 000000000..23cbe4fac --- /dev/null +++ b/src/examples/text-fields/labelSlot.vue @@ -0,0 +1,11 @@ + diff --git a/src/lang/en/components/SelectionControls.json b/src/lang/en/components/SelectionControls.json index e8cd54513..14b9fdf83 100644 --- a/src/lang/en/components/SelectionControls.json +++ b/src/lang/en/components/SelectionControls.json @@ -53,6 +53,10 @@ "switchesColors": { "header": "Switches - Colors", "desc": "Switches can be colored by using any of the builtin colors and contextual names using the `color` prop." + }, + "labelSlot": { + "header": "Label slot", + "desc": "Selection controls' labels can be defined in `label` slot - that will allow to use HTML content" } }, "props": { diff --git a/src/lang/en/components/TextFields.json b/src/lang/en/components/TextFields.json index f4bf6badd..8fa7b796b 100644 --- a/src/lang/en/components/TextFields.json +++ b/src/lang/en/components/TextFields.json @@ -31,6 +31,10 @@ "header": "Icon slots", "desc": "Instead of using prepend / append / append-outer icons you can use slots to extend input's functionality." }, + "labelSlot": { + "header": "Label slot", + "desc": "Text field label can be defined in `label` slot - that will allow to use HTML content" + }, "characterCounter": { "header": "Character counter", "desc": "Use a `counter` prop to inform a user of the character limit. The counter does not perform any validation by itself. You will need to pair it with either the internal validation system, or a 3rd party library. You can use it on regular, box or outline text fields." diff --git a/src/lang/es-MX/components/SelectionControls.json b/src/lang/es-MX/components/SelectionControls.json index 01528bf72..259926ea4 100644 --- a/src/lang/es-MX/components/SelectionControls.json +++ b/src/lang/es-MX/components/SelectionControls.json @@ -60,6 +60,10 @@ "switchesColors": { "header": "Switches - Colors", "desc": "Puedes cambiar el color de los switches si usas cualquiera de los colores prefabricados y los nombres contextuales en la prop `color`." + }, + "labelSlot": { + "header": "Label slot", + "desc": "Selection controls' labels can be defined in `label` slot - that will allow to use HTML content" } } ], @@ -74,4 +78,4 @@ "inputValue": "El valor referenciado en **v-model**", "value": "Configura el valor de la selección en el componente" } -} \ No newline at end of file +} diff --git a/src/lang/ko/components/SelectionControls.json b/src/lang/ko/components/SelectionControls.json index 99be27aed..4f37f1447 100644 --- a/src/lang/ko/components/SelectionControls.json +++ b/src/lang/ko/components/SelectionControls.json @@ -54,6 +54,10 @@ "switchesColors": { "header": "스위치 - 색깔", "desc": "`color` prop를 이용하면 스위치를 어떠한 내장 색(builtin colors) 이나 contextual 이름에 대응 하는 색으로 만들 수 있습니다." + }, + "labelSlot": { + "header": "Label slot", + "desc": "Selection controls' labels can be defined in `label` slot - that will allow to use HTML content" } }, "props": { diff --git a/src/lang/ru/components/SelectionControls.json b/src/lang/ru/components/SelectionControls.json index c3b48b548..a36955090 100644 --- a/src/lang/ru/components/SelectionControls.json +++ b/src/lang/ru/components/SelectionControls.json @@ -54,6 +54,10 @@ "switchesColors": { "header": "Switches - Цвета", "desc": "Switches можно покрасить, используя любой из встроенных цветов и контекстных имён, используя свойство `color`." + }, + "labelSlot": { + "header": "Label slot", + "desc": "Selection controls' labels can be defined in `label` slot - that will allow to use HTML content" } }, "props": { diff --git a/src/lang/zhHans/components/SelectionControls.json b/src/lang/zhHans/components/SelectionControls.json index 8c9df7926..3d6afe018 100644 --- a/src/lang/zhHans/components/SelectionControls.json +++ b/src/lang/zhHans/components/SelectionControls.json @@ -54,6 +54,10 @@ "switchesColors": { "header": "开关 - 颜色", "desc": "开关也可以通过 `color` 属性使用内置的颜色来设置色彩。" + }, + "labelSlot": { + "header": "Label slot", + "desc": "Selection controls' labels can be defined in `label` slot - that will allow to use HTML content" } }, "props": { From 4eea8d51f14c2ab0925caba06e7c3588c39693e7 Mon Sep 17 00:00:00 2001 From: Jacek Karczmarczyk Date: Thu, 25 Oct 2018 10:55:01 +0700 Subject: [PATCH 04/14] fix: info about non-existing asterisk fixes #599 --- src/examples/dialogs/form.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/examples/dialogs/form.vue b/src/examples/dialogs/form.vue index a2ab3b907..97d30ca42 100644 --- a/src/examples/dialogs/form.vue +++ b/src/examples/dialogs/form.vue @@ -1,6 +1,6 @@