@madgex/design-system 6.3.8 → 6.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/_tokens/css/_tokens.css +1 -1
  2. package/dist/_tokens/js/_tokens-module.js +1 -1
  3. package/dist/assets/icons-inline.svg +1 -1
  4. package/dist/assets/icons.json +1 -1
  5. package/dist/assets/icons.svg +1 -1
  6. package/dist/css/index.css +1 -1
  7. package/package.json +2 -2
  8. package/src/components/_preview.njk +0 -16
  9. package/src/components/accordion/accordion.config.js +1 -2
  10. package/src/components/accordion/accordion.njk +0 -46
  11. package/src/components/button/button.config.js +1 -1
  12. package/src/components/button/button.njk +0 -36
  13. package/src/components/card/card.config.js +1 -1
  14. package/src/components/icons/icons.config.js +1 -1
  15. package/src/components/icons/icons.njk +0 -78
  16. package/src/components/inputs/checkbox-list/checkbox-list.config.js +1 -1
  17. package/src/components/inputs/checkbox-list/checkbox-list.njk +0 -51
  18. package/src/components/inputs/combobox/combobox.config.js +1 -1
  19. package/src/components/inputs/combobox/combobox.njk +0 -77
  20. package/src/components/inputs/file-upload/file-upload.config.js +1 -1
  21. package/src/components/inputs/input/input.config.js +1 -1
  22. package/src/components/inputs/input/input.njk +0 -63
  23. package/src/components/inputs/label/label.config.js +1 -1
  24. package/src/components/inputs/label/label.njk +0 -35
  25. package/src/components/inputs/radio/radio.config.js +1 -1
  26. package/src/components/inputs/radio/radio.njk +0 -58
  27. package/src/components/inputs/select/select.config.js +1 -1
  28. package/src/components/inputs/single-checkbox/single-checkbox.config.js +1 -1
  29. package/src/components/inputs/single-checkbox/single-checkbox.njk +0 -61
  30. package/src/components/inputs/text-editor/text-editor.config.js +1 -1
  31. package/src/components/inputs/textarea/textarea.config.js +1 -1
  32. package/src/components/modal/modal.config.js +1 -1
  33. package/src/components/notification/notification.config.js +1 -1
  34. package/src/components/pagination/pagination.config.js +1 -1
  35. package/src/components/pagination/pagination.njk +0 -40
  36. package/src/components/pagination-numbers/pagination-numbers.config.js +1 -1
  37. package/src/components/popover/popover.config.js +1 -1
  38. package/src/components/popover/popover.njk +0 -24
  39. package/src/components/section-title/title-with-action.config.js +1 -1
  40. package/src/components/section-title/title.config.js +1 -1
  41. package/src/components/skip-link/skip-link.config.js +1 -1
  42. package/src/components/switch-state/switch-state.config.js +1 -1
  43. package/src/components/tabs/tabs.config.js +1 -1
  44. package/src/components/toggle-button-links/toggle-button-links.config.js +1 -1
  45. package/src/components/toggle-button-links/toggle-button-links.njk +9 -36
  46. package/src/icons/{info.svg → information.svg} +1 -1
  47. package/src/scss/components/__index.scss +0 -2
  48. package/src/scss/constants/_sd-tokens.scss +1 -1
  49. package/src/components/_import-MdsLibrary.njk +0 -7
  50. package/src/components/inputs/checkbox-pill/README.md +0 -18
  51. package/src/components/inputs/checkbox-pill/checkbox-pill.config.js +0 -5
  52. package/src/components/inputs/checkbox-pill/checkbox-pill.njk +0 -87
  53. package/src/components/inputs/checkbox-pill/checkbox-pill.scss +0 -47
  54. package/src/components/inputs/form-item/README.md +0 -28
  55. package/src/components/inputs/form-item/form-item.config.js +0 -5
  56. package/src/components/inputs/form-item/form-item.njk +0 -42
  57. package/src/components/inputs/input-number/README.md +0 -37
  58. package/src/components/inputs/input-number/input-number.config.js +0 -5
  59. package/src/components/inputs/input-number/input-number.njk +0 -68
  60. package/src/components/inputs/input-number/input-number.scss +0 -60
  61. package/tasks/design-system-vue.js +0 -14
