@mozaic-ds/vue 2.19.0 → 2.19.1
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.
- package/dist/mozaic-vue.css +1 -1
- package/dist/mozaic-vue.d.ts +958 -2090
- package/dist/mozaic-vue.js +18 -18
- package/dist/mozaic-vue.js.map +1 -1
- package/dist/mozaic-vue.umd.cjs +2 -2
- package/dist/mozaic-vue.umd.cjs.map +1 -1
- package/package.json +6 -4
- package/src/components/accordionlist/MAccordionList.figma.ts +16 -16
- package/src/components/accordionlist/MAccordionList.stories.ts +1 -1
- package/src/components/accordionlistitem/MAccordionListItem.figma.ts +9 -5
- package/src/components/accordionlistitem/MAccordionListItem.vue +4 -1
- package/src/components/accordionlistitem/README.md +2 -0
- package/src/components/actionbottombar/MActionBottomBar.figma.ts +7 -7
- package/src/components/actionlistbox/MActionListbox.figma.ts +11 -11
- package/src/components/actionlistbox/MActionListbox.spec.ts +21 -7
- package/src/components/actionlistbox/MActionListbox.vue +15 -4
- package/src/components/avatar/MAvatar.figma.ts +5 -5
- package/src/components/breadcrumb/MBreadcrumb.figma.ts +7 -7
- package/src/components/builtinmenu/MBuiltInMenu.figma.ts +8 -5
- package/src/components/builtinmenu/MBuiltInMenu.spec.ts +3 -1
- package/src/components/button/MButton.figma.ts +21 -6
- package/src/components/callout/MCallout.figma.ts +7 -7
- package/src/components/carousel/MCarousel.figma.ts +10 -10
- package/src/components/checkbox/MCheckbox.figma.ts +10 -10
- package/src/components/checkboxgroup/MCheckboxGroup.figma.ts +7 -7
- package/src/components/checklistmenu/MCheckListMenu.figma.ts +8 -8
- package/src/components/circularprogressbar/MCircularProgressbar.figma.ts +7 -3
- package/src/components/combobox/MCombobox.figma.ts +10 -10
- package/src/components/container/MContainer.figma.ts +5 -5
- package/src/components/datatable/DataTable.stories.ts +33 -7
- package/src/components/datatable/DataTableCells.stories.ts +2 -2
- package/src/components/datatable/DataTableEmpty.stories.ts +2 -2
- package/src/components/datatable/DataTableExpandable.stories.ts +2 -2
- package/src/components/datatable/DataTableNested.stories.ts +1 -1
- package/src/components/datatable/DataTableSelectable.stories.ts +2 -3
- package/src/components/datatable/DataTableSortable.stories.ts +1 -1
- package/src/components/datepicker/MDatepicker.figma.ts +3 -3
- package/src/components/divider/MDivider.figma.ts +3 -3
- package/src/components/drawer/MDrawer.figma.ts +13 -13
- package/src/components/field/MField.figma.ts +9 -5
- package/src/components/fileuploader/MFileUploader.figma.ts +3 -3
- package/src/components/fileuploaderitem/MFileUploaderItem.figma.ts +7 -3
- package/src/components/flag/MFlag.figma.ts +3 -3
- package/src/components/iconbutton/MIconButton.figma.ts +16 -16
- package/src/components/kpiitem/MKpiItem.figma.ts +8 -3
- package/src/components/kpiitem/MKpiItem.spec.ts +11 -12
- package/src/components/kpiitem/MKpiItem.vue +7 -1
- package/src/components/linearprogressbarbuffer/MLinearProgressbarBuffer.figma.ts +6 -3
- package/src/components/linearprogressbarpercentage/MLinearProgressbarPercentage.figma.ts +5 -3
- package/src/components/link/MLink.figma.ts +5 -5
- package/src/components/loader/MLoader.figma.ts +3 -3
- package/src/components/loadingoverlay/MLoadingOverlay.figma.ts +3 -3
- package/src/components/modal/MModal.figma.ts +12 -12
- package/src/components/navigationindicator/MNavigationIndicator.figma.ts +7 -3
- package/src/components/numberbadge/MNumberBadge.figma.ts +7 -3
- package/src/components/optionListbox/MOptionListbox.figma.ts +10 -10
- package/src/components/overlay/MOverlay.figma.ts +5 -5
- package/src/components/pageheader/MPageHeader.figma.ts +3 -3
- package/src/components/pagination/MPagination.figma.ts +10 -10
- package/src/components/passwordinput/MPasswordInput.figma.ts +9 -9
- package/src/components/phonenumber/MPhoneNumber.figma.ts +9 -9
- package/src/components/phonenumber/MPhoneNumber.vue +5 -3
- package/src/components/pincode/MPincode.figma.ts +9 -9
- package/src/components/popover/MPopover.figma.ts +15 -15
- package/src/components/quantityselector/MQuantitySelector.figma.ts +12 -12
- package/src/components/radio/MRadio.figma.ts +9 -9
- package/src/components/radiogroup/MRadioGroup.figma.ts +7 -7
- package/src/components/segmentedcontrol/MSegmentedControl.figma.ts +8 -8
- package/src/components/select/MSelect.figma.ts +11 -11
- package/src/components/sidebar/MSidebar.figma.ts +8 -8
- package/src/components/sidebar/MSidebar.vue +1 -0
- package/src/components/sidebarexpandableitem/MSidebarExpandableItem.figma.ts +8 -5
- package/src/components/sidebarfooter/MSidebarFooter.figma.ts +7 -3
- package/src/components/sidebarheader/MSidebarHeader.figma.ts +3 -3
- package/src/components/sidebarnavitem/MSidebarNavItem.figma.ts +3 -3
- package/src/components/sidebarshortcutitem/MSidebarShortcutItem.figma.ts +3 -3
- package/src/components/starrating/MStarRating.figma.ts +7 -7
- package/src/components/statusbadge/MStatusBadge.figma.ts +3 -3
- package/src/components/statusdot/MStatusDot.figma.ts +3 -3
- package/src/components/statusmessage/MStatusMessage.figma.ts +3 -3
- package/src/components/statusnotification/MStatusNotification.figma.ts +7 -7
- package/src/components/stepperbottombar/MStepperBottomBar.figma.ts +3 -3
- package/src/components/steppercompact/MStepperCompact.figma.ts +8 -3
- package/src/components/stepperinline/MStepperInline.figma.ts +6 -3
- package/src/components/stepperinline/MStepperInline.stories.ts +5 -1
- package/src/components/stepperstacked/MStepperStacked.figma.ts +6 -3
- package/src/components/tabs/MTabs.figma.ts +8 -8
- package/src/components/tag/MTag.figma.ts +3 -3
- package/src/components/textarea/MTextArea.figma.ts +8 -8
- package/src/components/textinput/MTextInput.figma.ts +12 -12
- package/src/components/textinput/README.md +1 -1
- package/src/components/tile/MTile.figma.ts +5 -5
- package/src/components/tileclickable/MTileClickable.figma.ts +6 -6
- package/src/components/tileexpandable/MTileExpandable.figma.ts +6 -6
- package/src/components/tileselectable/MTileSelectable.figma.ts +9 -5
- package/src/components/toaster/MToaster.figma.ts +3 -3
- package/src/components/toggle/MToggle.figma.ts +9 -9
- package/src/components/togglegroup/MToggleGroup.figma.ts +7 -7
- package/src/components/tooltip/MTooltip.figma.ts +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mozaic-ds/vue",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Mozaic-Vue is the Vue.js implementation of ADEO Design system",
|
|
6
6
|
"author": "ADEO - ADEO Design system",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"*.d.ts"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@mozaic-ds/styles": "^2.
|
|
46
|
+
"@mozaic-ds/styles": "^2.23.0",
|
|
47
47
|
"@mozaic-ds/web-fonts": "^1.65.0",
|
|
48
48
|
"postcss-scss": "^4.0.9"
|
|
49
49
|
},
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"@commitlint/cli": "^21.0.1",
|
|
55
55
|
"@commitlint/config-conventional": "^21.0.1",
|
|
56
56
|
"@figma/code-connect": "^1.4.1",
|
|
57
|
+
"@microsoft/api-extractor": "^7.58.7",
|
|
57
58
|
"@mozaic-ds/css-dev-tools": "1.75.0",
|
|
58
59
|
"@mozaic-ds/datatable-vue": "^1.0.0",
|
|
59
60
|
"@mozaic-ds/icons-vue": "^2.5.0",
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
"@vitest/eslint-plugin": "^1.1.38",
|
|
69
70
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
70
71
|
"@vue/eslint-config-typescript": "^14.5.0",
|
|
72
|
+
"@vue/language-core": "^3.3.2",
|
|
71
73
|
"@vue/test-utils": "^2.4.6",
|
|
72
74
|
"dotenv-cli": "^11.0.0",
|
|
73
75
|
"eslint": "^10.0.2",
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
"husky": "^9.1.7",
|
|
79
81
|
"jsdom": "^29.0.0",
|
|
80
82
|
"libphonenumber-js": "^1.12.23",
|
|
81
|
-
"lint-staged": "^
|
|
83
|
+
"lint-staged": "^17.0.5",
|
|
82
84
|
"mdx-mermaid": "^2.0.3",
|
|
83
85
|
"mermaid": "^11.5.0",
|
|
84
86
|
"npm-run-all": "^4.1.5",
|
|
@@ -88,8 +90,8 @@
|
|
|
88
90
|
"storybook": "^10.0.4",
|
|
89
91
|
"storybook-addon-tag-badges": "^3.0.2",
|
|
90
92
|
"typescript": "^6.0.3",
|
|
93
|
+
"unplugin-dts": "^1.0.1",
|
|
91
94
|
"vite": "^8.0.0",
|
|
92
|
-
"vite-plugin-dts": "^4.5.3",
|
|
93
95
|
"vitest": "^4.0.7",
|
|
94
96
|
"vue": "^3.5.13",
|
|
95
97
|
"vue-component-meta": "^3.0.8",
|
|
@@ -22,22 +22,22 @@ figma.connect(
|
|
|
22
22
|
},
|
|
23
23
|
example: ({ appearance }) =>
|
|
24
24
|
html`<script setup>
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
import { MAccordionList, MAccordionListItem } from '@mozaic-ds/vue';
|
|
26
|
+
</script>
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
<MAccordionList appearance=${appearance}>
|
|
29
|
+
<MAccordionListItem id="1" title="Content title">
|
|
30
|
+
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
|
|
31
|
+
</MAccordionListItem>
|
|
32
|
+
<MAccordionListItem id="2" title="Content title">
|
|
33
|
+
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
|
|
34
|
+
</MAccordionListItem>
|
|
35
|
+
<MAccordionListItem id="3" title="Content title">
|
|
36
|
+
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
|
|
37
|
+
</MAccordionListItem>
|
|
38
|
+
<MAccordionListItem id="4" title="Content title">
|
|
39
|
+
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
|
|
40
|
+
</MAccordionListItem>
|
|
41
|
+
</MAccordionList>`,
|
|
42
42
|
},
|
|
43
43
|
);
|
|
@@ -51,7 +51,7 @@ const meta: Meta<typeof MAccordionList> = {
|
|
|
51
51
|
return { args, Wrench32, Project32, Sharpening32, handleUpdate };
|
|
52
52
|
},
|
|
53
53
|
template: `
|
|
54
|
-
<MAccordionList v-bind="args" @update:modelValue="handleUpdate">
|
|
54
|
+
<MAccordionList v-bind="args" v-model="args.modelValue" @update:modelValue="handleUpdate">
|
|
55
55
|
${args.default}
|
|
56
56
|
</MAccordionList>
|
|
57
57
|
`,
|
|
@@ -16,12 +16,16 @@ figma.connect(
|
|
|
16
16
|
},
|
|
17
17
|
example: ({ title, subtitle }) =>
|
|
18
18
|
html`<script setup>
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
import { MAccordionListItem } from '@mozaic-ds/vue';
|
|
20
|
+
</script>
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
<MAccordionListItem
|
|
23
|
+
id="accordion-1"
|
|
24
|
+
title=${title}
|
|
25
|
+
subtitle=${subtitle}
|
|
26
|
+
>
|
|
27
|
+
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
|
|
28
|
+
</MAccordionListItem>`,
|
|
25
29
|
imports: ["import { MAccordionListItem } from '@mozaic-ds/vue'"],
|
|
26
30
|
},
|
|
27
31
|
);
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
<div
|
|
25
25
|
:id="`content-${id}`"
|
|
26
|
-
class="
|
|
26
|
+
:class="{
|
|
27
|
+
'mc-accordion__content': true,
|
|
28
|
+
'mc-accordion__content--open': open,
|
|
29
|
+
}"
|
|
27
30
|
:inert="!open || undefined"
|
|
28
31
|
:aria-labelledby="`accordion-${id}`"
|
|
29
32
|
role="region"
|
|
@@ -15,6 +15,8 @@ If no ID is provided, a unique one is generated automatically. | `string` | - |
|
|
|
15
15
|
| `subtitle` | An optional secondary heading displayed below the title. It provides additional context or detail about the content of the accordion item. | `string` | - |
|
|
16
16
|
| `content` | The main content of the accordion item. This is the information revealed when the accordion is expanded, typically containing text, HTML, or other elements. | `string` | - |
|
|
17
17
|
| `icon` | Icon component to display before the item title. | `Component` | - |
|
|
18
|
+
| `tag` | Heading level for the accordion trigger (h2–h6). Adjust to match the
|
|
19
|
+
heading hierarchy of the page where the accordion is used. | `"h2"` `"h1"` `"h3"` `"h4"` `"h5"` `"h6"` | `"h2"` |
|
|
18
20
|
|
|
19
21
|
## Slots
|
|
20
22
|
|
|
@@ -12,13 +12,13 @@ figma.connect(
|
|
|
12
12
|
},
|
|
13
13
|
example: ({ shadow }) =>
|
|
14
14
|
html`<script setup>
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
import { MActionBottomBar, MButton } from '@mozaic-ds/vue';
|
|
16
|
+
</script>
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<MActionBottomBar shadow=${shadow}>
|
|
19
|
+
<template #right>
|
|
20
|
+
<MButton size="s" appearance="accent">Save</MButton>
|
|
21
|
+
</template>
|
|
22
|
+
</MActionBottomBar>`,
|
|
23
23
|
},
|
|
24
24
|
);
|
|
@@ -10,21 +10,21 @@ figma.connect(
|
|
|
10
10
|
props: {},
|
|
11
11
|
example: () =>
|
|
12
12
|
html`<script setup>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import { MActionListbox, MButton } from '@mozaic-ds/vue';
|
|
14
|
+
import { Copy20, Download20, Trash20 } from '@mozaic-ds/icons-vue';
|
|
15
|
+
</script>
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
<MActionListbox
|
|
18
|
+
title="Listbox title"
|
|
19
|
+
:items="[
|
|
20
20
|
{ id: '1', label: 'Duplicate', icon: Copy20 },
|
|
21
21
|
{ id: '2', label: 'Download', icon: Download20 },
|
|
22
22
|
{ id: '3', label: 'Delete', icon: Trash20, appearance: 'danger', divider: true },
|
|
23
23
|
]"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
>
|
|
25
|
+
<template #activator="{ id }">
|
|
26
|
+
<MButton :popovertarget="id">Open menu</MButton>
|
|
27
|
+
</template>
|
|
28
|
+
</MActionListbox>`,
|
|
29
29
|
},
|
|
30
30
|
);
|
|
@@ -159,7 +159,9 @@ describe('MActionListbox', () => {
|
|
|
159
159
|
const wrapper = mountAttached();
|
|
160
160
|
const buttons = wrapper.findAll('button[role="menuitem"]');
|
|
161
161
|
await buttons[0].element.focus();
|
|
162
|
-
await wrapper
|
|
162
|
+
await wrapper
|
|
163
|
+
.find('ul[role="menu"]')
|
|
164
|
+
.trigger('keydown', { key: 'ArrowDown' });
|
|
163
165
|
expect(document.activeElement).toBe(buttons[1].element);
|
|
164
166
|
wrapper.unmount();
|
|
165
167
|
});
|
|
@@ -168,7 +170,9 @@ describe('MActionListbox', () => {
|
|
|
168
170
|
const wrapper = mountAttached();
|
|
169
171
|
const buttons = wrapper.findAll('button[role="menuitem"]');
|
|
170
172
|
await buttons[buttons.length - 1].element.focus();
|
|
171
|
-
await wrapper
|
|
173
|
+
await wrapper
|
|
174
|
+
.find('ul[role="menu"]')
|
|
175
|
+
.trigger('keydown', { key: 'ArrowDown' });
|
|
172
176
|
expect(document.activeElement).toBe(buttons[0].element);
|
|
173
177
|
wrapper.unmount();
|
|
174
178
|
});
|
|
@@ -177,7 +181,9 @@ describe('MActionListbox', () => {
|
|
|
177
181
|
const wrapper = mountAttached();
|
|
178
182
|
const buttons = wrapper.findAll('button[role="menuitem"]');
|
|
179
183
|
await buttons[1].element.focus();
|
|
180
|
-
await wrapper
|
|
184
|
+
await wrapper
|
|
185
|
+
.find('ul[role="menu"]')
|
|
186
|
+
.trigger('keydown', { key: 'ArrowUp' });
|
|
181
187
|
expect(document.activeElement).toBe(buttons[0].element);
|
|
182
188
|
wrapper.unmount();
|
|
183
189
|
});
|
|
@@ -186,7 +192,9 @@ describe('MActionListbox', () => {
|
|
|
186
192
|
const wrapper = mountAttached();
|
|
187
193
|
const buttons = wrapper.findAll('button[role="menuitem"]');
|
|
188
194
|
await buttons[0].element.focus();
|
|
189
|
-
await wrapper
|
|
195
|
+
await wrapper
|
|
196
|
+
.find('ul[role="menu"]')
|
|
197
|
+
.trigger('keydown', { key: 'ArrowUp' });
|
|
190
198
|
expect(document.activeElement).toBe(buttons[buttons.length - 1].element);
|
|
191
199
|
wrapper.unmount();
|
|
192
200
|
});
|
|
@@ -211,7 +219,9 @@ describe('MActionListbox', () => {
|
|
|
211
219
|
|
|
212
220
|
it('Escape emits "close"', async () => {
|
|
213
221
|
const wrapper = mountAttached();
|
|
214
|
-
await wrapper
|
|
222
|
+
await wrapper
|
|
223
|
+
.find('ul[role="menu"]')
|
|
224
|
+
.trigger('keydown', { key: 'Escape' });
|
|
215
225
|
expect(wrapper.emitted('close')).toBeTruthy();
|
|
216
226
|
wrapper.unmount();
|
|
217
227
|
});
|
|
@@ -227,9 +237,13 @@ describe('MActionListbox', () => {
|
|
|
227
237
|
attachTo: document.body,
|
|
228
238
|
global: { components: { MDivider, MIconButton, Cross24 } },
|
|
229
239
|
});
|
|
230
|
-
const enabledButtons = wrapper.findAll(
|
|
240
|
+
const enabledButtons = wrapper.findAll(
|
|
241
|
+
'button[role="menuitem"]:not([disabled])',
|
|
242
|
+
);
|
|
231
243
|
await enabledButtons[0].element.focus();
|
|
232
|
-
await wrapper
|
|
244
|
+
await wrapper
|
|
245
|
+
.find('ul[role="menu"]')
|
|
246
|
+
.trigger('keydown', { key: 'ArrowDown' });
|
|
233
247
|
expect(document.activeElement).toBe(enabledButtons[1].element);
|
|
234
248
|
wrapper.unmount();
|
|
235
249
|
});
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
@toggle="onPopoverToggle"
|
|
13
13
|
>
|
|
14
14
|
<div class="mc-listbox__header">
|
|
15
|
-
<h3 v-if="title" :id="`${id}-title`" class="mc-listbox__title">
|
|
15
|
+
<h3 v-if="title" :id="`${id}-title`" class="mc-listbox__title">
|
|
16
|
+
{{ title }}
|
|
17
|
+
</h3>
|
|
16
18
|
<MIconButton
|
|
17
19
|
class="mc-listbox__close"
|
|
18
20
|
ghost
|
|
@@ -44,7 +46,8 @@
|
|
|
44
46
|
:class="[
|
|
45
47
|
'mc-action-list__element',
|
|
46
48
|
{
|
|
47
|
-
'mc-action-list__element--danger':
|
|
49
|
+
'mc-action-list__element--danger':
|
|
50
|
+
item.appearance === 'danger',
|
|
48
51
|
'mc-action-list__element--disabled': item.disabled,
|
|
49
52
|
},
|
|
50
53
|
]"
|
|
@@ -76,7 +79,13 @@
|
|
|
76
79
|
</template>
|
|
77
80
|
|
|
78
81
|
<script setup lang="ts">
|
|
79
|
-
import {
|
|
82
|
+
import {
|
|
83
|
+
nextTick,
|
|
84
|
+
useId,
|
|
85
|
+
useTemplateRef,
|
|
86
|
+
type Component,
|
|
87
|
+
type VNode,
|
|
88
|
+
} from 'vue';
|
|
80
89
|
import MIconButton from '../iconbutton/MIconButton.vue';
|
|
81
90
|
import MDivider from '../divider/MDivider.vue';
|
|
82
91
|
import { Cross24 } from '@mozaic-ds/icons-vue';
|
|
@@ -153,7 +162,9 @@ const menuEl = useTemplateRef('menuEl');
|
|
|
153
162
|
|
|
154
163
|
function getMenuItems(): HTMLButtonElement[] {
|
|
155
164
|
return Array.from(
|
|
156
|
-
menuEl.value?.querySelectorAll<HTMLButtonElement>(
|
|
165
|
+
menuEl.value?.querySelectorAll<HTMLButtonElement>(
|
|
166
|
+
'button[role="menuitem"]:not(:disabled)',
|
|
167
|
+
) ?? [],
|
|
157
168
|
);
|
|
158
169
|
}
|
|
159
170
|
|
|
@@ -21,11 +21,11 @@ figma.connect(
|
|
|
21
21
|
},
|
|
22
22
|
example: ({ size }) =>
|
|
23
23
|
html`<script setup>
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
import { MAvatar } from '@mozaic-ds/vue';
|
|
25
|
+
</script>
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
<MAvatar size=${size}>
|
|
28
|
+
<img src="/placeholder.png" alt="Avatar" />
|
|
29
|
+
</MAvatar>`,
|
|
30
30
|
},
|
|
31
31
|
);
|
|
@@ -15,17 +15,17 @@ figma.connect(
|
|
|
15
15
|
},
|
|
16
16
|
example: ({ appearance }) =>
|
|
17
17
|
html`<script setup>
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
import { MBreadcrumb } from '@mozaic-ds/vue';
|
|
19
|
+
</script>
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
<MBreadcrumb
|
|
22
|
+
appearance=${appearance}
|
|
23
|
+
:links="[
|
|
24
24
|
{ label: 'Home', href: '#' },
|
|
25
25
|
{ label: 'Level 01', href: '#' },
|
|
26
26
|
{ label: 'Current Page', href: '#' },
|
|
27
27
|
]"
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
aria-label="breadcrumb"
|
|
29
|
+
></MBreadcrumb>`,
|
|
30
30
|
},
|
|
31
31
|
);
|
|
@@ -9,15 +9,18 @@ figma.connect(
|
|
|
9
9
|
{
|
|
10
10
|
props: {
|
|
11
11
|
outlined: figma.enum('is outlined', {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
true: true,
|
|
13
|
+
false: false,
|
|
14
14
|
}),
|
|
15
15
|
},
|
|
16
16
|
example: ({ outlined }) =>
|
|
17
17
|
html`<script setup>
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
import { MBuiltInMenu } from '@mozaic-ds/vue';
|
|
19
|
+
</script>
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
<MBuiltInMenu
|
|
22
|
+
:items="[{ label: 'Label' }, { label: 'Label' }]"
|
|
23
|
+
outlined=${outlined}
|
|
24
|
+
/>`,
|
|
22
25
|
},
|
|
23
26
|
);
|
|
@@ -120,7 +120,9 @@ describe('MBuiltInMenu', () => {
|
|
|
120
120
|
const wrapper = mount(MBuiltInMenu, {
|
|
121
121
|
props: { items, label: 'Settings navigation' },
|
|
122
122
|
});
|
|
123
|
-
expect(wrapper.find('nav').attributes('aria-label')).toBe(
|
|
123
|
+
expect(wrapper.find('nav').attributes('aria-label')).toBe(
|
|
124
|
+
'Settings navigation',
|
|
125
|
+
);
|
|
124
126
|
});
|
|
125
127
|
|
|
126
128
|
it('sets aria-hidden on ChevronRight and item icons', () => {
|
|
@@ -29,13 +29,28 @@ figma.connect(
|
|
|
29
29
|
outlined: figma.enum('Type', { Outlined: true }),
|
|
30
30
|
ghost: figma.enum('Type', { Ghost: true }),
|
|
31
31
|
},
|
|
32
|
-
example: ({
|
|
32
|
+
example: ({
|
|
33
|
+
label,
|
|
34
|
+
appearance,
|
|
35
|
+
size,
|
|
36
|
+
disabled,
|
|
37
|
+
isLoading,
|
|
38
|
+
outlined,
|
|
39
|
+
ghost,
|
|
40
|
+
}) =>
|
|
33
41
|
html`<script setup>
|
|
34
|
-
|
|
35
|
-
|
|
42
|
+
import { MButton } from '@mozaic-ds/vue';
|
|
43
|
+
</script>
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
<MButton
|
|
46
|
+
appearance=${appearance}
|
|
47
|
+
size=${size}
|
|
48
|
+
disabled=${disabled}
|
|
49
|
+
:is-loading=${isLoading}
|
|
50
|
+
outlined=${outlined}
|
|
51
|
+
ghost=${ghost}
|
|
52
|
+
>
|
|
53
|
+
${label}
|
|
54
|
+
</MButton>`,
|
|
40
55
|
},
|
|
41
56
|
);
|
|
@@ -17,13 +17,13 @@ figma.connect(
|
|
|
17
17
|
},
|
|
18
18
|
example: ({ appearance }) =>
|
|
19
19
|
html`<script setup>
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
import { MCallout } from '@mozaic-ds/vue';
|
|
21
|
+
</script>
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
<MCallout
|
|
24
|
+
title="This is a title, be concise and use the description message to give details."
|
|
25
|
+
description="Description message."
|
|
26
|
+
appearance=${appearance}
|
|
27
|
+
></MCallout>`,
|
|
28
28
|
},
|
|
29
29
|
);
|
|
@@ -17,16 +17,16 @@ figma.connect(
|
|
|
17
17
|
},
|
|
18
18
|
example: () =>
|
|
19
19
|
html`<script setup>
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
import { MCarousel } from '@mozaic-ds/vue';
|
|
21
|
+
</script>
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
<MCarousel>
|
|
24
|
+
<template #header>
|
|
25
|
+
<h2>Carousel title</h2>
|
|
26
|
+
</template>
|
|
27
|
+
<div>Slide 1</div>
|
|
28
|
+
<div>Slide 2</div>
|
|
29
|
+
<div>Slide 3</div>
|
|
30
|
+
</MCarousel>`,
|
|
31
31
|
},
|
|
32
32
|
);
|
|
@@ -30,16 +30,16 @@ figma.connect(
|
|
|
30
30
|
},
|
|
31
31
|
example: ({ modelValue, indeterminate, disabled, isInvalid }) =>
|
|
32
32
|
html`<script setup>
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
import { MCheckbox } from '@mozaic-ds/vue';
|
|
34
|
+
</script>
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
<MCheckbox
|
|
37
|
+
id="checkbox-id"
|
|
38
|
+
label="Checkbox Label"
|
|
39
|
+
:model-value=${modelValue}
|
|
40
|
+
:indeterminate=${indeterminate}
|
|
41
|
+
disabled=${disabled}
|
|
42
|
+
:is-invalid=${isInvalid}
|
|
43
|
+
></MCheckbox>`,
|
|
44
44
|
},
|
|
45
45
|
);
|
|
@@ -15,16 +15,16 @@ figma.connect(
|
|
|
15
15
|
},
|
|
16
16
|
example: ({ inline }) =>
|
|
17
17
|
html`<script setup>
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
import { MCheckboxGroup } from '@mozaic-ds/vue';
|
|
19
|
+
</script>
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
<MCheckboxGroup
|
|
22
|
+
name="group"
|
|
23
|
+
:options="[
|
|
24
24
|
{ id: '1', label: 'Option 1', value: '1' },
|
|
25
25
|
{ id: '2', label: 'Option 2', value: '2' },
|
|
26
26
|
]"
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
inline=${inline}
|
|
28
|
+
/>`,
|
|
29
29
|
},
|
|
30
30
|
);
|
|
@@ -9,21 +9,21 @@ figma.connect(
|
|
|
9
9
|
{
|
|
10
10
|
props: {
|
|
11
11
|
outlined: figma.enum('is outlined', {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
true: true,
|
|
13
|
+
false: false,
|
|
14
14
|
}),
|
|
15
15
|
},
|
|
16
16
|
example: ({ outlined }) =>
|
|
17
17
|
html`<script setup>
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
import { MCheckListMenu } from '@mozaic-ds/vue';
|
|
19
|
+
</script>
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
<MCheckListMenu
|
|
22
|
+
:items="[
|
|
23
23
|
{ label: 'Label', checked: true },
|
|
24
24
|
{ label: 'Label', checked: false },
|
|
25
25
|
]"
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
outlined=${outlined}
|
|
27
|
+
/>`,
|
|
28
28
|
},
|
|
29
29
|
);
|
|
@@ -23,9 +23,13 @@ figma.connect(
|
|
|
23
23
|
},
|
|
24
24
|
example: ({ size, value }) =>
|
|
25
25
|
html`<script setup>
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
import { MCircularProgressbar } from '@mozaic-ds/vue';
|
|
27
|
+
</script>
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
<MCircularProgressbar
|
|
30
|
+
size=${size}
|
|
31
|
+
:value=${value}
|
|
32
|
+
aria-label="Progress bar"
|
|
33
|
+
></MCircularProgressbar>`,
|
|
30
34
|
},
|
|
31
35
|
);
|
|
@@ -33,16 +33,16 @@ figma.connect(
|
|
|
33
33
|
},
|
|
34
34
|
example: ({ size, disabled, readonly, isInvalid }) =>
|
|
35
35
|
html`<script setup>
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
import { MCombobox } from '@mozaic-ds/vue';
|
|
37
|
+
</script>
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
<MCombobox
|
|
40
|
+
id="combobox-id"
|
|
41
|
+
size=${size}
|
|
42
|
+
disabled=${disabled}
|
|
43
|
+
readonly=${readonly}
|
|
44
|
+
:is-invalid=${isInvalid}
|
|
45
|
+
:options="[{ label: 'Option 1', value: 'option1' }, { label: 'Option 2', value: 'option2' }]"
|
|
46
|
+
></MCombobox>`,
|
|
47
47
|
},
|
|
48
48
|
);
|
|
@@ -20,11 +20,11 @@ figma.connect(
|
|
|
20
20
|
},
|
|
21
21
|
example: () =>
|
|
22
22
|
html`<script setup>
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
import { MContainer } from '@mozaic-ds/vue';
|
|
24
|
+
</script>
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
<MContainer>
|
|
27
|
+
<p>Container content</p>
|
|
28
|
+
</MContainer>`,
|
|
29
29
|
},
|
|
30
30
|
);
|