@mozaic-ds/vue 2.6.1 → 2.8.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/README.md +3 -3
- package/dist/mozaic-vue.css +1 -1
- package/dist/mozaic-vue.d.ts +211 -101
- package/dist/mozaic-vue.js +3034 -1070
- package/dist/mozaic-vue.js.map +1 -1
- package/dist/mozaic-vue.umd.cjs +5 -1
- package/dist/mozaic-vue.umd.cjs.map +1 -1
- package/package.json +10 -7
- package/src/components/Contributing.mdx +1 -1
- package/src/components/GettingStarted.mdx +1 -1
- package/src/components/Introduction.mdx +1 -1
- package/src/components/Support.mdx +1 -1
- package/src/components/avatar/MAvatar.stories.ts +1 -0
- package/src/components/avatar/README.md +16 -0
- package/src/components/breadcrumb/README.md +11 -0
- package/src/components/button/MButton.stories.ts +1 -2
- package/src/components/button/MButton.vue +6 -1
- package/src/components/button/README.md +24 -0
- package/src/components/callout/MCallout.stories.ts +1 -0
- package/src/components/callout/README.md +19 -0
- package/src/components/checkbox/README.md +23 -0
- package/src/components/checkboxgroup/README.md +20 -0
- package/src/components/circularprogressbar/MCircularProgressbar.stories.ts +1 -0
- package/src/components/circularprogressbar/README.md +14 -0
- package/src/components/container/MContainer.stories.ts +8 -0
- package/src/components/container/MContainer.vue +1 -1
- package/src/components/container/README.md +16 -0
- package/src/components/datepicker/MDatepicker.stories.ts +1 -0
- package/src/components/datepicker/README.md +24 -0
- package/src/components/divider/MDivider.stories.ts +1 -0
- package/src/components/divider/README.md +18 -0
- package/src/components/drawer/MDrawer.spec.ts +95 -0
- package/src/components/drawer/MDrawer.stories.ts +1 -0
- package/src/components/drawer/MDrawer.vue +34 -3
- package/src/components/drawer/README.md +30 -0
- package/src/components/field/MField.vue +1 -1
- package/src/components/field/README.md +24 -0
- package/src/components/fieldgroup/README.md +22 -0
- package/src/components/flag/README.md +11 -0
- package/src/components/iconbutton/MIconButton.stories.ts +1 -0
- package/src/components/iconbutton/MIconButton.vue +6 -1
- package/src/components/iconbutton/README.md +21 -0
- package/src/components/linearprogressbarbuffer/MLinearProgressbarBuffer.stories.ts +1 -0
- package/src/components/linearprogressbarbuffer/README.md +11 -0
- package/src/components/linearprogressbarpercentage/MLinearProgressbarPercentage.stories.ts +1 -0
- package/src/components/linearprogressbarpercentage/README.md +10 -0
- package/src/components/link/MLink.vue +0 -2
- package/src/components/link/README.md +23 -0
- package/src/components/loader/MLoader.vue +1 -1
- package/src/components/loader/README.md +12 -0
- package/src/components/loadingoverlay/MLoadingOverlay.stories.ts +1 -1
- package/src/components/loadingoverlay/README.md +11 -0
- package/src/components/modal/MModal.spec.ts +36 -1
- package/src/components/modal/MModal.vue +11 -1
- package/src/components/modal/README.md +29 -0
- package/src/components/numberbadge/README.md +12 -0
- package/src/components/overlay/README.md +17 -0
- package/src/components/pagination/README.md +20 -0
- package/src/components/passwordinput/README.md +25 -0
- package/src/components/phonenumber/MPhoneNumber.spec.ts +294 -0
- package/src/components/phonenumber/MPhoneNumber.stories.ts +88 -0
- package/src/components/phonenumber/MPhoneNumber.vue +271 -0
- package/src/components/phonenumber/README.md +26 -0
- package/src/components/pincode/MPincode.spec.ts +4 -1
- package/src/components/pincode/MPincode.stories.ts +1 -0
- package/src/components/pincode/MPincode.vue +5 -1
- package/src/components/pincode/README.md +22 -0
- package/src/components/quantityselector/MQuantitySelector.stories.ts +0 -7
- package/src/components/quantityselector/README.md +27 -0
- package/src/components/radio/README.md +21 -0
- package/src/components/radiogroup/README.md +21 -0
- package/src/components/segmentedcontrol/MSegmentedControl.spec.ts +116 -0
- package/src/components/segmentedcontrol/MSegmentedControl.stories.ts +78 -0
- package/src/components/segmentedcontrol/MSegmentedControl.vue +92 -0
- package/src/components/segmentedcontrol/README.md +19 -0
- package/src/components/select/README.md +24 -0
- package/src/components/statusbadge/README.md +11 -0
- package/src/components/statusdot/MStatusDot.stories.ts +1 -0
- package/src/components/statusdot/README.md +11 -0
- package/src/components/statusnotification/README.md +25 -0
- package/src/components/tabs/MTabs.stories.ts +23 -1
- package/src/components/tabs/MTabs.vue +8 -0
- package/src/components/tabs/Mtabs.spec.ts +29 -8
- package/src/components/tabs/README.md +20 -0
- package/src/components/tag/README.md +25 -0
- package/src/components/textarea/README.md +25 -0
- package/src/components/textinput/README.md +32 -0
- package/src/components/toaster/MToaster.stories.ts +1 -0
- package/src/components/toaster/README.md +28 -0
- package/src/components/toggle/README.md +21 -0
- package/src/components/togglegroup/MToggleGroup.vue +1 -3
- package/src/components/togglegroup/README.md +20 -0
- package/src/components/tooltip/README.md +19 -0
- package/src/components/usingIcons.mdx +1 -1
- package/src/components/usingPresets.mdx +1 -1
- package/src/main.ts +2 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# MTag
|
|
2
|
+
|
|
3
|
+
A Tag is a UI element used to filter data, categorize, select or deselect an option. It can appear standalone, in a group, or embedded within other components. Depending on its use, a tag can be interactive (clickable, removable, selectable) or static (serving as a visual indicator).
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Name | Description | Type | Default |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `type` | Defines the behavior and layout of the tag. | `"informative"` `"interactive"` `"contextualised"` `"removable"` `"selectable"` | `"informative"` |
|
|
11
|
+
| `size` | Determines the size of the tag. | `"s"` `"m"` `"l"` | - |
|
|
12
|
+
| `id` | A unique identifier for the tag, used to associate the label with the form element. **Required** when type is 'selectable' or 'removable'. | `string` | - |
|
|
13
|
+
| `name` | The name attribute for the tag element, typically used for form submission. (only relevant for type: 'selectable'). | `string` | - |
|
|
14
|
+
| `label*` | The text label displayed next to the tag. | `string` | - |
|
|
15
|
+
| `modelValue` | The tag's checked state, bound via v-model. Used only for type: 'selectable'. | `boolean` | - |
|
|
16
|
+
| `disabled` | If `true`, disables the tag, making it non-interactive. Applicable to selectable, interactive, and contextualised types. | `boolean` | - |
|
|
17
|
+
| `contextualisedNumber` | A number displayed in the badge when the tag is contextualised. | `number` | `99` |
|
|
18
|
+
| `removableLabel` | Accessible label text for the remove button in removable tags. | `string` | - |
|
|
19
|
+
|
|
20
|
+
## Events
|
|
21
|
+
|
|
22
|
+
| Name | Description | Type |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| `update:modelValue` | Emits when the tag value changes, updating the modelValue prop. | [value: boolean] |
|
|
25
|
+
| `remove-tag` | Emits when the remove button of a tag is clicked, passing the tag's ID. | [id: string] |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# MTextArea
|
|
2
|
+
|
|
3
|
+
A text area is an input designed for multi-line text entry, allowing users to input longer content compared to a standard text input. It is commonly used for comments, feedback, descriptions, and messaging. Text areas can be resizable or fixed in height, depending on the context, and often include placeholder text, character limits, and validation messages to guide users.<br><br> To put a label, requierement text, help text or to apply a valid or invalid message, the examples are available in the [Field section](/docs/form-elements-field--docs#textarea).
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Name | Description | Type | Default |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `id*` | A unique identifier for the textarea, used to associate the label with the form element. | `string` | - |
|
|
11
|
+
| `name` | The name attribute for the textarea element, used for form submission. | `string` | - |
|
|
12
|
+
| `modelValue` | The current value of the textarea field. | `string` `number` | - |
|
|
13
|
+
| `placeholder` | Text displayed when the textarea is empty. | `string` | - |
|
|
14
|
+
| `isInvalid` | If `true`, the textarea is marked as invalid. | `boolean` | - |
|
|
15
|
+
| `disabled` | If `true`, the textarea is disabled and non-interactive. | `boolean` | - |
|
|
16
|
+
| `rows` | The number of visible text lines in the textarea. | `number` | `2` |
|
|
17
|
+
| `minLength` | Minimum number of characters required for the textarea. | `number` | - |
|
|
18
|
+
| `maxLength` | Maximum number of characters allowed in the textarea. | `number` | - |
|
|
19
|
+
| `readonly` | If `true`, the textarea is read-only (cannot be edited). | `boolean` | - |
|
|
20
|
+
|
|
21
|
+
## Events
|
|
22
|
+
|
|
23
|
+
| Name | Description | Type |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| `update:modelValue` | Emits when the textarea value changes, updating the modelValue prop. | [value: string | number] |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# MTextInput
|
|
2
|
+
|
|
3
|
+
A text input is a single-line input that allows users to enter and edit short text-based content. It is commonly used for names, email addresses, search queries, and form entries. Text Inputs often include placeholders, validation rules, and assistive text to guide users and ensure accurate data entry.<br><br> To put a label, requierement text, help text or to apply a valid or invalid message, the examples are available in the [Field section](/docs/form-elements-field--docs#input).
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Name | Description | Type | Default |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `id*` | A unique identifier for the input element, used to associate the label with the form element. | `string` | - |
|
|
11
|
+
| `name` | The name attribute for the input element, typically used for form submission. | `string` | - |
|
|
12
|
+
| `modelValue` | The current value of the input field. | `string` `number` | - |
|
|
13
|
+
| `placeholder` | A placeholder text to show in the input when it is empty. | `string` | - |
|
|
14
|
+
| `inputType` | Defines the type of input. | `"number"` `"text"` `"date"` `"email"` `"password"` `"search"` `"tel"` | `"text"` |
|
|
15
|
+
| `isInvalid` | If `true`, applies an invalid state to the input. | `boolean` | - |
|
|
16
|
+
| `disabled` | If `true`, disables the input, making it non-interactive. | `boolean` | - |
|
|
17
|
+
| `size` | Determines the size of the input. | `"s"` `"m"` | `"m"` |
|
|
18
|
+
| `readonly` | If `true`, the input is read-only (cannot be edited). | `boolean` | - |
|
|
19
|
+
| `isClearable` | If `true`, a clear button will appear when the input has a value. | `boolean` | - |
|
|
20
|
+
| `clearLabel` | The label text for the clear button. | `string` | `"clear content"` |
|
|
21
|
+
|
|
22
|
+
## Slots
|
|
23
|
+
|
|
24
|
+
| Name | Description |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `icon` | Use this slot to insert an icon in the input. |
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
| Name | Description | Type |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `update:modelValue` | Emits when the input value changes, updating the `modelValue` prop. | [value: string | number] |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# MToaster
|
|
2
|
+
|
|
3
|
+
A toaster is a temporary notification that appears briefly on the screen to provide feedback or updates without interrupting the user’s workflow. It is commonly used for success messages, warnings, errors, or informational updates. Toasters can disappear automatically after a few seconds, be dismissed manually via a close button, or be removed when the user performs a relevant action. They typically include an icon, a short message, and an optional close button for better usability.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Name | Description | Type | Default |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `open` | If `true`, display the Toaster. | `boolean` | - |
|
|
11
|
+
| `position` | Position of the toaster. | `"top"` `"bottom"` `"top-center"` `"bottom-center"` | - |
|
|
12
|
+
| `description*` | Description of the toaster. | `string` | - |
|
|
13
|
+
| `status` | Allows to define the toaster style. | `"info"` `"success"` `"warning"` `"error"` | `"info"` |
|
|
14
|
+
| `closable` | If `true`, display the close button. | `boolean` | `true` |
|
|
15
|
+
| `progress` | If `true`, display the progress bar of the duration. | `boolean` | - |
|
|
16
|
+
| `timeout` | Duration of the toaster | `number` | - |
|
|
17
|
+
|
|
18
|
+
## Slots
|
|
19
|
+
|
|
20
|
+
| Name | Description |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `action` | Use this slot to insert a button or a link in the toaster |
|
|
23
|
+
|
|
24
|
+
## Events
|
|
25
|
+
|
|
26
|
+
| Name | Description | Type |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| `update:open` | Emits when the checkbox value changes, updating the modelValue prop. | [value: boolean] |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# MToggle
|
|
2
|
+
|
|
3
|
+
A toggle is a switch component that allows users to enable or disable a setting, representing a binary state such as on/off or active/inactive. It provides a quick and intuitive way to control preferences or system settings. Toggles are commonly used in settings menus, dark mode switches, and feature activations, offering an alternative to checkboxes for immediate visual feedback.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Name | Description | Type | Default |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `id*` | A unique identifier for the toggle, used to associate the label with the form element. | `string` | - |
|
|
11
|
+
| `name` | The name attribute for the toggle element, typically used for form submission. | `string` | - |
|
|
12
|
+
| `label` | The text label displayed next to the toggle. | `string` | - |
|
|
13
|
+
| `modelValue` | The toggle's checked state, bound via v-model. | `boolean` | - |
|
|
14
|
+
| `size` | Determines the size of the toggle. | `"s"` `"m"` | `"s"` |
|
|
15
|
+
| `disabled` | If `true`, disables the toggle, making it non-interactive. | `boolean` | - |
|
|
16
|
+
|
|
17
|
+
## Events
|
|
18
|
+
|
|
19
|
+
| Name | Description | Type |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `update:modelValue` | Emits when the toggle value changes, updating the modelValue prop. | [value: boolean] |
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
:id="option.id"
|
|
6
6
|
:key="option.id"
|
|
7
7
|
:label="option.label"
|
|
8
|
-
:is-invalid="option.isInvalid"
|
|
9
8
|
:name="name"
|
|
10
9
|
:class="classObjectItem"
|
|
11
10
|
:model-value="modelValue ? modelValue.includes(option.value) : undefined"
|
|
@@ -20,7 +19,7 @@ import { computed, ref, watch } from 'vue';
|
|
|
20
19
|
import MToggle from '../toggle/MToggle.vue';
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
|
-
* A toggle is a switch component that allows users to enable or disable a setting, representing a binary state such as on/off or active/inactive. It provides a quick and intuitive way to control preferences or system settings. Toggles are commonly used in settings menus, dark mode switches, and feature activations, offering an alternative to checkboxes for immediate visual feedback.<br><br> To put a label, requierement text, help text or to apply a valid or invalid message, the examples are available in the [Field Group section](/docs/form-elements-field-group--docs#toggle-group).
|
|
22
|
+
* A toggle is a switch component that allows users to enable or disable a setting, representing a binary state such as on/off or active/inactive. It provides a quick and intuitive way to control preferences or system settings. Toggles are commonly used in settings menus, dark mode switches, and feature activations, offering an alternative to checkboxes for immediate visual feedback.<br><br> To put a label, requierement text, help text or to apply a valid or invalid message, the examples are available in the [Field Group section](/docs/form-elements-field-group--docs#toggle-group).
|
|
24
23
|
*/
|
|
25
24
|
const props = defineProps<{
|
|
26
25
|
/**
|
|
@@ -40,7 +39,6 @@ const props = defineProps<{
|
|
|
40
39
|
label: string;
|
|
41
40
|
value: string;
|
|
42
41
|
disabled?: boolean;
|
|
43
|
-
isInvalid?: boolean;
|
|
44
42
|
size?: 's' | 'm';
|
|
45
43
|
}>;
|
|
46
44
|
/**
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# MToggleGroup
|
|
2
|
+
|
|
3
|
+
A toggle is a switch component that allows users to enable or disable a setting, representing a binary state such as on/off or active/inactive. It provides a quick and intuitive way to control preferences or system settings. Toggles are commonly used in settings menus, dark mode switches, and feature activations, offering an alternative to checkboxes for immediate visual feedback.<br><br> To put a label, requierement text, help text or to apply a valid or invalid message, the examples are available in the [Field Group section](/docs/form-elements-field-group--docs#toggle-group).
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Name | Description | Type | Default |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `name*` | The name attribute for the toggle element, typically used for form submission. | `string` | - |
|
|
11
|
+
| `modelValue` | Property used to manage the values checked by v-model
|
|
12
|
+
(Do not use directly) | `string[]` | - |
|
|
13
|
+
| `options*` | List of properties of each toggle of the toggle group. | `{ id: string; label: string; value: string; disabled?: boolean` `undefined; size?: "s"` `"m"` `undefined; }[]` | - |
|
|
14
|
+
| `inline` | If `true`, make the form element of the group inline. | `boolean` | - |
|
|
15
|
+
|
|
16
|
+
## Events
|
|
17
|
+
|
|
18
|
+
| Name | Description | Type |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| `update:modelValue` | Emits when the toggle group value changes, updating the modelValue prop. | [value: Array<string>] |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# MTooltip
|
|
2
|
+
|
|
3
|
+
A tooltip is a small, contextual message that appears when users hover over, focus on, or tap an element, providing additional information or guidance without cluttering the interface. Tooltips are commonly used to explain icons, abbreviations, or complex actions. They typically disappear automatically when the user moves away from the trigger element.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Name | Description | Type | Default |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `id*` | A unique identifier for the tooltip, used to describe the tooltip. | `string` | - |
|
|
11
|
+
| `text*` | Content of the tooltip. | `string` | - |
|
|
12
|
+
| `position` | Determines the position of the tooltip. | `"left"` `"right"` `"top"` `"bottom"` | `"top"` |
|
|
13
|
+
| `pointer` | If `true`, the tooltip display a pointer. | `boolean` | `true` |
|
|
14
|
+
|
|
15
|
+
## Slots
|
|
16
|
+
|
|
17
|
+
| Name | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `default` | The tooltip will point to the content of the slot. |
|
package/src/main.ts
CHANGED
|
@@ -23,10 +23,12 @@ export { default as MNumberBadge } from './components/numberbadge/MNumberBadge.v
|
|
|
23
23
|
export { default as MOverlay } from './components/overlay/MOverlay.vue';
|
|
24
24
|
export { default as MPagination } from './components/pagination/MPagination.vue';
|
|
25
25
|
export { default as MPasswordInput } from './components/passwordinput/MPasswordInput.vue';
|
|
26
|
+
export { default as MPhoneNumber } from './components/phonenumber/MPhoneNumber.vue';
|
|
26
27
|
export { default as MPincode } from './components/pincode/MPincode.vue';
|
|
27
28
|
export { default as MQuantitySelector } from './components/quantityselector/MQuantitySelector.vue';
|
|
28
29
|
export { default as MRadio } from './components/radio/MRadio.vue';
|
|
29
30
|
export { default as MRadioGroup } from './components/radiogroup/MRadioGroup.vue';
|
|
31
|
+
export { default as MSegmentedControl } from './components/segmentedcontrol/MSegmentedControl.vue';
|
|
30
32
|
export { default as MSelect } from './components/select/MSelect.vue';
|
|
31
33
|
export { default as MStatusBadge } from './components/statusbadge/MStatusBadge.vue';
|
|
32
34
|
export { default as MStatusDot } from './components/statusdot/MStatusDot.vue';
|