@mozaic-ds/vue 0.12.1 → 0.14.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/CHANGELOG.md +51 -0
- package/dist/mozaic-vue.adeo.css +1 -1
- package/dist/mozaic-vue.adeo.umd.js +978 -257
- package/dist/mozaic-vue.common.js +978 -257
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.css +1 -1
- package/dist/mozaic-vue.umd.js +978 -257
- package/dist/mozaic-vue.umd.js.map +1 -1
- package/dist/mozaic-vue.umd.min.js +1 -1
- package/dist/mozaic-vue.umd.min.js.map +1 -1
- package/package.json +6 -6
- package/src/components/accordion/MAccordion.vue +14 -29
- package/src/components/breadcrumb/MBreadcrumb.vue +1 -0
- package/src/components/field/MField.vue +3 -0
- package/src/components/fileuploader/MFileUploader.vue +6 -1
- package/src/components/index.js +4 -0
- package/src/components/optionbutton/MOptionButton.vue +67 -0
- package/src/components/optionbutton/index.js +7 -0
- package/src/components/optioncard/MOptionCard.vue +104 -0
- package/src/components/optioncard/index.js +7 -0
- package/src/components/optiongroup/MOptionGroup.vue +18 -0
- package/src/components/optiongroup/index.js +7 -0
- package/src/components/passwordinput/MPasswordInput.vue +96 -0
- package/src/components/passwordinput/index.js +7 -0
- package/src/components/phonenumber/MPhoneNumber.vue +48 -20
- package/src/components/quantityselector/MQuantitySelector.vue +6 -2
- package/src/components/select/MSelect.vue +19 -2
- package/src/components/textarea/MTextArea.vue +9 -2
- package/src/components/textinput/MTextInput.vue +22 -2
- package/src/index.js +4 -0
- package/types/index.d.ts +8 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<select
|
|
3
3
|
:id="id"
|
|
4
|
+
ref="select"
|
|
4
5
|
class="mc-select"
|
|
5
|
-
:class="setClasses"
|
|
6
|
+
:class="[setClasses, cssFieldElementClass]"
|
|
6
7
|
:value="getSelectValue"
|
|
7
8
|
:disabled="disabled"
|
|
8
|
-
@change="
|
|
9
|
+
@change="onChange($event.target.value)"
|
|
9
10
|
>
|
|
10
11
|
<option v-if="placeholder" value="" disabled="disabled">
|
|
11
12
|
-- {{ placeholder }} --
|
|
@@ -27,6 +28,11 @@
|
|
|
27
28
|
<script>
|
|
28
29
|
export default {
|
|
29
30
|
name: 'MSelect',
|
|
31
|
+
inject: {
|
|
32
|
+
cssFieldElementClass: {
|
|
33
|
+
default: '',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
30
36
|
|
|
31
37
|
model: {
|
|
32
38
|
prop: 'value',
|
|
@@ -107,6 +113,17 @@ export default {
|
|
|
107
113
|
this.optionValue = firstOption.value;
|
|
108
114
|
}
|
|
109
115
|
},
|
|
116
|
+
onChange(value) {
|
|
117
|
+
const optionText = this.$refs.select
|
|
118
|
+
.querySelector(`option[value="${value}"]`)
|
|
119
|
+
.textContent.trim();
|
|
120
|
+
const optionData = {
|
|
121
|
+
text: optionText,
|
|
122
|
+
value: value,
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
this.$emit('change', value, optionData);
|
|
126
|
+
},
|
|
110
127
|
},
|
|
111
128
|
};
|
|
112
129
|
</script>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<textarea
|
|
3
3
|
class="mc-textarea"
|
|
4
|
-
:class="
|
|
4
|
+
:class="[
|
|
5
|
+
{ 'is-valid': isValid, 'is-invalid': isInvalid },
|
|
6
|
+
cssFieldElementClass,
|
|
7
|
+
]"
|
|
5
8
|
:aria-invalid="isInvalid"
|
|
6
9
|
:value="value"
|
|
7
10
|
@input="$emit('input', $event.target.value)"
|
|
@@ -11,7 +14,11 @@
|
|
|
11
14
|
<script>
|
|
12
15
|
export default {
|
|
13
16
|
name: 'MTextArea',
|
|
14
|
-
|
|
17
|
+
inject: {
|
|
18
|
+
cssFieldElementClass: {
|
|
19
|
+
default: '',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
15
22
|
props: {
|
|
16
23
|
value: {
|
|
17
24
|
type: String,
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
v-if="icon"
|
|
4
|
+
key="icon-input"
|
|
5
|
+
class="mc-left-icon-input"
|
|
6
|
+
:class="cssFieldElementClass"
|
|
7
|
+
>
|
|
8
|
+
<m-text-input-icon :icon="icon" />
|
|
4
9
|
<m-text-input-field
|
|
5
10
|
ref="mField"
|
|
6
11
|
v-bind="[$attrs, $props]"
|
|
7
12
|
v-on="$listeners"
|
|
8
13
|
/>
|
|
9
14
|
</div>
|
|
15
|
+
|
|
16
|
+
<m-text-input-field
|
|
17
|
+
v-else
|
|
18
|
+
key="input-only"
|
|
19
|
+
ref="mField"
|
|
20
|
+
v-bind="[$attrs, $props]"
|
|
21
|
+
:class="cssFieldElementClass"
|
|
22
|
+
v-on="$listeners"
|
|
23
|
+
/>
|
|
10
24
|
</template>
|
|
11
25
|
|
|
12
26
|
<script>
|
|
@@ -21,6 +35,12 @@ export default {
|
|
|
21
35
|
MTextInputIcon,
|
|
22
36
|
},
|
|
23
37
|
|
|
38
|
+
inject: {
|
|
39
|
+
cssFieldElementClass: {
|
|
40
|
+
default: '',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
|
|
24
44
|
inheritAttrs: false,
|
|
25
45
|
|
|
26
46
|
props: {
|
package/src/index.js
CHANGED
|
@@ -38,7 +38,11 @@ export { MLayer } from './components/layer';
|
|
|
38
38
|
export { MLink } from './components/link';
|
|
39
39
|
export { MModal } from './components/modal';
|
|
40
40
|
export { MNotification } from './components/notification';
|
|
41
|
+
export { MOptionButton } from './components/optionbutton';
|
|
42
|
+
export { MOptionCard } from './components/optioncard';
|
|
43
|
+
export { MOptionGroup } from './components/optiongroup';
|
|
41
44
|
export { MPagination } from './components/pagination';
|
|
45
|
+
export { MPasswordInput } from './components/passwordinput';
|
|
42
46
|
export { MPhoneNumber } from './components/phonenumber';
|
|
43
47
|
export { MProgress } from './components/progressbar';
|
|
44
48
|
export { MQuantitySelector } from './components/quantityselector';
|
package/types/index.d.ts
CHANGED
|
@@ -23,7 +23,11 @@ declare module '@mozaic-ds/vue' {
|
|
|
23
23
|
const MLink: VueConstructor;
|
|
24
24
|
const MModal: VueConstructor;
|
|
25
25
|
const MNotification: VueConstructor;
|
|
26
|
+
const MOptionButton: VueConstructor;
|
|
27
|
+
const MOptionCard: VueConstructor;
|
|
28
|
+
const MOptionGroup: VueConstructor;
|
|
26
29
|
const MPagination: VueConstructor;
|
|
30
|
+
const MPasswordInput: VueConstructor;
|
|
27
31
|
const MPhoneNumber: VueConstructor;
|
|
28
32
|
const MProgress: VueConstructor;
|
|
29
33
|
const MQuantitySelector: VueConstructor;
|
|
@@ -60,7 +64,11 @@ declare module '@mozaic-ds/vue' {
|
|
|
60
64
|
MLink,
|
|
61
65
|
MModal,
|
|
62
66
|
MNotification,
|
|
67
|
+
MOptionButton,
|
|
68
|
+
MOptionCard,
|
|
69
|
+
MOptionGroup,
|
|
63
70
|
MPagination,
|
|
71
|
+
MPasswordInput,
|
|
64
72
|
MPhoneNumber,
|
|
65
73
|
MProgress,
|
|
66
74
|
MQuantitySelector,
|