@mozaic-ds/vue 1.0.0-rc.3 → 2.2.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 (224) hide show
  1. package/LICENSE +51 -0
  2. package/README.md +76 -77
  3. package/dist/mozaic-vue.css +1 -1
  4. package/dist/mozaic-vue.d.ts +1718 -0
  5. package/dist/mozaic-vue.js +1971 -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 +78 -51
  11. package/src/components/Contributing.mdx +118 -0
  12. package/src/components/GettingStarted.mdx +45 -0
  13. package/src/components/Introduction.mdx +100 -0
  14. package/src/components/Support.mdx +18 -0
  15. package/src/components/breadcrumb/MBreadcrumb.spec.ts +105 -0
  16. package/src/components/breadcrumb/MBreadcrumb.stories.ts +82 -0
  17. package/src/components/breadcrumb/MBreadcrumb.vue +52 -55
  18. package/src/components/button/MButton.spec.ts +191 -0
  19. package/src/components/button/MButton.stories.ts +59 -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/datepicker/MDatepicker.spec.ts +95 -0
  28. package/src/components/datepicker/MDatepicker.stories.ts +75 -0
  29. package/src/components/datepicker/MDatepicker.vue +114 -0
  30. package/src/components/divider/MDivider.spec.ts +57 -0
  31. package/src/components/divider/MDivider.stories.ts +64 -0
  32. package/src/components/divider/MDivider.vue +56 -0
  33. package/src/components/drawer/MDrawer.spec.ts +100 -0
  34. package/src/components/drawer/MDrawer.stories.ts +128 -0
  35. package/src/components/drawer/MDrawer.vue +140 -0
  36. package/src/components/field/MField.spec.ts +166 -0
  37. package/src/components/field/MField.stories.ts +369 -0
  38. package/src/components/field/MField.vue +78 -61
  39. package/src/components/fieldgroup/MFieldGroup.spec.ts +165 -0
  40. package/src/components/fieldgroup/MFieldGroup.stories.ts +416 -0
  41. package/src/components/fieldgroup/MFieldGroup.vue +79 -0
  42. package/src/components/flag/MFlag.spec.ts +46 -0
  43. package/src/components/flag/MFlag.stories.ts +46 -0
  44. package/src/components/flag/MFlag.vue +28 -39
  45. package/src/components/iconbutton/MIconButton.spec.ts +108 -0
  46. package/src/components/iconbutton/MIconButton.stories.ts +74 -0
  47. package/src/components/iconbutton/MIconButton.vue +73 -0
  48. package/src/components/link/MLink.spec.ts +154 -0
  49. package/src/components/link/MLink.stories.ts +89 -0
  50. package/src/components/link/MLink.vue +86 -120
  51. package/src/components/loader/MLoader.spec.ts +104 -0
  52. package/src/components/loader/MLoader.stories.ts +43 -0
  53. package/src/components/loader/MLoader.vue +66 -55
  54. package/src/components/loadingoverlay/MLoadingOverlay.spec.ts +37 -0
  55. package/src/components/loadingoverlay/MLoadingOverlay.stories.ts +40 -0
  56. package/src/components/loadingoverlay/MLoadingOverlay.vue +28 -0
  57. package/src/components/modal/MModal.spec.ts +103 -0
  58. package/src/components/modal/MModal.stories.ts +127 -0
  59. package/src/components/modal/MModal.vue +111 -159
  60. package/src/components/numberbadge/MNumberBadge.spec.ts +56 -0
  61. package/src/components/numberbadge/MNumberBadge.stories.ts +48 -0
  62. package/src/components/numberbadge/MNumberBadge.vue +45 -0
  63. package/src/components/overlay/MOverlay.spec.ts +51 -0
  64. package/src/components/overlay/MOverlay.stories.ts +35 -0
  65. package/src/components/overlay/MOverlay.vue +27 -19
  66. package/src/components/pagination/MPagination.spec.ts +123 -0
  67. package/src/components/pagination/MPagination.stories.ts +83 -0
  68. package/src/components/pagination/MPagination.vue +120 -140
  69. package/src/components/passwordinput/MPasswordInput.spec.ts +104 -0
  70. package/src/components/passwordinput/MPasswordInput.stories.ts +75 -0
  71. package/src/components/passwordinput/MPasswordInput.vue +126 -77
  72. package/src/components/pincode/MPincode.spec.ts +126 -0
  73. package/src/components/pincode/MPincode.stories.ts +68 -0
  74. package/src/components/pincode/MPincode.vue +148 -0
  75. package/src/components/quantityselector/MQuantitySelector.spec.ts +262 -0
  76. package/src/components/quantityselector/MQuantitySelector.stories.ts +89 -0
  77. package/src/components/quantityselector/MQuantitySelector.vue +159 -148
  78. package/src/components/radio/MRadio.spec.ts +104 -0
  79. package/src/components/radio/MRadio.stories.ts +68 -0
  80. package/src/components/radio/MRadio.vue +56 -39
  81. package/src/components/radiogroup/MRadioGroup.spec.ts +54 -0
  82. package/src/components/radiogroup/MRadioGroup.stories.ts +61 -0
  83. package/src/components/radiogroup/MRadioGroup.vue +79 -0
  84. package/src/components/select/MSelect.spec.ts +114 -0
  85. package/src/components/select/MSelect.stories.ts +101 -0
  86. package/src/components/select/MSelect.vue +77 -119
  87. package/src/components/statusbadge/MStatusBadge.stories.ts +45 -0
  88. package/src/components/statusbadge/MStatusBadge.vue +40 -0
  89. package/src/components/statusbadge/MstatusBadge.spec.ts +16 -0
  90. package/src/components/statusdot/MStatusDot.spec.ts +51 -0
  91. package/src/components/statusdot/MStatusDot.stories.ts +48 -0
  92. package/src/components/statusdot/MStatusDot.vue +36 -0
  93. package/src/components/statusnotification/MStatusNotification.spec.ts +103 -0
  94. package/src/components/statusnotification/MStatusNotification.stories.ts +89 -0
  95. package/src/components/statusnotification/MStatusNotification.vue +106 -0
  96. package/src/components/tabs/MTabs.stories.ts +104 -0
  97. package/src/components/tabs/MTabs.vue +113 -0
  98. package/src/components/tabs/Mtabs.spec.ts +149 -0
  99. package/src/components/tag/MTag.spec.ts +107 -0
  100. package/src/components/tag/MTag.stories.ts +75 -0
  101. package/src/components/tag/MTag.vue +151 -0
  102. package/src/components/textarea/MTextArea.spec.ts +112 -0
  103. package/src/components/textarea/MTextArea.stories.ts +67 -0
  104. package/src/components/textarea/MTextArea.vue +81 -43
  105. package/src/components/textinput/MTextInput.spec.ts +121 -0
  106. package/src/components/textinput/MTextInput.stories.ts +107 -0
  107. package/src/components/textinput/MTextInput.vue +127 -47
  108. package/src/components/toggle/MToggle.spec.ts +99 -0
  109. package/src/components/toggle/MToggle.stories.ts +68 -0
  110. package/src/components/toggle/MToggle.vue +63 -103
  111. package/src/components/togglegroup/MToggleGroup.spec.ts +78 -0
  112. package/src/components/togglegroup/MToggleGroup.stories.ts +61 -0
  113. package/src/components/togglegroup/MToggleGroup.vue +97 -0
  114. package/src/components/tooltip/MTooltip.spec.ts +47 -0
  115. package/src/components/tooltip/MTooltip.stories.ts +59 -0
  116. package/src/components/tooltip/MTooltip.vue +49 -32
  117. package/src/components/usingIcons.mdx +35 -0
  118. package/src/components/usingPresets.mdx +128 -0
  119. package/src/main.ts +33 -0
  120. package/dist/demo.html +0 -1
  121. package/dist/mozaic-vue.adeo.css +0 -47
  122. package/dist/mozaic-vue.adeo.umd.js +0 -31341
  123. package/dist/mozaic-vue.common.js +0 -31331
  124. package/dist/mozaic-vue.common.js.map +0 -1
  125. package/dist/mozaic-vue.umd.js +0 -31342
  126. package/dist/mozaic-vue.umd.js.map +0 -1
  127. package/dist/mozaic-vue.umd.min.js +0 -4
  128. package/dist/mozaic-vue.umd.min.js.map +0 -1
  129. package/postinstall.js +0 -3
  130. package/src/components/accordion/MAccordion.vue +0 -128
  131. package/src/components/accordion/index.js +0 -7
  132. package/src/components/autocomplete/MAutocomplete.vue +0 -380
  133. package/src/components/autocomplete/index.js +0 -7
  134. package/src/components/badge/MBadge.vue +0 -43
  135. package/src/components/badge/index.js +0 -7
  136. package/src/components/breadcrumb/index.js +0 -7
  137. package/src/components/button/index.js +0 -7
  138. package/src/components/card/MCard.vue +0 -78
  139. package/src/components/card/index.js +0 -7
  140. package/src/components/checkbox/MCheckboxGroup.vue +0 -163
  141. package/src/components/checkbox/index.js +0 -12
  142. package/src/components/container/MContainer.vue +0 -33
  143. package/src/components/container/index.js +0 -7
  144. package/src/components/datatable/MDataTable.vue +0 -651
  145. package/src/components/datatable/MDataTableHeader.vue +0 -55
  146. package/src/components/datatable/MDataTableTop.vue +0 -35
  147. package/src/components/datatable/helpers.js +0 -132
  148. package/src/components/datatable/index.js +0 -12
  149. package/src/components/dropdown/MDropdown.vue +0 -317
  150. package/src/components/dropdown/index.js +0 -7
  151. package/src/components/field/index.js +0 -7
  152. package/src/components/fileuploader/MFileResult.vue +0 -149
  153. package/src/components/fileuploader/MFileUploader.vue +0 -142
  154. package/src/components/fileuploader/index.js +0 -7
  155. package/src/components/flag/index.js +0 -7
  156. package/src/components/heading/MHeading.vue +0 -75
  157. package/src/components/heading/index.js +0 -7
  158. package/src/components/hero/MHero.vue +0 -93
  159. package/src/components/hero/index.js +0 -7
  160. package/src/components/icon/MIcon.vue +0 -136
  161. package/src/components/icon/index.js +0 -7
  162. package/src/components/index.js +0 -44
  163. package/src/components/layer/MLayer.vue +0 -208
  164. package/src/components/layer/index.js +0 -7
  165. package/src/components/link/index.js +0 -7
  166. package/src/components/listbox/MListBox.vue +0 -146
  167. package/src/components/listbox/MListBoxActions.vue +0 -251
  168. package/src/components/listbox/index.js +0 -12
  169. package/src/components/loader/index.js +0 -7
  170. package/src/components/modal/index.js +0 -7
  171. package/src/components/notification/MNotification.vue +0 -110
  172. package/src/components/notification/index.js +0 -7
  173. package/src/components/optionbutton/MOptionButton.vue +0 -67
  174. package/src/components/optionbutton/index.js +0 -7
  175. package/src/components/optioncard/MOptionCard.vue +0 -132
  176. package/src/components/optioncard/index.js +0 -7
  177. package/src/components/optiongroup/MOptionGroup.vue +0 -18
  178. package/src/components/optiongroup/index.js +0 -7
  179. package/src/components/overlay/MOverlayLoader.vue +0 -43
  180. package/src/components/overlay/index.js +0 -12
  181. package/src/components/pagination/index.js +0 -7
  182. package/src/components/passwordinput/index.js +0 -7
  183. package/src/components/phonenumber/MPhoneNumber.vue +0 -398
  184. package/src/components/phonenumber/index.js +0 -7
  185. package/src/components/progressbar/MProgress.vue +0 -102
  186. package/src/components/progressbar/index.js +0 -7
  187. package/src/components/quantityselector/index.js +0 -7
  188. package/src/components/radio/MRadioGroup.vue +0 -111
  189. package/src/components/radio/index.js +0 -12
  190. package/src/components/ratingstars/MStarsInput.vue +0 -119
  191. package/src/components/ratingstars/MStarsResult.vue +0 -89
  192. package/src/components/ratingstars/index.js +0 -12
  193. package/src/components/select/index.js +0 -7
  194. package/src/components/stepper/MStepper.vue +0 -111
  195. package/src/components/stepper/index.js +0 -7
  196. package/src/components/tabs/MTab.vue +0 -204
  197. package/src/components/tabs/index.js +0 -7
  198. package/src/components/tags/MTag.vue +0 -175
  199. package/src/components/tags/index.js +0 -7
  200. package/src/components/textarea/index.js +0 -7
  201. package/src/components/textinput/MTextInputField.vue +0 -105
  202. package/src/components/textinput/MTextInputIcon.vue +0 -42
  203. package/src/components/textinput/index.js +0 -7
  204. package/src/components/toggle/index.js +0 -7
  205. package/src/components/tooltip/index.js +0 -7
  206. package/src/index.js +0 -63
  207. package/src/shims-tsx.d.ts +0 -13
  208. package/src/shims.vue.d.ts +0 -4
  209. package/src/tokens/adeo/android/colors.xml +0 -452
  210. package/src/tokens/adeo/android/font_dimens.xml +0 -18
  211. package/src/tokens/adeo/css/_variables.scss +0 -446
  212. package/src/tokens/adeo/css/root.scss +0 -448
  213. package/src/tokens/adeo/ios/StyleDictionaryColor.h +0 -460
  214. package/src/tokens/adeo/ios/StyleDictionaryColor.m +0 -472
  215. package/src/tokens/adeo/ios/StyleDictionaryColor.swift +0 -455
  216. package/src/tokens/adeo/ios/StyleDictionarySize.h +0 -69
  217. package/src/tokens/adeo/ios/StyleDictionarySize.m +0 -70
  218. package/src/tokens/adeo/ios/StyleDictionarySize.swift +0 -71
  219. package/src/tokens/adeo/js/tokens.js +0 -544
  220. package/src/tokens/adeo/js/tokensObject.js +0 -11733
  221. package/src/tokens/adeo/scss/_tokens.scss +0 -1522
  222. package/src/utils/mozaicClasses.js +0 -16
  223. package/src/utils/theme.validator.js +0 -19
  224. package/types/index.d.ts +0 -104
