@mozaic-ds/vue 1.0.0-beta.1 → 1.0.0-beta.4

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 (179) hide show
  1. package/LICENSE +51 -0
  2. package/README.md +218 -84
  3. package/dist/mozaic-vue.css +1 -1
  4. package/dist/mozaic-vue.d.ts +920 -0
  5. package/dist/mozaic-vue.js +877 -0
  6. package/dist/mozaic-vue.js.map +1 -0
  7. package/dist/mozaic-vue.umd.cjs +2 -0
  8. package/dist/mozaic-vue.umd.cjs.map +1 -0
  9. package/env.d.ts +1 -0
  10. package/package.json +80 -50
  11. package/src/components/Contributing.mdx +118 -0
  12. package/src/components/GettingStarted.mdx +39 -0
  13. package/src/components/Introduction.mdx +54 -0
  14. package/src/components/Support.mdx +18 -0
  15. package/src/components/badge/MBadge.spec.ts +16 -0
  16. package/src/components/badge/MBadge.stories.ts +50 -0
  17. package/src/components/badge/MBadge.vue +36 -34
  18. package/src/components/button/MButton.spec.ts +191 -0
  19. package/src/components/button/MButton.stories.ts +66 -0
  20. package/src/components/button/MButton.vue +98 -154
  21. package/src/components/checkbox/MCheckbox.spec.ts +104 -0
  22. package/src/components/checkbox/MCheckbox.stories.ts +83 -0
  23. package/src/components/checkbox/MCheckbox.vue +60 -101
  24. package/src/components/checkboxgroup/MCheckboxGroup.spec.ts +78 -0
  25. package/src/components/checkboxgroup/MCheckboxGroup.stories.ts +61 -0
  26. package/src/components/checkboxgroup/MCheckboxGroup.vue +97 -0
  27. package/src/components/field/MField.spec.ts +166 -0
  28. package/src/components/field/MField.stories.ts +376 -0
  29. package/src/components/field/MField.vue +78 -61
  30. package/src/components/fieldgroup/MFieldGroup.spec.ts +165 -0
  31. package/src/components/fieldgroup/MFieldGroup.stories.ts +274 -0
  32. package/src/components/fieldgroup/MFieldGroup.vue +79 -0
  33. package/src/components/iconbutton/MIconButton.spec.ts +108 -0
  34. package/src/components/iconbutton/MIconButton.stories.ts +66 -0
  35. package/src/components/iconbutton/MIconButton.vue +73 -0
  36. package/src/components/link/MLink.spec.ts +154 -0
  37. package/src/components/link/MLink.stories.ts +98 -0
  38. package/src/components/link/MLink.vue +86 -109
  39. package/src/components/loader/MLoader.spec.ts +104 -0
  40. package/src/components/loader/MLoader.stories.ts +45 -0
  41. package/src/components/loader/MLoader.vue +65 -55
  42. package/src/components/overlay/MOverlay.spec.ts +51 -0
  43. package/src/components/overlay/MOverlay.stories.ts +40 -0
  44. package/src/components/overlay/MOverlay.vue +27 -19
  45. package/src/components/quantityselector/MQuantitySelector.spec.ts +262 -0
  46. package/src/components/quantityselector/MQuantitySelector.stories.ts +89 -0
  47. package/src/components/quantityselector/MQuantitySelector.vue +160 -136
  48. package/src/components/radio/MRadio.spec.ts +104 -0
  49. package/src/components/radio/MRadio.stories.ts +68 -0
  50. package/src/components/radio/MRadio.vue +56 -39
  51. package/src/components/radiogroup/MRadioGroup.spec.ts +54 -0
  52. package/src/components/radiogroup/MRadioGroup.stories.ts +61 -0
  53. package/src/components/radiogroup/MRadioGroup.vue +79 -0
  54. package/src/components/select/MSelect.spec.ts +114 -0
  55. package/src/components/select/MSelect.stories.ts +101 -0
  56. package/src/components/select/MSelect.vue +77 -119
  57. package/src/components/statusbadge/MStatusBadge.stories.ts +45 -0
  58. package/src/components/statusbadge/MStatusBadge.vue +40 -0
  59. package/src/components/statusbadge/MStatusDot.vue +32 -0
  60. package/src/components/statusbadge/MstatusBadge.spec.ts +16 -0
  61. package/src/components/textarea/MTextArea.spec.ts +112 -0
  62. package/src/components/textarea/MTextArea.stories.ts +67 -0
  63. package/src/components/textarea/MTextArea.vue +81 -42
  64. package/src/components/textinput/MTextInput.spec.ts +121 -0
  65. package/src/components/textinput/MTextInput.stories.ts +114 -0
  66. package/src/components/textinput/MTextInput.vue +127 -47
  67. package/src/components/toggle/MToggle.spec.ts +99 -0
  68. package/src/components/toggle/MToggle.stories.ts +68 -0
  69. package/src/components/toggle/MToggle.vue +63 -103
  70. package/src/components/usingIcons.mdx +43 -0
  71. package/src/components/usingPresets.mdx +125 -0
  72. package/src/main.ts +39 -0
  73. package/dist/demo.html +0 -1
  74. package/dist/mozaic-vue.adeo.css +0 -45
  75. package/dist/mozaic-vue.adeo.umd.js +0 -41775
  76. package/dist/mozaic-vue.common.js +0 -41765
  77. package/dist/mozaic-vue.common.js.map +0 -1
  78. package/dist/mozaic-vue.umd.js +0 -41776
  79. package/dist/mozaic-vue.umd.js.map +0 -1
  80. package/dist/mozaic-vue.umd.min.js +0 -4
  81. package/dist/mozaic-vue.umd.min.js.map +0 -1
  82. package/postinstall.js +0 -3
  83. package/src/components/accordion/MAccordion.vue +0 -128
  84. package/src/components/accordion/index.js +0 -7
  85. package/src/components/autocomplete/MAutocomplete.vue +0 -198
  86. package/src/components/autocomplete/index.js +0 -7
  87. package/src/components/badge/index.js +0 -7
  88. package/src/components/breadcrumb/MBreadcrumb.vue +0 -73
  89. package/src/components/breadcrumb/index.js +0 -7
  90. package/src/components/button/index.js +0 -7
  91. package/src/components/card/MCard.vue +0 -78
  92. package/src/components/card/index.js +0 -7
  93. package/src/components/checkbox/MCheckboxGroup.vue +0 -155
  94. package/src/components/checkbox/index.js +0 -12
  95. package/src/components/container/MContainer.vue +0 -33
  96. package/src/components/container/index.js +0 -7
  97. package/src/components/datatable/MDataTable.vue +0 -651
  98. package/src/components/datatable/MDataTableHeader.vue +0 -55
  99. package/src/components/datatable/MDataTableTop.vue +0 -35
  100. package/src/components/datatable/helpers.js +0 -132
  101. package/src/components/datatable/index.js +0 -12
  102. package/src/components/field/index.js +0 -7
  103. package/src/components/fileuploader/MFileResult.vue +0 -149
  104. package/src/components/fileuploader/MFileUploader.vue +0 -142
  105. package/src/components/fileuploader/index.js +0 -7
  106. package/src/components/flag/MFlag.vue +0 -46
  107. package/src/components/flag/index.js +0 -7
  108. package/src/components/heading/MHeading.vue +0 -75
  109. package/src/components/heading/index.js +0 -7
  110. package/src/components/hero/MHero.vue +0 -93
  111. package/src/components/hero/index.js +0 -7
  112. package/src/components/icon/MIcon.vue +0 -120
  113. package/src/components/icon/index.js +0 -7
  114. package/src/components/index.js +0 -43
  115. package/src/components/layer/MLayer.vue +0 -208
  116. package/src/components/layer/index.js +0 -7
  117. package/src/components/link/index.js +0 -7
  118. package/src/components/listbox/MListBox.vue +0 -106
  119. package/src/components/listbox/index.js +0 -7
  120. package/src/components/loader/index.js +0 -7
  121. package/src/components/modal/MModal.vue +0 -179
  122. package/src/components/modal/index.js +0 -7
  123. package/src/components/notification/MNotification.vue +0 -110
  124. package/src/components/notification/index.js +0 -7
  125. package/src/components/optionbutton/MOptionButton.vue +0 -67
  126. package/src/components/optionbutton/index.js +0 -7
  127. package/src/components/optioncard/MOptionCard.vue +0 -132
  128. package/src/components/optioncard/index.js +0 -7
  129. package/src/components/optiongroup/MOptionGroup.vue +0 -18
  130. package/src/components/optiongroup/index.js +0 -7
  131. package/src/components/overlay/MOverlayLoader.vue +0 -43
  132. package/src/components/overlay/index.js +0 -12
  133. package/src/components/pagination/MPagination.vue +0 -162
  134. package/src/components/pagination/index.js +0 -7
  135. package/src/components/passwordinput/MPasswordInput.vue +0 -96
  136. package/src/components/passwordinput/index.js +0 -7
  137. package/src/components/phonenumber/MPhoneNumber.vue +0 -390
  138. package/src/components/phonenumber/index.js +0 -7
  139. package/src/components/progressbar/MProgress.vue +0 -102
  140. package/src/components/progressbar/index.js +0 -7
  141. package/src/components/quantityselector/index.js +0 -7
  142. package/src/components/radio/MRadioGroup.vue +0 -111
  143. package/src/components/radio/index.js +0 -12
  144. package/src/components/ratingstars/MStarsInput.vue +0 -118
  145. package/src/components/ratingstars/MStarsResult.vue +0 -89
  146. package/src/components/ratingstars/index.js +0 -12
  147. package/src/components/select/index.js +0 -7
  148. package/src/components/stepper/MStepper.vue +0 -70
  149. package/src/components/stepper/index.js +0 -7
  150. package/src/components/tabs/MTab.vue +0 -184
  151. package/src/components/tabs/index.js +0 -7
  152. package/src/components/tags/MTag.vue +0 -173
  153. package/src/components/tags/index.js +0 -7
  154. package/src/components/textarea/index.js +0 -7
  155. package/src/components/textinput/MTextInputField.vue +0 -105
  156. package/src/components/textinput/MTextInputIcon.vue +0 -42
  157. package/src/components/textinput/index.js +0 -7
  158. package/src/components/toggle/index.js +0 -7
  159. package/src/components/tooltip/MTooltip.vue +0 -42
  160. package/src/components/tooltip/index.js +0 -7
  161. package/src/index.js +0 -62
  162. package/src/shims-tsx.d.ts +0 -13
  163. package/src/shims.vue.d.ts +0 -4
  164. package/src/tokens/adeo/android/colors.xml +0 -391
  165. package/src/tokens/adeo/android/font_dimens.xml +0 -18
  166. package/src/tokens/adeo/css/_variables.scss +0 -385
  167. package/src/tokens/adeo/css/root.scss +0 -387
  168. package/src/tokens/adeo/ios/StyleDictionaryColor.h +0 -399
  169. package/src/tokens/adeo/ios/StyleDictionaryColor.m +0 -411
  170. package/src/tokens/adeo/ios/StyleDictionaryColor.swift +0 -394
  171. package/src/tokens/adeo/ios/StyleDictionarySize.h +0 -69
  172. package/src/tokens/adeo/ios/StyleDictionarySize.m +0 -70
  173. package/src/tokens/adeo/ios/StyleDictionarySize.swift +0 -71
  174. package/src/tokens/adeo/js/tokens.js +0 -483
  175. package/src/tokens/adeo/js/tokensObject.js +0 -10354
  176. package/src/tokens/adeo/scss/_tokens.scss +0 -1300
  177. package/src/utils/mozaicClasses.js +0 -16
  178. package/src/utils/theme.validator.js +0 -19
  179. package/types/index.d.ts +0 -100
