@mozaic-ds/vue 2.15.0 → 2.17.0

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 (125) hide show
  1. package/dist/mozaic-vue.css +2 -1
  2. package/dist/mozaic-vue.d.ts +1040 -408
  3. package/dist/mozaic-vue.js +17183 -6742
  4. package/dist/mozaic-vue.js.map +1 -1
  5. package/dist/mozaic-vue.umd.cjs +26 -6
  6. package/dist/mozaic-vue.umd.cjs.map +1 -1
  7. package/package.json +11 -5
  8. package/src/components/BrandPresets.mdx +2 -2
  9. package/src/components/ComponentsMapping.mdx +98 -0
  10. package/src/components/accordionlist/MAccordionList.figma.ts +43 -0
  11. package/src/components/accordionlistitem/MAccordionListItem.figma.ts +27 -0
  12. package/src/components/actionbottombar/MActionBottomBar.figma.ts +24 -0
  13. package/src/components/actionlistbox/MActionListbox.figma.ts +30 -0
  14. package/src/components/actionlistbox/MActionListbox.spec.ts +14 -0
  15. package/src/components/actionlistbox/MActionListbox.stories.ts +15 -8
  16. package/src/components/actionlistbox/MActionListbox.vue +13 -1
  17. package/src/components/actionlistbox/README.md +2 -1
  18. package/src/components/avatar/MAvatar.figma.ts +31 -0
  19. package/src/components/breadcrumb/MBreadcrumb.figma.ts +31 -0
  20. package/src/components/builtinmenu/MBuiltInMenu.figma.ts +23 -0
  21. package/src/components/button/MButton.figma.ts +41 -0
  22. package/src/components/button/README.md +2 -0
  23. package/src/components/callout/MCallout.figma.ts +29 -0
  24. package/src/components/carousel/MCarousel.figma.ts +32 -0
  25. package/src/components/checkbox/MCheckbox.figma.ts +45 -0
  26. package/src/components/checkboxgroup/MCheckboxGroup.figma.ts +30 -0
  27. package/src/components/checklistmenu/MCheckListMenu.figma.ts +29 -0
  28. package/src/components/circularprogressbar/MCircularProgressbar.figma.ts +31 -0
  29. package/src/components/combobox/MCombobox.figma.ts +48 -0
  30. package/src/components/combobox/MCombobox.spec.ts +246 -0
  31. package/src/components/combobox/MCombobox.stories.ts +190 -0
  32. package/src/components/combobox/MCombobox.vue +286 -0
  33. package/src/components/combobox/README.md +52 -0
  34. package/src/components/container/MContainer.figma.ts +30 -0
  35. package/src/components/datatable/DataTable.stories.ts +277 -0
  36. package/src/components/datatable/DataTableCells.stories.ts +251 -0
  37. package/src/components/datatable/DataTableEmpty.stories.ts +102 -0
  38. package/src/components/datatable/DataTableExpandable.stories.ts +95 -0
  39. package/src/components/datatable/DataTableNested.stories.ts +96 -0
  40. package/src/components/datatable/DataTableSelectable.stories.ts +124 -0
  41. package/src/components/datatable/DataTableSortable.stories.ts +164 -0
  42. package/src/components/datatable/MDataTable.types.ts +54 -0
  43. package/src/components/datatable/assets/styles.scss +10 -0
  44. package/src/components/datatable/datatable.mdx +62 -0
  45. package/src/components/datatable/tools/data.js +8 -0
  46. package/src/components/datatable/tools/data.json +2018 -0
  47. package/src/components/datatable/utils.js +19 -0
  48. package/src/components/datepicker/MDatepicker.figma.ts +20 -0
  49. package/src/components/divider/MDivider.figma.ts +30 -0
  50. package/src/components/drawer/MDrawer.figma.ts +37 -0
  51. package/src/components/drawer/README.md +1 -1
  52. package/src/components/field/MField.figma.ts +30 -0
  53. package/src/components/field/MField.stories.ts +105 -0
  54. package/src/components/fileuploader/MFileUploader.figma.ts +23 -0
  55. package/src/components/fileuploaderitem/MFileUploaderItem.figma.ts +27 -0
  56. package/src/components/flag/MFlag.figma.ts +26 -0
  57. package/src/components/iconbutton/MIconButton.figma.ts +54 -0
  58. package/src/components/kpiitem/MKpiItem.figma.ts +33 -0
  59. package/src/components/linearprogressbarbuffer/MLinearProgressbarBuffer.figma.ts +31 -0
  60. package/src/components/linearprogressbarpercentage/MLinearProgressbarPercentage.figma.ts +26 -0
  61. package/src/components/link/MLink.figma.ts +32 -0
  62. package/src/components/loader/MLoader.figma.ts +30 -0
  63. package/src/components/loadingoverlay/MLoadingOverlay.figma.ts +18 -0
  64. package/src/components/modal/MModal.figma.ts +27 -0
  65. package/src/components/navigationindicator/MNavigationIndicator.figma.ts +24 -0
  66. package/src/components/numberbadge/MNumberBadge.figma.ts +31 -0
  67. package/src/components/optionListbox/MOptionListbox.figma.ts +36 -0
  68. package/src/components/optionListbox/MOptionListbox.spec.ts +527 -0
  69. package/src/components/optionListbox/MOptionListbox.vue +470 -0
  70. package/src/components/optionListbox/README.md +63 -0
  71. package/src/components/overlay/MOverlay.figma.ts +20 -0
  72. package/src/components/pageheader/MPageHeader.figma.ts +21 -0
  73. package/src/components/pagination/MPagination.figma.ts +34 -0
  74. package/src/components/passwordinput/MPasswordInput.figma.ts +30 -0
  75. package/src/components/phonenumber/MPhoneNumber.figma.ts +47 -0
  76. package/src/components/pincode/MPincode.figma.ts +41 -0
  77. package/src/components/pincode/MPincode.spec.ts +1 -4
  78. package/src/components/pincode/MPincode.vue +11 -15
  79. package/src/components/popover/MPopover.figma.ts +42 -0
  80. package/src/components/quantityselector/MQuantitySelector.figma.ts +50 -0
  81. package/src/components/radio/MRadio.figma.ts +40 -0
  82. package/src/components/radiogroup/MRadioGroup.figma.ts +30 -0
  83. package/src/components/segmentedcontrol/MSegmentedControl.figma.ts +33 -0
  84. package/src/components/select/MSelect.figma.ts +49 -0
  85. package/src/components/sidebar/MSidebar.figma.ts +28 -0
  86. package/src/components/sidebarexpandableitem/MSidebarExpandableItem.figma.ts +19 -0
  87. package/src/components/sidebarfooter/MSidebarFooter.figma.ts +21 -0
  88. package/src/components/sidebarheader/MSidebarHeader.figma.ts +18 -0
  89. package/src/components/sidebarnavitem/MSidebarNavItem.figma.ts +23 -0
  90. package/src/components/sidebarshortcutitem/MSidebarShortcutItem.figma.ts +20 -0
  91. package/src/components/starrating/MStarRating.figma.ts +35 -0
  92. package/src/components/statusbadge/MStatusBadge.figma.ts +27 -0
  93. package/src/components/statusdot/MStatusDot.figma.ts +31 -0
  94. package/src/components/statusmessage/MStatusMessage.figma.ts +28 -0
  95. package/src/components/statusmessage/MStatusMessage.spec.ts +15 -0
  96. package/src/components/statusmessage/MStatusMessage.stories.ts +4 -0
  97. package/src/components/statusmessage/MStatusMessage.vue +7 -0
  98. package/src/components/statusmessage/README.md +2 -0
  99. package/src/components/statusnotification/MStatusNotification.figma.ts +29 -0
  100. package/src/components/stepperbottombar/MStepperBottomBar.figma.ts +20 -0
  101. package/src/components/steppercompact/MStepperCompact.figma.ts +21 -0
  102. package/src/components/stepperinline/MStepperInline.figma.ts +23 -0
  103. package/src/components/stepperstacked/MStepperStacked.figma.ts +23 -0
  104. package/src/components/stepperstacked/MStepperStacked.spec.ts +162 -0
  105. package/src/components/stepperstacked/MStepperStacked.stories.ts +57 -0
  106. package/src/components/stepperstacked/MStepperStacked.vue +106 -0
  107. package/src/components/stepperstacked/README.md +15 -0
  108. package/src/components/tabs/MTabs.figma.ts +33 -0
  109. package/src/components/tag/MTag.figma.ts +26 -0
  110. package/src/components/tag/MTag.stories.ts +13 -3
  111. package/src/components/tag/MTag.vue +11 -1
  112. package/src/components/tag/README.md +6 -0
  113. package/src/components/textarea/MTextArea.figma.ts +28 -0
  114. package/src/components/textinput/MTextInput.figma.ts +51 -0
  115. package/src/components/textinput/MTextInput.vue +13 -1
  116. package/src/components/textinput/README.md +15 -1
  117. package/src/components/tile/MTile.figma.ts +31 -0
  118. package/src/components/tileclickable/MTileClickable.figma.ts +31 -0
  119. package/src/components/tileexpandable/MTileExpandable.figma.ts +31 -0
  120. package/src/components/tileselectable/MTileSelectable.figma.ts +29 -0
  121. package/src/components/toaster/MToaster.figma.ts +25 -0
  122. package/src/components/toggle/MToggle.figma.ts +39 -0
  123. package/src/components/togglegroup/MToggleGroup.figma.ts +30 -0
  124. package/src/components/tooltip/MTooltip.figma.ts +29 -0
  125. package/src/main.ts +1 -0
