@mozaic-ds/vue 2.18.0 → 2.19.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 +25 -17
- package/dist/mozaic-vue.js +1240 -1130
- package/dist/mozaic-vue.js.map +1 -1
- package/dist/mozaic-vue.umd.cjs +6 -6
- package/dist/mozaic-vue.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/components/BrandPresets.mdx +20 -2
- package/src/components/actionlistbox/MActionListbox.spec.ts +99 -0
- package/src/components/actionlistbox/MActionListbox.vue +54 -7
- package/src/components/breadcrumb/MBreadcrumb.vue +1 -1
- package/src/components/button/MButton.spec.ts +26 -0
- package/src/components/button/MButton.vue +2 -0
- package/src/components/callout/MCallout.stories.ts +0 -3
- package/src/components/callout/MCallout.vue +4 -3
- package/src/components/callout/README.md +2 -2
- package/src/components/carousel/MCarousel.spec.ts +26 -2
- package/src/components/carousel/MCarousel.vue +10 -4
- package/src/components/combobox/MCombobox.vue +7 -0
- package/src/components/drawer/MDrawer.spec.ts +102 -3
- package/src/components/drawer/MDrawer.vue +73 -14
- package/src/components/field/MField.vue +1 -0
- package/src/components/fileuploader/MFileUploader.vue +2 -2
- package/src/components/fileuploaderitem/MFileUploaderItem.vue +2 -7
- package/src/components/iconbutton/MIconButton.spec.ts +15 -0
- package/src/components/iconbutton/MIconButton.vue +1 -0
- package/src/components/kpiitem/MKpiItem.spec.ts +13 -0
- package/src/components/kpiitem/MKpiItem.vue +1 -1
- package/src/components/modal/MModal.spec.ts +115 -3
- package/src/components/modal/MModal.vue +91 -11
- package/src/components/modal/README.md +1 -1
- package/src/components/overlay/MOverlay.spec.ts +1 -1
- package/src/components/overlay/MOverlay.vue +1 -1
- package/src/components/phonenumber/MPhoneNumber.spec.ts +6 -2
- package/src/components/phonenumber/MPhoneNumber.vue +20 -16
- package/src/components/sidebarexpandableitem/MSidebarExpandableItem.spec.ts +12 -0
- package/src/components/sidebarexpandableitem/MSidebarExpandableItem.vue +1 -0
- package/src/components/steppercompact/MStepperCompact.spec.ts +9 -0
- package/src/components/steppercompact/MStepperCompact.vue +1 -1
- package/src/components/stepperinline/MStepperInline.spec.ts +11 -0
- package/src/components/stepperinline/MStepperInline.vue +1 -1
- package/src/components/stepperstacked/MStepperStacked.spec.ts +13 -0
- package/src/components/stepperstacked/MStepperStacked.vue +1 -0
- package/src/components/textinput/MTextInput.vue +2 -2
- package/src/components/toggle/MToggle.vue +1 -1
|
@@ -50,6 +50,15 @@ describe('MStepperCompact component', () => {
|
|
|
50
50
|
expect(progressbar.props('contentValue')).toBe('3 / 7');
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
+
it('passes a dynamic aria-label reflecting current step to MCircularProgressbar', () => {
|
|
54
|
+
const wrapper = mount(MStepperCompact, {
|
|
55
|
+
props: { label: 'Step', value: 2, maxSteps: 5 },
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const progressbar = wrapper.findComponent({ name: 'MCircularProgressbar' });
|
|
59
|
+
expect(progressbar.attributes('aria-label')).toBe('Step 2 / 5');
|
|
60
|
+
});
|
|
61
|
+
|
|
53
62
|
it('passes correct props to MCircularProgressbar', () => {
|
|
54
63
|
const wrapper = mount(MStepperCompact, {
|
|
55
64
|
props: {
|
|
@@ -9,6 +9,17 @@ describe('MStepperInline', () => {
|
|
|
9
9
|
{ id: '3', label: 'Step 3' },
|
|
10
10
|
];
|
|
11
11
|
|
|
12
|
+
it('sets aria-current="step" on the current step item', () => {
|
|
13
|
+
const wrapper = mount(MStepperInline, {
|
|
14
|
+
props: { currentStep: '2', steps: defaultSteps },
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const items = wrapper.findAll('.mc-stepper-inline__item');
|
|
18
|
+
expect(items[1].attributes('aria-current')).toBe('step');
|
|
19
|
+
expect(items[0].attributes('aria-current')).toBeUndefined();
|
|
20
|
+
expect(items[2].attributes('aria-current')).toBeUndefined();
|
|
21
|
+
});
|
|
22
|
+
|
|
12
23
|
it('renders correctly with default props', () => {
|
|
13
24
|
const wrapper = mount(MStepperInline, {
|
|
14
25
|
props: {
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
class="mc-stepper-inline__item"
|
|
8
8
|
:class="{ 'is-completed': stepStates[i].completed }"
|
|
9
9
|
:tabindex="stepStates[i].completed ? 0 : undefined"
|
|
10
|
+
:aria-current="stepStates[i].current ? 'step' : undefined"
|
|
10
11
|
>
|
|
11
12
|
<Check24
|
|
12
13
|
class="mc-stepper-inline__icon mc-stepper-inline__icon--check"
|
|
13
14
|
v-if="stepStates[i].completed"
|
|
14
|
-
aria-hidden="true"
|
|
15
15
|
/>
|
|
16
16
|
<span
|
|
17
17
|
v-else
|
|
@@ -9,6 +9,19 @@ const defaultSteps = [
|
|
|
9
9
|
];
|
|
10
10
|
|
|
11
11
|
describe('MStepperStacked', () => {
|
|
12
|
+
describe('Accessibility', () => {
|
|
13
|
+
it('sets aria-current="step" on the current step item', () => {
|
|
14
|
+
const wrapper = mount(MStepperStacked, {
|
|
15
|
+
props: { steps: defaultSteps, currentStep: '2' },
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const items = wrapper.findAll('.mc-stepper-stacked__item');
|
|
19
|
+
expect(items[1].attributes('aria-current')).toBe('step');
|
|
20
|
+
expect(items[0].attributes('aria-current')).toBeUndefined();
|
|
21
|
+
expect(items[2].attributes('aria-current')).toBeUndefined();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
12
25
|
describe('Basic rendering', () => {
|
|
13
26
|
it('renders as many li elements as there are steps', () => {
|
|
14
27
|
const wrapper = mount(MStepperStacked, {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
class="mc-controls-options__icon"
|
|
36
36
|
aria-hidden="true"
|
|
37
37
|
/>
|
|
38
|
-
<span class="mc-controls-options__label">{clearLabel}</span>
|
|
38
|
+
<span class="mc-controls-options__label">{{ clearLabel }}</span>
|
|
39
39
|
</button>
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
@@ -71,6 +71,7 @@ const props = withDefaults(
|
|
|
71
71
|
*/
|
|
72
72
|
inputType?:
|
|
73
73
|
| 'date'
|
|
74
|
+
| 'datetime-local'
|
|
74
75
|
| 'email'
|
|
75
76
|
| 'number'
|
|
76
77
|
| 'password'
|
|
@@ -145,7 +146,6 @@ const emit = defineEmits<{
|
|
|
145
146
|
}>();
|
|
146
147
|
|
|
147
148
|
function focus() {
|
|
148
|
-
console.log(textInput.value);
|
|
149
149
|
textInput.value?.focus();
|
|
150
150
|
}
|
|
151
151
|
|