@@ -1,184 +0,0 @@
1
- <template>
2
- <div :class="['mc-tabs', setClasses]">
3
- <ul
4
- v-if="type !== 'dropdown'"
5
- ref="tablist"
6
- class="mc-tabs__nav"
7
- role="tablist"
8
- :aria-label="description"
9
- >
10
- <li
11
- v-for="(tab, index) in tabs"
12
- :key="`tab-${index}`"
13
- class="mc-tabs__item"
14
- role="presentation"
15
- >
16
- <component
17
- :is="tab.href ? (tab.disabled ? 'span' : 'a') : 'button'"
18
- :id="tab.id"
19
- ref="tab"
20
- :href="tab.href ? (!tab.disabled ? tab.href : null) : null"
21
- :type="!tab.href ? 'button' : null"
22
- :disabled="!tab.href && tab.disabled ? true : null"
23
- class="mc-tabs__link"
24
- role="tab"
25
- :aria-selected="tab.active ? 'true' : 'false'"
26
- :class="setActiveClass(tab)"
27
- @click="
28
- manageTabs(
29
- $event.target,
30
- $event,
31
- Object.assign({ index: index }, tab)
32
- )
33
- "
34
- >
35
- {{ tab.text }}
36
- </component>
37
- </li>
38
- </ul>
39
- <m-select v-else v-bind="selectAttributes" :options="tabs" />
40
- </div>
41
- </template>
42
-
43
- <script>
44
- import MSelect from '../select/MSelect.vue';
45
-
46
- export default {
47
- name: 'MTab',
48
-
49
- components: {
50
- MSelect,
51
- },
52
-
53
- props: {
54
- tabs: {
55
- type: Array,
56
- required: true,
57
- default() {
58
- return [];
59
- },
60
- },
61
- type: {
62
- type: String,
63
- default: 'tabs',
64
- validator: (value) => ['tabs', 'dropdown'].includes(value),
65
- },
66
- description: {
67
- type: String,
68
- default: 'Tabs',
69
- },
70
- align: {
71
- type: String,
72
- default: 'auto',
73
- validator: (value) => ['auto', 'full', 'centered'].includes(value),
74
- },
75
- shadow: {
76
- type: Boolean,
77
- default: true,
78
- },
79
- selectAttributes: {
80
- type: Object,
81
- default: null,
82
- },
83
- activeIndex: {
84
- type: Number,
85
- default: 0,
86
- },
87
- },
88
-
89
- data() {
90
- return {
91
- tablist: null,
92
- };
93
- },
94
-
95
- computed: {
96
- setClasses() {
97
- const classes = [
98
- {
99
- 'mc-tabs--full': this.align === 'full',
100
- 'mc-tabs--full-centered': this.align === 'centered',
101
- 'mc-tabs--dropdown': this.type === 'dropdown',
102
- 'mc-tabs--no-shadow': !this.shadow,
103
- },
104
- ];
105
-
106
- return classes;
107
- },
108
- },
109
-
110
- watch: {
111
- activeIndex(newValue) {
112
- const tab = this.getTabFromIndex(newValue);
113
- if (tab && this.tabs[newValue]) {
114
- this.manageTabs(tab, null, Object.assign({index: newValue}, this.tabs[newValue]));
115
- }
116
- }
117
- },
118
-
119
- mounted: function () {
120
- this.$nextTick(() => {
121
- if (this.type === 'tabs') {
122
- this.tablist = this.$refs.tablist;
123
-
124
- if (this.activeIndex) {
125
- const tab = this.getTabFromIndex(this.activeIndex);
126
- if (tab) {
127
- this.manageTabs(tab);
128
- }
129
- } else {
130
- const isActive = this.tabs.some((tab) =>
131
- Object.prototype.hasOwnProperty.call(tab, 'active')
132
- );
133
- if (!isActive) {
134
- const firstTab = this.tablist.querySelector('.mc-tabs__link');
135
- this.manageTabs(firstTab);
136
- }
137
- }
138
- }
139
- });
140
- },
141
-
142
- methods: {
143
- setActiveClass: function (tab) {
144
- const tabClasses = [];
145
-
146
- if (tab.active) {
147
- tabClasses.push('mc-tabs__link--selected');
148
- }
149
-
150
- if (tab.disabled) {
151
- tabClasses.push('mc-tabs__link--disabled');
152
- }
153
-
154
- return tabClasses;
155
- },
156
- manageTabs: function (el, e, tab) {
157
- if (tab && tab.disabled) {
158
- return;
159
- }
160
- if (e) {
161
- this.$emit('tab-clicked', e.target, tab);
162
- }
163
-
164
- this.tablist.querySelectorAll('.mc-tabs__link').forEach((el) => {
165
- el.classList.remove('mc-tabs__link--selected');
166
- el.setAttribute('aria-selected', 'false');
167
- });
168
-
169
- el.classList.add('mc-tabs__link--selected');
170
- el.setAttribute('aria-selected', 'true');
171
- },
172
- getTabFromIndex: function (index) {
173
- if (this.tablist && this.tablist.children[index] && this.tablist.children[index].children[0]) {
174
- return this.tablist.children[index].children[0];
175
- }
176
- },
177
- },
178
- };
179
- </script>
180
-
181
- <style lang="scss">
182
- @import 'settings-tools/_all-settings';
183
- @import 'components/_c.tabs';
184
- </style>
@@ -1,7 +0,0 @@
1
- import MTab from './MTab.vue';
2
-
3
- MTab.install = function (Vue) {
4
- Vue.component(MTab.name, MTab);
5
- };
6
-
7
- export { MTab };
@@ -1,173 +0,0 @@
1
- <template>
2
- <span v-if="type === 'text'" class="mc-tag-text" :class="setClasses">
3
- <span class="mc-tag-text__label">
4
- {{ label }}
5
- </span>
6
- </span>
7
- <a
8
- v-else-if="type === 'link'"
9
- class="mc-tag-link"
10
- :href="href"
11
- :class="setClasses"
12
- >
13
- <span class="mc-tag-link__label">
14
- {{ label }}
15
- </span>
16
- </a>
17
- <span
18
- v-else-if="type === 'selectable'"
19
- class="mc-tag-selectable"
20
- :class="setClasses"
21
- >
22
- <input
23
- :id="id"
24
- class="mc-tag-selectable__input"
25
- type="checkbox"
26
- :name="name"
27
- :value="value"
28
- :checked="checked"
29
- :required="required"
30
- :disabled="disabled"
31
- @change="$emit('change', $event.target.checked)"
32
- />
33
- <label class="mc-tag-selectable__pill" :for="id">
34
- <span class="mc-tag-selectable__label">
35
- {{ label }}
36
- </span>
37
- </label>
38
- </span>
39
- <span
40
- v-else-if="type === 'removable'"
41
- class="mc-tag-removable"
42
- :class="setClasses"
43
- >
44
- <span class="mc-tag-removable__label">
45
- {{ label }}
46
- </span>
47
- <button
48
- type="button"
49
- class="mc-tag-removable__remove"
50
- @click="$emit('remove-tag')"
51
- />
52
- </span>
53
- </template>
54
-
55
- <script>
56
- import {
57
- responsiveModifierValidators,
58
- responsiveModifiers,
59
- } from '../../utils/mozaicClasses';
60
-
61
- export default {
62
- name: 'MTag',
63
-
64
- model: {
65
- prop: 'checked',
66
- event: 'change',
67
- },
68
-
69
- props: {
70
- label: {
71
- type: String,
72
- required: true,
73
- },
74
- type: {
75
- type: String,
76
- default: 'text',
77
- validator: (value) =>
78
- ['text', 'link', 'selectable', 'removable'].includes(value),
79
- },
80
- theme: {
81
- type: String,
82
- default: null,
83
- },
84
- href: {
85
- type: String,
86
- default: null,
87
- },
88
- name: {
89
- type: String,
90
- default: null,
91
- },
92
- value: {
93
- type: String,
94
- default: null,
95
- },
96
- checked: {
97
- type: Boolean,
98
- default: false,
99
- },
100
- disabled: {
101
- type: Boolean,
102
- default: false,
103
- },
104
- required: {
105
- type: Boolean,
106
- default: false,
107
- },
108
- size: {
109
- type: String,
110
- default: 'm',
111
- validator: (value) => responsiveModifierValidators(value, ['s', 'm']),
112
- },
113
- // Experimental solution waiting on this issue https://github.com/adeo/mozaic-vue/issues/52
114
- responsiveSizeModifiers: {
115
- type: Array,
116
- default: null,
117
- validator: (array) =>
118
- array.every((e) =>
119
- responsiveModifierValidators(e, [
120
- 's@from-m',
121
- 's@from-l',
122
- 's@from-xl',
123
- 's@from-xxl',
124
- 'm@from-m',
125
- 'm@from-l',
126
- 'm@from-xl',
127
- 'm@from-xxl',
128
- ])
129
- ),
130
- },
131
- },
132
-
133
- data() {
134
- return {
135
- id: null,
136
- };
137
- },
138
-
139
- computed: {
140
- setClasses() {
141
- const classes = [];
142
-
143
- if (this.size) {
144
- classes.push(`mc-tag-${this.type}--${this.size}`);
145
- }
146
-
147
- if (this.theme) {
148
- classes.push(`mc-tag-${this.type}--${this.theme}`);
149
- }
150
-
151
- if (
152
- this.responsiveSizeModifiers &&
153
- this.responsiveSizeModifiers.length > 0
154
- ) {
155
- for (const modifier of this.responsiveSizeModifiers) {
156
- responsiveModifiers('mc-tag', modifier, classes);
157
- }
158
- }
159
-
160
- return classes;
161
- },
162
- },
163
-
164
- created() {
165
- this.id = this._uid;
166
- },
167
- };
168
- </script>
169
-
170
- <style lang="scss">
171
- @import 'settings-tools/_all-settings';
172
- @import 'components/_c.tag';
173
- </style>
@@ -1,7 +0,0 @@
1
- import MTag from './MTag.vue';
2
-
3
- MTag.install = function (Vue) {
4
- Vue.component(MTag.name, MTag);
5
- };
6
-
7
- export { MTag };
@@ -1,7 +0,0 @@
1
- import MTextArea from './MTextArea.vue';
2
-
3
- MTextArea.install = function (Vue) {
4
- Vue.component(MTextArea.name, MTextArea);
5
- };
6
-
7
- export { MTextArea };
@@ -1,105 +0,0 @@
1
- <template>
2
- <input
3
- :type="type"
4
- :required="required"
5
- class="mc-text-input"
6
- :class="setClasses"
7
- :aria-invalid="isInvalid"
8
- :value="value"
9
- @input="$emit('input', $event.target.value)"
10
- v-on="inputListeners"
11
- />
12
- </template>
13
-
14
- <script>
15
- import {
16
- responsiveModifiers,
17
- responsiveModifierValidators,
18
- } from '../../utils/mozaicClasses';
19
-
20
- const supportedTypes = [
21
- 'date',
22
- 'email',
23
- 'number',
24
- 'password',
25
- 'tel',
26
- 'text',
27
- 'time',
28
- 'search',
29
- ];
30
-
31
- export default {
32
- name: 'MTextInputField',
33
-
34
- props: {
35
- type: {
36
- type: String,
37
- default: 'text',
38
- validator: (type) => supportedTypes.includes(type),
39
- },
40
- required: {
41
- type: Boolean,
42
- default: false,
43
- },
44
- value: {
45
- type: [String, Number],
46
- default: null,
47
- },
48
- isValid: {
49
- type: Boolean,
50
- default: false,
51
- },
52
- isInvalid: {
53
- type: Boolean,
54
- default: false,
55
- },
56
- icon: {
57
- type: String,
58
- default: null,
59
- },
60
- size: {
61
- type: String,
62
- default: 'm',
63
- validator: (value) => responsiveModifierValidators(value, ['s', 'm']),
64
- },
65
- },
66
-
67
- computed: {
68
- setClasses() {
69
- const classes = [];
70
-
71
- if (this.isValid) {
72
- classes.push('is-valid');
73
- }
74
-
75
- if (this.isInvalid) {
76
- classes.push('is-invalid');
77
- }
78
-
79
- if (this.icon) {
80
- classes.push('mc-left-icon-input__input');
81
- }
82
-
83
- if (this.size) {
84
- responsiveModifiers('mc-text-input', this.size, classes);
85
- }
86
-
87
- return classes;
88
- },
89
- inputListeners: function () {
90
- // see => https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components
91
- var vm = this;
92
- return Object.assign({}, this.$listeners, {
93
- input: function (event) {
94
- vm.$emit('input', event.target.value);
95
- },
96
- });
97
- },
98
- },
99
- };
100
- </script>
101
-
102
- <style lang="scss">
103
- @import 'settings-tools/_all-settings';
104
- @import 'components/_c.text-input';
105
- </style>
@@ -1,42 +0,0 @@
1
- <template>
2
- <m-icon
3
- :id="`mc-text-input__icon-${id}`"
4
- key="text-input-icon"
5
- class="mc-left-icon-input__icon"
6
- :name="icon"
7
- />
8
- </template>
9
-
10
- <script>
11
- import MIcon from '../icon/MIcon.vue';
12
-
13
- export default {
14
- name: 'MTextInputIcon',
15
-
16
- components: {
17
- MIcon,
18
- },
19
-
20
- props: {
21
- icon: {
22
- type: String,
23
- default: null,
24
- },
25
- },
26
-
27
- data() {
28
- return {
29
- id: null,
30
- };
31
- },
32
-
33
- created() {
34
- this.id = this._uid;
35
- },
36
- };
37
- </script>
38
-
39
- <style lang="scss">
40
- @import 'settings-tools/_all-settings';
41
- @import 'components/_c.left-icon-input';
42
- </style>
@@ -1,7 +0,0 @@
1
- import MTextInput from './MTextInput.vue';
2
-
3
- MTextInput.install = function (Vue) {
4
- Vue.component(MTextInput.name, MTextInput);
5
- };
6
-
7
- export { MTextInput };
@@ -1,7 +0,0 @@
1
- import MToggle from './MToggle.vue';
2
-
3
- MToggle.install = function (Vue) {
4
- Vue.component(MToggle.name, MToggle);
5
- };
6
-
7
- export { MToggle };
@@ -1,42 +0,0 @@
1
- <template>
2
- <div
3
- class="mc-tooltip"
4
- :class="position ? `mc-tooltip--${position}` : ''"
5
- :aria-describedby="id"
6
- >
7
- <slot />
8
-
9
- <span :id="id" class="mc-tooltip__content" role="tooltip">
10
- {{ text }}
11
- </span>
12
- </div>
13
- </template>
14
-
15
- <script>
16
- export default {
17
- name: 'MTooltip',
18
-
19
- inheritAttrs: false,
20
-
21
- props: {
22
- id: {
23
- type: String,
24
- required: true,
25
- },
26
- text: {
27
- type: String,
28
- required: true,
29
- },
30
- position: {
31
- type: String,
32
- default: 'top',
33
- validator: (value) => ['top', 'right', 'bottom', 'left'].includes(value),
34
- },
35
- },
36
- };
37
- </script>
38
-
39
- <style lang="scss">
40
- @import 'settings-tools/_all-settings';
41
- @import 'components/_c.tooltip';
42
- </style>
@@ -1,7 +0,0 @@
1
- import MTooltip from './MTooltip.vue';
2
-
3
- MTooltip.install = function (Vue) {
4
- Vue.component(MTooltip.name, MTooltip);
5
- };
6
-
7
- export { MTooltip };
package/src/index.js DELETED
@@ -1,62 +0,0 @@
1
- // Export the components as a plugin
2
- import * as Components from './components';
3
-
4
- const MozaicVue = {
5
- // eslint-disable-next-line no-unused-vars
6
- install(Vue, options = {}) {
7
- // components
8
- Object.keys(Components).forEach((name) => {
9
- Vue.component(name, Components[name]);
10
- });
11
- },
12
- };
13
-
14
- if (typeof window !== 'undefined' && window.Vue) {
15
- window.Vue.use(MozaicVue);
16
- }
17
-
18
- export default MozaicVue;
19
-
20
- // import/export individual components
21
- // Foundations
22
- export { MContainer } from './components/container/';
23
- export { MHeading } from './components/heading';
24
- // Components
25
- export { MAccordion } from './components/accordion/';
26
- export { MAutocomplete } from './components/autocomplete';
27
- export { MBadge } from './components/badge/';
28
- export { MBreadcrumb } from './components/breadcrumb/';
29
- export { MButton } from './components/button/';
30
- export { MCard } from './components/card/';
31
- export { MCheckbox, MCheckboxGroup } from './components/checkbox/';
32
- export { MDataTable, MDataTableHeader } from './components/datatable';
33
- export { MField } from './components/field';
34
- export { MFileUploader } from './components/fileuploader';
35
- export { MFlag } from './components/flag';
36
- export { MHero } from './components/hero';
37
- export { MIcon } from './components/icon';
38
- export { MLayer } from './components/layer';
39
- export { MLink } from './components/link';
40
- export { MListBox } from './components/listbox';
41
- export { MLoader } from './components/loader';
42
- export { MModal } from './components/modal';
43
- export { MNotification } from './components/notification';
44
- export { MOptionButton } from './components/optionbutton';
45
- export { MOptionCard } from './components/optioncard';
46
- export { MOptionGroup } from './components/optiongroup';
47
- export { MOverlay, MOverlayLoader } from './components/overlay';
48
- export { MPagination } from './components/pagination';
49
- export { MPasswordInput } from './components/passwordinput';
50
- export { MPhoneNumber } from './components/phonenumber';
51
- export { MProgress } from './components/progressbar';
52
- export { MQuantitySelector } from './components/quantityselector';
53
- export { MRadio, MRadioGroup } from './components/radio';
54
- export { MStarsInput, MStarsResult } from './components/ratingstars';
55
- export { MSelect } from './components/select';
56
- export { MStepper } from './components/stepper';
57
- export { MTab } from './components/tabs';
58
- export { MTag } from './components/tags';
59
- export { MTextArea } from './components/textarea';
60
- export { MTextInput } from './components/textinput';
61
- export { MToggle } from './components/toggle';
62
- export { MTooltip } from './components/tooltip';
@@ -1,13 +0,0 @@
1
- import Vue, { VNode } from 'vue'
2
-
3
- declare global {
4
- namespace JSX {
5
- // tslint:disable no-empty-interface
6
- interface Element extends VNode {}
7
- // tslint:disable no-empty-interface
8
- interface ElementClass extends Vue {}
9
- interface IntrinsicElements {
10
- [elem: string]: any
11
- }
12
- }
13
- }
@@ -1,4 +0,0 @@
1
- declare module '*.vue' {
2
- import Vue from 'vue';
3
- export default Vue;
4
- }