@mozaic-ds/vue 2.16.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.
- package/dist/mozaic-vue.css +2 -1
- package/dist/mozaic-vue.d.ts +134 -91
- package/dist/mozaic-vue.js +17184 -10878
- package/dist/mozaic-vue.js.map +1 -1
- package/dist/mozaic-vue.umd.cjs +23 -22
- package/dist/mozaic-vue.umd.cjs.map +1 -1
- package/package.json +10 -5
- package/src/components/BrandPresets.mdx +2 -2
- package/src/components/ComponentsMapping.mdx +98 -0
- package/src/components/accordionlist/MAccordionList.figma.ts +43 -0
- package/src/components/accordionlistitem/MAccordionListItem.figma.ts +27 -0
- package/src/components/actionbottombar/MActionBottomBar.figma.ts +24 -0
- package/src/components/actionlistbox/MActionListbox.figma.ts +30 -0
- package/src/components/avatar/MAvatar.figma.ts +31 -0
- package/src/components/breadcrumb/MBreadcrumb.figma.ts +31 -0
- package/src/components/builtinmenu/MBuiltInMenu.figma.ts +23 -0
- package/src/components/button/MButton.figma.ts +41 -0
- package/src/components/callout/MCallout.figma.ts +29 -0
- package/src/components/carousel/MCarousel.figma.ts +32 -0
- package/src/components/checkbox/MCheckbox.figma.ts +45 -0
- package/src/components/checkboxgroup/MCheckboxGroup.figma.ts +30 -0
- package/src/components/checklistmenu/MCheckListMenu.figma.ts +29 -0
- package/src/components/circularprogressbar/MCircularProgressbar.figma.ts +31 -0
- package/src/components/combobox/MCombobox.figma.ts +48 -0
- package/src/components/combobox/MCombobox.spec.ts +1 -1
- package/src/components/combobox/MCombobox.vue +18 -9
- package/src/components/combobox/README.md +2 -2
- package/src/components/container/MContainer.figma.ts +30 -0
- package/src/components/datatable/DataTable.stories.ts +277 -0
- package/src/components/datatable/DataTableCells.stories.ts +251 -0
- package/src/components/datatable/DataTableEmpty.stories.ts +102 -0
- package/src/components/datatable/DataTableExpandable.stories.ts +95 -0
- package/src/components/datatable/DataTableNested.stories.ts +96 -0
- package/src/components/datatable/DataTableSelectable.stories.ts +124 -0
- package/src/components/datatable/DataTableSortable.stories.ts +164 -0
- package/src/components/datatable/MDataTable.types.ts +54 -0
- package/src/components/datatable/assets/styles.scss +10 -0
- package/src/components/datatable/datatable.mdx +62 -0
- package/src/components/datatable/tools/data.js +8 -0
- package/src/components/datatable/tools/data.json +2018 -0
- package/src/components/datatable/utils.js +19 -0
- package/src/components/datepicker/MDatepicker.figma.ts +20 -0
- package/src/components/divider/MDivider.figma.ts +30 -0
- package/src/components/drawer/MDrawer.figma.ts +37 -0
- package/src/components/drawer/README.md +1 -1
- package/src/components/field/MField.figma.ts +30 -0
- package/src/components/fileuploader/MFileUploader.figma.ts +23 -0
- package/src/components/fileuploaderitem/MFileUploaderItem.figma.ts +27 -0
- package/src/components/flag/MFlag.figma.ts +26 -0
- package/src/components/iconbutton/MIconButton.figma.ts +54 -0
- package/src/components/kpiitem/MKpiItem.figma.ts +33 -0
- package/src/components/linearprogressbarbuffer/MLinearProgressbarBuffer.figma.ts +31 -0
- package/src/components/linearprogressbarpercentage/MLinearProgressbarPercentage.figma.ts +26 -0
- package/src/components/link/MLink.figma.ts +32 -0
- package/src/components/loader/MLoader.figma.ts +30 -0
- package/src/components/loadingoverlay/MLoadingOverlay.figma.ts +18 -0
- package/src/components/modal/MModal.figma.ts +27 -0
- package/src/components/navigationindicator/MNavigationIndicator.figma.ts +24 -0
- package/src/components/numberbadge/MNumberBadge.figma.ts +31 -0
- package/src/components/optionListbox/MOptionListbox.figma.ts +36 -0
- package/src/components/optionListbox/MOptionListbox.vue +18 -18
- package/src/components/optionListbox/README.md +1 -1
- package/src/components/overlay/MOverlay.figma.ts +20 -0
- package/src/components/pageheader/MPageHeader.figma.ts +21 -0
- package/src/components/pagination/MPagination.figma.ts +34 -0
- package/src/components/passwordinput/MPasswordInput.figma.ts +30 -0
- package/src/components/phonenumber/MPhoneNumber.figma.ts +47 -0
- package/src/components/pincode/MPincode.figma.ts +41 -0
- package/src/components/pincode/MPincode.spec.ts +1 -4
- package/src/components/pincode/MPincode.vue +11 -15
- package/src/components/popover/MPopover.figma.ts +42 -0
- package/src/components/quantityselector/MQuantitySelector.figma.ts +50 -0
- package/src/components/radio/MRadio.figma.ts +40 -0
- package/src/components/radiogroup/MRadioGroup.figma.ts +30 -0
- package/src/components/segmentedcontrol/MSegmentedControl.figma.ts +33 -0
- package/src/components/select/MSelect.figma.ts +49 -0
- package/src/components/sidebar/MSidebar.figma.ts +28 -0
- package/src/components/sidebarexpandableitem/MSidebarExpandableItem.figma.ts +19 -0
- package/src/components/sidebarfooter/MSidebarFooter.figma.ts +21 -0
- package/src/components/sidebarheader/MSidebarHeader.figma.ts +18 -0
- package/src/components/sidebarnavitem/MSidebarNavItem.figma.ts +23 -0
- package/src/components/sidebarshortcutitem/MSidebarShortcutItem.figma.ts +20 -0
- package/src/components/starrating/MStarRating.figma.ts +35 -0
- package/src/components/statusbadge/MStatusBadge.figma.ts +27 -0
- package/src/components/statusdot/MStatusDot.figma.ts +31 -0
- package/src/components/statusmessage/MStatusMessage.figma.ts +28 -0
- package/src/components/statusmessage/MStatusMessage.spec.ts +15 -0
- package/src/components/statusmessage/MStatusMessage.stories.ts +4 -0
- package/src/components/statusmessage/MStatusMessage.vue +7 -0
- package/src/components/statusmessage/README.md +2 -0
- package/src/components/statusnotification/MStatusNotification.figma.ts +29 -0
- package/src/components/stepperbottombar/MStepperBottomBar.figma.ts +20 -0
- package/src/components/steppercompact/MStepperCompact.figma.ts +21 -0
- package/src/components/stepperinline/MStepperInline.figma.ts +23 -0
- package/src/components/stepperstacked/MStepperStacked.figma.ts +23 -0
- package/src/components/tabs/MTabs.figma.ts +33 -0
- package/src/components/tag/MTag.figma.ts +26 -0
- package/src/components/tag/MTag.stories.ts +13 -3
- package/src/components/tag/MTag.vue +11 -1
- package/src/components/tag/README.md +6 -0
- package/src/components/textarea/MTextArea.figma.ts +28 -0
- package/src/components/textinput/MTextInput.figma.ts +51 -0
- package/src/components/tile/MTile.figma.ts +31 -0
- package/src/components/tileclickable/MTileClickable.figma.ts +31 -0
- package/src/components/tileexpandable/MTileExpandable.figma.ts +31 -0
- package/src/components/tileselectable/MTileSelectable.figma.ts +29 -0
- package/src/components/toaster/MToaster.figma.ts +25 -0
- package/src/components/toggle/MToggle.figma.ts +39 -0
- package/src/components/togglegroup/MToggleGroup.figma.ts +30 -0
- package/src/components/tooltip/MTooltip.figma.ts +29 -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
|
+
);
|
|
@@ -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
|
+
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MOptionListbox
|
|
3
|
+
* Links Figma _option listbox / multi-select 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=20140-26198',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
search: figma.boolean('Has a search'),
|
|
12
|
+
actions: figma.boolean('Has actions (select / unselect all)'),
|
|
13
|
+
hasSections: figma.enum('Has sections', {
|
|
14
|
+
False: false,
|
|
15
|
+
True: true,
|
|
16
|
+
}),
|
|
17
|
+
hasAdditionalInfo: figma.enum('Has additional info', {
|
|
18
|
+
False: false,
|
|
19
|
+
True: true,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
example: ({ search, actions }) =>
|
|
23
|
+
html`<script setup>
|
|
24
|
+
import { MOptionListbox } from '@mozaic-ds/vue';
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<MOptionListbox
|
|
28
|
+
id="option-listbox"
|
|
29
|
+
v-model="selected"
|
|
30
|
+
multiple
|
|
31
|
+
search=${search}
|
|
32
|
+
actions=${actions}
|
|
33
|
+
:options="[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]"
|
|
34
|
+
/>`,
|
|
35
|
+
},
|
|
36
|
+
);
|
|
@@ -82,23 +82,23 @@
|
|
|
82
82
|
"
|
|
83
83
|
>
|
|
84
84
|
<div class="mc-option-listbox__label">
|
|
85
|
-
<slot
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
</span>
|
|
85
|
+
<slot name="item" v-bind="{ item }">
|
|
86
|
+
<div class="mc-option-listbox__content">
|
|
87
|
+
<span
|
|
88
|
+
:class="
|
|
89
|
+
item.type === 'section'
|
|
90
|
+
? 'mc-option-listbox__section-title'
|
|
91
|
+
: 'mc-option-listbox__text'
|
|
92
|
+
"
|
|
93
|
+
>
|
|
94
|
+
{{ item.label }}
|
|
95
|
+
</span>
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
<span v-if="item.content" class="mc-option-listbox__additional">
|
|
98
|
+
{{ item.content }}
|
|
99
|
+
</span>
|
|
100
|
+
</div>
|
|
101
|
+
</slot>
|
|
102
102
|
|
|
103
103
|
<div class="mc-option-listbox__spacer"></div>
|
|
104
104
|
|
|
@@ -228,9 +228,9 @@ const emit = defineEmits<{
|
|
|
228
228
|
|
|
229
229
|
defineSlots<{
|
|
230
230
|
/**
|
|
231
|
-
* Use this slot to
|
|
231
|
+
* Use this slot to customize the content of each item.
|
|
232
232
|
*/
|
|
233
|
-
|
|
233
|
+
item(props: { item: ListboxOption }): VNode;
|
|
234
234
|
}>();
|
|
235
235
|
|
|
236
236
|
const listboxEl = useTemplateRef('listboxEl');
|
|
@@ -24,7 +24,7 @@ An Option Listbox is a customizable, accessible listbox component designed to po
|
|
|
24
24
|
|
|
25
25
|
| Name | Description |
|
|
26
26
|
| --- | --- |
|
|
27
|
-
| `
|
|
27
|
+
| `item` | Use this slot to customize the content of each item. |
|
|
28
28
|
|
|
29
29
|
## Events
|
|
30
30
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MOverlay
|
|
3
|
+
* Links Figma 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=6-19511',
|
|
9
|
+
{
|
|
10
|
+
props: {},
|
|
11
|
+
example: () =>
|
|
12
|
+
html`<script setup>
|
|
13
|
+
import { MOverlay } from '@mozaic-ds/vue';
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<MOverlay is-visible dialog-label="Overlay">
|
|
17
|
+
<p>Overlay content</p>
|
|
18
|
+
</MOverlay>`,
|
|
19
|
+
},
|
|
20
|
+
);
|