@@ -0,0 +1,35 @@
1
+ import { Meta, Source } from '@storybook/addon-docs/blocks';
2
+
3
+ <Meta title="Using Icons" />
4
+
5
+ # Using Icons
6
+
7
+ To use icons in Vue applications, you need to install a dedicated package.
8
+
9
+ You must first install the [npm package](https://www.npmjs.com/package/@mozaic-ds/icons-vue):
10
+
11
+ <Source language="bash" dark code="npm install @mozaic-ds/icons-vue" />
12
+
13
+ Or with **Yarn**:
14
+
15
+ <Source language="bash" dark code="yarn add @mozaic-ds/icons-vue" />
16
+
17
+ You can then start importing the icon of your choice into your Vue component:
18
+
19
+ <Source
20
+ language='html'
21
+ dark
22
+ code={`
23
+ // In one of the .vue file of your application
24
+
25
+ <template>
26
+ <A11y20 fill="#333" />
27
+ </template>
28
+
29
+ <script setup>
30
+ import A11y20 from '@mozaic-ds/icons-vue/src/components/A11y20/A11y20.vue';
31
+ </script>
32
+
33
+ `} />
34
+
35
+ [The full list of icons is available here](https://github.com/adeo/mozaic-icons-vue/tree/main/src/components).
@@ -0,0 +1,128 @@
1
+ import { Meta, Source } from '@storybook/addon-docs/blocks';
2
+
3
+ <Meta title="Using Presets" />
4
+
5
+ # Mozaic's presets
6
+
7
+ **Mozaic** is a **multi-brand** design system.<br/>
8
+ This means that it is fully customisable so that its constituent elements _(foundations, components, etc.)_ can be adapted to the graphic charter of the brand that uses it.
9
+
10
+ To simplify this aspect of customising **Mozaic** for you, we have created themes _(which we also call **"presets"**)_ ready to use according to your context of use.
11
+
12
+ Currently **Mozaic** can be customized with the following presets:
13
+
14
+ - Preset **Leroy Merlin**: this is the default preset/theme configured when **Mozaic** was first installed
15
+ - Preset **Adeo**: dedicated to the **Adeo Group's** internal interfaces and products
16
+ - Preset **Bricoman**: dedicated to the interfaces and products of the **Bricoman** brand
17
+
18
+ The rest of this documentation shows you how to use/install the Adeo preset in your project.
19
+
20
+ > Note that the procedure remains the same for all other presets.<br/> You just need to replace all references to "Adeo" with the brand name of your choice.
21
+
22
+ ## Using the Adeo's preset
23
+
24
+ Before anything else, make sure you have followed the **Mozaic-Vue** installation procedure as described in the [Getting Started](?path=/docs/getting-started--docs) page.
25
+
26
+ Once **Mozaic-Vue** is installed as shown, we can make the following changes:
27
+
28
+ ### 1. Loading preset
29
+
30
+ All it has to do is insert the following code into its main Sass file (entrypoint stylesheet):
31
+
32
+ <Source
33
+ language="css"
34
+ dark
35
+ code={`
36
+ // Entrypoint stylesheet
37
+ @use "@mozaic-ds/tokens/<presetName>" as *;
38
+ `}
39
+ />
40
+
41
+ > [!NOTE]
42
+ > The `<presetName>` string should be replaced by the name of the preset you want, one of the following values: `adeo | enki | mbrand`.
43
+ > As the `leroymerlin` preset is the default preset, you don't need to use this syntax to use it.
44
+
45
+ For example, for ADEO
46
+
47
+ <Source
48
+ language="css"
49
+ dark
50
+ code={`
51
+ // Entrypoint stylesheet
52
+ @use "@mozaic-ds/tokens/adeo" as *;
53
+ `}
54
+ />
55
+
56
+ ### 2. Font by brand
57
+
58
+ Each brand is distinguished not only by different styles but also by a different font.
59
+
60
+ The table below summarises which font to use depending on the brand.
61
+
62
+ <table>
63
+ <tr>
64
+ <td>Brand</td>
65
+ <td>Font</td>
66
+ </tr>
67
+ <tr>
68
+ <td>Leroy Merlin</td>
69
+ <td>
70
+ [LeroyMerlinSans](https://mozaic.adeo.cloud/foundations/typography/font-families/)
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <td>Adeo</td>
75
+ <td>[Roboto](https://fonts.google.com/specimen/Roboto)</td>
76
+ </tr>
77
+ <tr>
78
+ <td>Bricoman</td>
79
+ <td>[Inter](https://fonts.google.com/specimen/Inter)</td>
80
+ </tr>
81
+ </table>
82
+
83
+ From there, we can update the main style sheet of your project, in order to import the right font.
84
+
85
+ <Source
86
+ language='css'
87
+ dark
88
+ code={`
89
+ @use "@mozaic-ds/styles/tools/t.font" as *;
90
+
91
+ body {
92
+ @include set-font-family();
93
+ }
94
+ `} />
95
+
96
+ Specific for LM fonts
97
+
98
+ > This section describes the use of fonts for the **Leroy Merlin** preset, but if you are using another preset, please see [the associated documentation](?path=/docs/using-presets--docs).
99
+
100
+ The theme defined by default when **Mozaic-Vue** is first installed/used is the theme corresponding to the **Leroy Merlin** charter.
101
+
102
+ For any use of the **Leroy Merlin** theme, it is recommended to use the font [LeroyMerlinSans](/typography/font-families/) which has been specially designed for **Leroy Merlin** products.
103
+
104
+ To use the `LeroyMerlinSans` font in your project, you must copy it into your project so that it is present in your `assets`.
105
+
106
+ You can do this as follows:
107
+
108
+ 1. Create a folder in your project where you can save the fonts, for example: `static/assets/fonts`
109
+
110
+ 2. Copy fonts from Mozaic dependencies:
111
+
112
+ <Source
113
+ language="bash"
114
+ dark
115
+ code="cp node_modules/@mozaic-ds/web-fonts/*.{woff,woff2} static/assets/fonts"
116
+ />
117
+
118
+ ### 3. Usage
119
+
120
+ At this stage, the integration of the **Mozaic-Vue** components should normally be customised with the preset values.
121
+
122
+ All that remains is to use the components as usual:
123
+
124
+ <Source
125
+ language="html"
126
+ dark
127
+ code='<MButton label="This is a Mozaic Button" />'
128
+ />
package/src/main.ts ADDED
@@ -0,0 +1,33 @@
1
+ export { default as MBreadcrumb } from './components/breadcrumb/MBreadcrumb.vue';
2
+ export { default as MButton } from './components/button/MButton.vue';
3
+ export { default as MCheckbox } from './components/checkbox/MCheckbox.vue';
4
+ export { default as MCheckboxGroup } from './components/checkboxgroup/MCheckboxGroup.vue';
5
+ export { default as MDatepicker } from './components/datepicker/MDatepicker.vue';
6
+ export { default as MDivider } from './components/divider/MDivider.vue';
7
+ export { default as MDrawer } from './components/drawer/MDrawer.vue';
8
+ export { default as MField } from './components/field/MField.vue';
9
+ export { default as MFieldGroup } from './components/fieldgroup/MFieldGroup.vue';
10
+ export { default as MFlag } from './components/flag/MFlag.vue';
11
+ export { default as MIconButton } from './components/iconbutton/MIconButton.vue';
12
+ export { default as MLink } from './components/link/MLink.vue';
13
+ export { default as MLoader } from './components/loader/MLoader.vue';
14
+ export { default as MLoadingOverlay } from './components/loadingoverlay/MLoadingOverlay.vue';
15
+ export { default as MModal } from './components/modal/MModal.vue';
16
+ export { default as MNumberBadge } from './components/numberbadge/MNumberBadge.vue';
17
+ export { default as MOverlay } from './components/overlay/MOverlay.vue';
18
+ export { default as MPagination } from './components/pagination/MPagination.vue';
19
+ export { default as MPasswordInput } from './components/passwordinput/MPasswordInput.vue';
20
+ export { default as MPincode } from './components/pincode/MPincode.vue';
21
+ export { default as MQuantitySelector } from './components/quantityselector/MQuantitySelector.vue';
22
+ export { default as MRadio } from './components/radio/MRadio.vue';
23
+ export { default as MRadioGroup } from './components/radiogroup/MRadioGroup.vue';
24
+ export { default as MSelect } from './components/select/MSelect.vue';
25
+ export { default as MStatusBadge } from './components/statusbadge/MStatusBadge.vue';
26
+ export { default as MStatusNotification } from './components/statusnotification/MStatusNotification.vue';
27
+ export { default as MTabs } from './components/tabs/MTabs.vue';
28
+ export { default as MTag } from './components/tag/MTag.vue';
29
+ export { default as MTextArea } from './components/textarea/MTextArea.vue';
30
+ export { default as MTextInput } from './components/textinput/MTextInput.vue';
31
+ export { default as MToggle } from './components/toggle/MToggle.vue';
32
+ export { default as MTooltip } from './components/tooltip/MTooltip.vue';
33
+ export { default as MToggleGroup } from './components/togglegroup/MToggleGroup.vue';
package/dist/demo.html DELETED
@@ -1 +0,0 @@
1
- <!doctype html><meta charset="utf-8"><title>vue demo</title><script src="./mozaic-vue.adeo.umd.js"></script><link rel="stylesheet" href="./mozaic-vue.adeo.css"><script>console.log(vue)</script>