@mozaic-ds/vue 2.10.0 → 2.11.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 (31) hide show
  1. package/dist/mozaic-vue.css +1 -1
  2. package/dist/mozaic-vue.d.ts +156 -48
  3. package/dist/mozaic-vue.js +1528 -1200
  4. package/dist/mozaic-vue.js.map +1 -1
  5. package/dist/mozaic-vue.umd.cjs +5 -5
  6. package/dist/mozaic-vue.umd.cjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/components/kpiitem/MKpiItem.spec.ts +71 -0
  9. package/src/components/kpiitem/MKpiItem.stories.ts +69 -0
  10. package/src/components/kpiitem/MKpiItem.vue +89 -0
  11. package/src/components/kpiitem/README.md +15 -0
  12. package/src/components/phonenumber/README.md +2 -0
  13. package/src/components/starrating/MStarRating.spec.ts +203 -0
  14. package/src/components/starrating/MStarRating.stories.ts +82 -0
  15. package/src/components/starrating/MStarRating.vue +187 -0
  16. package/src/components/starrating/README.md +31 -0
  17. package/src/components/statusbadge/README.md +1 -1
  18. package/src/components/statusdot/README.md +1 -1
  19. package/src/components/statusmessage/MStatusMessage.spec.ts +76 -0
  20. package/src/components/statusmessage/MStatusMessage.stories.ts +52 -0
  21. package/src/components/statusmessage/MStatusMessage.vue +70 -0
  22. package/src/components/statusmessage/README.md +11 -0
  23. package/src/components/statusnotification/README.md +1 -1
  24. package/src/components/steppercompact/MStepperCompact.spec.ts +98 -0
  25. package/src/components/steppercompact/MStepperCompact.stories.ts +43 -0
  26. package/src/components/steppercompact/MStepperCompact.vue +105 -0
  27. package/src/components/steppercompact/README.md +13 -0
  28. package/src/components/tag/MTag.vue +2 -1
  29. package/src/components/tag/README.md +1 -1
  30. package/src/components/toaster/README.md +1 -1
  31. package/src/main.ts +3 -0
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <div class="mc-stepper-compact">
3
+ <div class="mc-circular-progressbar mc-stepper-compact__progress">
4
+ <MCircularProgressbar
5
+ aria-label="Progress bar"
6
+ type="content"
7
+ size="m"
8
+ :value="progressValue"
9
+ :content-value="contentValue"
10
+ class="mc-stepper-compact__indicator mc-stepper-compact__number"
11
+ />
12
+ </div>
13
+ <div class="mc-stepper-compact__label-container">
14
+ <p class="mc-stepper-compact__label">
15
+ {{ label }}
16
+ </p>
17
+ <p v-if="description" class="mc-stepper-compact__description">
18
+ {{ description }}
19
+ </p>
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ import { computed } from 'vue';
26
+ import MCircularProgressbar from '../circularprogressbar/MCircularProgressbar.vue';
27
+ /**
28
+ * 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.
29
+ */
30
+ const props = withDefaults(
31
+ defineProps<{
32
+ /**
33
+ * Current step of the stepper compact.
34
+ */
35
+ value?: number;
36
+ /**
37
+ * Maximum number of steps for the stepper compact.
38
+ */
39
+ maxSteps?: number;
40
+ /**
41
+ * Label of the stepper compact.
42
+ */
43
+ label: string;
44
+ /**
45
+ * Description displayed below the label of the stepper compact.
46
+ */
47
+ description?: string;
48
+ }>(),
49
+ {
50
+ value: 1,
51
+ maxSteps: 4,
52
+ },
53
+ );
54
+
55
+ const progressValue = computed(() => {
56
+ const value = props.value ?? 0;
57
+ const max = props.maxSteps ?? 1;
58
+ return Math.round((value / max) * 100);
59
+ });
60
+
61
+ const contentValue = computed(() => {
62
+ return `${props.value} / ${props.maxSteps}`;
63
+ });
64
+ </script>
65
+
66
+ <style lang="scss" scoped>
67
+ @use '@mozaic-ds/styles/components/stepper-compact';
68
+ @use '@mozaic-ds/styles/components/circular-progressbar/_t.circular-progressbar'
69
+ as *;
70
+
71
+ .mc-stepper-compact__progress {
72
+ width: $spacing-600;
73
+ height: $spacing-600;
74
+
75
+ ::v-deep(.mc-circular-progressbar__content) {
76
+ display: block;
77
+ visibility: visible;
78
+ }
79
+
80
+ ::v-deep(.mc-circular-progressbar__number) {
81
+ display: block;
82
+ visibility: visible;
83
+ opacity: 1;
84
+ color: inherit;
85
+ font-size: inherit;
86
+ line-height: inherit;
87
+ }
88
+
89
+ ::v-deep(.mc-circular-progressbar__number) {
90
+ display: block;
91
+ visibility: visible;
92
+ opacity: 1;
93
+ color: inherit;
94
+ font-size: inherit;
95
+ line-height: inherit;
96
+ }
97
+
98
+ ::v-deep(.mc-circular-progressbar__indicator) {
99
+ @include calculate-border-width(4, 48, 100);
100
+ stroke: $stepper-color-progress-bar-indicator;
101
+ fill: none;
102
+ stroke-linecap: round;
103
+ }
104
+ }
105
+ </style>
@@ -0,0 +1,13 @@
1
+ # MStepperCompact
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
+ | `value` | Current step of the stepper compact. | `number` | `1` |
11
+ | `maxSteps` | Maximum number of steps for the stepper compact. | `number` | `4` |
12
+ | `label*` | Label of the stepper compact. | `string` | - |
13
+ | `description` | Description displayed below the label of the stepper compact. | `string` | - |
@@ -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"` `"success"` `"warning"` `"error"` | `"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
@@ -31,9 +31,12 @@ export { default as MRadio } from './components/radio/MRadio.vue';
31
31
  export { default as MRadioGroup } from './components/radiogroup/MRadioGroup.vue';
32
32
  export { default as MSegmentedControl } from './components/segmentedcontrol/MSegmentedControl.vue';
33
33
  export { default as MSelect } from './components/select/MSelect.vue';
34
+ export { default as MStarRating } from './components/starrating/MStarRating.vue';
34
35
  export { default as MStatusBadge } from './components/statusbadge/MStatusBadge.vue';
35
36
  export { default as MStatusDot } from './components/statusdot/MStatusDot.vue';
37
+ export { default as MStatusMessage } from './components/statusmessage/MStatusMessage.vue';
36
38
  export { default as MStatusNotification } from './components/statusnotification/MStatusNotification.vue';
39
+ export { default as MStepperCompact } from './components/steppercompact/MStepperCompact.vue';
37
40
  export { default as MTabs } from './components/tabs/MTabs.vue';
38
41
  export { default as MTag } from './components/tag/MTag.vue';
39
42
  export { default as MTextArea } from './components/textarea/MTextArea.vue';