@@ -0,0 +1,19 @@
1
+ import { deals } from './tools/data';
2
+
3
+ export const addlDeals = deals;
4
+ export const deals10 = [...deals.slice(0, 10)];
5
+ export const deals25 = [...deals.slice(0, 25)];
6
+ export const deals50 = [...deals.slice(0, 50)];
7
+ export const deals75 = [...deals.slice(0, 75)];
8
+ export const deals100 = [...deals.slice(0, 100)];
9
+
10
+ export const args = {
11
+ items: deals10,
12
+ };
13
+
14
+ export const backgrounds = {
15
+ default: 'datatable',
16
+ values: [{ name: 'datatable', value: '#EAEDEF' }],
17
+ };
18
+
19
+ export const formatDate = (date) => new Date(date).toLocaleString();
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Code Connect mapping for MDatepicker
3
+ * Links Figma Date picker (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=6-29074',
9
+ {
10
+ props: {
11
+ showFieldLabel: figma.boolean('Show Field label'),
12
+ },
13
+ example: () =>
14
+ html`<script setup>
15
+ import { MDatepicker } from '@mozaic-ds/vue';
16
+ </script>
17
+
18
+ <MDatepicker id="datepicker" />`,
19
+ },
20
+ );
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Code Connect mapping for MDivider
3
+ * Links Figma Divider (Horizontal) (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=6-26971',
9
+ {
10
+ props: {
11
+ appearance: figma.enum('Style', {
12
+ Primary: 'primary',
13
+ Secondary: 'secondary',
14
+ Tertiary: 'tertiary',
15
+ Inverse: 'inverse',
16
+ }),
17
+ size: figma.enum('Size', {
18
+ 'S (1px)': 's',
19
+ 'M (4px)': 'm',
20
+ 'L (8px)': 'l',
21
+ }),
22
+ },
23
+ example: ({ appearance, size }) =>
24
+ html`<script setup>
25
+ import { MDivider } from '@mozaic-ds/vue';
26
+ </script>
27
+
28
+ <MDivider appearance=${appearance} size=${size} />`,
29
+ },
30
+ );
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Code Connect mapping for MDrawer
3
+ * Links Figma Drawer (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5-6717',
9
+ {
10
+ props: {
11
+ position: figma.enum('Left alignment', {
12
+ True: 'left',
13
+ False: 'right',
14
+ }),
15
+ extended: figma.enum('Is extended (only from M)', {
16
+ True: true,
17
+ False: false,
18
+ }),
19
+ },
20
+ example: ({ position, extended }) =>
21
+ html`<script setup>
22
+ import { MDrawer, MButton } from '@mozaic-ds/vue';
23
+ </script>
24
+
25
+ <MDrawer
26
+ open
27
+ title="Drawer title"
28
+ :position=${position}
29
+ :extended=${extended}
30
+ >
31
+ <p>Drawer content</p>
32
+ <template #footer>
33
+ <MButton>Confirm</MButton>
34
+ </template>
35
+ </MDrawer>`,
36
+ },
37
+ );
@@ -27,8 +27,8 @@ A drawer is a sliding panel that appears from the side of the screen, providing
27
27
 