@@ -1,6 +1,5 @@
1
1
  {% from "./accordion/_macro.njk" import MdsAccordion %}
2
2
 
3
- <em>Nunjucks</em>
4
3
  <h3>{{ name }}</h3>
5
4
  {{ MdsAccordion({
6
5
  id: id,
@@ -22,48 +21,3 @@
22
21
  ariaLabel: ariaLabel,
23
22
  ariaLabelActive: ariaLabelActive
24
23
  }) }}
25
- <hr />
26
-
27
-
28
- <em>Vue</em>
29
- <h3>{{ name }}</h3>
30
- <div id="vue-{{id}}"></div>
31
-
32
- <script type="module" async>
33
- {% include '_import-MdsLibrary.njk' %}
34
-
35
- vue.createApp({
36
- data() {
37
- return {
38
- isExpanded: false,
39
- hideTriggerLabel: {{hideTriggerLabel or false}},
40
- leftAligned: {{leftAligned or false}},
41
- triggerIsNonClosing: {{triggerIsNonClosing or false}},
42
- expandIcon:"{{expandIcon}}" || undefined,
43
- collapseIcon:"{{collapseIcon}}" || undefined,
44
- };
45
- },
46
- template: `<div>
47
- <MdsAccordion
48
- id="{{id}}"
49
- triggerClasses="{{triggerClasses}}"
50
- activateOnMediaQuery="{{activateOnMediaQuery}}"
51
- :expandIcon="expandIcon"
52
- :collapseIcon="collapseIcon"
53
- :triggerIsNonClosing="triggerIsNonClosing"
54
- :hideTriggerLabel="hideTriggerLabel"
55
- :leftAligned="leftAligned"
56
- v-model:expanded="isExpanded"
57
- >
58
- <template #triggerLabel>{{triggerLabel}}</template>
59
- <template #triggerLabelActive>{{triggerLabelActive}}</template>
60
- {{content | safe}}
61
- </MdsAccordion>
62
- </div>`
63
-
64
- }).use(MdsLibrary).mount('#vue-{{id}}');
65
- </script>
66
- <hr />
67
- <div style="margin-bottom:40px"></div>
68
-
69
-
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  title: 'Buttons',
3
- meta: { status: { njk: 'wip', vue: 'wip' } },
3
+ status: 'wip',
4
4
  context: {
5
5
  items: [
6
6
  { name: 'link-buttons', href: 'http://madgex.com', text: 'Link button 1', id: 'link-1' },
@@ -2,9 +2,6 @@
2
2
  {% from "./button/_macro.njk" import MdsButton %}
3
3
  {% from "./icons/_macro.njk" import MdsIcon %}
4
4
 
5
- <h3>Nunjucks</h3>
6
-
7
- <div class="nunjucks-items">
8
5
  {% for item in items %}
9
6
 
10
7
  {% if item.useIcon %}
@@ -35,38 +32,5 @@
35
32
  {% endif %}
36
33
 
37
34
  {% endfor %}
38
- </div>
39
-
40
- <h3 style="margin-top: 10px">Vue</h3>
41
-
42
- <div id="vue-app">
43
- {% raw %}
44
- <mds-button v-for="item in items"
45
- :element="item.element"
46
- :id="item.id"
47
- :to="item.href"
48
- :class="item.classes"
49
- style="margin-right: 5px"
50
- :value="item.text"
51
- >
52
- <span v-if="item.useIcon"><mds-icon icon-name="search" classes="mds-icon--md" visually-hidden-label="Search Icon" /></span>
53
- <span v-else >{{item.text}}</span>
54
- </mds-button>
55
- {% endraw %}
56
- </div>
57
-
58
- <script type="module" async>
59
- {% include '_import-MdsLibrary.njk' %}
60
- const { MdsButton, MdsIcon } = MdsLibrary;
61
35
 
62
- const items = {{items | dump | safe}};
63
36
 
64
- const app = vue.createApp({
65
- components: { MdsButton, MdsIcon },
66
- data() {
67
- return {
68
- items,
69
- }
70
- },
71
- }).mount('#vue-app');
72
- </script>
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  title: 'Card',
3
3
  label: 'Card',
4
- meta: { status: { njk: 'ready' } },
4
+ status: 'ready',
5
5
  context: {
6
6
  fractalLabel: 'Card',
7
7
  inList: false,
@@ -1,4 +1,4 @@
1
1
  module.exports = {
2
2
  title: 'Icon',
3
- meta: { status: { njk: 'ready', vue: 'wip' } },
3
+ status: 'ready',
4
4
  };
@@ -2,8 +2,6 @@
2
2
 
3
3
  {% from "./icons/_macro.njk" import MdsIcon %}
4
4
 
5
- <em> Nunjucks version </em>
6
-
7
5
  <h2>Different sizes</h2>
8
6
 
9
7
  <p>{{ MdsIcon({
@@ -161,79 +159,3 @@
161
159
  </li>
162
160
  </ul>
163
161
  </div>
164
-
165
- <br><hr><br>
166
-
167
-
168
- {# VUE LIBRARY VERSION #}
169
-
170
- <em>Vue</em>
171
-
172
- <h2>Different sizes</h2>
173
- <p><span id="vue-size-sm"></span> : small (16px)</p>
174
- <p><span id="vue-size-md"></span> : medium (24px)</p>
175
- <p><span id="vue-size-lg"></span> : large (32px)</p>
176
- <p><span id="vue-size-xl"></span> : extra large (48px)</p>
177
- <p><span id="vue-size-xxl"></span> : extra extra large (72px)</p>
178
- <br><hr><br>
179
-
180
- <h2>Icon with text</h2>
181
- <p><span id="vue-text-before"></span> Email me</p>
182
- <p><a href="#">Apply <span id="vue-text-after"></span></a></p>
183
- <br><hr><br>
184
-
185
- <h2>Spinner</h2>
186
- <span id="vue-spinner"></span>
187
- <br><hr><br>
188
-
189
- <h2>Has container</h2>
190
- <span id="vue-has-container"></span>
191
- <br><hr><br>
192
-
193
- <h2>Icons using inline SVG</h2>
194
- <div>
195
- <span>Share this job</span>
196
- <ul class="mds-list mds-list--inline mds-display-inline-block">
197
- {% for item in ['Facebook', 'Twitter', 'LinkedIn', 'Pinterest', 'Reddit'] %}
198
- <li class="mds-list__item">
199
- <a href="#"><span id="vue-social-{{item | lower}}"></span></a>
200
- </li>
201
- {% endfor %}
202
- </ul>
203
- </div>
204
-
205
-
206
- <script async type="module">
207
- {% include '_import-MdsLibrary.njk' %}
208
- const { MdsIcon } = MdsLibrary;
209
-
210
- const variants = [
211
- { id: 'size-sm', iconName: 'star-fill', classes: 'mds-icon--sm' },
212
- { id: 'size-md', iconName: 'star-fill', classes: 'mds-icon--md' },
213
- { id: 'size-lg', iconName: 'star-fill', classes: 'mds-icon--lg' },
214
- { id: 'size-xl', iconName: 'star-fill', classes: 'mds-icon--xl' },
215
- { id: 'size-xxl', iconName: 'star-fill', classes: 'mds-icon--xxl' },
216
- { id: 'text-before', iconName: 'email', classes: 'mds-icon--before' },
217
- { id: 'text-after', iconName: 'chevron-right', classes: 'mds-icon--after' },
218
- { id: 'spinner', iconName: 'spinner', visuallyHiddenLabel:'Loading...' },
219
- { id: 'has-container', iconName: 'cross', classes:'mds-icon--md', visuallyHiddenLabel:'Error', hasContainer:true, containerClasses:'mds-icon-container--circle mds-icon-container--error' },
220
- ...['facebook', 'twitter', 'linkedin', 'pinterest', 'reddit'].map(icon => ({id: `social-${icon}`, iconName: `social-${icon}`, visuallyHiddenLabel: icon}))
221
- ];
222
- variants.forEach((item) => {
223
- vue.createApp({
224
- components: { MdsIcon },
225
- data() {
226
- return {
227
- iconName: item.iconName,
228
- classes: item.classes,
229
- visuallyHiddenLabel: item.visuallyHiddenLabel,
230
- hasContainer: item.hasContainer,
231
- containerClasses: item.containerClasses,
232
- };
233
- },
234
- template: `<MdsIcon :icon-name="iconName" :classes="classes" :visually-hidden-label="visuallyHiddenLabel" :has-container="hasContainer" :container-classes="containerClasses" />` }).mount('#vue-'+item.id);
235
- });
236
- </script>
237
-
238
-
239
-
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  title: 'Checkbox List',
3
- meta: { status: { njk: 'ready', vue: 'wip' } },
3
+ status: 'ready',
4
4
  context: {
5
5
  id: 'checkbox-input',
6
6
  labelText: 'Standard checkbox group',
@@ -1,6 +1,5 @@
1
1
  {% from "./inputs/checkbox-list/_macro.njk" import MdsCheckboxList %}
2
2
 
3
- <em>Nunjucks</em>
4
3
  <div class="mds-form-field">
5
4
  {{ MdsCheckboxList({
6
5
  labelText: labelText,
@@ -19,53 +18,3 @@
19
18
  }) }}
20
19
  </div>
21
20
 
22
-
23
-
24
-
25
- <em>Vue</em>
26
- <div class="mds-form-field">
27
- {% set id = 'vue-'+id %}
28
- <div id="{{id}}"></div>
29
- {% set option = (options[0] or options) %}
30
- <script async type="module">
31
- {% include '_import-MdsLibrary.njk' %}
32
-
33
- let selectedOptions = {{(selectedOptions or []) | dump | safe}};
34
- if(!Array.isArray(selectedOptions)) selectedOptions = [selectedOptions];
35
- vue.createApp({
36
- data() {
37
- return {
38
- options: {{ options | dump | safe}},
39
- i18n: {{(i18n or {}) | dump | safe}},
40
- optional: {{optional or false}},
41
- disabled: {{disabled or false}},
42
- validationError: "{{validationError or ''}}",
43
- helpText: "{{helpText or ''}}",
44
- tooltipMessage: "{{tooltipMessage or ''}}",
45
- selectedOptions,
46
- error: {{state === 'error'}}
47
- };
48
- },
49
- template: `<MdsFormItem fieldset :error="error" :optional="optional">
50
- <template #label>{{labelText | safe}}</template>
51
- <template v-if="helpText" #help>{{helpText}}</template>
52
- <template v-if="validationError" #error>{{validationError}}</template>
53
- <template v-if="tooltipMessage" #tooltip>{{tooltipMessage | safe}}</template>
54
- <MdsCheckboxList
55
- id="{{id}}-vue-version"
56
- name="{{name}}"
57
- describedBy="{{describedBy}}"
58
- class="{{classes}}"
59
- :options="options"
60
- v-model="selectedOptions"
61
- :disabled="disabled"
62
- :i18n="i18n" />
63
- </MdsFormItem>`
64
-
65
- }).use(MdsLibrary).mount('#{{id}}');
66
- </script>
67
-
68
- </div>
69
-
70
-
71
- <div style="margin-bottom:40px"></div>
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  title: 'Combobox',
3
3
  label: 'Combobox',
4
- meta: { status: { njk: 'ready', vue: 'wip' } },
4
+ status: 'ready',
5
5
  variants: [
6
6
  {
7
7
  name: 'default',
@@ -1,7 +1,6 @@
1
1
  {% from "./inputs/combobox/_macro.njk" import MdsCombobox %}
2
2
 
3
3
  {% if not multiple %}
4
- <em>Nunjucks</em>
5
4
 
6
5
  <div class="mds-grid-row">
7
6
  <div class="mds-grid-col-6">
@@ -35,79 +34,3 @@
35
34
  </div>
36
35
  {% endif %}
37
36
 
38
-
39
-
40
-
41
- <em>Vue</em>
42
-
43
- {% set id = "vue-"+ id %}
44
-
45
- <div class="mds-grid-row">
46
- <div class="mds-grid-col-6">
47
- <h3>{{ variantTitle }}</h3>
48
-
49
- <div id="{{id}}"></div>
50
-
51
- <script async type="module">
52
- {% include '_import-MdsLibrary.njk' %}
53
- let options = {{ (options or {}) | dump | safe}};
54
- options = Object.keys(options).map(value => ({value, label: options[value]}))
55
-
56
- vue.createApp({
57
- data() {
58
- return {
59
- options,
60
- i18n: {{(i18n or null) | dump | safe}},
61
- vModel: {{(vModel or null) | dump | safe}},
62
- search: "{{value or ''}}",
63
- optional: {{optional or false}},
64
- multiple: {{multiple or false}},
65
- useAutocomplete: {{useAutocomplete or false}}
66
- };
67
- },
68
- watch: {
69
- search(val) {
70
- this.fetchAutocomplete(val);
71
- },
72
- },
73
- methods: {
74
- async fetchAutocomplete(searchValue) {
75
- if (!this.useAutocomplete) return;
76
- if (searchValue && searchValue.length > 2) {
77
- try {
78
- let res = await fetch(`https://api.datamuse.com/sug?s=${searchValue}`);
79
- res = await res.json();
80
- this.options = res.map(({ word }) => ({ value: word, label: word }));
81
- } catch (e) {
82
- console.log(e);
83
- }
84
- } else {
85
- this.options = [];
86
- }
87
- },
88
- },
89
- template: `<div>
90
- <MdsFormItem input-id="{{id}}" :optional="optional">
91
- <template #label >{{labelText}}</template>
92
- <MdsCombobox
93
- id="{{id}}"
94
- name="{{name}}"
95
- placeholder="{{placeholder}}"
96
- class="{{classes}}"
97
- :options="options"
98
- :multiple="multiple"
99
- :i18n="i18n"
100
- v-model:search="search"
101
- v-model="vModel"
102
- @search="fetchAutocomplete"
103
- />
104
- </MdsFormItem>
105
- </div>`
106
- }).use(MdsLibrary).mount('#{{id}}');
107
- </script>
108
-
109
- </div>
110
- </div>
111
-
112
-
113
- <div style="margin-bottom:40px"></div>
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  title: 'File Upload',
3
- meta: { status: { njk: 'ready' } },
3
+ status: 'ready',
4
4
  context: {
5
5
  labelText: 'Upload a file',
6
6
  helpText: 'Your file must be a .doc, .pdf, .docx, or .rtf. No larger than 1MB',
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  title: 'Input',
3
- meta: { status: { njk: 'ready', vue: 'wip' } },
3
+ status: 'ready',
4
4
  context: {
5
5
  labelText: 'Text input',
6
6
  name: 'Example input',
@@ -1,6 +1,5 @@
1
1
  {% from "./inputs/input/_macro.njk" import MdsInput %}
2
2
 
3
- <em> Nunjucks </em>
4
3
  <div class="mds-grid-row">
5
4
  <div class="mds-grid-col-12 mds-grid-col-md-6">
6
5
  <div class="mds-form-field">
@@ -24,65 +23,3 @@
24
23
  </div>
25
24
  </div>
26
25
  </div>
27
-
28
- <em>Vue</em>
29
- <div class="mds-grid-row" style="margin-bottom:40px">
30
- <div class="mds-grid-col-6">
31
- <div class="mds-form-field">
32
- <div id="vue-{{id}}" >
33
- {% raw %}
34
- <mds-form-item :input-id="`${id}-vue-version`" :optional="optional" class="mds-form-element--input" :error="error" :hide-label="hideLabel">
35
- <template v-if="labelText" #label>{{labelText}}</template>
36
- <template v-if="tooltipMessage" #tooltip>{{tooltipMessage}}</template>
37
- <template v-if="helpText" #help>{{helpText}}</template>
38
- <template v-if="validationError" #error>{{validationError}}</template>
39
- <mds-input
40
- :id="`${id}-vue-version`"
41
- v-model="value"
42
- :name="name"
43
- :type="type"
44
- :placeholder="placeholder"
45
- :error="error"
46
- :class="classes"
47
- :disabled="disabled"
48
- :autocomplete="autocompleteValue"
49
- />
50
- </mds-form-item>
51
- {% endraw %}
52
- </div>
53
- </div>
54
- </div>
55
- </div>
56
-
57
- <script async type="module">
58
- {% include '_import-MdsLibrary.njk' %}
59
- const { MdsFormItem, MdsInput} = MdsLibrary;
60
- const hideLabel = {{hideLabel or false}};
61
- const labelText = "{{labelText | safe}}";
62
- const placeholder = hideLabel ? labelText : "{{placeholder}}";
63
- const autocompleteValue = "{{autocompleteValue}}" ? "{{autocompleteValue}}" : null;
64
-
65
- vue.createApp({
66
- components: { MdsFormItem, MdsInput},
67
- data() {
68
- return {
69
- id: "{{id | safe}}",
70
- name: "{{name | safe}}",
71
- type: "{{type | safe}}",
72
- value: "{{value | safe}}",
73
- labelText,
74
- placeholder,
75
- hideLabel,
76
- classes: "{{classes | safe}}",
77
- helpText: "{{(helpText or '') | safe}}",
78
- tooltipMessage: "{{(tooltipMessage or '') | safe}}",
79
- validationError: "{{(validationError or '') | safe}}",
80
- i18n: {{(i18n or {}) | dump | safe}},
81
- error: {{state === 'error'}},
82
- optional: {{optional or false}},
83
- disabled: {{disabled or false}},
84
- autocompleteValue,
85
- };
86
- },
87
- }).use(MdsLibrary).mount('#vue-{{id}}');
88
- </script>
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  title: 'Label',
3
- meta: { status: { njk: 'ready', vue: 'wip' } },
3
+ status: 'ready',
4
4
  context: {
5
5
  id: 'default',
6
6
  inputId: 'input-default',
@@ -2,8 +2,6 @@
2
2
 
3
3
  <div style="padding: 20px 10px 0 10px; margin: 10px; border: 2px solid lightgrey">
4
4
 
5
-
6
- <em>Nunjucks</em>
7
5
  <div class="mds-form-field">
8
6
  {{ MdsInputLabel({
9
7
  labelText: labelText,
@@ -16,37 +14,4 @@
16
14
  }) }}
17
15
  </div>
18
16
 
19
-
20
- <em>Vue</em>
21
- <div id="vue-{{id}}" class="mds-form-field"></div>
22
-
23
- <script async type="module">
24
- {% include '_import-MdsLibrary.njk' %}
25
-
26
- vue.createApp({
27
- data() {
28
- return {
29
- i18n: {{(i18n or {}) | dump | safe}},
30
- hideLabel: {{hideLabel or false}},
31
- legend: {{element === "legend" or false}},
32
- optional: {{optional or false}},
33
- tooltipMessage: {{(tooltipMessage or false) | dump | safe}}
34
- };
35
- },
36
- template: `
37
- <MdsLabel
38
- inputId="{{id}}"
39
- id="{{id}}"
40
- :optional="optional"
41
- :legend="legend"
42
- :hideLabel="hideLabel"
43
- :i18n="i18n"
44
- >
45
- {{labelText}}
46
- <template #tooltip v-if="tooltipMessage">{{tooltipMessage}}</template>
47
- </MdsLabel>
48
- `
49
-
50
- }).use(MdsLibrary).mount('#vue-{{id}}');
51
- </script>
52
17
  </div>
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  title: 'Radio',
3
- meta: { status: { njk: 'ready', vue: 'wip' } },
3
+ status: 'ready',
4
4
  context: {
5
5
  id: 'radio-input',
6
6
  labelText: 'Standard Radio group',
@@ -1,6 +1,5 @@
1
1
  {% from "./inputs/radio/_macro.njk" import MdsRadio %}
2
2
 
3
- <em>Nunjucks</em>
4
3
  <div class="mds-form-field">
5
4
  {{ MdsRadio({
6
5
  labelText: labelText,
@@ -14,60 +13,3 @@
14
13
  validationError: validationError
15
14
  }) }}
16
15
  </div>
17
-
18
- <em>Vue</em>
19
- <div class="mds-form-field ">
20
- <div id="vue-{{id}}" >
21
- {% raw %}
22
- <mds-form-item :input-id="`${id}-vue-version`" :optional="optional" :error="error" :hide-label="hideLabel" :class="classes">
23
- <template v-if="labelText" #label>{{labelText}}</template>
24
- <template v-if="tooltipMessage" #tooltip>{{tooltipMessage}}</template>
25
- <template v-if="helpText" #help>{{helpText}}</template>
26
- <template v-if="validationError" #error>{{validationError}}</template>
27
- <fieldset>
28
- <mds-radio
29
- v-for="item in options"
30
- v-model="selectedOption"
31
- :name="name"
32
- :id="`${item.id}-vue-version`"
33
- :key="`${item.id}-vue-version`"
34
- :value="item.value"
35
- :class="item.classes"
36
- :disabled="disabled"
37
- >
38
- <span v-html="item.labelText" />
39
- </mds-radio>
40
- </fieldset>
41
- </mds-form-item>
42
- {% endraw %}
43
- </div>
44
- </div>
45
-
46
- <script async type="module">
47
- {% include '_import-MdsLibrary.njk' %}
48
- const { MdsFormItem, MdsRadio} = MdsLibrary;
49
- const hideLabel = {{hideLabel or false}};
50
- const labelText = "{{labelText | safe}}";
51
- const placeholder = hideLabel ? labelText : "{{placeholder}}";
52
-
53
- vue.createApp({
54
- components: { MdsFormItem, MdsRadio},
55
- data() {
56
- return {
57
- id: "{{id | safe}}",
58
- name: "vue-{{id}}",
59
- selectedOption: "{{value | safe}}",
60
- options: {{options | dump | safe}},
61
- labelText,
62
- hideLabel,
63
- classes: "{{classes | safe}}",
64
- helpText: "{{(helpText or '') | safe}}",
65
- tooltipMessage: "{{(tooltipMessage or '') | safe}}",
66
- validationError: "{{(validationError or '') | safe}}",
67
- error: {{state === 'error'}},
68
- optional: {{optional or false}},
69
- disabled: {{disabled or false}},
70
- };
71
- },
72
- }).use(MdsLibrary).mount('#vue-{{id}}');
73
- </script>
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  title: 'Select',
3
- meta: { status: { njk: 'ready' } },
3
+ status: 'ready',
4
4
  context: {
5
5
  labelText: 'Select input',
6
6
  name: 'Select input',
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  title: 'Single checkbox',
3
3
  name: 'Single checkbox',
4
- meta: { status: { njk: 'ready', vue: 'wip' } },
4
+ status: 'ready',
5
5
  context: {
6
6
  id: 'terms-and-conditions',
7
7
  options: [