@mozaic-ds/vue 2.6.1 → 2.7.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 (88) hide show
  1. package/README.md +3 -3
  2. package/dist/mozaic-vue.css +1 -1
  3. package/dist/mozaic-vue.d.ts +105 -63
  4. package/dist/mozaic-vue.js +1137 -1082
  5. package/dist/mozaic-vue.js.map +1 -1
  6. package/dist/mozaic-vue.umd.cjs +1 -1
  7. package/dist/mozaic-vue.umd.cjs.map +1 -1
  8. package/package.json +8 -6
  9. package/src/components/Contributing.mdx +1 -1
  10. package/src/components/GettingStarted.mdx +1 -1
  11. package/src/components/Introduction.mdx +1 -1
  12. package/src/components/Support.mdx +1 -1
  13. package/src/components/avatar/MAvatar.stories.ts +1 -0
  14. package/src/components/avatar/README.md +16 -0
  15. package/src/components/breadcrumb/README.md +11 -0
  16. package/src/components/button/MButton.stories.ts +1 -2
  17. package/src/components/button/MButton.vue +6 -1
  18. package/src/components/button/README.md +24 -0
  19. package/src/components/callout/MCallout.stories.ts +1 -0
  20. package/src/components/callout/README.md +19 -0
  21. package/src/components/checkbox/README.md +23 -0
  22. package/src/components/checkboxgroup/README.md +20 -0
  23. package/src/components/circularprogressbar/MCircularProgressbar.stories.ts +1 -0
  24. package/src/components/circularprogressbar/README.md +14 -0
  25. package/src/components/container/MContainer.stories.ts +8 -0
  26. package/src/components/container/MContainer.vue +1 -1
  27. package/src/components/container/README.md +16 -0
  28. package/src/components/datepicker/MDatepicker.stories.ts +1 -0
  29. package/src/components/datepicker/README.md +24 -0
  30. package/src/components/divider/MDivider.stories.ts +1 -0
  31. package/src/components/divider/README.md +18 -0
  32. package/src/components/drawer/MDrawer.spec.ts +28 -0
  33. package/src/components/drawer/MDrawer.stories.ts +1 -0
  34. package/src/components/drawer/MDrawer.vue +9 -2
  35. package/src/components/drawer/README.md +29 -0
  36. package/src/components/field/MField.vue +1 -1
  37. package/src/components/field/README.md +24 -0
  38. package/src/components/fieldgroup/README.md +22 -0
  39. package/src/components/flag/README.md +11 -0
  40. package/src/components/iconbutton/MIconButton.stories.ts +1 -0
  41. package/src/components/iconbutton/MIconButton.vue +1 -1
  42. package/src/components/iconbutton/README.md +21 -0
  43. package/src/components/linearprogressbarbuffer/MLinearProgressbarBuffer.stories.ts +1 -0
  44. package/src/components/linearprogressbarbuffer/README.md +11 -0
  45. package/src/components/linearprogressbarpercentage/MLinearProgressbarPercentage.stories.ts +1 -0
  46. package/src/components/linearprogressbarpercentage/README.md +10 -0
  47. package/src/components/link/MLink.vue +0 -2
  48. package/src/components/link/README.md +23 -0
  49. package/src/components/loader/MLoader.vue +1 -1
  50. package/src/components/loader/README.md +12 -0
  51. package/src/components/loadingoverlay/README.md +11 -0
  52. package/src/components/modal/README.md +28 -0
  53. package/src/components/numberbadge/README.md +12 -0
  54. package/src/components/overlay/README.md +17 -0
  55. package/src/components/pagination/README.md +20 -0
  56. package/src/components/passwordinput/README.md +25 -0
  57. package/src/components/pincode/MPincode.spec.ts +4 -1
  58. package/src/components/pincode/MPincode.stories.ts +1 -0
  59. package/src/components/pincode/MPincode.vue +5 -1
  60. package/src/components/pincode/README.md +22 -0
  61. package/src/components/quantityselector/README.md +27 -0
  62. package/src/components/radio/README.md +21 -0
  63. package/src/components/radiogroup/README.md +21 -0
  64. package/src/components/segmentedcontrol/MSegmentedControl.spec.ts +116 -0
  65. package/src/components/segmentedcontrol/MSegmentedControl.stories.ts +78 -0
  66. package/src/components/segmentedcontrol/MSegmentedControl.vue +92 -0
  67. package/src/components/segmentedcontrol/README.md +19 -0
  68. package/src/components/select/README.md +24 -0
  69. package/src/components/statusbadge/README.md +11 -0
  70. package/src/components/statusdot/MStatusDot.stories.ts +1 -0
  71. package/src/components/statusdot/README.md +11 -0
  72. package/src/components/statusnotification/README.md +25 -0
  73. package/src/components/tabs/MTabs.stories.ts +23 -1
  74. package/src/components/tabs/MTabs.vue +8 -0
  75. package/src/components/tabs/Mtabs.spec.ts +29 -8
  76. package/src/components/tabs/README.md +20 -0
  77. package/src/components/tag/README.md +25 -0
  78. package/src/components/textarea/README.md +25 -0
  79. package/src/components/textinput/README.md +32 -0
  80. package/src/components/toaster/MToaster.stories.ts +1 -0
  81. package/src/components/toaster/README.md +28 -0
  82. package/src/components/toggle/README.md +21 -0
  83. package/src/components/togglegroup/MToggleGroup.vue +1 -1
  84. package/src/components/togglegroup/README.md +20 -0
  85. package/src/components/tooltip/README.md +19 -0
  86. package/src/components/usingIcons.mdx +1 -1
  87. package/src/components/usingPresets.mdx +1 -1
  88. package/src/main.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozaic-ds/vue",