28
28
  | Name | Description | Type |
29
29
  | --- | --- | --- |
30
- | `back` | Emits when click back button of the drawer. | [] |
31
30
  | `update:open` | Emits when the drawer open state changes, updating the modelValue prop. | [value: boolean] |
31
+ | `back` | Emits when click back button of the drawer. | [] |
32
32
 
33
33
  ## Dependencies
34
34
 
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Code Connect mapping for MField
3
+ * Links Figma _Field label to @mozaic-ds/vue
4
+ *
5
+ * MField is a wrapper that encompasses form inputs. The default slot accepts any
6
+ * form component: MTextInput, MTextArea, MSelect, MCombobox, MPasswordInput,
7
+ * MPhoneNumber, MPincode, MQuantitySelector, etc.
8
+ */
9
+ import figma, { html } from '@figma/code-connect/html';
10
+
11
+ figma.connect(
12
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=6-29469',
13
+ {
14
+ props: {
15
+ label: figma.string('Label'),
16
+ requirementText: figma.enum('Necessity indicator', {
17
+ True: 'required',
18
+ False: '',
19
+ }),
20
+ },
21
+ example: ({ label, requirementText }) =>
22
+ html`<script setup>
23
+ import { MField, MTextInput } from '@mozaic-ds/vue';
24
+ </script>
25
+
26
+ <MField id="field-id" label=${label} requirement-text=${requirementText}>
27
+ <MTextInput id="field-id" placeholder="Placeholder"></MTextInput>
28
+ </MField>`,
29
+ },
30
+ );
@@ -5,6 +5,8 @@ import MField from './MField.vue';
5
5
  import MTextInput from '../textinput/MTextInput.vue';
