@mozaic-ds/vue 2.14.0 → 2.16.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 +1582 -500
- package/dist/mozaic-vue.js +8020 -3218
- package/dist/mozaic-vue.js.map +1 -1
- package/dist/mozaic-vue.umd.cjs +24 -5
- package/dist/mozaic-vue.umd.cjs.map +1 -1
- package/package.json +6 -4
- package/src/components/DarkMode.mdx +115 -0
- package/src/components/actionlistbox/MActionListbox.spec.ts +20 -10
- package/src/components/actionlistbox/MActionListbox.stories.ts +15 -8
- package/src/components/actionlistbox/MActionListbox.vue +15 -12
- package/src/components/actionlistbox/README.md +2 -1
- package/src/components/avatar/MAvatar.stories.ts +1 -1
- package/src/components/breadcrumb/MBreadcrumb.vue +2 -2
- package/src/components/button/README.md +2 -0
- package/src/components/combobox/MCombobox.spec.ts +246 -0
- package/src/components/combobox/MCombobox.stories.ts +190 -0
- package/src/components/combobox/MCombobox.vue +277 -0
- package/src/components/combobox/README.md +52 -0
- package/src/components/field/MField.stories.ts +105 -0
- package/src/components/optionListbox/MOptionListbox.spec.ts +527 -0
- package/src/components/optionListbox/MOptionListbox.vue +470 -0
- package/src/components/optionListbox/README.md +63 -0
- package/src/components/pageheader/MPageHeader.spec.ts +12 -12
- package/src/components/pageheader/MPageHeader.stories.ts +9 -1
- package/src/components/pageheader/MPageHeader.vue +3 -6
- package/src/components/segmentedcontrol/MSegmentedControl.spec.ts +57 -25
- package/src/components/segmentedcontrol/MSegmentedControl.stories.ts +6 -19
- package/src/components/segmentedcontrol/MSegmentedControl.vue +27 -13
- package/src/components/segmentedcontrol/README.md +6 -3
- package/src/components/select/MSelect.vue +4 -3
- package/src/components/sidebar/stories/DefaultCase.stories.vue +2 -2
- package/src/components/sidebar/stories/README.md +8 -0
- package/src/components/sidebar/stories/WithExpandOnly.stories.vue +1 -1
- package/src/components/sidebar/stories/WithProfileInfoOnly.stories.vue +2 -2
- package/src/components/sidebar/stories/WithSingleLevel.stories.vue +2 -2
- package/src/components/stepperinline/MStepperInline.spec.ts +63 -28
- package/src/components/stepperinline/MStepperInline.stories.ts +18 -10
- package/src/components/stepperinline/MStepperInline.vue +24 -10
- package/src/components/stepperinline/README.md +6 -2
- package/src/components/stepperstacked/MStepperStacked.spec.ts +162 -0
- package/src/components/stepperstacked/MStepperStacked.stories.ts +57 -0
- package/src/components/stepperstacked/MStepperStacked.vue +106 -0
- package/src/components/stepperstacked/README.md +15 -0
- package/src/components/tabs/MTabs.stories.ts +18 -0
- package/src/components/tabs/MTabs.vue +30 -14
- package/src/components/tabs/Mtabs.spec.ts +56 -10
- package/src/components/tabs/README.md +6 -3
- package/src/components/textinput/MTextInput.vue +13 -1
- package/src/components/textinput/README.md +15 -1
- package/src/components/tileclickable/README.md +1 -1
- package/src/main.ts +10 -2
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
<span v-if="prefix" class="mc-text-input__addon">{{ prefix }}</span>
|
|
8
8
|
|
|
9
9
|
<input
|
|
10
|
+
ref="textInput"
|
|
10
11
|
:id="id"
|
|
11
12
|
class="mc-text-input__control"
|
|
12
13
|
:value="modelValue"
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
</template>
|
|
42
43
|
|
|
43
44
|
<script setup lang="ts">
|
|
44
|
-
import { computed, type VNode } from 'vue';
|
|
45
|
+
import { computed, useTemplateRef, type VNode } from 'vue';
|
|
45
46
|
import { CrossCircleFilled24 } from '@mozaic-ds/icons-vue';
|
|
46
47
|
|
|
47
48
|
/**
|
|
@@ -130,6 +131,8 @@ const classObject = computed(() => {
|
|
|
130
131
|
};
|
|
131
132
|
});
|
|
132
133
|
|
|
134
|
+
const textInput = useTemplateRef('textInput');
|
|
135
|
+
|
|
133
136
|
const clearValue = () => {
|
|
134
137
|
emit('update:modelValue', '');
|
|
135
138
|
};
|
|
@@ -141,9 +144,18 @@ const emit = defineEmits<{
|
|
|
141
144
|
(on: 'update:modelValue', value: string | number): void;
|
|
142
145
|
}>();
|
|
143
146
|
|
|
147
|
+
function focus() {
|
|
148
|
+
console.log(textInput.value);
|
|
149
|
+
textInput.value?.focus();
|
|
150
|
+
}
|
|
151
|
+
|
|
144
152
|
defineOptions({
|
|
145
153
|
inheritAttrs: false,
|
|
146
154
|
});
|
|
155
|
+
|
|
156
|
+
defineExpose({
|
|
157
|
+
focus,
|
|
158
|
+
});
|
|
147
159
|
</script>
|
|
148
160
|
|
|
149
161
|
<style lang="scss" scoped>
|
|
@@ -11,7 +11,7 @@ A text input is a single-line input that allows users to enter and edit short te
|
|
|
11
11
|
| `name` | The name attribute for the input element, typically used for form submission. | `string` | - |
|
|
12
12
|
| `modelValue` | The current value of the input field. | `string` `number` | - |
|
|
13
13
|
| `placeholder` | A placeholder text to show in the input when it is empty. | `string` | - |
|
|
14
|
-
| `inputType` | Defines the type of input. | `"number"` `"
|
|
14
|
+
| `inputType` | Defines the type of input. | `"number"` `"search"` `"text"` `"date"` `"email"` `"password"` `"tel"` | `"text"` |
|
|
15
15
|
| `isInvalid` | If `true`, applies an invalid state to the input. | `boolean` | - |
|
|
16
16
|
| `disabled` | If `true`, disables the input, making it non-interactive. | `boolean` | - |
|
|
17
17
|
| `size` | Determines the size of the input. | `"s"` `"m"` | `"m"` |
|
|
@@ -32,3 +32,17 @@ A text input is a single-line input that allows users to enter and edit short te
|
|
|
32
32
|
| Name | Description | Type |
|
|
33
33
|
| --- | --- | --- |
|
|
34
34
|
| `update:modelValue` | Emits when the input value changes, updating the `modelValue` prop. | [value: string | number] |
|
|
35
|
+
|
|
36
|
+
## Dependencies
|
|
37
|
+
|
|
38
|
+
### Used By
|
|
39
|
+
|
|
40
|
+
- [MOptionListbox](../optionListbox)
|
|
41
|
+
|
|
42
|
+
### Graph
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
graph TD;
|
|
46
|
+
MOptionListbox --> MTextInput
|
|
47
|
+
style MTextInput fill:#008240,stroke:#333,stroke-width:4px
|
|
48
|
+
```
|
|
@@ -14,7 +14,7 @@ Used to navigate to a full URL. | `string` | - |
|
|
|
14
14
|
| `to` | If set, the tile becomes an internal link (Vue Router route).
|
|
15
15
|
Used for navigation within the app. | `string` | - |
|
|
16
16
|
| `target` | Where to open the link. | `"_self"` `"_blank"` `"_parent"` `"_top"` | - |
|
|
17
|
-
| `iconPosition` | Position of the icon relative to the content. | `"
|
|
17
|
+
| `iconPosition` | Position of the icon relative to the content. | `"bottom"` `"right"` | `"right"` |
|
|
18
18
|
|
|
19
19
|
## Slots
|
|
20
20
|
|
package/src/main.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { default as MCheckbox } from './components/checkbox/MCheckbox.vue';
|
|
|
12
12
|
export { default as MCheckboxGroup } from './components/checkboxgroup/MCheckboxGroup.vue';
|
|
13
13
|
export { default as MCheckListMenu } from './components/checklistmenu/MCheckListMenu.vue';
|
|
14
14
|
export { default as MCircularProgressbar } from './components/circularprogressbar/MCircularProgressbar.vue';
|
|
15
|
+
export { default as MCombobox } from './components/combobox/MCombobox.vue';
|
|
15
16
|
export { default as MContainer } from './components/container/MContainer.vue';
|
|
16
17
|
export { default as MDatepicker } from './components/datepicker/MDatepicker.vue';
|
|
17
18
|
export { default as MDivider } from './components/divider/MDivider.vue';
|
|
@@ -19,6 +20,7 @@ export { default as MDrawer } from './components/drawer/MDrawer.vue';
|
|
|
19
20
|
export { default as MField } from './components/field/MField.vue';
|
|
20
21
|
export { default as MFieldGroup } from './components/fieldgroup/MFieldGroup.vue';
|
|
21
22
|
export { default as MFileUploader } from './components/fileuploader/MFileUploader.vue';
|
|
23
|
+
export { default as MFileUploaderItem } from './components/fileuploaderitem/MFileUploaderItem.vue';
|
|
22
24
|
export { default as MFlag } from './components/flag/MFlag.vue';
|
|
23
25
|
export { default as MIconButton } from './components/iconbutton/MIconButton.vue';
|
|
24
26
|
export { default as MKpiItem } from './components/kpiitem/MKpiItem.vue';
|
|
@@ -43,6 +45,12 @@ export { default as MRadioGroup } from './components/radiogroup/MRadioGroup.vue'
|
|
|
43
45
|
export { default as MSegmentedControl } from './components/segmentedcontrol/MSegmentedControl.vue';
|
|
44
46
|
export { default as MSelect } from './components/select/MSelect.vue';
|
|
45
47
|
export { default as MSidebar } from './components/sidebar/MSidebar.vue';
|
|
48
|
+
export { default as MSidebarExpandableItem } from './components/sidebarexpandableitem/MSidebarExpandableItem.vue';
|
|
49
|
+
export { default as MSidebarFooter } from './components/sidebarfooter/MSidebarFooter.vue';
|
|
50
|
+
export { default as MSidebarHeader } from './components/sidebarheader/MSidebarHeader.vue';
|
|
51
|
+
export { default as MSidebarNavItem } from './components/sidebarnavitem/MSidebarNavItem.vue';
|
|
52
|
+
export { default as MSidebarShortcutItem } from './components/sidebarshortcutitem/MSidebarShortcutItem.vue';
|
|
53
|
+
export { default as MSidebarShortcuts } from './components/sidebarshortcuts/MSidebarShortcuts.vue';
|
|
46
54
|
export { default as MStarRating } from './components/starrating/MStarRating.vue';
|
|
47
55
|
export { default as MStatusBadge } from './components/statusbadge/MStatusBadge.vue';
|
|
48
56
|
export { default as MStatusDot } from './components/statusdot/MStatusDot.vue';
|
|
@@ -53,12 +61,12 @@ export { default as MStepperCompact } from './components/steppercompact/MStepper
|
|
|
53
61
|
export { default as MStepperInline } from './components/stepperinline/MStepperInline.vue';
|
|
54
62
|
export { default as MTabs } from './components/tabs/MTabs.vue';
|
|
55
63
|
export { default as MTag } from './components/tag/MTag.vue';
|
|
64
|
+
export { default as MTextArea } from './components/textarea/MTextArea.vue';
|
|
65
|
+
export { default as MTextInput } from './components/textinput/MTextInput.vue';
|
|
56
66
|
export { default as MTile } from './components/tile/MTile.vue';
|
|
57
67
|
export { default as MTileClickable } from './components/tileclickable/MTileClickable.vue';
|
|
58
68
|
export { default as MTileExpandable } from './components/tileexpandable/MTileExpandable.vue';
|
|
59
69
|
export { default as MTileSelectable } from './components/tileselectable/MTileSelectable.vue';
|
|
60
|
-
export { default as MTextArea } from './components/textarea/MTextArea.vue';
|
|
61
|
-
export { default as MTextInput } from './components/textinput/MTextInput.vue';
|
|
62
70
|
export { default as MToaster } from './components/toaster/MToaster.vue';
|
|
63
71
|
export { default as MToggle } from './components/toggle/MToggle.vue';
|
|
64
72
|
export { default as MToggleGroup } from './components/togglegroup/MToggleGroup.vue';
|