3
- "version": "2.6.1",
3
+ "version": "2.7.0",
4
4
  "type": "module",
5
5
  "description": "Mozaic-Vue is the Vue.js implementation of ADEO Design system",
6
6
  "author": "ADEO - ADEO Design system",
@@ -22,6 +22,7 @@
22
22
  "test:unit": "vitest",
23
23
  "format": "prettier --write src/",
24
24
  "build": "vite build",
25
+ "readme": "node generate-readmes.js ",
25
26
  "storybook": "storybook dev -p 6006",
26
27
  "storybook:build": "npm run build-storybook",
27
28
  "storybook:deploy": "storybook-to-ghpages",
@@ -40,14 +41,14 @@
40
41
  "*.d.ts"
41
42
  ],
42
43
  "dependencies": {
43
- "@mozaic-ds/styles": "2.0.0-beta.5",
44
+ "@mozaic-ds/styles": "^2.0.1",
44
45
  "@mozaic-ds/web-fonts": "1.65.0",
45
46
  "postcss-scss": "^4.0.9",
46
47
  "vue": "^3.5.13"
47
48
  },
48
49
  "devDependencies": {
49
- "@commitlint/cli": "^19.8.0",
50
- "@commitlint/config-conventional": "^19.8.0",
50
+ "@commitlint/cli": "^20.1.0",
51
+ "@commitlint/config-conventional": "^20.0.0",
51
52
  "@mozaic-ds/css-dev-tools": "1.75.0",
52
53
  "@mozaic-ds/icons-vue": "^1.0.0",
53
54
  "@release-it/conventional-changelog": "^10.0.1",
@@ -55,14 +56,13 @@
55
56
  "@storybook/addon-docs": "^9.0.18",
56
57
  "@storybook/addon-themes": "^9.0.18",
57
58
  "@storybook/vue3-vite": "^9.0.18",
58
- "@types/jsdom": "^21.1.7",
59
+ "@types/jsdom": "^27.0.0",
59
60
  "@vitejs/plugin-vue": "^6.0.1",
60
61
  "@vitest/coverage-v8": "^3.0.9",
61
62
  "@vitest/eslint-plugin": "^1.1.38",
62
63
  "@vue/eslint-config-prettier": "^10.2.0",
63
64
  "@vue/eslint-config-typescript": "^14.5.0",
64
65
  "@vue/test-utils": "^2.4.6",
65
- "all-contributors-cli": "^6.26.1",
66
66
  "eslint": "^9.22.0",
67
67
  "eslint-plugin-vue": "^10.0.0",
68
68
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
@@ -76,10 +76,12 @@
76
76
  "release-it": "^19.0.4",
77
77
  "sass": "^1.86.0",
78
78
  "storybook": "^9.0.18",
79
+ "storybook-addon-tag-badges": "^2.0.2",
79
80
  "typescript": "^5.7.2",
80
81
  "vite": "^7.1.1",
81
82
  "vite-plugin-dts": "^4.5.3",
82
83
  "vitest": "^3.0.9",
84
+ "vue-component-meta": "^3.0.8",
83
85
  "vue-eslint-parser": "^10.1.1"
84
86
  },
