@mgdis/mg-components 3.1.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 (271) hide show
  1. package/LICENSE +29 -0
  2. package/dist/cjs/css-shim-a22512c4.js +6 -0
  3. package/dist/cjs/index-85a4a0b6.js +1674 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +35 -0
  6. package/dist/cjs/mg-badge_20.cjs.entry.js +4661 -0
  7. package/dist/cjs/mg-components.cjs.js +23 -0
  8. package/dist/cjs/shadow-css-8940f82d.js +390 -0
  9. package/dist/collection/collection-manifest.json +31 -0
  10. package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +4 -0
  11. package/dist/collection/components/atoms/mg-badge/mg-badge.css +99 -0
  12. package/dist/collection/components/atoms/mg-badge/mg-badge.js +148 -0
  13. package/dist/collection/components/atoms/mg-badge/mg-badge.stories.js +27 -0
  14. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +4 -0
  15. package/dist/collection/components/atoms/mg-button/mg-button.css +134 -0
  16. package/dist/collection/components/atoms/mg-button/mg-button.js +236 -0
  17. package/dist/collection/components/atoms/mg-button/mg-button.stories.js +38 -0
  18. package/dist/collection/components/atoms/mg-character-left/mg-character-left.css +3 -0
  19. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +133 -0
  20. package/dist/collection/components/atoms/mg-character-left/mg-character-left.stories.js +15 -0
  21. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +54 -0
  22. package/dist/collection/components/atoms/mg-icon/mg-icon.css +57 -0
  23. package/dist/collection/components/atoms/mg-icon/mg-icon.js +155 -0
  24. package/dist/collection/components/atoms/mg-icon/mg-icon.stories.js +34 -0
  25. package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +12 -0
  26. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +95 -0
  27. package/dist/collection/components/atoms/mg-input-title/mg-input-title.stories.js +21 -0
  28. package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js +4 -0
  29. package/dist/collection/components/atoms/mg-tag/mg-tag.css +73 -0
  30. package/dist/collection/components/atoms/mg-tag/mg-tag.js +94 -0
  31. package/dist/collection/components/atoms/mg-tag/mg-tag.stories.js +25 -0
  32. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +44 -0
  33. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +225 -0
  34. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.stories.js +26 -0
  35. package/dist/collection/components/molecules/inputs/MgInput.conf.js +7 -0
  36. package/dist/collection/components/molecules/inputs/MgInput.js +130 -0
  37. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +1 -0
  38. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +156 -0
  39. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +444 -0
  40. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.js +57 -0
  41. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +7 -0
  42. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +171 -0
  43. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +467 -0
  44. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.stories.js +46 -0
  45. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +11 -0
  46. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +199 -0
  47. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +633 -0
  48. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.js +68 -0
  49. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +195 -0
  50. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +401 -0
  51. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.stories.js +43 -0
  52. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js +1 -0
  53. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +156 -0
  54. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +443 -0
  55. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.js +65 -0
  56. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js +1 -0
  57. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +201 -0
  58. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +532 -0
  59. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.stories.js +70 -0
  60. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +222 -0
  61. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +589 -0
  62. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.stories.js +115 -0
  63. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +217 -0
  64. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +553 -0
  65. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.js +52 -0
  66. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +1 -0
  67. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +213 -0
  68. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +457 -0
  69. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.js +73 -0
  70. package/dist/collection/components/molecules/mg-message/mg-message.conf.js +4 -0
  71. package/dist/collection/components/molecules/mg-message/mg-message.css +94 -0
  72. package/dist/collection/components/molecules/mg-message/mg-message.js +285 -0
  73. package/dist/collection/components/molecules/mg-message/mg-message.stories.js +43 -0
  74. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +5 -0
  75. package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +39 -0
  76. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +218 -0
  77. package/dist/collection/components/molecules/mg-pagination/mg-pagination.stories.js +23 -0
  78. package/dist/collection/components/molecules/mg-popover/mg-popover.css +59 -0
  79. package/dist/collection/components/molecules/mg-popover/mg-popover.js +249 -0
  80. package/dist/collection/components/molecules/mg-popover/mg-popover.stories.js +36 -0
  81. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +1 -0
  82. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +30 -0
  83. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +212 -0
  84. package/dist/collection/components/molecules/mg-tabs/mg-tabs.stories.js +40 -0
  85. package/dist/collection/fonts/OpenSans-Regular.ttf +0 -0
  86. package/dist/collection/fonts/OpenSans-SemiBold.ttf +0 -0
  87. package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
  88. package/dist/collection/index.js +1 -0
  89. package/dist/collection/locales/index.js +4 -0
  90. package/dist/collection/stories/buttons.stories.js +43 -0
  91. package/dist/collection/stories/grids.stories.js +50 -0
  92. package/dist/collection/stories/icons.stories.js +20 -0
  93. package/dist/collection/stories/messages.stories.js +44 -0
  94. package/dist/collection/stories/tags.stories.js +13 -0
  95. package/dist/collection/stories/typography.stories.js +28 -0
  96. package/dist/collection/utils/components.utils.js +67 -0
  97. package/dist/collection/utils/locale.utils.js +32 -0
  98. package/dist/collection/utils/test.utils.js +26 -0
  99. package/dist/collection/variables.css +177 -0
  100. package/dist/collection/variables.scss +177 -0
  101. package/dist/components/MgInput.js +140 -0
  102. package/dist/components/components.utils.js +69 -0
  103. package/dist/components/index.d.ts +26 -0
  104. package/dist/components/index.js +1 -0
  105. package/dist/components/index2.js +54 -0
  106. package/dist/components/locale.utils.js +35 -0
  107. package/dist/components/mg-badge.d.ts +11 -0
  108. package/dist/components/mg-badge.js +6 -0
  109. package/dist/components/mg-badge2.js +82 -0
  110. package/dist/components/mg-button.d.ts +11 -0
  111. package/dist/components/mg-button.js +6 -0
  112. package/dist/components/mg-button2.js +148 -0
  113. package/dist/components/mg-character-left.d.ts +11 -0
  114. package/dist/components/mg-character-left.js +6 -0
  115. package/dist/components/mg-character-left2.js +77 -0
  116. package/dist/components/mg-icon.d.ts +11 -0
  117. package/dist/components/mg-icon.js +6 -0
  118. package/dist/components/mg-icon2.js +147 -0
  119. package/dist/components/mg-input-checkbox.d.ts +11 -0
  120. package/dist/components/mg-input-checkbox.js +222 -0
  121. package/dist/components/mg-input-date.d.ts +11 -0
  122. package/dist/components/mg-input-date.js +245 -0
  123. package/dist/components/mg-input-numeric.d.ts +11 -0
  124. package/dist/components/mg-input-numeric.js +324 -0
  125. package/dist/components/mg-input-password.d.ts +11 -0
  126. package/dist/components/mg-input-password.js +171 -0
  127. package/dist/components/mg-input-radio.d.ts +11 -0
  128. package/dist/components/mg-input-radio.js +211 -0
  129. package/dist/components/mg-input-select.d.ts +11 -0
  130. package/dist/components/mg-input-select.js +6 -0
  131. package/dist/components/mg-input-select2.js +243 -0
  132. package/dist/components/mg-input-text.d.ts +11 -0
  133. package/dist/components/mg-input-text.js +242 -0
  134. package/dist/components/mg-input-textarea.d.ts +11 -0
  135. package/dist/components/mg-input-textarea.js +224 -0
  136. package/dist/components/mg-input-title.d.ts +11 -0
  137. package/dist/components/mg-input-title.js +6 -0
  138. package/dist/components/mg-input-title2.js +55 -0
  139. package/dist/components/mg-input-toggle.d.ts +11 -0
  140. package/dist/components/mg-input-toggle.js +247 -0
  141. package/dist/components/mg-message.d.ts +11 -0
  142. package/dist/components/mg-message.js +183 -0
  143. package/dist/components/mg-pagination.d.ts +11 -0
  144. package/dist/components/mg-pagination.js +175 -0
  145. package/dist/components/mg-popover.d.ts +11 -0
  146. package/dist/components/mg-popover.js +183 -0
  147. package/dist/components/mg-tabs.d.ts +11 -0
  148. package/dist/components/mg-tabs.js +160 -0
  149. package/dist/components/mg-tag.d.ts +11 -0
  150. package/dist/components/mg-tag.js +76 -0
  151. package/dist/components/mg-tooltip.d.ts +11 -0
  152. package/dist/components/mg-tooltip.js +6 -0
  153. package/dist/components/mg-tooltip2.js +150 -0
  154. package/dist/components/popper.js +1784 -0
  155. package/dist/esm/css-shim-7c240feb.js +4 -0
  156. package/dist/esm/index-e3e84606.js +1643 -0
  157. package/dist/esm/index.js +1 -0
  158. package/dist/esm/loader.js +31 -0
  159. package/dist/esm/mg-badge_20.entry.js +4638 -0
  160. package/dist/esm/mg-components.js +21 -0
  161. package/dist/esm/polyfills/core-js.js +11 -0
  162. package/dist/esm/polyfills/css-shim.js +1 -0
  163. package/dist/esm/polyfills/dom.js +79 -0
  164. package/dist/esm/polyfills/es5-html-element.js +1 -0
  165. package/dist/esm/polyfills/index.js +34 -0
  166. package/dist/esm/polyfills/system.js +6 -0
  167. package/dist/esm/shadow-css-5d2d01ce.js +388 -0
  168. package/dist/esm-es5/css-shim-7c240feb.js +1 -0
  169. package/dist/esm-es5/index-e3e84606.js +1 -0
  170. package/dist/esm-es5/index.js +0 -0
  171. package/dist/esm-es5/loader.js +1 -0
  172. package/dist/esm-es5/mg-badge_20.entry.js +2 -0
  173. package/dist/esm-es5/mg-components.js +1 -0
  174. package/dist/esm-es5/shadow-css-5d2d01ce.js +12 -0
  175. package/dist/index.cjs.js +1 -0
  176. package/dist/index.js +1 -0
  177. package/dist/mg-components/fonts/OpenSans-Regular.ttf +0 -0
  178. package/dist/mg-components/fonts/OpenSans-SemiBold.ttf +0 -0
  179. package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
  180. package/dist/mg-components/index.esm.js +0 -0
  181. package/dist/mg-components/mg-components.css +1 -0
  182. package/dist/mg-components/mg-components.esm.js +1 -0
  183. package/dist/mg-components/mg-components.js +132 -0
  184. package/dist/mg-components/p-1cd24462.system.js +1 -0
  185. package/dist/mg-components/p-2e2f6b27.system.entry.js +2 -0
  186. package/dist/mg-components/p-366a224e.js +1 -0
  187. package/dist/mg-components/p-422c429b.system.js +1 -0
  188. package/dist/mg-components/p-50ea2036.system.js +1 -0
  189. package/dist/mg-components/p-62fa3797.js +1 -0
  190. package/dist/mg-components/p-71d57b8b.system.js +13 -0
  191. package/dist/mg-components/p-9a215712.system.js +1 -0
  192. package/dist/mg-components/p-cbf0464b.entry.js +1 -0
  193. package/dist/mg-components/p-f6455ab3.js +12 -0
  194. package/dist/mg-components/variables.css +177 -0
  195. package/dist/mg-components/variables.scss +177 -0
  196. package/dist/types/components/atoms/mg-badge/mg-badge.conf.d.ts +8 -0
  197. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +36 -0
  198. package/dist/types/components/atoms/mg-badge/mg-badge.stories.d.ts +19 -0
  199. package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +4 -0
  200. package/dist/types/components/atoms/mg-button/mg-button.d.ts +67 -0
  201. package/dist/types/components/atoms/mg-button/mg-button.stories.d.ts +16 -0
  202. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +39 -0
  203. package/dist/types/components/atoms/mg-character-left/mg-character-left.stories.d.ts +7 -0
  204. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +12 -0
  205. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +36 -0
  206. package/dist/types/components/atoms/mg-icon/mg-icon.stories.d.ts +26 -0
  207. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +24 -0
  208. package/dist/types/components/atoms/mg-input-title/mg-input-title.stories.d.ts +6 -0
  209. package/dist/types/components/atoms/mg-tag/mg-tag.conf.d.ts +4 -0
  210. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +25 -0
  211. package/dist/types/components/atoms/mg-tag/mg-tag.stories.d.ts +14 -0
  212. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +56 -0
  213. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +11 -0
  214. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +10 -0
  215. package/dist/types/components/molecules/inputs/MgInput.d.ts +35 -0
  216. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +19 -0
  217. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +120 -0
  218. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.d.ts +6 -0
  219. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.conf.d.ts +6 -0
  220. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +128 -0
  221. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.stories.d.ts +7 -0
  222. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.d.ts +10 -0
  223. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +173 -0
  224. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.d.ts +21 -0
  225. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +111 -0
  226. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +9 -0
  227. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +9 -0
  228. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +121 -0
  229. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.d.ts +15 -0
  230. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +18 -0
  231. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +133 -0
  232. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +14 -0
  233. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +160 -0
  234. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.stories.d.ts +26 -0
  235. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +150 -0
  236. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +6 -0
  237. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +8 -0
  238. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +117 -0
  239. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.d.ts +7 -0
  240. package/dist/types/components/molecules/mg-message/mg-message.conf.d.ts +4 -0
  241. package/dist/types/components/molecules/mg-message/mg-message.d.ts +76 -0
  242. package/dist/types/components/molecules/mg-message/mg-message.stories.d.ts +16 -0
  243. package/dist/types/components/molecules/mg-pagination/mg-pagination.conf.d.ts +4 -0
  244. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +53 -0
  245. package/dist/types/components/molecules/mg-pagination/mg-pagination.stories.d.ts +6 -0
  246. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +62 -0
  247. package/dist/types/components/molecules/mg-popover/mg-popover.stories.d.ts +12 -0
  248. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +10 -0
  249. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +63 -0
  250. package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +7 -0
  251. package/dist/types/components.d.ts +1987 -0
  252. package/dist/types/index.d.ts +1 -0
  253. package/dist/types/locales/index.d.ts +44 -0
  254. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  255. package/dist/types/stories/buttons.stories.d.ts +13 -0
  256. package/dist/types/stories/grids.stories.d.ts +5 -0
  257. package/dist/types/stories/icons.stories.d.ts +13 -0
  258. package/dist/types/stories/messages.stories.d.ts +13 -0
  259. package/dist/types/stories/tags.stories.d.ts +5 -0
  260. package/dist/types/stories/typography.stories.d.ts +5 -0
  261. package/dist/types/utils/components.utils.d.ts +43 -0
  262. package/dist/types/utils/locale.utils.d.ts +22 -0
  263. package/dist/types/utils/test.utils.d.ts +5 -0
  264. package/loader/cdn.js +3 -0
  265. package/loader/index.cjs.js +3 -0
  266. package/loader/index.d.ts +12 -0
  267. package/loader/index.es2017.js +3 -0
  268. package/loader/index.js +4 -0
  269. package/loader/package.json +10 -0
  270. package/package.json +86 -0
  271. package/readme.md +159 -0