6
6
  import MTextArea from '../textarea/MTextArea.vue';
7
7
  import MSelect from '../select/MSelect.vue';
8
+ import MCombobox from '../combobox/MCombobox.vue';
9
+ import { ref } from 'vue';
8
10
 
9
11
  const meta: Meta<typeof MField> = {
10
12
  title: 'Form Elements/Field',
@@ -383,3 +385,106 @@ export const SelectInvalid: Story = {
383
385
  `,
384
386
  }),
385
387
  };
388
+
389
+ export const ComboboxValid: Story = {
390
+ args: {
391
+ label: 'Label',
392
+ id: 'comboboxValidId',
393
+ requirementText: 'required',
394
+ helpText: 'Help text',
395
+ isValid: true,
396
+ message: 'Validation message (Be concise and use comprehensive words).',
397
+ default: `
398
+ <MCombobox
399
+ v-model="value"
400
+ :options="
401
+ [
402
+ {
403
+ label: 'Option 1',
404
+ value: 'option1',
405
+ },
406
+ {
407
+ label: 'Option 2',
408
+ value: 'option2',
409
+ },
410
+ {
411
+ label: 'Option 3',
412
+ value: 'option3',
413
+ },
414
+ {
415
+ label: 'Option 4',
416
+ value: 'option4',
417
+ },
418
+ ]
419
+ "
420
+ @update:modelValue="handleUpdate"
421
+ />
422
+ `,
423
+ },
424
+ render: (args) => ({
425
+ components: { MField, MCombobox },
426
+ setup() {
427
+ const value = ref(null);
428
+ const handleUpdate = action('update:modelValue');
429
+
430
+ return { args, handleUpdate, value };
431
+ },
432
+ template: `
433
+ <MField v-bind="args">
434
+ ${args.default}
435
+ </MField>
436
+ `,
437
+ }),
438
+ };
439
+
440
+ export const ComboboxInvalid: Story = {
441
+ args: {
442
+ label: 'Label',
443
+ id: 'comboboxValidId',
444
+ requirementText: 'required',
445
+ helpText: 'Help text',
446
+ isInvalid: true,
447
+ message: 'Error message (Be concise and use comprehensive words)',
448
+ default: `
449
+ <MCombobox
450
+ v-model="value"
451
+ invalid
452
+ :options="
453
+ [
454
+ {
455
+ label: 'Option 1',
456
+ value: 'option1',
457
+ },
458
+ {
459
+ label: 'Option 2',
460
+ value: 'option2',
461
+ },
462
+ {
463
+ label: 'Option 3',
464
+ value: 'option3',
465
+ },
466
+ {
467
+ label: 'Option 4',
468
+ value: 'option4',
469
+ },
470
+ ]
471
+ "
472
+ @update:modelValue="handleUpdate"
473
+ />
474
+ `,
475
+ },
476
+ render: (args) => ({
477
+ components: { MField, MCombobox },
478
+ setup() {
479
+ const value = ref(null);
480
+ const handleUpdate = action('update:modelValue');
481
+
482
+ return { args, handleUpdate, value };
483
+ },
484
+ template: `
485
+ <MField v-bind="args">
486
+ ${args.default}
487
+ </MField>
488
+ `,
489
+ }),
490
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Code Connect mapping for MFileUploader
3
+ * Links Figma File uploader (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=11973-12085',
9
+ {
10
+ props: {
11
+ hasDragDrop: figma.enum('Has drag & drop', {
12
+ False: false,
13
+ True: true,
14
+ }),
15
+ },
16
+ example: ({ hasDragDrop }) =>
17
+ html`<script setup>
18
+ import { MFileUploader } from '@mozaic-ds/vue';
19
+ </script>
20
+
21
+ <MFileUploader :model-value="[]" :has-drag-drop=${hasDragDrop} />`,
22
+ },
23
+ );
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Code Connect mapping for MFileUploaderItem
3
+ * Links Figma _file uploader / file item to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=11975-12550',
9
+ {
10
+ props: {
11
+ format: figma.enum('🚫 Format', {
12
+ 'Inline (default)': 'inline',
13
+ Stacked: 'stacked',
14
+ }),
15
+ valid: figma.enum('Is invalid', {
16
+ False: true,
17
+ True: false,
18
+ }),
19
+ },
20
+ example: ({ format, valid }) =>
21
+ html`<script setup>
22
+ import { MFileUploaderItem } from '@mozaic-ds/vue';
23
+ </script>
24
+
25
+ <MFileUploaderItem :file="{ name: 'document.pdf' }" format=${format} :valid=${valid} />`,
26
+ },
27
+ );
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Code Connect mapping for MFlag
3
+ * Links Figma Flag to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5462-8542',
9
+ {
10
+ props: {
11
+ label: figma.string('Flag label'),
12
+ appearance: figma.enum('Appearance', {
13
+ Standard: 'standard',
14
+ Accent: 'accent',
15
+ Danger: 'danger',
16
+ Inverse: 'inverse',
17
+ }),
18
+ },
19
+ example: ({ label, appearance }) =>
20
+ html`<script setup>
21
+ import { MFlag } from '@mozaic-ds/vue';
22
+ </script>
23
+
24
+ <MFlag label=${label} appearance=${appearance}></MFlag>`,
25
+ },
26
+ );
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Code Connect mapping for MIconButton
3
+ * Links Figma Icon Button (ADS2) to @mozaic-ds/vue
4
+ * Props from figma_get_component (Figma Console MCP) + MIconButton.stories.ts
5
+ */
6
+ import figma, { html } from '@figma/code-connect/html';
7
+
8
+ figma.connect(
9
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=1-1978',
10
+ {
11
+ props: {
12
+ appearance: figma.enum('Appearance', {
13
+ Standard: 'standard',
14
+ Accent: 'accent',
15
+ Danger: 'danger',
16
+ 'Inverse (only on dark background)': 'inverse',
17
+ }),
18
+ size: figma.enum('Size', {
19
+ S: 's',
20
+ 'M (default)': 'm',
21
+ L: 'l',
22
+ }),
23
+ disabled: figma.enum('is disabled', {
24
+ False: false,
25
+ True: true,
26
+ }),
27
+ isLoading: figma.enum('Is loading', {
28
+ False: false,
29
+ True: true,
30
+ }),
31
+ outlined: figma.enum('Type', { Outlined: true }),
32
+ ghost: figma.enum('Type', { Ghost: true }),
33
+ },
34
+ example: ({ appearance, size, disabled, isLoading, outlined, ghost }) =>
35
+ html`<script setup>
36
+ import { MIconButton } from '@mozaic-ds/vue';
37
+ import { ChevronRight24 } from '@mozaic-ds/icons-vue';
38
+ </script>
39
+
40
+ <MIconButton
41
+ appearance=${appearance}
42
+ size=${size}
43
+ disabled=${disabled}
44
+ :is-loading=${isLoading}
45
+ outlined=${outlined}
46
+ ghost=${ghost}
47
+ aria-label="Action"
48
+ >
49
+ <template #icon>
50
+ <ChevronRight24 />
51
+ </template>
52
+ </MIconButton>`,
53
+ },
54
+ );
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Code Connect mapping for MKpiItem
3
+ * Links Figma KPI item (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=6-21651',
9
+ {
10
+ props: {
11
+ value: figma.string('Value'),
12
+ label: figma.string('KPI label'),
13
+ size: figma.enum('Size', {
14
+ 'S (Badge)': 's',
15
+ 'M (Inline)': 'm',
16
+ 'L (Card)': 'l',
17
+ }),
18
+ status: figma.enum('Status', {
19
+ Information: 'info',
20
+ Success: 'success',
21
+ Warning: 'warning',
22
+ Error: 'error',
23
+ Neutral: 'neutral',
24
+ }),
25
+ },
26
+ example: ({ value, label, size, status }) =>
27
+ html`<script setup>
28
+ import { MKpiItem } from '@mozaic-ds/vue';
29
+ </script>
30
+
31
+ <MKpiItem value=${value} label=${label} size=${size} status=${status} />`,
32
+ },
33
+ );
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Code Connect mapping for MLinearProgressbarBuffer
3
+ * Links Figma Linear progress bar (Buffer) (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5-13925',
9
+ {
10
+ props: {
11
+ size: figma.enum('Size', {
12
+ S: 's',
13
+ M: 'm',
14
+ L: 'l',
15
+ }),
16
+ value: figma.enum('Completion', {
17
+ '0%': 0,
18
+ '25%': 25,
19
+ '50%': 50,
20
+ '75%': 75,
21
+ '100%': 100,
22
+ }),
23
+ },
24
+ example: ({ size, value }) =>
25
+ html`<script setup>
26
+ import { MLinearProgressbarBuffer } from '@mozaic-ds/vue';
27
+ </script>
28
+
29
+ <MLinearProgressbarBuffer size=${size} :value=${value}></MLinearProgressbarBuffer>`,
30
+ },
31
+ );
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Code Connect mapping for MLinearProgressbarPercentage
3
+ * Links Figma Linear progress bar (Percentage) (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5-13902',
9
+ {
10
+ props: {
11
+ value: figma.enum('Completion', {
12
+ '0%': 0,
13
+ '25%': 25,
14
+ '50%': 50,
15
+ '75%': 75,
16
+ '100%': 100,
17
+ }),
18
+ },
19
+ example: ({ value }) =>
20
+ html`<script setup>
21
+ import { MLinearProgressbarPercentage } from '@mozaic-ds/vue';
22
+ </script>
23
+
24
+ <MLinearProgressbarPercentage :value=${value}></MLinearProgressbarPercentage>`,
25
+ },
26
+ );
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Code Connect mapping for MLink
3
+ * Links Figma Link (Standalone) (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=6-11290',
9
+ {
10
+ props: {
11
+ label: figma.string('Label'),
12
+ size: figma.enum('Size', {
13
+ S: 's',
14
+ M: 'm',
15
+ }),
16
+ appearance: figma.enum('Appearance', {
17
+ Primary: 'standard',
18
+ Secondary: 'secondary',
19
+ Accent: 'accent',
20
+ Inverse: 'inverse',
21
+ }),
22
+ },
23
+ example: ({ label, size, appearance }) =>
24
+ html`<script setup>
25
+ import { MLink } from '@mozaic-ds/vue';
26
+ </script>
27
+
28
+ <MLink href="#" size=${size} appearance=${appearance}>
29
+ ${label}
30
+ </MLink>`,
31
+ },
32
+ );
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Code Connect mapping for MLoader
3
+ * Links Figma Loader to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5-14423',
9
+ {
10
+ props: {
11
+ appearance: figma.enum('Appearance', {
12
+ Standard: 'standard',
13
+ Accent: 'accent',
14
+ Inverse: 'inverse',
15
+ }),
16
+ size: figma.enum('Size', {
17
+ 'XS (20px)': 'xs',
18
+ 'S (24px)': 's',
19
+ 'M (32px)': 'm',
20
+ 'L (64px)': 'l',
21
+ }),
22
+ },
23
+ example: ({ appearance, size }) =>
24
+ html`<script setup>
25
+ import { MLoader } from '@mozaic-ds/vue';
26
+ </script>
27
+
28
+ <MLoader appearance=${appearance} size=${size}></MLoader>`,
29
+ },
30
+ );
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Code Connect mapping for MLoadingOverlay
3
+ * Links Figma Loading overlay (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5-14550',
9
+ {
10
+ props: {},
11
+ example: () =>
12
+ html`<script setup>
13
+ import { MLoadingOverlay } from '@mozaic-ds/vue';
14
+ </script>
15
+
16
+ <MLoadingOverlay is-visible text="Loading..."></MLoadingOverlay>`,
17
+ },
18
+ );
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Code Connect mapping for MModal
3
+ * Links Figma Modal (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5-6700',
9
+ {
10
+ props: {},
11
+ example: () =>
12
+ html`<script setup>
13
+ import { MModal, MButton } from '@mozaic-ds/vue';
14
+ </script>
15
+
16
+ <MModal
17
+ open
18
+ title="Modal title"
19
+ description="A modal is a dialog window allowing you to focus the user's attention."
20
+ closable
21
+ >
22
+ <template #footer>
23
+ <MButton>Confirm</MButton>
24
+ </template>
25
+ </MModal>`,
26
+ },
27
+ );
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Code Connect mapping for MNavigationIndicator
3
+ * Links Figma Navigation indicator to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5-14643',
9
+ {
10
+ props: {
11
+ player: figma.boolean('Show player'),
12
+ showIndicator03: figma.boolean('Show Indicator 03'),
13
+ showIndicator04: figma.boolean('Show Indicator 04'),
14
+ showIndicator05: figma.boolean('Show Indicator 05'),
15
+ showIndicator06: figma.boolean('Show Indicator 06'),
16
+ },
17
+ example: ({ player }) =>
18
+ html`<script setup>
19
+ import { MNavigationIndicator } from '@mozaic-ds/vue';
20
+ </script>
21
+
22
+ <MNavigationIndicator :steps="6" :model-value="0" player=${player}></MNavigationIndicator>`,
23
+ },
24
+ );
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Code Connect mapping for MNumberBadge
3
+ * Links Figma Number badge (ADS2) to @mozaic-ds/vue
4
+ */
5
+ import figma, { html } from '@figma/code-connect/html';
6
+
7
+ figma.connect(
8
+ 'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=5-13889',
9
+ {
10
+ props: {
11
+ label: figma.string('Count (number only)'),
12
+ appearance: figma.enum('Appearance', {
13
+ Standard: 'standard',
14
+ Accent: 'accent',
15
+ Inverse: 'inverse',
16
+ Danger: 'danger',
17
+ }),
18
+ size: figma.enum('Size', {
19
+ 'S (16px)': 's',
20
+ 'M (24px)': 'm',
21
+ 'L (32px)': 'm',
22
+ }),
23
+ },
24
+ example: ({ label, appearance, size }) =>
25
+ html`<script setup>
26
+ import { MNumberBadge } from '@mozaic-ds/vue';
27
+ </script>
28
+
29
+ <MNumberBadge :label=${label} appearance=${appearance} size=${size}></MNumberBadge>`,
30
+ },
31
+ );