85
87
  "bugs": {
@@ -1,7 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import { Mermaid } from 'mdx-mermaid/Mermaid';
3
3
 
4
- <Meta title="Contributing" />
4
+ <Meta title="Getting Started/Contributing" />
5
5
 
6
6
  # Be part of something bigger!
7
7
 
@@ -1,6 +1,6 @@
1
1
  import { Meta, Source } from '@storybook/addon-docs/blocks';
2
2
 
3
- <Meta title="Getting Started" />
3
+ <Meta title="Getting Started/Getting Started" />
4
4
 
5
5
  # Getting Started
6
6
 
@@ -2,7 +2,7 @@ import { Meta, Source } from '@storybook/addon-docs/blocks';
2
2
  import ads from '../../.storybook/assets/logo.svg';
3
3
  import vue from '../../.storybook/assets/vue.svg';
4
4
 
5
- <Meta title="Introduction" />
5
+ <Meta title="Getting Started/Introduction" />
6
6
 
7
7
  <p
8
8
  style={{
@@ -1,6 +1,6 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
 
3
- <Meta title="Support" />
3
+ <Meta title="Getting Started/Support" />
4
4
 
5
5
  # Support
6
6
 
@@ -6,6 +6,7 @@ import Profile24 from '@mozaic-ds/icons-vue/src/components/Profile24/Profile24.v
6
6
  const meta: Meta<typeof MAvatar> = {
7
7
  title: 'Content/Avatar',
8
8
  component: MAvatar,
9
+ tags: ['v2'],
9
10
  parameters: {
10
11
  docs: {
11
12
  description: {
@@ -0,0 +1,16 @@
1
+ # MAvatar
2
+
3
+ An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `size` | Allows to define the avatar size. | `"s"` `"m"` `"l"` | `"s"` |
11
+
12
+ ## Slots
13
+
14
+ | Name | Description |
15
+ | --- | --- |
16
+ | `default` | Use this slot to insert the image, icon or intials of the avatar. |
@@ -0,0 +1,11 @@
1
+ # MBreadcrumb
2
+
3
+ A breadcrumb is a navigation help that displays the hierarchical path of the current page within a website or application. It helps users understand their location and allows them to navigate back to previous levels easily. Breadcrumbs improve usability and accessibility, especially in multi-level websites, dashboards, and e-commerce platforms.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `appearance` | Allows to define the breadcrumb appearance. | `"standard"` `"inverse"` | - |
11
+ | `links*` | Links of the breadcrumb. | `{ label: string; href: string; router?: boolean` `undefined; }[]` | - |
@@ -1,7 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
 
3
3
  import MButton from './MButton.vue';
4
- import Download24 from '@mozaic-ds/icons-vue/src/components/Download24/Download24.vue';
5
4
  import ChevronRight24 from '@mozaic-ds/icons-vue/src/components/ChevronRight24/ChevronRight24.vue';
6
5
 
7
6
  const meta: Meta<typeof MButton> = {
@@ -17,7 +16,7 @@ const meta: Meta<typeof MButton> = {
17
16
  },
18
17
  args: { default: 'Button Label' },
19
18
  render: (args) => ({
20
- components: { MButton, Download24, ChevronRight24 },
19
+ components: { MButton, ChevronRight24 },
21
20
  setup() {
22
21
  return { args };
23
22
  },
@@ -91,7 +91,7 @@ defineSlots<{
91
91
  */
92
92
  default: string;
93
93
  /**
94
- * Use this slot to insert an icon for the Button
94
+ * Use this slot to insert an icon for the Button.
95
95
  */
96
96
  icon?: VNode;
97
97
  }>();
@@ -110,4 +110,9 @@ const classObject = computed(() => {
110
110
 
111
111
  <style lang="scss" scoped>
112
112
  @use '@mozaic-ds/styles/components/button';
113
+
114
+ .mc-button__icon::v-deep(svg) {
115
+ width: 100%;
116
+ height: 100%;
117
+ }
113
118
  </style>
@@ -0,0 +1,24 @@
1
+ # MButton
2
+
3
+ Buttons are key interactive elements used to perform actions and can be used as standalone element, or as part of another component. Their appearance depends on the type of action required from the user and the context in which they are used.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `appearance` | Defines the visual style of the button. | `"standard"` `"inverse"` `"accent"` `"danger"` | `"standard"` |
11
+ | `size` | Determines the size of the button. | `"s"` `"m"` `"l"` | `"m"` |
12
+ | `disabled` | If `true`, disables the button, making it non-interactive. | `boolean` | - |
13
+ | `ghost` | If `true`, applies a "ghost" style to the button, typically a transparent background with a border. | `boolean` | - |
14
+ | `outlined` | If `true`, the button gets an outlined style, usually with just the border and no solid background. | `boolean` | - |
15
+ | `iconPosition` | Controls the positioning of an icon in the button. | `"left"` `"right"` `"only"` | - |
16
+ | `type` | Specifies the button's HTML `type` attribute. | `"button"` `"reset"` `"submit"` | `"button"` |
17
+ | `isLoading` | If `true`, a loading state is displayed. | `boolean` | - |
18
+
19
+ ## Slots
20
+
21
+ | Name | Description |
22
+ | --- | --- |
23
+ | `default` | The content displayed in the button. |
24
+ | `icon` | Use this slot to insert an icon for the Button. |
@@ -8,6 +8,7 @@ import ImageAlt32 from '@mozaic-ds/icons-vue/src/components/ImageAlt32/ImageAlt3
8
8
  const meta: Meta<typeof MCallout> = {
9
9
  title: 'Content/Callout',
10
10
  component: MCallout,
11
+ tags: ['v2'],
11
12
  parameters: {
12
13
  docs: {
13
14
  description: {
@@ -0,0 +1,19 @@
1
+ # MCallout
2
+
3
+ A callout is used to highlight additional information that can assist users with tips, extra details, or helpful guidance, without signaling a critical status or alert. Unlike notifications, callouts are not triggered by user actions and do not correspond to specific system states. They are designed to enhance the user experience by providing contextually relevant information that supports comprehension and usability.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `title*` | Title of the callout. | `string` | - |
11
+ | `description*` | Description of the callout. | `string` | - |
12
+ | `appearance` | Allows to define the callout appearance. | `"standard"` `"inverse"` `"accent"` `"tips"` | `"standard"` |
13
+
14
+ ## Slots
15
+
16
+ | Name | Description |
17
+ | --- | --- |
18
+ | `icon` | Use this slot to insert an icon. |
19
+ | `footer` | Use this slot to insert a button or a link in the footer of the callout. |
@@ -0,0 +1,23 @@
1
+ # MCheckbox
2
+
3
+ A checkbox is an interactive component used to select or deselect an option, typically within a list of choices. It allows users to make multiple selections independently and is often accompanied by a label for clarity. Checkboxes are commonly used in forms, filters, settings, and preference selections to provide a simple and intuitive way to enable or disable specific options.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `id*` | A unique identifier for the checkbox, used to associate the label with the form element. | `string` | - |
11
+ | `name` | The name attribute for the checkbox element, typically used for form submission. | `string` | - |
12
+ | `label` | The text label displayed next to the checkbox. | `string` | - |
13
+ | `modelValue` | The checkbox's checked state, bound via v-model. | `boolean` | - |
14
+ | `indeterminate` | Sets the checkbox to an indeterminate state (partially selected). | `boolean` | - |
15
+ | `isInvalid` | If `true`, applies an invalid state to the checkbox. | `boolean` | - |
16
+ | `disabled` | If `true`, disables the checkbox, making it non-interactive. | `boolean` | - |
17
+ | `indented` | If `true`, indent the checkbox. | `boolean` | - |
18
+
19
+ ## Events
20
+
21
+ | Name | Description | Type |
22
+ | --- | --- | --- |
23
+ | `update:modelValue` | Emits when the checkbox value changes, updating the modelValue prop. | [value: boolean] |
@@ -0,0 +1,20 @@
1
+ # MCheckboxGroup
2
+
3
+ A checkbox is an interactive component used to select or deselect an option, typically within a list of choices. It allows users to make multiple selections independently and is often accompanied by a label for clarity. Checkboxes are commonly used in forms, filters, settings, and preference selections to provide a simple and intuitive way to enable or disable specific options. <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
+ | `name*` | The name attribute for the checkbox 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 checkbox button of the checkbox group | `{ id: string; label: string; value: string; disabled?: boolean` `undefined; isInvalid?: boolean` `undefined; indented?: boolean` `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 checkbox group value changes, updating the modelValue prop. | [value: Array<string>] |
@@ -4,6 +4,7 @@ import MCircularProgressbar from './MCircularProgressbar.vue';
4
4
  const meta: Meta<typeof MCircularProgressbar> = {
5
5
  title: 'Indicators/Circular Progress Bar',
6
6
  component: MCircularProgressbar,
7
+ tags: ['v2'],
7
8
  parameters: {
8
9
  docs: {
9
10
  description: {
@@ -0,0 +1,14 @@
1
+ # MCircularProgressbar
2
+
3
+ A circular progress bar visually represents progress toward a goal or completion of a process using a circular shape. It is commonly used to indicate task completion or performance metrics. The progress is displayed as a partially filled ring, often accompanied by a percentage or status indicator. Circular Progress Bars are useful for providing users with real-time feedback on ongoing actions without taking up significant screen space.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `size` | Sets the size of the progress bar. | `"s"` `"m"` `"l"` | - |
11
+ | `value` | The current value of the progress bar. | `number` | `0` |
12
+ | `type` | Shows either a percentage or custom content. | `"percentage"` `"content"` | `"percentage"` |
13
+ | `contentValue` | Main content shown when `type` is `'content'`. | `string` | - |
14
+ | `additionalInfo` | Additional text shown to define the `contentValue`. | `string` | - |
@@ -4,6 +4,14 @@ import MContainer from './MContainer.vue';
4
4
  const meta: Meta<typeof MContainer> = {
5
5
  title: 'Foundations/Container',
6
6
  component: MContainer,
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component:
11
+ 'The Container component is designed to wrap your page or section content, typically grids or other layout elements. By default, it centers the content with a maximum width to ensure consistent alignment and spacing.',
12
+ },
13
+ },
14
+ },
7
15
  args: {
8
16
  default: `<h1>Container</h1>`,
9
17
  },
@@ -7,7 +7,7 @@
7
7
  <script setup lang="ts">
8
8
  import { computed, type VNode } from 'vue';
9
9
  /**
10
- * A Divider serves as a visual divider to separate content, providing a clear distinction between sections.
10
+ * The Container component is designed to wrap your page or section content, typically grids or other layout elements. By default, it centers the content with a maximum width to ensure consistent alignment and spacing.
11
11
  */
12
12
  const props = defineProps<{
13
13
  /**
@@ -0,0 +1,16 @@
1
+ # MContainer
2
+
3
+ The Container component is designed to wrap your page or section content, typically grids or other layout elements. By default, it centers the content with a maximum width to ensure consistent alignment and spacing.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `fluid` | If `true`, the container will take the full width. | `boolean` | - |
11
+
12
+ ## Slots
13
+
14
+ | Name | Description |
15
+ | --- | --- |
16
+ | `default` | Use this slot to insert the content of the container. |
@@ -6,6 +6,7 @@ import MDatepicker from './MDatepicker.vue';
6
6
  const meta: Meta<typeof MDatepicker> = {
7
7
  title: 'Form Elements/Datepicker',
8
8
  component: MDatepicker,
9
+ tags: ['v2'],
9
10
  parameters: {
10
11
  docs: {
11
12
  description: {
@@ -0,0 +1,24 @@
1
+ # MDatepicker
2
+
3
+ A date picker is an input component that allows users to select a date from a calendar interface or manually enter a date value. It enhances usability by providing structured date selection, reducing input errors, and ensuring format consistency. Date Pickers are commonly used in forms, booking systems, scheduling tools, and data filtering interfaces to facilitate accurate date 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 datepicker element, used to associate the label with the form element. | `string` | - |
11
+ | `name` | The name attribute for the datepicker element, typically used for form submission. | `string` | - |
12
+ | `modelValue` | The current value of the datepicker field. | `string` `number` | - |
13
+ | `isInvalid` | If `true`, applies an invalid state to the datepicker. | `boolean` | - |
14
+ | `disabled` | If `true`, disables the datepicker, making it non-interactive. | `boolean` | - |
15
+ | `size` | Determines the size of the datepicker. | `"s"` `"m"` | `"m"` |
16
+ | `readonly` | If `true`, the datepicker is read-only (cannot be edited). | `boolean` | - |
17
+ | `isClearable` | If `true`, a clear button will appear when the datepicker has a value. | `boolean` | - |
18
+ | `clearLabel` | The label text for the clear button. | `string` | `"clear content"` |
19
+
20
+ ## Events
21
+
22
+ | Name | Description | Type |
23
+ | --- | --- | --- |
24
+ | `update:modelValue` | Emits when the datepicker value changes, updating the `modelValue` prop. | [value: string | number] |
@@ -4,6 +4,7 @@ import MDivider from './MDivider.vue';
4
4
  const meta: Meta<typeof MDivider> = {
5
5
  title: 'Structure/Divider',
6
6
  component: MDivider,
7
+ tags: ['v2'],
7
8
  parameters: {
8
9
  docs: {
9
10
  description: {
@@ -0,0 +1,18 @@
1
+ # MDivider
2
+
3
+ A divider is a visual element used to separate content or sections within an interface. It helps improve readability and organization by creating clear distinctions between groups of information. Dividers can be thin lines, thick separators, or even styled with spacing variations, adapting to different layouts. They are commonly used in menus, lists, forms, and content blocks to create a structured visual hierarchy.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `orientation` | Determines the orientation of the divider. | `"horizontal"` `"vertical"` | `"horizontal"` |
11
+ | `appearance` | Determines the appearance of the divider. | `"inverse"` `"primary"` `"secondary"` `"tertiary"` | `"primary"` |
12
+ | `size` | Determines the size of the divider. | `"s"` `"m"` `"l"` | `"s"` |
13
+
14
+ ## Slots
15
+
16
+ | Name | Description |
17
+ | --- | --- |
18
+ | `default` | Use this slot to insert the content who need a vertical divider |
@@ -97,4 +97,32 @@ describe('MDrawer component', () => {
97
97
 
98
98
  expect(wrapper.find('.mc-drawer__back').exists()).toBe(false);
99
99
  });
100
+
101
+ it('sets the focus on the title when the drawer opens', async () => {
102
+ const wrapper = mount(MDrawer, {
103
+ props: {
104
+ title: 'Test Title',
105
+ },
106
+ attachTo: document.body,
107
+ });
108
+
109
+ const titleElement = wrapper.find('.mc-drawer__title').element;
110
+ expect(document.activeElement).not.toBe(titleElement);
111
+ await wrapper.setProps({ open: true });
112
+ expect(document.activeElement).toBe(titleElement);
113
+ });
114
+
115
+ it('does not set the focus on the title when the drawer closes', async () => {
116
+ const wrapper = mount(MDrawer, {
117
+ props: {
118
+ title: 'Test Title',
119
+ open: true
120
+ },
121
+ attachTo: document.body,
122
+ });
123
+
124
+ const titleElement = wrapper.find('.mc-drawer__title').element;
125
+ await wrapper.setProps({ open: false });
126
+ expect(document.activeElement).not.toBe(titleElement);
127
+ });
100
128
  });
@@ -7,6 +7,7 @@ import { ref, watch } from 'vue';
7
7
  const meta: Meta<typeof MDrawer> = {
8
8
  title: 'Overlay/Drawer',
9
9
  component: MDrawer,
10
+ tags: ['v2'],
10
11
  parameters: {
11
12
  layout: 'fullscreen',
12
13
  docs: {
@@ -24,7 +24,7 @@
24
24
  <ArrowBack24 aria-hidden="true" />
25
25
  </template>
26
26
  </MIconButton>
27
- <h2 class="mc-drawer__title" id="drawerTitle">{{ title }}</h2>
27
+ <h2 class="mc-drawer__title" tabindex="-1" id="drawerTitle" ref="titleRef">{{ title }}</h2>
28
28
  <MIconButton
29
29
  class="mc-drawer__close"
30
30
  aria-label="Close"
@@ -53,7 +53,7 @@
53
53
  </template>
54
54
 
55
55
  <script setup lang="ts">
56
- import { computed, watch, type VNode } from 'vue';
56
+ import { computed, watch, type VNode, ref } from 'vue';
57
57
  import ArrowBack24 from '@mozaic-ds/icons-vue/src/components/ArrowBack24/ArrowBack24.vue';
58
58
  import Cross24 from '@mozaic-ds/icons-vue/src/components/Cross24/Cross24.vue';
59
59
  import MIconButton from '../iconbutton/MIconButton.vue';
@@ -115,6 +115,13 @@ watch(
115
115
  },
116
116
  );
117
117
 
118
+ const titleRef = ref<HTMLElement | null>(null);
119
+ watch(() => props.open, (newValue) => {
120
+ if (newValue && titleRef.value) {
121
+ titleRef.value.focus();
122
+ }
123
+ });
124
+
118
125
  const onClose = () => {
119
126
  emit('update:open', false);
120
127
  };
@@ -0,0 +1,29 @@
1
+ # MDrawer
2
+
3
+ A drawer is a sliding panel that appears from the side of the screen, providing additional content, settings, or actions without disrupting the main view. It is often used for filtering options, or contextual details. It enhances usability by keeping interfaces clean while offering expandable functionality.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `open` | If `true`, display the drawer. | `boolean` | - |
11
+ | `position` | Position of the drawer. | `"left"` `"right"` | - |
12
+ | `extended` | If `true`, the drawer have a bigger width. | `boolean` | - |
13
+ | `back` | If `true`, display the back button. | `boolean` | - |
14
+ | `title*` | Title of the drawer. | `string` | - |
15
+ | `contentTitle` | Title of the content of the drawer. | `string` | - |
16
+
17
+ ## Slots
18
+
19
+ | Name | Description |
20
+ | --- | --- |
21
+ | `default` | Use this slot to insert the content of the drawer |
22
+ | `footer` | Use this slot to insert buttons in the footer |
23
+
24
+ ## Events
25
+
26
+ | Name | Description | Type |
27
+ | --- | --- | --- |
28
+ | `back` | Emits when click back button of the drawer. | [] |
29
+ | `update:open` | Emits when the drawer open state changes, updating the modelValue prop. | [value: boolean] |
@@ -29,7 +29,7 @@
29
29
  <script setup lang="ts">
30
30
  import { computed, type VNode } from 'vue';
31
31
  /**
32
- * This component creates a structured form field with a label, optional help text, error and validation message handling.
32
+ * A field label is a text element that identifies the purpose of an input field, providing users with clear guidance on what information to enter. It is typically placed above the input field and may include indicators for required or optional fields. Field Labels improve form usability, accessibility, and data entry accuracy by ensuring users understand the expected input.
33
33
  */
34
34
  const props = defineProps<{
35
35
  /**
@@ -0,0 +1,24 @@
1
+ # MField
2
+
3
+ A field label is a text element that identifies the purpose of an input field, providing users with clear guidance on what information to enter. It is typically placed above the input field and may include indicators for required or optional fields. Field Labels improve form usability, accessibility, and data entry accuracy by ensuring users understand the expected input.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `id*` | A unique identifier for the form field, used to associate the label with the form element. | `string` | - |
11
+ | `label*` | The text displayed as the label for the form field. | `string` | - |
12
+ | `requirementText` | Additional text displayed alongside the label, typically used to indicate if the form field is required or optional | `string` | - |
13
+ | `helpText` | Text shown below the form field to provide additional context or instructions for the user. | `string` | - |
14
+ | `helpId` | The value of the `id` attribute set on the **helpText** element. _This value is mandatory when using a helpText in order to guarantee the accessibility of the component._ | `string` | - |
15
+ | `isValid` | If `true`, applies a valid state to the form field. | `boolean` | - |
16
+ | `isInvalid` | If `true`, applies an invalid state to the form field. | `boolean` | - |
17
+ | `messageId` | The value of the `id` attribute set on the **validationMessage** element. _This value is mandatory when using a validationMessage in order to guarantee the accessibility of the component._ | `string` | - |
18
+ | `message` | message displayed when the form field has a valid or invalid state, usually indicating validation or errors. | `string` | - |
19
+
20
+ ## Slots
21
+
22
+ | Name | Description |
23
+ | --- | --- |
24
+ | `default` | Use this slot to insert the form element of your choice |
@@ -0,0 +1,22 @@
1
+ # MFieldGroup
2
+
3
+ This component creates a structured form field for group field such as Radio Group, Checkbox Group or Toggle Group with a label, optional help text, error and validation message handling.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `id*` | A unique identifier for the form field, used to associate the label with the form element. | `string` | - |
11
+ | `legend*` | The text displayed as the legend for the form fieldset. | `string` | - |
12
+ | `requirementText` | Additional text displayed alongside the label, typically used to indicate if the form field is required or optional | `string` | - |
13
+ | `helpText` | Text shown below the form field to provide additional context or instructions for the user. | `string` | - |
14
+ | `isValid` | If `true`, applies a valid state to the form field. | `boolean` | - |
15
+ | `isInvalid` | If `true`, applies an invalid state to the form field. | `boolean` | - |
16
+ | `message` | message displayed when the form field has a valid or invalid state, usually indicating validation or errors. | `string` | - |
17
+
18
+ ## Slots
19
+
20
+ | Name | Description |
21
+ | --- | --- |
22
+ | `default` | Use this slot to insert the form element of your choice |
@@ -0,0 +1,11 @@
1
+ # MFlag
2
+
3
+ A flag is used to display meta-information about a product or service, acting as a visual indicator of the main category of content. It is typically placed at the top of an element to ensure immediate visibility.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `label*` | Label of the Flag. | `string` | - |
11
+ | `appearance` | Allows to define the Flag appearance. | `"standard"` `"inverse"` `"accent"` `"danger"` | - |
@@ -8,6 +8,7 @@ import ChevronRight32 from '@mozaic-ds/icons-vue/src/components/ChevronRight32/C
8
8
  const meta: Meta<typeof MIconButton> = {
9
9
  title: 'Action/Icon Button',
10
10
  component: MIconButton,
11
+ tags: ['v2'],
11
12
  parameters: {
12
13
  docs: {
13
14
  description: {
@@ -52,7 +52,7 @@ const props = withDefaults(
52
52
 
53
53
  defineSlots<{
54
54
  /**
55
- * Use this slot to insert the form element of your choice
55
+ * Use this slot to insert an icon for the Button.
56
56
  */
57
57
  icon: VNode;
58
58
  }>();
@@ -0,0 +1,21 @@
1
+ # MIconButton
2
+
3
+ Buttons are key interactive elements used to perform actions and can be used as standalone element, or as part of another component. Their appearance depends on the type of action required from the user and the context in which they are used.
4
+
5
+
6
+ ## Props
7
+
8
+ | Name | Description | Type | Default |
9
+ | --- | --- | --- | --- |
10
+ | `appearance` | Defines the visual style of the icon button. | `"standard"` `"inverse"` `"accent"` `"danger"` | `"standard"` |
11
+ | `size` | Determines the size of the icon button. | `"s"` `"m"` `"l"` | `"m"` |
12
+ | `disabled` | If `true`, disables the icon button, making it non-interactive. | `boolean` | - |
13
+ | `ghost` | If `true`, applies a "ghost" style to the icon button. | `boolean` | - |
14
+ | `outlined` | If `true`, the icon button gets an outlined style. | `boolean` | - |
15
+ | `type` | Specifies the button's HTML `type` attribute. | `"button"` `"reset"` `"submit"` | `"button"` |
16
+
17
+ ## Slots
18
+
19
+ | Name | Description |
20
+ | --- | --- |
21
+ | `icon` | Use this slot to insert an icon for the Button. |
@@ -4,6 +4,7 @@ import MLinearProgressbarBuffer from './MLinearProgressbarBuffer.vue';
4
4
  const meta: Meta<typeof MLinearProgressbarBuffer> = {
5
5
  title: 'Indicators/Linear Progress Bar (Buffer)',
6
6
  component: MLinearProgressbarBuffer,
7
+ tags: ['v2'],
7
8
  parameters: {
8
9
  docs: {
9
10
  description: {