@mozaic-ds/vue 2.6.0 → 2.6.1
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 +1 -1
- package/dist/mozaic-vue.d.ts +276 -258
- package/dist/mozaic-vue.js +308 -292
- package/dist/mozaic-vue.js.map +1 -1
- package/dist/mozaic-vue.umd.cjs +1 -1
- package/dist/mozaic-vue.umd.cjs.map +1 -1
- package/package.json +2 -2
- package/src/components/avatar/MAvatar.vue +2 -2
- package/src/components/breadcrumb/MBreadcrumb.stories.ts +1 -0
- package/src/components/breadcrumb/MBreadcrumb.vue +3 -3
- package/src/components/button/MButton.vue +1 -1
- package/src/components/callout/MCallout.vue +5 -5
- package/src/components/checkbox/MCheckbox.vue +5 -1
- package/src/components/checkboxgroup/MCheckboxGroup.stories.ts +1 -1
- package/src/components/checkboxgroup/MCheckboxGroup.vue +1 -1
- package/src/components/circularprogressbar/MCircularProgressbar.vue +2 -2
- package/src/components/container/MContainer.stories.ts +3 -3
- package/src/components/container/MContainer.vue +2 -2
- package/src/components/datepicker/MDatepicker.stories.ts +1 -1
- package/src/components/datepicker/MDatepicker.vue +7 -3
- package/src/components/divider/MDivider.spec.ts +5 -5
- package/src/components/divider/MDivider.stories.ts +7 -13
- package/src/components/divider/MDivider.vue +8 -8
- package/src/components/drawer/MDrawer.vue +7 -3
- package/src/components/flag/MFlag.vue +2 -2
- package/src/components/iconbutton/MIconButton.vue +1 -1
- package/src/components/linearprogressbarbuffer/MLinearProgressbarBuffer.vue +5 -1
- package/src/components/linearprogressbarpercentage/MLinearProgressbarPercentage.vue +4 -0
- package/src/components/link/MLink.stories.ts +2 -2
- package/src/components/link/MLink.vue +22 -10
- package/src/components/loadingoverlay/MLoadingOverlay.stories.ts +1 -1
- package/src/components/loadingoverlay/MLoadingOverlay.vue +4 -0
- package/src/components/modal/MModal.vue +11 -7
- package/src/components/numberbadge/MNumberBadge.vue +4 -4
- package/src/components/overlay/MOverlay.stories.ts +1 -1
- package/src/components/overlay/MOverlay.vue +2 -2
- package/src/components/pagination/MPagination.stories.ts +1 -0
- package/src/components/pagination/MPagination.vue +1 -1
- package/src/components/passwordinput/MPasswordInput.vue +6 -2
- package/src/components/pincode/MPincode.stories.ts +1 -1
- package/src/components/pincode/MPincode.vue +5 -1
- package/src/components/quantityselector/MQuantitySelector.stories.ts +1 -1
- package/src/components/quantityselector/MQuantitySelector.vue +6 -2
- package/src/components/radio/MRadio.vue +5 -1
- package/src/components/radiogroup/MRadioGroup.vue +1 -1
- package/src/components/select/MSelect.vue +6 -2
- package/src/components/statusbadge/MStatusBadge.stories.ts +1 -1
- package/src/components/statusbadge/MStatusBadge.vue +3 -3
- package/src/components/statusdot/MStatusDot.vue +3 -3
- package/src/components/statusnotification/MStatusNotification.vue +3 -3
- package/src/components/tabs/Mtabs.spec.ts +3 -3
- package/src/components/tag/MTag.stories.ts +1 -1
- package/src/components/tag/MTag.vue +4 -0
- package/src/components/textarea/MTextArea.vue +5 -1
- package/src/components/textinput/MTextInput.vue +10 -6
- package/src/components/toaster/MToaster.vue +4 -4
- package/src/components/toggle/MToggle.vue +6 -2
- package/src/components/togglegroup/MToggleGroup.vue +2 -2
- package/src/components/tooltip/MTooltip.vue +8 -10
- package/src/main.ts +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mozaic-ds/vue",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
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",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"eslint-plugin-vue": "^10.0.0",
|
|
68
68
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
69
69
|
"husky": "^9.1.7",
|
|
70
|
-
"jsdom": "^
|
|
70
|
+
"jsdom": "^27.0.0",
|
|
71
71
|
"lint-staged": "^16.1.5",
|
|
72
72
|
"mdx-mermaid": "^2.0.3",
|
|
73
73
|
"mermaid": "^11.5.0",
|
|
@@ -12,7 +12,7 @@ import { computed, type VNode } from 'vue';
|
|
|
12
12
|
const props = withDefaults(
|
|
13
13
|
defineProps<{
|
|
14
14
|
/**
|
|
15
|
-
* Allows to define the avatar size
|
|
15
|
+
* Allows to define the avatar size.
|
|
16
16
|
*/
|
|
17
17
|
size?: 's' | 'm' | 'l';
|
|
18
18
|
}>(),
|
|
@@ -29,7 +29,7 @@ const classObject = computed(() => {
|
|
|
29
29
|
|
|
30
30
|
defineSlots<{
|
|
31
31
|
/**
|
|
32
|
-
* Use this slot to insert the image, icon or intials of the avatar
|
|
32
|
+
* Use this slot to insert the image, icon or intials of the avatar.
|
|
33
33
|
*/
|
|
34
34
|
default: VNode;
|
|
35
35
|
}>();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<nav class="mc-breadcrumb" :class="classObject"
|
|
2
|
+
<nav class="mc-breadcrumb" :class="classObject">
|
|
3
3
|
<ul class="mc-breadcrumb__container">
|
|
4
4
|
<li
|
|
5
5
|
class="mc-breadcrumb__item"
|
|
@@ -31,11 +31,11 @@ import MLink from '../link/MLink.vue';
|
|
|
31
31
|
*/
|
|
32
32
|
const props = defineProps<{
|
|
33
33
|
/**
|
|
34
|
-
* Allows to define the breadcrumb
|
|
34
|
+
* Allows to define the breadcrumb appearance.
|
|
35
35
|
*/
|
|
36
36
|
appearance?: 'standard' | 'inverse';
|
|
37
37
|
/**
|
|
38
|
-
* Links of the breadcrumb
|
|
38
|
+
* Links of the breadcrumb.
|
|
39
39
|
*/
|
|
40
40
|
links: Array<{
|
|
41
41
|
/**
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
import { computed, type VNode } from 'vue';
|
|
42
42
|
import MLoader from '../loader/MLoader.vue';
|
|
43
43
|
/**
|
|
44
|
-
* Buttons are used to
|
|
44
|
+
* 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.
|
|
45
45
|
*/
|
|
46
46
|
const props = withDefaults(
|
|
47
47
|
defineProps<{
|
|
@@ -25,15 +25,15 @@ import { computed, type VNode } from 'vue';
|
|
|
25
25
|
const props = withDefaults(
|
|
26
26
|
defineProps<{
|
|
27
27
|
/**
|
|
28
|
-
* Title of the callout
|
|
28
|
+
* Title of the callout.
|
|
29
29
|
*/
|
|
30
30
|
title: string;
|
|
31
31
|
/**
|
|
32
|
-
* Description of the callout
|
|
32
|
+
* Description of the callout.
|
|
33
33
|
*/
|
|
34
34
|
description: string;
|
|
35
35
|
/**
|
|
36
|
-
* Allows to define the callout
|
|
36
|
+
* Allows to define the callout appearance.
|
|
37
37
|
*/
|
|
38
38
|
appearance?: 'standard' | 'accent' | 'tips' | 'inverse';
|
|
39
39
|
}>(),
|
|
@@ -44,11 +44,11 @@ const props = withDefaults(
|
|
|
44
44
|
|
|
45
45
|
defineSlots<{
|
|
46
46
|
/**
|
|
47
|
-
* Use this slot to insert an icon
|
|
47
|
+
* Use this slot to insert an icon.
|
|
48
48
|
*/
|
|
49
49
|
icon?: VNode;
|
|
50
50
|
/**
|
|
51
|
-
* Use this slot to insert a button or a link in the footer of the callout
|
|
51
|
+
* Use this slot to insert a button or a link in the footer of the callout.
|
|
52
52
|
*/
|
|
53
53
|
footer?: VNode;
|
|
54
54
|
}>();
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { computed } from 'vue';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* 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.
|
|
29
29
|
*/
|
|
30
30
|
const props = defineProps<{
|
|
31
31
|
/**
|
|
@@ -80,6 +80,10 @@ const emit = defineEmits<{
|
|
|
80
80
|
*/
|
|
81
81
|
(on: 'update:modelValue', value: boolean): void;
|
|
82
82
|
}>();
|
|
83
|
+
|
|
84
|
+
defineOptions({
|
|
85
|
+
inheritAttrs: false,
|
|
86
|
+
});
|
|
83
87
|
</script>
|
|
84
88
|
|
|
85
89
|
<style lang="scss" scoped>
|
|
@@ -10,7 +10,7 @@ const meta: Meta<typeof MCheckboxGroup> = {
|
|
|
10
10
|
docs: {
|
|
11
11
|
description: {
|
|
12
12
|
component:
|
|
13
|
-
'A
|
|
13
|
+
'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).',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
},
|
|
@@ -22,7 +22,7 @@ import { computed, ref, watch } from 'vue';
|
|
|
22
22
|
import MCheckbox from '../checkbox/MCheckbox.vue';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* 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).
|
|
26
26
|
*/
|
|
27
27
|
const props = defineProps<{
|
|
28
28
|
/**
|
|
@@ -51,7 +51,7 @@ import { computed } from 'vue';
|
|
|
51
51
|
const props = withDefaults(
|
|
52
52
|
defineProps<{
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Sets the size of the progress bar.
|
|
55
55
|
*/
|
|
56
56
|
size?: 's' | 'm' | 'l';
|
|
57
57
|
/**
|
|
@@ -59,7 +59,7 @@ const props = withDefaults(
|
|
|
59
59
|
*/
|
|
60
60
|
value?: number;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Shows either a percentage or custom content.
|
|
63
63
|
*/
|
|
64
64
|
type?: 'percentage' | 'content';
|
|
65
65
|
/**
|
|
@@ -5,7 +5,7 @@ const meta: Meta<typeof MContainer> = {
|
|
|
5
5
|
title: 'Foundations/Container',
|
|
6
6
|
component: MContainer,
|
|
7
7
|
args: {
|
|
8
|
-
default: `<h1>Container</h1
|
|
8
|
+
default: `<h1>Container</h1>`,
|
|
9
9
|
},
|
|
10
10
|
render: (args) => ({
|
|
11
11
|
components: { MContainer },
|
|
@@ -25,8 +25,8 @@ type Story = StoryObj<typeof MContainer>;
|
|
|
25
25
|
export const Standard: Story = {};
|
|
26
26
|
|
|
27
27
|
export const Fluid: Story = {
|
|
28
|
-
args: {
|
|
28
|
+
args: {
|
|
29
29
|
fluid: true,
|
|
30
|
-
default: `<h1>Fluid Container</h1
|
|
30
|
+
default: `<h1>Fluid Container</h1>`,
|
|
31
31
|
},
|
|
32
32
|
};
|
|
@@ -11,14 +11,14 @@ import { computed, type VNode } from 'vue';
|
|
|
11
11
|
*/
|
|
12
12
|
const props = defineProps<{
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* If `true`, the container will take the full width.
|
|
15
15
|
*/
|
|
16
16
|
fluid?: boolean;
|
|
17
17
|
}>();
|
|
18
18
|
|
|
19
19
|
defineSlots<{
|
|
20
20
|
/**
|
|
21
|
-
* Use this slot to insert the content of the container
|
|
21
|
+
* Use this slot to insert the content of the container.
|
|
22
22
|
*/
|
|
23
23
|
default?: VNode;
|
|
24
24
|
}>();
|
|
@@ -10,7 +10,7 @@ const meta: Meta<typeof MDatepicker> = {
|
|
|
10
10
|
docs: {
|
|
11
11
|
description: {
|
|
12
12
|
component:
|
|
13
|
-
'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.',
|
|
13
|
+
'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).',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
import { computed, ref } from 'vue';
|
|
39
39
|
import CrossCircleFilled24 from '@mozaic-ds/icons-vue/src/components/CrossCircleFilled24/CrossCircleFilled24.vue';
|
|
40
40
|
/**
|
|
41
|
-
* 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.
|
|
41
|
+
* 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).
|
|
42
42
|
*/
|
|
43
43
|
const props = withDefaults(
|
|
44
44
|
defineProps<{
|
|
@@ -63,7 +63,7 @@ const props = withDefaults(
|
|
|
63
63
|
*/
|
|
64
64
|
disabled?: boolean;
|
|
65
65
|
/**
|
|
66
|
-
* Determines the size of the datepicker
|
|
66
|
+
* Determines the size of the datepicker.
|
|
67
67
|
*/
|
|
68
68
|
size?: 's' | 'm';
|
|
69
69
|
/**
|
|
@@ -75,7 +75,7 @@ const props = withDefaults(
|
|
|
75
75
|
*/
|
|
76
76
|
isClearable?: boolean;
|
|
77
77
|
/**
|
|
78
|
-
* The label text for the clear button
|
|
78
|
+
* The label text for the clear button.
|
|
79
79
|
*/
|
|
80
80
|
clearLabel?: string;
|
|
81
81
|
}>(),
|
|
@@ -105,6 +105,10 @@ const emit = defineEmits<{
|
|
|
105
105
|
*/
|
|
106
106
|
(on: 'update:modelValue', value: string | number): void;
|
|
107
107
|
}>();
|
|
108
|
+
|
|
109
|
+
defineOptions({
|
|
110
|
+
inheritAttrs: false,
|
|
111
|
+
});
|
|
108
112
|
</script>
|
|
109
113
|
|
|
110
114
|
<style lang="scss" scoped>
|
|
@@ -19,9 +19,9 @@ describe('MDivider component', () => {
|
|
|
19
19
|
expect(innerDiv.classes()).toContain('mc-divider-vertical');
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
it('applies the correct
|
|
22
|
+
it('applies the correct appearance class', () => {
|
|
23
23
|
const wrapper = mount(MDivider, {
|
|
24
|
-
props: {
|
|
24
|
+
props: { appearance: 'secondary' },
|
|
25
25
|
});
|
|
26
26
|
const innerDiv = wrapper.find('.mc-divider > div');
|
|
27
27
|
expect(innerDiv.classes()).toContain('mc-divider-horizontal--secondary');
|
|
@@ -38,7 +38,7 @@ describe('MDivider component', () => {
|
|
|
38
38
|
it('uses default props when none are provided', () => {
|
|
39
39
|
const wrapper = mount(MDivider);
|
|
40
40
|
expect(wrapper.props().orientation).toBe('horizontal');
|
|
41
|
-
expect(wrapper.props().
|
|
41
|
+
expect(wrapper.props().appearance).toBe('primary');
|
|
42
42
|
expect(wrapper.props().size).toBe('s');
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -46,12 +46,12 @@ describe('MDivider component', () => {
|
|
|
46
46
|
const wrapper = mount(MDivider, {
|
|
47
47
|
props: {
|
|
48
48
|
orientation: 'vertical',
|
|
49
|
-
|
|
49
|
+
appearance: 'tertiary',
|
|
50
50
|
size: 'l',
|
|
51
51
|
},
|
|
52
52
|
});
|
|
53
53
|
expect(wrapper.props().orientation).toBe('vertical');
|
|
54
|
-
expect(wrapper.props().
|
|
54
|
+
expect(wrapper.props().appearance).toBe('tertiary');
|
|
55
55
|
expect(wrapper.props().size).toBe('l');
|
|
56
56
|
});
|
|
57
57
|
});
|
|
@@ -4,18 +4,12 @@ import MDivider from './MDivider.vue';
|
|
|
4
4
|
const meta: Meta<typeof MDivider> = {
|
|
5
5
|
title: 'Structure/Divider',
|
|
6
6
|
component: MDivider,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
control: 'radio',
|
|
14
|
-
options: ['primary', 'secondary', 'tertiary', 'inverse'],
|
|
15
|
-
},
|
|
16
|
-
size: {
|
|
17
|
-
control: 'radio',
|
|
18
|
-
options: ['s', 'm', 'l'],
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component:
|
|
11
|
+
'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.',
|
|
12
|
+
},
|
|
19
13
|
},
|
|
20
14
|
},
|
|
21
15
|
render: (args) => ({
|
|
@@ -60,5 +54,5 @@ export const Size: Story = {
|
|
|
60
54
|
};
|
|
61
55
|
|
|
62
56
|
export const Secondary: Story = {
|
|
63
|
-
args: {
|
|
57
|
+
args: { appearance: 'secondary' },
|
|
64
58
|
};
|
|
@@ -8,26 +8,26 @@
|
|
|
8
8
|
<script setup lang="ts">
|
|
9
9
|
import { computed, type VNode } from 'vue';
|
|
10
10
|
/**
|
|
11
|
-
* A
|
|
11
|
+
* 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.
|
|
12
12
|
*/
|
|
13
13
|
const props = withDefaults(
|
|
14
14
|
defineProps<{
|
|
15
15
|
/**
|
|
16
|
-
* Determines the orientation of the divider
|
|
16
|
+
* Determines the orientation of the divider.
|
|
17
17
|
*/
|
|
18
18
|
orientation?: 'vertical' | 'horizontal';
|
|
19
19
|
/**
|
|
20
|
-
* Determines the
|
|
20
|
+
* Determines the appearance of the divider.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
appearance?: 'primary' | 'secondary' | 'tertiary' | 'inverse';
|
|
23
23
|
/**
|
|
24
|
-
* Determines the size of the divider
|
|
24
|
+
* Determines the size of the divider.
|
|
25
25
|
*/
|
|
26
26
|
size?: 's' | 'm' | 'l';
|
|
27
27
|
}>(),
|
|
28
28
|
{
|
|
29
29
|
orientation: 'horizontal',
|
|
30
|
-
|
|
30
|
+
appearance: 'primary',
|
|
31
31
|
size: 's',
|
|
32
32
|
},
|
|
33
33
|
);
|
|
@@ -42,8 +42,8 @@ defineSlots<{
|
|
|
42
42
|
const classObject = computed(() => {
|
|
43
43
|
return {
|
|
44
44
|
[`mc-divider-${props.orientation}`]: props.orientation,
|
|
45
|
-
[`mc-divider-horizontal--${props.
|
|
46
|
-
props.
|
|
45
|
+
[`mc-divider-horizontal--${props.appearance}`]:
|
|
46
|
+
props.appearance && props.appearance != 'primary',
|
|
47
47
|
[`mc-divider-horizontal--${props.size}`]: props.size && props.size != 's',
|
|
48
48
|
};
|
|
49
49
|
});
|
|
@@ -67,7 +67,7 @@ const props = defineProps<{
|
|
|
67
67
|
*/
|
|
68
68
|
open?: boolean;
|
|
69
69
|
/**
|
|
70
|
-
* Position of the drawer
|
|
70
|
+
* Position of the drawer.
|
|
71
71
|
*/
|
|
72
72
|
position?: 'left' | 'right';
|
|
73
73
|
/**
|
|
@@ -79,11 +79,11 @@ const props = defineProps<{
|
|
|
79
79
|
*/
|
|
80
80
|
back?: boolean;
|
|
81
81
|
/**
|
|
82
|
-
* Title of the drawer
|
|
82
|
+
* Title of the drawer.
|
|
83
83
|
*/
|
|
84
84
|
title: string;
|
|
85
85
|
/**
|
|
86
|
-
* Title of the content of the drawer
|
|
86
|
+
* Title of the content of the drawer.
|
|
87
87
|
*/
|
|
88
88
|
contentTitle?: string;
|
|
89
89
|
}>();
|
|
@@ -129,6 +129,10 @@ const emit = defineEmits<{
|
|
|
129
129
|
*/
|
|
130
130
|
(on: 'back'): void;
|
|
131
131
|
}>();
|
|
132
|
+
|
|
133
|
+
defineOptions({
|
|
134
|
+
inheritAttrs: false,
|
|
135
|
+
});
|
|
132
136
|
</script>
|
|
133
137
|
|
|
134
138
|
<style lang="scss" scoped>
|
|
@@ -13,11 +13,11 @@ import { computed } from 'vue';
|
|
|
13
13
|
*/
|
|
14
14
|
const props = defineProps<{
|
|
15
15
|
/**
|
|
16
|
-
* Label of the Flag
|
|
16
|
+
* Label of the Flag.
|
|
17
17
|
*/
|
|
18
18
|
label: string;
|
|
19
19
|
/**
|
|
20
|
-
* Allows to define the Flag
|
|
20
|
+
* Allows to define the Flag appearance.
|
|
21
21
|
*/
|
|
22
22
|
appearance?: 'danger' | 'accent' | 'inverse' | 'standard';
|
|
23
23
|
}>();
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<script setup lang="ts">
|
|
15
15
|
import { computed, type VNode } from 'vue';
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* 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.
|
|
18
18
|
*/
|
|
19
19
|
const props = withDefaults(
|
|
20
20
|
defineProps<{
|
|
@@ -20,7 +20,7 @@ import { computed } from 'vue';
|
|
|
20
20
|
const props = withDefaults(
|
|
21
21
|
defineProps<{
|
|
22
22
|
/**
|
|
23
|
-
* Allows to define the progress bar size
|
|
23
|
+
* Allows to define the progress bar size.
|
|
24
24
|
*/
|
|
25
25
|
size?: 's' | 'm' | 'l';
|
|
26
26
|
/**
|
|
@@ -39,6 +39,10 @@ const classObject = computed(() => {
|
|
|
39
39
|
props.size && props.size != 'm',
|
|
40
40
|
};
|
|
41
41
|
});
|
|
42
|
+
|
|
43
|
+
defineOptions({
|
|
44
|
+
inheritAttrs: false,
|
|
45
|
+
});
|
|
42
46
|
</script>
|
|
43
47
|
|
|
44
48
|
<style lang="scss" scoped>
|
|
@@ -4,13 +4,13 @@ import ChevronLeft24 from '@mozaic-ds/icons-vue/src/components/ChevronLeft24/Che
|
|
|
4
4
|
import ChevronRight24 from '@mozaic-ds/icons-vue/src/components/ChevronRight24/ChevronRight24.vue';
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof MLink> = {
|
|
7
|
-
title: 'Navigation/Link
|
|
7
|
+
title: 'Navigation/Link',
|
|
8
8
|
component: MLink,
|
|
9
9
|
parameters: {
|
|
10
10
|
docs: {
|
|
11
11
|
description: {
|
|
12
12
|
component:
|
|
13
|
-
'A link is
|
|
13
|
+
'A link is an interactive text element used to navigate between pages, sections, or external resources. It is typically underlined and styled to indicate its clickable nature. Links can be standalone or embedded within text, and they may include icons to reinforce their purpose. They are essential for navigation and content referencing in web and application interfaces.',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
},
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
:is="router ? 'router-link' : 'a'"
|
|
4
4
|
class="mc-link"
|
|
5
5
|
:class="classObject"
|
|
6
|
-
|
|
7
|
-
:target="target"
|
|
8
|
-
:to="router ? href : undefined"
|
|
6
|
+
v-bind="linkProps"
|
|
9
7
|
>
|
|
10
8
|
<span
|
|
11
9
|
v-if="$slots.icon && iconPosition == 'left'"
|
|
@@ -30,7 +28,7 @@
|
|
|
30
28
|
<script setup lang="ts">
|
|
31
29
|
import { computed, type VNode } from 'vue';
|
|
32
30
|
/**
|
|
33
|
-
* A link is
|
|
31
|
+
* A link is an interactive text element used to navigate between pages, sections, or external resources. It is typically underlined and styled to indicate its clickable nature. Links can be standalone or embedded within text, and they may include icons to reinforce their purpose. They are essential for navigation and content referencing in web and application interfaces.
|
|
34
32
|
*/
|
|
35
33
|
const props = withDefaults(
|
|
36
34
|
defineProps<{
|
|
@@ -39,11 +37,11 @@ const props = withDefaults(
|
|
|
39
37
|
*/
|
|
40
38
|
iconPosition?: 'left' | 'right';
|
|
41
39
|
/**
|
|
42
|
-
* Allows to define the link
|
|
40
|
+
* Allows to define the link appearance.
|
|
43
41
|
*/
|
|
44
42
|
appearance?: 'secondary' | 'accent' | 'inverse' | 'standard';
|
|
45
43
|
/**
|
|
46
|
-
* Allows to define the link size
|
|
44
|
+
* Allows to define the link size.
|
|
47
45
|
*/
|
|
48
46
|
size?: 's' | 'm';
|
|
49
47
|
/**
|
|
@@ -51,11 +49,11 @@ const props = withDefaults(
|
|
|
51
49
|
*/
|
|
52
50
|
href?: string;
|
|
53
51
|
/**
|
|
54
|
-
* Where to open the link
|
|
52
|
+
* Where to open the link.
|
|
55
53
|
*/
|
|
56
54
|
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
57
55
|
/**
|
|
58
|
-
* Specify wether the link is inline
|
|
56
|
+
* Specify wether the link is inline.
|
|
59
57
|
*/
|
|
60
58
|
inline?: boolean;
|
|
61
59
|
/**
|
|
@@ -74,11 +72,11 @@ const props = withDefaults(
|
|
|
74
72
|
|
|
75
73
|
defineSlots<{
|
|
76
74
|
/**
|
|
77
|
-
* Use this slot to insert the textual content of the Link
|
|
75
|
+
* Use this slot to insert the textual content of the Link.
|
|
78
76
|
*/
|
|
79
77
|
default: string;
|
|
80
78
|
/**
|
|
81
|
-
* Use this slot to insert an icon for the Link
|
|
79
|
+
* Use this slot to insert an icon for the Link.
|
|
82
80
|
*/
|
|
83
81
|
icon?: VNode;
|
|
84
82
|
}>();
|
|
@@ -92,6 +90,20 @@ const classObject = computed(() => {
|
|
|
92
90
|
'mc-link--stand-alone': !props.inline,
|
|
93
91
|
};
|
|
94
92
|
});
|
|
93
|
+
|
|
94
|
+
const linkProps = computed(() => {
|
|
95
|
+
if (props.router) {
|
|
96
|
+
return {
|
|
97
|
+
to: props.href,
|
|
98
|
+
target: props.target,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
href: props.href,
|
|
104
|
+
target: props.target,
|
|
105
|
+
};
|
|
106
|
+
});
|
|
95
107
|
</script>
|
|
96
108
|
|
|
97
109
|
<style lang="scss" scoped>
|
|
@@ -10,7 +10,7 @@ const meta: Meta<typeof MLoadingOverlay> = {
|
|
|
10
10
|
story: { height: '400px' },
|
|
11
11
|
description: {
|
|
12
12
|
component:
|
|
13
|
-
'
|
|
13
|
+
'A loading overlay is a full-screen or container-level layer that indicates a process is in progress, preventing user interaction until the task is completed. It includes a progress indicator, and a message to inform users about the loading state. Loading Overlays are commonly used in data-heavy applications, form submissions, and page transitions to enhance user experience by managing wait times effectively.',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
},
|
|
@@ -61,11 +61,11 @@ const props = withDefaults(
|
|
|
61
61
|
*/
|
|
62
62
|
open?: boolean;
|
|
63
63
|
/**
|
|
64
|
-
* Title of the modal
|
|
64
|
+
* Title of the modal.
|
|
65
65
|
*/
|
|
66
66
|
title: string;
|
|
67
67
|
/**
|
|
68
|
-
* Description of the modal
|
|
68
|
+
* Description of the modal.
|
|
69
69
|
*/
|
|
70
70
|
description?: string;
|
|
71
71
|
/**
|
|
@@ -80,19 +80,19 @@ const props = withDefaults(
|
|
|
80
80
|
|
|
81
81
|
defineSlots<{
|
|
82
82
|
/**
|
|
83
|
-
* Use this slot to insert an icon next to the title of the modal
|
|
83
|
+
* Use this slot to insert an icon next to the title of the modal.
|
|
84
84
|
*/
|
|
85
85
|
icon?: VNode;
|
|
86
86
|
/**
|
|
87
|
-
* Use this slot to insert the content of the modal
|
|
87
|
+
* Use this slot to insert the content of the modal.
|
|
88
88
|
*/
|
|
89
89
|
default?: VNode;
|
|
90
90
|
/**
|
|
91
|
-
* Use this slot to insert a link in the footer
|
|
91
|
+
* Use this slot to insert a link in the footer.
|
|
92
92
|
*/
|
|
93
93
|
link?: VNode;
|
|
94
94
|
/**
|
|
95
|
-
* Use this slot to insert buttons in the footer
|
|
95
|
+
* Use this slot to insert buttons in the footer.
|
|
96
96
|
*/
|
|
97
97
|
footer?: VNode;
|
|
98
98
|
}>();
|
|
@@ -116,10 +116,14 @@ const onClose = () => {
|
|
|
116
116
|
|
|
117
117
|
const emit = defineEmits<{
|
|
118
118
|
/**
|
|
119
|
-
* Emits when the
|
|
119
|
+
* Emits when the modal display changes, updating the modelValue prop.
|
|
120
120
|
*/
|
|
121
121
|
(on: 'update:open', value: boolean): void;
|
|
122
122
|
}>();
|
|
123
|
+
|
|
124
|
+
defineOptions({
|
|
125
|
+
inheritAttrs: false,
|
|
126
|
+
});
|
|
123
127
|
</script>
|
|
124
128
|
|
|
125
129
|
<style lang="scss" scoped>
|