@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.
- package/dist/mozaic-vue.css +2 -1
- package/dist/mozaic-vue.d.ts +1040 -408
- package/dist/mozaic-vue.js +17183 -6742
- package/dist/mozaic-vue.js.map +1 -1
- package/dist/mozaic-vue.umd.cjs +26 -6
- package/dist/mozaic-vue.umd.cjs.map +1 -1
- package/package.json +11 -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/actionlistbox/MActionListbox.spec.ts +14 -0
- package/src/components/actionlistbox/MActionListbox.stories.ts +15 -8
- package/src/components/actionlistbox/MActionListbox.vue +13 -1
- package/src/components/actionlistbox/README.md +2 -1
- 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/button/README.md +2 -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 +246 -0
- package/src/components/combobox/MCombobox.stories.ts +190 -0
- package/src/components/combobox/MCombobox.vue +286 -0
- package/src/components/combobox/README.md +52 -0
- 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/field/MField.stories.ts +105 -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.spec.ts +527 -0
- package/src/components/optionListbox/MOptionListbox.vue +470 -0
- package/src/components/optionListbox/README.md +63 -0
- 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/stepperstacked/MStepperStacked.spec.ts +162 -0
- package/src/components/stepperstacked/MStepperStacked.stories.ts +57 -0
- package/src/components/stepperstacked/MStepperStacked.vue +106 -0
- package/src/components/stepperstacked/README.md +15 -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/textinput/MTextInput.vue +13 -1
- package/src/components/textinput/README.md +15 -1
- 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
- package/src/main.ts +1 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MTextInput
|
|
3
|
+
* Links Figma _text input / base 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-29794',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
size: figma.enum('Size', {
|
|
12
|
+
S: 's',
|
|
13
|
+
'M (default)': 'm',
|
|
14
|
+
}),
|
|
15
|
+
disabled: figma.enum('State', {
|
|
16
|
+
Disabled: true,
|
|
17
|
+
Default: false,
|
|
18
|
+
Hovered: false,
|
|
19
|
+
Focused: false,
|
|
20
|
+
'Read-only': false,
|
|
21
|
+
}),
|
|
22
|
+
readonly: figma.enum('State', {
|
|
23
|
+
'Read-only': true,
|
|
24
|
+
Default: false,
|
|
25
|
+
Hovered: false,
|
|
26
|
+
Focused: false,
|
|
27
|
+
Disabled: false,
|
|
28
|
+
}),
|
|
29
|
+
isInvalid: figma.enum('Is invalid', {
|
|
30
|
+
True: true,
|
|
31
|
+
False: false,
|
|
32
|
+
}),
|
|
33
|
+
isClearable: figma.boolean('Is clearable'),
|
|
34
|
+
},
|
|
35
|
+
example: ({ size, disabled, readonly, isInvalid, isClearable }) =>
|
|
36
|
+
html`<script setup>
|
|
37
|
+
import { MTextInput } from '@mozaic-ds/vue';
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<MTextInput
|
|
41
|
+
id="text-input-id"
|
|
42
|
+
size=${size}
|
|
43
|
+
disabled=${disabled}
|
|
44
|
+
readonly=${readonly}
|
|
45
|
+
:is-invalid=${isInvalid}
|
|
46
|
+
:is-clearable=${isClearable}
|
|
47
|
+
placeholder="Placeholder"
|
|
48
|
+
model-value=""
|
|
49
|
+
></MTextInput>`,
|
|
50
|
+
},
|
|
51
|
+
);
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
<span v-if="prefix" class="mc-text-input__addon">{{ prefix }}</span>
|
|
8
8
|
|
|
9
9
|
<input
|
|
10
|
+
ref="textInput"
|
|
10
11
|
:id="id"
|
|
11
12
|
class="mc-text-input__control"
|
|
12
13
|
:value="modelValue"
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
</template>
|
|
42
43
|
|
|
43
44
|
<script setup lang="ts">
|
|
44
|
-
import { computed, type VNode } from 'vue';
|
|
45
|
+
import { computed, useTemplateRef, type VNode } from 'vue';
|
|
45
46
|
import { CrossCircleFilled24 } from '@mozaic-ds/icons-vue';
|
|
46
47
|
|
|
47
48
|
/**
|
|
@@ -130,6 +131,8 @@ const classObject = computed(() => {
|
|
|
130
131
|
};
|
|
131
132
|
});
|
|
132
133
|
|
|
134
|
+
const textInput = useTemplateRef('textInput');
|
|
135
|
+
|
|
133
136
|
const clearValue = () => {
|
|
134
137
|
emit('update:modelValue', '');
|
|
135
138
|
};
|
|
@@ -141,9 +144,18 @@ const emit = defineEmits<{
|
|
|
141
144
|
(on: 'update:modelValue', value: string | number): void;
|
|
142
145
|
}>();
|
|
143
146
|
|
|
147
|
+
function focus() {
|
|
148
|
+
console.log(textInput.value);
|
|
149
|
+
textInput.value?.focus();
|
|
150
|
+
}
|
|
151
|
+
|
|
144
152
|
defineOptions({
|
|
145
153
|
inheritAttrs: false,
|
|
146
154
|
});
|
|
155
|
+
|
|
156
|
+
defineExpose({
|
|
157
|
+
focus,
|
|
158
|
+
});
|
|
147
159
|
</script>
|
|
148
160
|
|
|
149
161
|
<style lang="scss" scoped>
|
|
@@ -11,7 +11,7 @@ A text input is a single-line input that allows users to enter and edit short te
|
|
|
11
11
|
| `name` | The name attribute for the input element, typically used for form submission. | `string` | - |
|
|
12
12
|
| `modelValue` | The current value of the input field. | `string` `number` | - |
|
|
13
13
|
| `placeholder` | A placeholder text to show in the input when it is empty. | `string` | - |
|
|
14
|
-
| `inputType` | Defines the type of input. | `"number"` `"
|
|
14
|
+
| `inputType` | Defines the type of input. | `"number"` `"search"` `"text"` `"date"` `"email"` `"password"` `"tel"` | `"text"` |
|
|
15
15
|
| `isInvalid` | If `true`, applies an invalid state to the input. | `boolean` | - |
|
|
16
16
|
| `disabled` | If `true`, disables the input, making it non-interactive. | `boolean` | - |
|
|
17
17
|
| `size` | Determines the size of the input. | `"s"` `"m"` | `"m"` |
|
|
@@ -32,3 +32,17 @@ A text input is a single-line input that allows users to enter and edit short te
|
|
|
32
32
|
| Name | Description | Type |
|
|
33
33
|
| --- | --- | --- |
|
|
34
34
|
| `update:modelValue` | Emits when the input value changes, updating the `modelValue` prop. | [value: string | number] |
|
|
35
|
+
|
|
36
|
+
## Dependencies
|
|
37
|
+
|
|
38
|
+
### Used By
|
|
39
|
+
|
|
40
|
+
- [MOptionListbox](../optionListbox)
|
|
41
|
+
|
|
42
|
+
### Graph
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
graph TD;
|
|
46
|
+
MOptionListbox --> MTextInput
|
|
47
|
+
style MTextInput fill:#008240,stroke:#333,stroke-width:4px
|
|
48
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MTile
|
|
3
|
+
* Links Figma Tile (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=156-18755',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
type: figma.enum('Type', {
|
|
12
|
+
'Base (as container)': 'base',
|
|
13
|
+
'Clickable (as navigation)': 'clickable',
|
|
14
|
+
'Expandable (as accordion)': 'expandable',
|
|
15
|
+
'Selectable (as option)': 'selectable',
|
|
16
|
+
}),
|
|
17
|
+
bordered: figma.enum('Is bordered', {
|
|
18
|
+
True: true,
|
|
19
|
+
False: false,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
example: ({ bordered }) =>
|
|
23
|
+
html`<script setup>
|
|
24
|
+
import { MTile } from '@mozaic-ds/vue';
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<MTile bordered=${bordered}>
|
|
28
|
+
<p>Tile content</p>
|
|
29
|
+
</MTile>`,
|
|
30
|
+
},
|
|
31
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MTileClickable
|
|
3
|
+
* Links Figma clickable tile (as navigation) 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=156-18803',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
appearance: figma.enum('Appearance', {
|
|
12
|
+
Primary: 'primary',
|
|
13
|
+
Secondary: 'secondary',
|
|
14
|
+
Inverse: 'inverse',
|
|
15
|
+
}),
|
|
16
|
+
iconPosition: figma.enum('Icon position', {
|
|
17
|
+
Bottom: 'bottom',
|
|
18
|
+
Right: 'right',
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
example: ({ appearance, iconPosition }) =>
|
|
22
|
+
html`<script setup>
|
|
23
|
+
import { MTileClickable } from '@mozaic-ds/vue';
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<MTileClickable appearance=${appearance} icon-position=${iconPosition}>
|
|
27
|
+
<p>Tile content</p>
|
|
28
|
+
<template #icon>Action</template>
|
|
29
|
+
</MTileClickable>`,
|
|
30
|
+
},
|
|
31
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MTileExpandable
|
|
3
|
+
* Links Figma expandable tile (as accordion) 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=156-18764',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
appearance: figma.enum('Appearance', {
|
|
12
|
+
Primary: 'primary',
|
|
13
|
+
Secondary: 'secondary',
|
|
14
|
+
}),
|
|
15
|
+
trigger: figma.enum('Triggering event', {
|
|
16
|
+
Container: 'container',
|
|
17
|
+
Icon: 'icon',
|
|
18
|
+
Button: 'button',
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
example: ({ appearance, trigger }) =>
|
|
22
|
+
html`<script setup>
|
|
23
|
+
import { MTileExpandable } from '@mozaic-ds/vue';
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<MTileExpandable appearance=${appearance} trigger=${trigger}>
|
|
27
|
+
<p>Tile content</p>
|
|
28
|
+
<template #details>Expandable details</template>
|
|
29
|
+
</MTileExpandable>`,
|
|
30
|
+
},
|
|
31
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MTileSelectable
|
|
3
|
+
* Links Figma selectable tile (as option) 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=156-18948',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
inputPosition: figma.enum('Input on the left', {
|
|
12
|
+
False: 'right',
|
|
13
|
+
True: 'left',
|
|
14
|
+
}),
|
|
15
|
+
centered: figma.enum('Centered input', {
|
|
16
|
+
False: false,
|
|
17
|
+
True: true,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
example: ({ inputPosition, centered }) =>
|
|
21
|
+
html`<script setup>
|
|
22
|
+
import { MTileSelectable } from '@mozaic-ds/vue';
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<MTileSelectable v-model="selected" input-position=${inputPosition} :centered=${centered}>
|
|
26
|
+
<p>Tile content</p>
|
|
27
|
+
</MTileSelectable>`,
|
|
28
|
+
},
|
|
29
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MToaster
|
|
3
|
+
* Links Figma Toaster (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=12131-26443',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
status: figma.enum('Status', {
|
|
12
|
+
Information: 'info',
|
|
13
|
+
Success: 'success',
|
|
14
|
+
Warning: 'warning',
|
|
15
|
+
Error: 'error',
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
example: ({ status }) =>
|
|
19
|
+
html`<script setup>
|
|
20
|
+
import { MToaster } from '@mozaic-ds/vue';
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<MToaster description="Notification message" status=${status} />`,
|
|
24
|
+
},
|
|
25
|
+
);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MToggle
|
|
3
|
+
* Links Figma Toggle (stand-alone) (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-29289',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: figma.enum('Is checked', {
|
|
12
|
+
True: true,
|
|
13
|
+
False: false,
|
|
14
|
+
}),
|
|
15
|
+
size: figma.enum('Size', {
|
|
16
|
+
'S (default)': 's',
|
|
17
|
+
M: 'm',
|
|
18
|
+
}),
|
|
19
|
+
disabled: figma.enum('State', {
|
|
20
|
+
Disabled: true,
|
|
21
|
+
Default: false,
|
|
22
|
+
Hovered: false,
|
|
23
|
+
Focused: false,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
example: ({ modelValue, size, disabled }) =>
|
|
27
|
+
html`<script setup>
|
|
28
|
+
import { MToggle } from '@mozaic-ds/vue';
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<MToggle
|
|
32
|
+
id="toggle-id"
|
|
33
|
+
label="Toggle Label"
|
|
34
|
+
:model-value=${modelValue}
|
|
35
|
+
size=${size}
|
|
36
|
+
disabled=${disabled}
|
|
37
|
+
></MToggle>`,
|
|
38
|
+
},
|
|
39
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MToggleGroup
|
|
3
|
+
* Links Figma Toggle group (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-29266',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
inline: figma.enum('Layout', {
|
|
12
|
+
'Stacked (default)': false,
|
|
13
|
+
Inline: true,
|
|
14
|
+
}),
|
|
15
|
+
},
|
|
16
|
+
example: ({ inline }) =>
|
|
17
|
+
html`<script setup>
|
|
18
|
+
import { MToggleGroup } from '@mozaic-ds/vue';
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<MToggleGroup
|
|
22
|
+
name="group"
|
|
23
|
+
:options="[
|
|
24
|
+
{ id: '1', label: 'Option 1', value: '1' },
|
|
25
|
+
{ id: '2', label: 'Option 2', value: '2' },
|
|
26
|
+
]"
|
|
27
|
+
inline=${inline}
|
|
28
|
+
/>`,
|
|
29
|
+
},
|
|
30
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Connect mapping for MTooltip
|
|
3
|
+
* Links Figma Tooltip (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-6487',
|
|
9
|
+
{
|
|
10
|
+
props: {
|
|
11
|
+
text: figma.string('Text'),
|
|
12
|
+
position: figma.enum('Position', {
|
|
13
|
+
Top: 'top',
|
|
14
|
+
Bottom: 'bottom',
|
|
15
|
+
Left: 'left',
|
|
16
|
+
Right: 'right',
|
|
17
|
+
}),
|
|
18
|
+
pointer: figma.boolean('Pointer'),
|
|
19
|
+
},
|
|
20
|
+
example: ({ text, position, pointer }) =>
|
|
21
|
+
html`<script setup>
|
|
22
|
+
import { MTooltip } from '@mozaic-ds/vue';
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<MTooltip id="tooltip-id" text=${text} position=${position} :pointer=${pointer}>
|
|
26
|
+
<span>Hover me</span>
|
|
27
|
+
</MTooltip>`,
|
|
28
|
+
},
|
|
29
|
+
);
|
package/src/main.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { default as MCheckbox } from './components/checkbox/MCheckbox.vue';
|
|
|
12
12
|
export { default as MCheckboxGroup } from './components/checkboxgroup/MCheckboxGroup.vue';
|
|
13
13
|
export { default as MCheckListMenu } from './components/checklistmenu/MCheckListMenu.vue';
|
|
14
14
|
export { default as MCircularProgressbar } from './components/circularprogressbar/MCircularProgressbar.vue';
|
|
15
|
+
export { default as MCombobox } from './components/combobox/MCombobox.vue';
|
|
15
16
|
export { default as MContainer } from './components/container/MContainer.vue';
|
|
16
17
|
export { default as MDatepicker } from './components/datepicker/MDatepicker.vue';
|
|
17
18
|
export { default as MDivider } from './components/divider/MDivider.vue';
|