@mozaic-ds/vue 2.10.0 → 2.12.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 +1 -1
- package/dist/mozaic-vue.d.ts +417 -212
- package/dist/mozaic-vue.js +1737 -1231
- package/dist/mozaic-vue.js.map +1 -1
- package/dist/mozaic-vue.umd.cjs +5 -5
- package/dist/mozaic-vue.umd.cjs.map +1 -1
- package/package.json +2 -2
- package/src/components/builtinmenu/MBuiltInMenu.spec.ts +111 -0
- package/src/components/builtinmenu/MBuiltInMenu.stories.ts +58 -0
- package/src/components/builtinmenu/MBuiltInMenu.vue +110 -0
- package/src/components/builtinmenu/README.md +18 -0
- package/src/components/checklistmenu/MCheckListMenu.spec.ts +77 -0
- package/src/components/checklistmenu/MCheckListMenu.stories.ts +46 -0
- package/src/components/checklistmenu/MCheckListMenu.vue +61 -0
- package/src/components/checklistmenu/README.md +18 -0
- package/src/components/kpiitem/MKpiItem.spec.ts +71 -0
- package/src/components/kpiitem/MKpiItem.stories.ts +69 -0
- package/src/components/kpiitem/MKpiItem.vue +89 -0
- package/src/components/kpiitem/README.md +15 -0
- package/src/components/phonenumber/README.md +2 -0
- package/src/components/starrating/MStarRating.spec.ts +203 -0
- package/src/components/starrating/MStarRating.stories.ts +82 -0
- package/src/components/starrating/MStarRating.vue +187 -0
- package/src/components/starrating/README.md +31 -0
- package/src/components/statusbadge/README.md +1 -1
- package/src/components/statusdot/README.md +1 -1
- package/src/components/statusmessage/MStatusMessage.spec.ts +76 -0
- package/src/components/statusmessage/MStatusMessage.stories.ts +52 -0
- package/src/components/statusmessage/MStatusMessage.vue +70 -0
- package/src/components/statusmessage/README.md +11 -0
- package/src/components/statusnotification/README.md +1 -1
- package/src/components/steppercompact/MStepperCompact.spec.ts +98 -0
- package/src/components/steppercompact/MStepperCompact.stories.ts +43 -0
- package/src/components/steppercompact/MStepperCompact.vue +105 -0
- package/src/components/steppercompact/README.md +13 -0
- package/src/components/stepperinline/MStepperInline.spec.ts +78 -0
- package/src/components/stepperinline/MStepperInline.stories.ts +49 -0
- package/src/components/stepperinline/MStepperInline.vue +94 -0
- package/src/components/stepperinline/README.md +11 -0
- package/src/components/tag/MTag.vue +2 -1
- package/src/components/tag/README.md +1 -1
- package/src/components/toaster/README.md +1 -1
- package/src/main.ts +6 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="mc-stepper-inline" aria-label="Stepper">
|
|
3
|
+
<ol class="mc-stepper-inline__container">
|
|
4
|
+
<li
|
|
5
|
+
v-for="(step, i) in steps"
|
|
6
|
+
:key="i"
|
|
7
|
+
class="mc-stepper-inline__item"
|
|
8
|
+
:class="{ 'is-completed': stepStates[i].completed }"
|
|
9
|
+
:tabindex="stepStates[i].completed ? 0 : undefined"
|
|
10
|
+
>
|
|
11
|
+
<Check24
|
|
12
|
+
class="mc-stepper-inline__icon mc-stepper-inline__icon--check"
|
|
13
|
+
v-if="stepStates[i].completed"
|
|
14
|
+
aria-hidden="true"
|
|
15
|
+
/>
|
|
16
|
+
<span
|
|
17
|
+
v-else
|
|
18
|
+
class="mc-stepper-inline__circle"
|
|
19
|
+
:class="{ 'is-current': stepStates[i].current }"
|
|
20
|
+
>
|
|
21
|
+
{{ i + 1 }}
|
|
22
|
+
</span>
|
|
23
|
+
<div class="mc-stepper-inline__content">
|
|
24
|
+
<span
|
|
25
|
+
class="mc-stepper-inline__label"
|
|
26
|
+
:class="{ 'is-current': stepStates[i].current }"
|
|
27
|
+
>
|
|
28
|
+
{{ step.label }}
|
|
29
|
+
</span>
|
|
30
|
+
<span
|
|
31
|
+
v-if="step.additionalInfo"
|
|
32
|
+
class="mc-stepper-inline__additional"
|
|
33
|
+
>
|
|
34
|
+
{{ step.additionalInfo }}
|
|
35
|
+
</span>
|
|
36
|
+
</div>
|
|
37
|
+
<ChevronRight24
|
|
38
|
+
v-if="i < steps.length - 1"
|
|
39
|
+
class="mc-stepper-inline__icon mc-stepper-inline__icon--chevron"
|
|
40
|
+
/>
|
|
41
|
+
</li>
|
|
42
|
+
</ol>
|
|
43
|
+
</nav>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script setup lang="ts">
|
|
47
|
+
import { computed } from 'vue';
|
|
48
|
+
import Check24 from '@mozaic-ds/icons-vue/src/components/Check24/Check24.vue';
|
|
49
|
+
import ChevronRight24 from '@mozaic-ds/icons-vue/src/components/ChevronRight24/ChevronRight24.vue';
|
|
50
|
+
/**
|
|
51
|
+
* A stepper is a navigation component that guides users through a sequence of steps in a structured process. It visually represents progress, completed steps, and upcoming steps, helping users understand their position within a workflow. Steppers are commonly used in multi-step forms, onboarding flows, checkout processes, and task completion sequences to improve clarity and reduce cognitive load.
|
|
52
|
+
*/
|
|
53
|
+
const props = withDefaults(
|
|
54
|
+
defineProps<{
|
|
55
|
+
/**
|
|
56
|
+
* Current step of the stepper compact.
|
|
57
|
+
*/
|
|
58
|
+
currentStep?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Steps of the stepper inline.
|
|
61
|
+
*/
|
|
62
|
+
steps?: Array<{
|
|
63
|
+
/**
|
|
64
|
+
* Label of the step.
|
|
65
|
+
*/
|
|
66
|
+
label: string;
|
|
67
|
+
/**
|
|
68
|
+
* Optional additional information under the label.
|
|
69
|
+
*/
|
|
70
|
+
additionalInfo?: string;
|
|
71
|
+
}>;
|
|
72
|
+
}>(),
|
|
73
|
+
{
|
|
74
|
+
currentStep: 1,
|
|
75
|
+
steps: () => [],
|
|
76
|
+
},
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const safeStep = computed(() =>
|
|
80
|
+
Math.min(Math.max(props.currentStep, 1), props.steps.length),
|
|
81
|
+
);
|
|
82
|
+
const steps = props.steps;
|
|
83
|
+
|
|
84
|
+
const stepStates = computed(() =>
|
|
85
|
+
steps.map((_, i) => ({
|
|
86
|
+
completed: i + 1 < safeStep.value,
|
|
87
|
+
current: i + 1 === safeStep.value,
|
|
88
|
+
})),
|
|
89
|
+
);
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<style scoped lang="scss">
|
|
93
|
+
@use '@mozaic-ds/styles/components/stepper-inline';
|
|
94
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# MStepperInline
|
|
2
|
+
|
|
3
|
+
A stepper is a navigation component that guides users through a sequence of steps in a structured process. It visually represents progress, completed steps, and upcoming steps, helping users understand their position within a workflow. Steppers are commonly used in multi-step forms, onboarding flows, checkout processes, and task completion sequences to improve clarity and reduce cognitive load.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Name | Description | Type | Default |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `currentStep` | Current step of the stepper compact. | `number` | `1` |
|
|
11
|
+
| `steps` | Steps of the stepper inline. | `{ label: string; additionalInfo?: string` `undefined; }[]` | `[]` |
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
@click="id && emit('remove-tag', id)"
|
|
61
61
|
>
|
|
62
62
|
<CrossCircleFilled24 class="mc-tag-removable__icon" aria-hidden="true" />
|
|
63
|
-
<span class="mc-tag-removable__text">removableLabel</span>
|
|
63
|
+
<span class="mc-tag-removable__text">{{ removableLabel }}</span>
|
|
64
64
|
</button>
|
|
65
65
|
</span>
|
|
66
66
|
|
|
@@ -124,6 +124,7 @@ const props = withDefaults(
|
|
|
124
124
|
{
|
|
125
125
|
type: 'informative',
|
|
126
126
|
contextualisedNumber: 99,
|
|
127
|
+
removableLabel: 'Remove',
|
|
127
128
|
},
|
|
128
129
|
);
|
|
129
130
|
|
|
@@ -15,7 +15,7 @@ A Tag is a UI element used to filter data, categorize, select or deselect an opt
|
|
|
15
15
|
| `modelValue` | The tag's checked state, bound via v-model. Used only for type: 'selectable'. | `boolean` | - |
|
|
16
16
|
| `disabled` | If `true`, disables the tag, making it non-interactive. Applicable to selectable, interactive, and contextualised types. | `boolean` | - |
|
|
17
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` |
|
|
18
|
+
| `removableLabel` | Accessible label text for the remove button in removable tags. | `string` | `"Remove"` |
|
|
19
19
|
|
|
20
20
|
## Events
|
|
21
21
|
|
|
@@ -10,7 +10,7 @@ A toaster is a temporary notification that appears briefly on the screen to prov
|
|
|
10
10
|
| `open` | If `true`, display the Toaster. | `boolean` | - |
|
|
11
11
|
| `position` | Position of the toaster. | `"top"` `"bottom"` `"top-center"` `"bottom-center"` | - |
|
|
12
12
|
| `description*` | Description of the toaster. | `string` | - |
|
|
13
|
-
| `status` | Allows to define the toaster style. | `"info"` `"
|
|
13
|
+
| `status` | Allows to define the toaster style. | `"info"` `"warning"` `"error"` `"success"` | `"info"` |
|
|
14
14
|
| `closable` | If `true`, display the close button. | `boolean` | `true` |
|
|
15
15
|
| `progress` | If `true`, display the progress bar of the duration. | `boolean` | - |
|
|
16
16
|
| `timeout` | Duration of the toaster | `number` | - |
|
package/src/main.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export { default as MAvatar } from './components/avatar/MAvatar.vue';
|
|
2
2
|
export { default as MBreadcrumb } from './components/breadcrumb/MBreadcrumb.vue';
|
|
3
|
+
export { default as MBuiltInMenu } from './components/builtinmenu/MBuiltInMenu.vue';
|
|
3
4
|
export { default as MButton } from './components/button/MButton.vue';
|
|
4
5
|
export { default as MCallout } from './components/callout/MCallout.vue';
|
|
5
6
|
export { default as MCarousel } from './components/carousel/MCarousel.vue';
|
|
6
7
|
export { default as MCheckbox } from './components/checkbox/MCheckbox.vue';
|
|
7
8
|
export { default as MCheckboxGroup } from './components/checkboxgroup/MCheckboxGroup.vue';
|
|
9
|
+
export { default as MCheckListMenu } from './components/checklistmenu/MCheckListMenu.vue';
|
|
8
10
|
export { default as MCircularProgressbar } from './components/circularprogressbar/MCircularProgressbar.vue';
|
|
9
11
|
export { default as MContainer } from './components/container/MContainer.vue';
|
|
10
12
|
export { default as MDatepicker } from './components/datepicker/MDatepicker.vue';
|
|
@@ -31,9 +33,13 @@ export { default as MRadio } from './components/radio/MRadio.vue';
|
|
|
31
33
|
export { default as MRadioGroup } from './components/radiogroup/MRadioGroup.vue';
|
|
32
34
|
export { default as MSegmentedControl } from './components/segmentedcontrol/MSegmentedControl.vue';
|
|
33
35
|
export { default as MSelect } from './components/select/MSelect.vue';
|
|
36
|
+
export { default as MStarRating } from './components/starrating/MStarRating.vue';
|
|
34
37
|
export { default as MStatusBadge } from './components/statusbadge/MStatusBadge.vue';
|
|
35
38
|
export { default as MStatusDot } from './components/statusdot/MStatusDot.vue';
|
|
39
|
+
export { default as MStatusMessage } from './components/statusmessage/MStatusMessage.vue';
|
|
36
40
|
export { default as MStatusNotification } from './components/statusnotification/MStatusNotification.vue';
|
|
41
|
+
export { default as MStepperCompact } from './components/steppercompact/MStepperCompact.vue';
|
|
42
|
+
export { default as MStepperInline } from './components/stepperinline/MStepperInline.vue';
|
|
37
43
|
export { default as MTabs } from './components/tabs/MTabs.vue';
|
|
38
44
|
export { default as MTag } from './components/tag/MTag.vue';
|
|
39
45
|
export { default as MTextArea } from './components/textarea/MTextArea.vue';
|