@@ -0,0 +1,177 @@
1
+ :root {
2
+ /*
3
+ Fonts
4
+ */
5
+
6
+ --font-size: 1.3rem;
7
+ --line-height: 1.4;
8
+
9
+ /* Open Sans is used for the body (mostly all texts) */
10
+ --font-family: 'Open Sans', sans-serif;
11
+
12
+ /* Poppins is used for the headings (h1 to h6) */
13
+ --font-family-heading: 'Poppins', sans-serif;
14
+
15
+ /* Font colors */
16
+ --color-font-light: var(--color-light);
17
+ --color-font-dark: var(--color-dark);
18
+ /*
19
+ Colors
20
+ https://jira.mgdis.fr/browse/PDA9-690
21
+ */
22
+
23
+ /* Neutral */
24
+ /* #fefefe; */
25
+ /* rgb(254, 254, 254); */
26
+ --color-neutral-h: 0;
27
+ --color-neutral-s: 0%;
28
+ --color-neutral-l: 99.6%;
29
+ --color-neutral: var(--color-neutral-h), var(--color-neutral-s), var(--color-neutral-l);
30
+
31
+ /* Warning */
32
+ /* #ffc33e */
33
+ /* rgb(255, 195, 62); */
34
+ --color-warning-h: 41;
35
+ --color-warning-s: 100%;
36
+ --color-warning-l: 62.2%;
37
+ --color-warning: var(--color-warning-h), var(--color-warning-s), var(--color-warning-l);
38
+
39
+ /* Success */
40
+ /* #32d59c */
41
+ /* rgb(50, 213, 156); */
42
+ --color-success-h: 159;
43
+ --color-success-s: 66%;
44
+ --color-success-l: 51.6%;
45
+ --color-success: var(--color-success-h), var(--color-success-s), var(--color-success-l);
46
+
47
+ /* Info */
48
+ /* #005e9c; */
49
+ /* rgb(0, 94, 156); */
50
+ --color-info-h: 204;
51
+ --color-info-s: 100%;
52
+ --color-info-l: 30.6%;
53
+ --color-info: var(--color-info-h), var(--color-info-s), var(--color-info-l);
54
+
55
+ /* Danger */
56
+ /* #df242c; */
57
+ /* rgb(223, 36, 44); */
58
+ --color-danger-h: 357;
59
+ --color-danger-s: 74.5%;
60
+ --color-danger-l: 50.8%;
61
+ --color-danger: var(--color-danger-h), var(--color-danger-s), var(--color-danger-l);
62
+
63
+ /* Dark */
64
+ /* #15282e; */
65
+ /* rgb(21, 40, 46); */
66
+ --color-dark-h: 194;
67
+ --color-dark-s: 37.3%;
68
+ --color-dark-l: 13.1%;
69
+ --color-dark: var(--color-dark-h), var(--color-dark-s), var(--color-dark-l);
70
+
71
+ /* Light */
72
+ /* white; (#ffffff) */
73
+ /* rgb(255, 255, 255); */
74
+ --color-light-h: 0;
75
+ --color-light-s: 0%;
76
+ --color-light-l: 100%;
77
+ --color-light: var(--color-light-h), var(--color-light-s), var(--color-light-l);
78
+
79
+ /*
80
+ Global
81
+ */
82
+ --default-size: 3.5rem;
83
+
84
+ /*
85
+ <mg-icon>
86
+ */
87
+ --mg-icon-regular-size: 1.6rem;
88
+ --mg-icon-large-size: 2.4rem;
89
+ --mg-icon-extra-large-size: 3.6rem;
90
+
91
+ /*
92
+ <mg-button>
93
+ */
94
+
95
+ --mg-button-border-radius: 0.3rem;
96
+ --mg-button-icon-border-radius: var(--default-size);
97
+ --mg-button-disabled-opacity: 0.6;
98
+
99
+ /* Primary */
100
+ --mg-button-primary-color-h: var(--color-dark-h);
101
+ --mg-button-primary-color-s: var(--color-dark-s);
102
+ --mg-button-primary-color-l: var(--color-dark-l);
103
+ --mg-button-primary-font-color: var(--color-neutral);
104
+
105
+ /* Secondary */
106
+ --mg-button-secondary-color-h: var(--color-neutral-h);
107
+ --mg-button-secondary-color-s: var(--color-neutral-s);
108
+ --mg-button-secondary-color-l: var(--color-neutral-l);
109
+ --mg-button-secondary-font-color: var(--color-dark);
110
+
111
+ /*
112
+ <mg-tag>
113
+ */
114
+ --mg-tag-height: 2.3rem;
115
+ --mg-tag-border-radius: 0.5rem;
116
+ --mg-tag-font-size: 1.2rem;
117
+
118
+ /*
119
+ <mg-badge>
120
+ */
121
+ --mg-badge-size: 1.6rem;
122
+ --mg-badge-font-size: 1.1rem;
123
+
124
+ /*
125
+ <mg-tooltip>
126
+ */
127
+ --mg-tooltip-border-radius: 0.5rem;
128
+ --mg-tooltip-background-color: var(--color-dark);
129
+ --mg-tooltip-font-color: var(--color-font-light);
130
+
131
+ /*
132
+ <mg-popover>
133
+ */
134
+ --mg-popover-background-color: var(--color-light);
135
+ --mg-popover-font-color: var(--color-font-dark);
136
+ --mg-popover-title-font-size: 1.4rem;
137
+
138
+ /*
139
+ <mg-message>
140
+ */
141
+ --mg-message-border-radius: 0.3rem;
142
+
143
+ /*
144
+ Layout
145
+ */
146
+ --mg-grid-spacing: 1rem;
147
+
148
+ /*
149
+ Forms
150
+ */
151
+ --mg-form-group-vertical-space: 1.5rem;
152
+
153
+ /*
154
+ <mg-input-...>
155
+ */
156
+ --mg-inputs-border-width: 0.1rem;
157
+ --mg-inputs-border-radius: 0.3rem;
158
+ --mg-inputs-color: #b5c2c9;
159
+ --mg-inputs-spacer: 1rem;
160
+
161
+ /* Input focus shadow */
162
+ /* #b5c2c9 */
163
+ /* rgb(0, 221, 255); */
164
+ /* hsl(188, 100%, 50%); */
165
+ --mg-inputs-color-shadow-focus-hsl: 188, 100%, 50%;
166
+
167
+ /*
168
+ <mg-input-toggle>
169
+ */
170
+ --mg-input-toggle-border-radius-ratio: 2;
171
+
172
+ /*
173
+ <mg-input-checkbox>
174
+ <mg-input-radio>
175
+ */
176
+ --mg-input-check-size: 1.3rem;
177
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * List of all possibles variants
3
+ */
4
+ export declare const variants: string[];
5
+ export declare type BadgeType = {
6
+ value: string | number;
7
+ label: string;
8
+ };
@@ -0,0 +1,36 @@
1
+ import { BadgeType } from './mg-badge.conf';
2
+ import { ClassList } from '../../../utils/components.utils';
3
+ export declare class MgBadge {
4
+ /**
5
+ * Badge value
6
+ */
7
+ value: BadgeType['value'];
8
+ valideValue(newValue: any): void;
9
+ /**
10
+ * Badge label. Include short description.
11
+ * Required for accessibility
12
+ */
13
+ label: BadgeType['label'];
14
+ /**
15
+ * Define button variant
16
+ */
17
+ variant?: string;
18
+ validateVariant(newValue: string): void;
19
+ /**
20
+ * Define if button is using outline style
21
+ */
22
+ outline?: boolean;
23
+ validateOutline(newValue: boolean): void;
24
+ /**
25
+ * Component classes
26
+ */
27
+ classList: ClassList;
28
+ /**
29
+ * Check if props are well configured on init
30
+ */
31
+ componentWillLoad(): void;
32
+ /**
33
+ * Render
34
+ */
35
+ render(): any;
36
+ }
@@ -0,0 +1,19 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ argTypes: {
5
+ variant: {
6
+ options: string[];
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ value: {
12
+ control: {
13
+ type: string;
14
+ };
15
+ };
16
+ };
17
+ };
18
+ export default _default;
19
+ export declare const MgBadge: any;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * List of all possibles variants
3
+ */
4
+ export declare const variants: string[];
@@ -0,0 +1,67 @@
1
+ import { ClassList } from '../../../utils/components.utils';
2
+ export declare class MgButton {
3
+ /************
4
+ * Internal *
5
+ ************/
6
+ private onClickElementFn;
7
+ /**************
8
+ * Decorators *
9
+ **************/
10
+ /**
11
+ * Get component DOM element
12
+ */
13
+ element: HTMLMgButtonElement;
14
+ /**
15
+ * Define button variant
16
+ */
17
+ variant: string;
18
+ validateVariant(newValue: string): void;
19
+ /**
20
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
21
+ * If not set, it will be created.
22
+ */
23
+ identifier?: string;
24
+ /**
25
+ * aria-label
26
+ * In case button text is not explicit enough
27
+ */
28
+ label: string;
29
+ /**
30
+ * Disable button
31
+ */
32
+ disabled: boolean;
33
+ disabledHandler(isDisabled: boolean): void;
34
+ /**
35
+ * Define if button is round.
36
+ * Used for icon button.
37
+ */
38
+ isIcon: boolean;
39
+ /**
40
+ * Option to set input disable on click, in order to prevent multi-click.
41
+ * Parent component have to remove the attribute 'disabled' when the process ends.
42
+ */
43
+ disableOnClick: boolean;
44
+ /**
45
+ * Define if button is loading, default to false.
46
+ * Trigger when button is clicked or key-up ['enter', 'space], then value change to true.
47
+ * It's required to reset to false when action/promise in parent is done to stop the loading state
48
+ */
49
+ loading: boolean;
50
+ loadingHandler(newValue: boolean): void;
51
+ /**
52
+ * Component classes
53
+ */
54
+ classList: ClassList;
55
+ /**
56
+ * Trigger actions onClick event
57
+ */
58
+ private handleClick;
59
+ /**
60
+ * Check if props are well configured on init
61
+ */
62
+ componentWillLoad(): void;
63
+ /**
64
+ * Render component
65
+ */
66
+ render(): any;
67
+ }
@@ -0,0 +1,16 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ argTypes: {
5
+ variant: {
6
+ options: string[];
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ };
12
+ };
13
+ export default _default;
14
+ export declare const MgButton: any;
15
+ export declare const IsIcon: any;
16
+ export declare const DisableOnClick: any;
@@ -0,0 +1,39 @@
1
+ export declare class MgCharacterLeft {
2
+ /************
3
+ * Internal *
4
+ ************/
5
+ private mustacheCounter;
6
+ /**************
7
+ * Decorators *
8
+ **************/
9
+ /**
10
+ * Sets an `id` attribute.
11
+ * Needed by the input for accessibility `aria-decribedby`.
12
+ */
13
+ identifier: string;
14
+ /**
15
+ * Template to display remaining characters.
16
+ * Must have {counter} inside
17
+ */
18
+ template: string;
19
+ validateTemplate(newValue: string): void;
20
+ /**
21
+ * Sets the characters to count
22
+ */
23
+ characters: string;
24
+ /**
25
+ * Add maximum length
26
+ */
27
+ maxlength: number;
28
+ validateMaxlength(newValue: number): void;
29
+ /**
30
+ * Calculate number character left
31
+ * @returns {string}
32
+ */
33
+ private getMessage;
34
+ /*************
35
+ * Lifecycle *
36
+ *************/
37
+ componentWillLoad(): void;
38
+ render(): any;
39
+ }
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const MgCharacterLeft: any;
7
+ export declare const CustomTemplate: any;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Icon SVG paths
3
+ */
4
+ export declare const icons: Object;
5
+ /**
6
+ * List of all possibles sizes
7
+ */
8
+ export declare const sizes: string[];
9
+ /**
10
+ * List of all possibles variants
11
+ */
12
+ export declare const variants: string[];
@@ -0,0 +1,36 @@
1
+ import { ClassList } from '../../../utils/components.utils';
2
+ export declare class MgIcon {
3
+ /**
4
+ * Icon to display
5
+ */
6
+ icon: string;
7
+ validateIcon(newValue: string): void;
8
+ /**
9
+ * Define icon size
10
+ */
11
+ size: string;
12
+ validateSize(newValue: string): void;
13
+ /**
14
+ * Define icon variant
15
+ * Add a background to the icon based on variant color
16
+ */
17
+ variant: string;
18
+ validateVariant(newValue: string): void;
19
+ /**
20
+ * Make the icon spin
21
+ */
22
+ spin: boolean;
23
+ handleSpin(newValue: boolean): void;
24
+ /**
25
+ * Component classes
26
+ */
27
+ classList: ClassList;
28
+ /**
29
+ * Check if props are well configured on init
30
+ */
31
+ componentWillLoad(): void;
32
+ /**
33
+ * Render component
34
+ */
35
+ render(): any;
36
+ }
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ argTypes: {
5
+ icon: {
6
+ options: string[];
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ size: {
12
+ options: string[];
13
+ control: {
14
+ type: string;
15
+ };
16
+ };
17
+ variant: {
18
+ options: string[];
19
+ control: {
20
+ type: string;
21
+ };
22
+ };
23
+ };
24
+ };
25
+ export default _default;
26
+ export declare const MgIcon: any;
@@ -0,0 +1,24 @@
1
+ export declare class MgInputTitle {
2
+ /**
3
+ * Label input id
4
+ */
5
+ identifier: string;
6
+ /**
7
+ * If input is required an asterisk is added at the end of the label
8
+ */
9
+ required: boolean;
10
+ /**
11
+ * Switch from label to fieldset sementic
12
+ */
13
+ isLegend: boolean;
14
+ /**
15
+ * Component parent tagname
16
+ */
17
+ tagName: string;
18
+ private getTagName;
19
+ /*************
20
+ * Lifecycle *
21
+ *************/
22
+ componentWillLoad(): void;
23
+ render(): any;
24
+ }
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const MgInputTitle: any;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * List of all possibles variants
3
+ */
4
+ export declare const variants: string[];
@@ -0,0 +1,25 @@
1
+ import { ClassList } from '../../../utils/components.utils';
2
+ export declare class MgTag {
3
+ /**
4
+ * Define button variant
5
+ */
6
+ variant?: string;
7
+ validateVariant(newValue: string): void;
8
+ /**
9
+ * Define if button is using outline style
10
+ */
11
+ outline?: boolean;
12
+ validateOutline(newValue: boolean): void;
13
+ /**
14
+ * Component classes
15
+ */
16
+ classList: ClassList;
17
+ /**
18
+ * Check if props are well configured on init
19
+ */
20
+ componentWillLoad(): void;
21
+ /**
22
+ * Render
23
+ */
24
+ render(): any;
25
+ }
@@ -0,0 +1,14 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ argTypes: {
5
+ variant: {
6
+ options: string[];
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ };
12
+ };
13
+ export default _default;
14
+ export declare const MgTag: any;
@@ -0,0 +1,56 @@
1
+ export declare class MgTooltip {
2
+ /************
3
+ * Internal *
4
+ ************/
5
+ private popper;
6
+ private tooltip;
7
+ /**************
8
+ * Decorators *
9
+ **************/
10
+ /**
11
+ * Get component DOM element
12
+ */
13
+ element: HTMLMgTooltipElement;
14
+ /**
15
+ * Sets an `id` attribute.
16
+ * Needed by the input for accessibility `aria-decribedby`.
17
+ */
18
+ identifier: string;
19
+ /**
20
+ * Displayed message in the tooltip
21
+ */
22
+ message: string;
23
+ /**
24
+ * Tooltip placement
25
+ */
26
+ placement: 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
27
+ /**
28
+ * Display tooltip
29
+ */
30
+ display: boolean;
31
+ handleDisplay(newVal: any): void;
32
+ /**
33
+ * Disable tooltip
34
+ */
35
+ disabled: boolean;
36
+ /**
37
+ * Show tooltip
38
+ * @returns {void}
39
+ */
40
+ private show;
41
+ /**
42
+ * Hide tooltip
43
+ * @returns {void}
44
+ */
45
+ private hide;
46
+ /*************
47
+ * Lifecycle *
48
+ *************/
49
+ /**
50
+ * Get slotted element
51
+ * Check if it already contain an interactive element, if not we need to add a tabIndex attribute
52
+ * We need to attach the focused element to the tooltip (aria-describedby)
53
+ */
54
+ componentDidLoad(): void;
55
+ render(): any;
56
+ }
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ };
7
+ };
8
+ export default _default;
9
+ export declare const MgTooltip: any;
10
+ export declare const MgTooltipOnButton: any;
11
+ export declare const MgTooltipOnSpan: any;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Possible input width
3
+ */
4
+ export declare type Width = 2 | 4 | 16 | 'full';
5
+ /**
6
+ * Possible input classes
7
+ */
8
+ export declare enum InputClass {
9
+ ERROR = "is-not-valid"
10
+ }
@@ -0,0 +1,35 @@
1
+ import { FunctionalComponent } from '../../../stencil-public-runtime';
2
+ import { Width } from './MgInput.conf';
3
+ import { ClassList } from '../../../utils/components.utils';
4
+ /**
5
+ * MgInput Interface
6
+ */
7
+ interface MgInputProps {
8
+ identifier: string;
9
+ classList: ClassList;
10
+ label: string;
11
+ labelOnTop: boolean;
12
+ labelHide: boolean;
13
+ isFieldset: boolean;
14
+ value: string;
15
+ readonlyValue: string;
16
+ required: boolean;
17
+ readonly: boolean;
18
+ width: Width;
19
+ disabled: boolean;
20
+ tooltip: string;
21
+ displayCharacterLeft: boolean;
22
+ characterLeftTemplate: string;
23
+ maxlength: number;
24
+ helpText: string;
25
+ errorMessage: string;
26
+ }
27
+ /**
28
+ * Get input template
29
+ * @param props MgInput Interface Props
30
+ * @param children Represent scoped elements
31
+ * @param utils Stencil.js utils
32
+ * @returns JSX template
33
+ */
34
+ export declare const MgInput: FunctionalComponent<MgInputProps>;
35
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * type CheckboxItem
3
+ * use to match checkbox attributes
4
+ */
5
+ export declare type CheckboxItem = {
6
+ id: string;
7
+ title: string;
8
+ value: boolean | null;
9
+ disabled?: boolean;
10
+ };
11
+ /**
12
+ * type CheckboxValue
13
+ * use to match returned value
14
+ */
15
+ export declare type CheckboxValue = {
16
+ title: string;
17
+ value: boolean | null;
18
+ disabled?: boolean;
19
+ };