@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,242 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import { I as InputClass, M as MgInput } from './MgInput.js';
3
+ import { c as createID, C as ClassList } from './components.utils.js';
4
+ import { m as messages } from './index2.js';
5
+ import { d as defineCustomElement$5 } from './mg-character-left2.js';
6
+ import { d as defineCustomElement$4 } from './mg-icon2.js';
7
+ import { d as defineCustomElement$3 } from './mg-input-title2.js';
8
+ import { d as defineCustomElement$2 } from './mg-tooltip2.js';
9
+
10
+ const mgInputTextCss = ":host{display:block}.mg-input{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;min-height:var(--default-size);max-width:100%;}.mg-input.is-not-valid{color:hsl(var(--color-danger))}.mg-input.is-not-valid .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input mg-input-title{-ms-flex-negative:var(--mg-inputs-shrink, 1);flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{-ms-flex-direction:column;flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{-ms-flex-negative:1;flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:-ms-inline-flexbox;display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:-ms-inline-flexbox;display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container mg-icon{display:-ms-flexbox;display:flex}.mg-input__input{display:-ms-flexbox;display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input+*{text-align:start;margin-top:0.5rem}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);-webkit-box-sizing:border-box;box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size)}.mg-input__box::-webkit-input-placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box::-moz-placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:-ms-input-placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box::-ms-input-placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{-webkit-box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5);box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0%;border-bottom-right-radius:0%}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input.mg-input--width-full:not(.mg-input--label-on-top){-ms-flex-pack:justify;justify-content:space-between}.mg-input.mg-input--width-full .mg-input__input-container{-ms-flex:auto;flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.mg-input mg-character-left{display:none}.mg-input.is-focused mg-character-left{display:block}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}.mg-input.mg-input--has-icon .mg-input__input{position:relative}.mg-input.mg-input--has-icon .mg-input__input>mg-icon{position:absolute;top:calc(var(--default-size) - var(--mg-icon-regular-size));left:var(--mg-inputs-spacer);color:var(--mg-inputs-color);-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mg-input.mg-input--has-icon .mg-input__input .mg-input__box{padding-left:calc(var(--mg-icon-regular-size) + var(--mg-inputs-spacer) * 2)}";
11
+
12
+ const MgInputText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
13
+ constructor() {
14
+ super();
15
+ this.__registerHost();
16
+ this.__attachShadow();
17
+ this.valueChange = createEvent(this, "value-change", 7);
18
+ /************
19
+ * Internal *
20
+ ************/
21
+ // classes
22
+ this.classFocus = 'is-focused';
23
+ this.classError = InputClass.ERROR;
24
+ /**
25
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
26
+ * If not set, it will be created.
27
+ */
28
+ this.identifier = createID('mg-input-text');
29
+ /**
30
+ * Input name
31
+ * If not set the value equals the identifier
32
+ */
33
+ this.name = this.identifier;
34
+ /**
35
+ * Input type
36
+ */
37
+ this.type = 'text';
38
+ /**
39
+ * Define if label is visible
40
+ */
41
+ this.labelHide = false;
42
+ /**
43
+ * Input max length
44
+ */
45
+ this.maxlength = 400;
46
+ /**
47
+ * Define if input is required
48
+ */
49
+ this.required = false;
50
+ /**
51
+ * Define if input is readonly
52
+ */
53
+ this.readonly = false;
54
+ /**
55
+ * Define if input is disabled
56
+ */
57
+ this.disabled = false;
58
+ /**
59
+ * Define input width
60
+ */
61
+ this.width = 'full';
62
+ /**
63
+ * Define if component should display character left
64
+ */
65
+ this.displayCharacterLeft = true;
66
+ /**
67
+ * Component classes
68
+ */
69
+ this.classList = new ClassList(['mg-input--text']);
70
+ /**
71
+ * Handle input event
72
+ */
73
+ this.handleInput = () => {
74
+ this.checkValidity();
75
+ this.value = this.input.value;
76
+ this.valueChange.emit(this.value);
77
+ };
78
+ /**
79
+ * Handle focus event
80
+ */
81
+ this.handleFocus = () => {
82
+ this.classList.add(this.classFocus);
83
+ this.classList = new ClassList(this.classList.classes);
84
+ };
85
+ /**
86
+ * Handle blur event
87
+ */
88
+ this.handleBlur = () => {
89
+ // Manage focus
90
+ this.classList.delete(this.classFocus);
91
+ this.classList = new ClassList(this.classList.classes);
92
+ // Check validity
93
+ this.checkValidity();
94
+ this.checkError();
95
+ };
96
+ /**
97
+ * Validate patern configuration
98
+ */
99
+ this.validatePattern = () => {
100
+ if (this.pattern &&
101
+ typeof this.pattern === 'string' &&
102
+ this.pattern !== '' &&
103
+ (this.patternErrorMessage === undefined || typeof this.patternErrorMessage !== 'string' || this.patternErrorMessage === '')) {
104
+ throw new Error('<mg-input-text> prop "pattern" must be paired with the prop "patternErrorMessage"');
105
+ }
106
+ };
107
+ }
108
+ /**
109
+ * Check if input is valid
110
+ */
111
+ checkValidity() {
112
+ if (!this.readonly && this.input !== undefined) {
113
+ const validity = this.input.checkValidity();
114
+ // Set validity
115
+ this.valid = validity;
116
+ this.invalid = !validity;
117
+ }
118
+ }
119
+ /**
120
+ * Check input errors
121
+ */
122
+ checkError() {
123
+ // Set error message
124
+ this.errorMessage = undefined;
125
+ // Does not match pattern
126
+ if (!this.valid && this.input.validity.patternMismatch) {
127
+ this.errorMessage = this.patternErrorMessage;
128
+ }
129
+ // required
130
+ else if (!this.valid && this.input.validity.valueMissing) {
131
+ this.errorMessage = messages.errors.required;
132
+ }
133
+ // Update class
134
+ if (this.valid) {
135
+ this.classList.delete(this.classError);
136
+ }
137
+ else {
138
+ this.classList.add(this.classError);
139
+ }
140
+ }
141
+ /**
142
+ * Validate append slot
143
+ */
144
+ validateAppendSlot() {
145
+ const slotAppendInput = this.element.querySelector('[slot="append-input"]');
146
+ if (slotAppendInput !== null && slotAppendInput.querySelector('.mg-button') !== null) {
147
+ this.classList.add('mg-input--is-input-group-append');
148
+ this.classList = new ClassList(this.classList.classes);
149
+ }
150
+ else if (slotAppendInput !== null) {
151
+ this.classList.add('mg-input--is-append-input-slot-content');
152
+ this.classList = new ClassList(this.classList.classes);
153
+ }
154
+ }
155
+ /*************
156
+ * Lifecycle *
157
+ *************/
158
+ /**
159
+ * Check if component props are well configured on init
160
+ */
161
+ componentWillLoad() {
162
+ if (this.icon !== undefined) {
163
+ this.classList.add('mg-input--has-icon');
164
+ }
165
+ this.validatePattern();
166
+ // return a promise to process action only in the FIRST render().
167
+ // https://stenciljs.com/docs/component-lifecycle#componentwillload
168
+ return setTimeout(() => this.checkValidity(), 0);
169
+ }
170
+ componentDidLoad() {
171
+ this.validateAppendSlot();
172
+ }
173
+ render() {
174
+ return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, width: this.width, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: this.tooltip, displayCharacterLeft: this.displayCharacterLeft, characterLeftTemplate: this.characterLeftTemplate, maxlength: this.maxlength, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, this.icon !== undefined && h("mg-icon", { icon: this.icon }), h("input", { type: this.type, class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, maxlength: this.maxlength, disabled: this.disabled, required: this.required, pattern: this.pattern, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => (this.input = el) }), h("slot", { name: "append-input" })));
175
+ }
176
+ get element() { return this; }
177
+ static get style() { return mgInputTextCss; }
178
+ }, [1, "mg-input-text", {
179
+ "value": [1537],
180
+ "identifier": [1],
181
+ "name": [1],
182
+ "label": [1],
183
+ "type": [1],
184
+ "icon": [1],
185
+ "labelOnTop": [4, "label-on-top"],
186
+ "labelHide": [4, "label-hide"],
187
+ "placeholder": [1],
188
+ "maxlength": [2],
189
+ "required": [4],
190
+ "readonly": [4],
191
+ "disabled": [4],
192
+ "width": [8],
193
+ "pattern": [1],
194
+ "patternErrorMessage": [1, "pattern-error-message"],
195
+ "tooltip": [1],
196
+ "displayCharacterLeft": [4, "display-character-left"],
197
+ "characterLeftTemplate": [1, "character-left-template"],
198
+ "helpText": [1, "help-text"],
199
+ "valid": [1028],
200
+ "invalid": [1028],
201
+ "classList": [32],
202
+ "errorMessage": [32]
203
+ }]);
204
+ function defineCustomElement$1() {
205
+ if (typeof customElements === "undefined") {
206
+ return;
207
+ }
208
+ const components = ["mg-input-text", "mg-character-left", "mg-icon", "mg-input-title", "mg-tooltip"];
209
+ components.forEach(tagName => { switch (tagName) {
210
+ case "mg-input-text":
211
+ if (!customElements.get(tagName)) {
212
+ customElements.define(tagName, MgInputText$1);
213
+ }
214
+ break;
215
+ case "mg-character-left":
216
+ if (!customElements.get(tagName)) {
217
+ defineCustomElement$5();
218
+ }
219
+ break;
220
+ case "mg-icon":
221
+ if (!customElements.get(tagName)) {
222
+ defineCustomElement$4();
223
+ }
224
+ break;
225
+ case "mg-input-title":
226
+ if (!customElements.get(tagName)) {
227
+ defineCustomElement$3();
228
+ }
229
+ break;
230
+ case "mg-tooltip":
231
+ if (!customElements.get(tagName)) {
232
+ defineCustomElement$2();
233
+ }
234
+ break;
235
+ } });
236
+ }
237
+ defineCustomElement$1();
238
+
239
+ const MgInputText = MgInputText$1;
240
+ const defineCustomElement = defineCustomElement$1;
241
+
242
+ export { MgInputText, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MgInputTextarea extends Components.MgInputTextarea, HTMLElement {}
4
+ export const MgInputTextarea: {
5
+ prototype: MgInputTextarea;
6
+ new (): MgInputTextarea;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,224 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import { I as InputClass, M as MgInput } from './MgInput.js';
3
+ import { c as createID, C as ClassList } from './components.utils.js';
4
+ import { m as messages } from './index2.js';
5
+ import { d as defineCustomElement$5 } from './mg-character-left2.js';
6
+ import { d as defineCustomElement$4 } from './mg-icon2.js';
7
+ import { d as defineCustomElement$3 } from './mg-input-title2.js';
8
+ import { d as defineCustomElement$2 } from './mg-tooltip2.js';
9
+
10
+ const mgInputTextareaCss = ":host{display:block}.mg-input{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;min-height:var(--default-size);max-width:100%;}.mg-input.is-not-valid{color:hsl(var(--color-danger))}.mg-input.is-not-valid .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input mg-input-title{-ms-flex-negative:var(--mg-inputs-shrink, 1);flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{-ms-flex-direction:column;flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{-ms-flex-negative:1;flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:-ms-inline-flexbox;display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:-ms-inline-flexbox;display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container mg-icon{display:-ms-flexbox;display:flex}.mg-input__input{display:-ms-flexbox;display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input+*{text-align:start;margin-top:0.5rem}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);-webkit-box-sizing:border-box;box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size)}.mg-input__box::-webkit-input-placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box::-moz-placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:-ms-input-placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box::-ms-input-placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{-webkit-box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5);box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0%;border-bottom-right-radius:0%}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input.mg-input--width-full:not(.mg-input--label-on-top){-ms-flex-pack:justify;justify-content:space-between}.mg-input.mg-input--width-full .mg-input__input-container{-ms-flex:auto;flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.mg-input mg-character-left{display:none}.mg-input.is-focused mg-character-left{display:block}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}.mg-input .mg-input__box{height:auto}@-moz-document url-prefix(){.mg-input__box{overflow-x:hidden}}";
11
+
12
+ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
13
+ constructor() {
14
+ super();
15
+ this.__registerHost();
16
+ this.__attachShadow();
17
+ this.valueChange = createEvent(this, "value-change", 7);
18
+ /************
19
+ * Internal *
20
+ ************/
21
+ // classes
22
+ this.classFocus = 'is-focused';
23
+ this.classError = InputClass.ERROR;
24
+ /**
25
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
26
+ * If not set, it will be created.
27
+ */
28
+ this.identifier = createID('mg-input-textarea');
29
+ /**
30
+ * Input name
31
+ * If not set the value equals the identifier
32
+ */
33
+ this.name = this.identifier;
34
+ /**
35
+ * Define if label is visible
36
+ */
37
+ this.labelHide = false;
38
+ /**
39
+ * Input max length
40
+ */
41
+ this.maxlength = 4000;
42
+ /**
43
+ * Define if input is required
44
+ */
45
+ this.required = false;
46
+ /**
47
+ * Define if input is readonly
48
+ */
49
+ this.readonly = false;
50
+ /**
51
+ * Define if input is disabled
52
+ */
53
+ this.disabled = false;
54
+ /**
55
+ * Define input width
56
+ */
57
+ this.width = 'full';
58
+ /**
59
+ * Define input pattern error message
60
+ */
61
+ this.rows = 3;
62
+ /**
63
+ * Define if component should display character left
64
+ */
65
+ this.displayCharacterLeft = true;
66
+ /**
67
+ * Component classes
68
+ */
69
+ this.classList = new ClassList(['mg-input--textarea']);
70
+ /**
71
+ * Handle input event
72
+ */
73
+ this.handleInput = () => {
74
+ this.checkValidity();
75
+ this.value = this.input.value;
76
+ this.valueChange.emit(this.value);
77
+ };
78
+ /**
79
+ * Handle focus event
80
+ */
81
+ this.handleFocus = () => {
82
+ this.classList.add(this.classFocus);
83
+ this.classList = new ClassList(this.classList.classes);
84
+ };
85
+ /**
86
+ * Handle blur event
87
+ */
88
+ this.handleBlur = () => {
89
+ // Manage focus
90
+ this.classList.delete(this.classFocus);
91
+ this.classList = new ClassList(this.classList.classes);
92
+ // Check validity
93
+ this.checkValidity();
94
+ this.checkError();
95
+ };
96
+ /**
97
+ * Get pattern validity
98
+ * Pattern is not defined on textarea field : https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea
99
+ * @returns {boolean}
100
+ */
101
+ this.getPatternValidity = () => this.pattern === undefined || new RegExp(`^${this.pattern}$`, 'u').test(this.value);
102
+ /**
103
+ * Validate pattern configuration
104
+ */
105
+ this.validatePattern = () => {
106
+ if (this.pattern &&
107
+ typeof this.pattern === 'string' &&
108
+ this.pattern !== '' &&
109
+ (this.patternErrorMessage === undefined || typeof this.patternErrorMessage !== 'string' || this.patternErrorMessage === '')) {
110
+ throw new Error('<mg-input-textarea> prop "pattern" must be paired with the prop "patternErrorMessage"');
111
+ }
112
+ };
113
+ }
114
+ /**
115
+ * Check if input is valid
116
+ */
117
+ checkValidity() {
118
+ if (!this.readonly && this.input !== undefined) {
119
+ const patternValidity = this.getPatternValidity();
120
+ const validity = this.input.checkValidity && this.input.checkValidity() && patternValidity;
121
+ // Set validity
122
+ this.valid = validity;
123
+ this.invalid = !validity;
124
+ }
125
+ }
126
+ /**
127
+ * Check input errors
128
+ */
129
+ checkError() {
130
+ const patternValidity = this.getPatternValidity();
131
+ // Set error message
132
+ this.errorMessage = undefined;
133
+ if (!this.valid && !patternValidity) {
134
+ this.errorMessage = this.patternErrorMessage;
135
+ }
136
+ // required
137
+ else if (!this.valid && this.input.validity.valueMissing) {
138
+ this.errorMessage = messages.errors.required;
139
+ }
140
+ // Update class
141
+ if (this.valid) {
142
+ this.classList.delete(this.classError);
143
+ }
144
+ else {
145
+ this.classList.add(this.classError);
146
+ }
147
+ }
148
+ /*************
149
+ * Lifecycle *
150
+ *************/
151
+ componentWillLoad() {
152
+ this.validatePattern();
153
+ // return a promise to process action only in the FIRST render().
154
+ // https://stenciljs.com/docs/component-lifecycle#componentwillload
155
+ return setTimeout(() => this.checkValidity(), 0);
156
+ }
157
+ render() {
158
+ return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, width: this.width, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: this.tooltip, displayCharacterLeft: this.displayCharacterLeft, characterLeftTemplate: this.characterLeftTemplate, maxlength: this.maxlength, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("textarea", { class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, rows: this.rows, maxlength: this.maxlength, disabled: this.disabled, required: this.required, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => (this.input = el) })));
159
+ }
160
+ static get style() { return mgInputTextareaCss; }
161
+ }, [1, "mg-input-textarea", {
162
+ "value": [1537],
163
+ "identifier": [1],
164
+ "name": [1],
165
+ "label": [1],
166
+ "labelOnTop": [4, "label-on-top"],
167
+ "labelHide": [4, "label-hide"],
168
+ "placeholder": [1],
169
+ "maxlength": [2],
170
+ "required": [4],
171
+ "readonly": [4],
172
+ "disabled": [4],
173
+ "width": [8],
174
+ "pattern": [1],
175
+ "patternErrorMessage": [1, "pattern-error-message"],
176
+ "rows": [2],
177
+ "tooltip": [1],
178
+ "displayCharacterLeft": [4, "display-character-left"],
179
+ "characterLeftTemplate": [1, "character-left-template"],
180
+ "helpText": [1, "help-text"],
181
+ "valid": [1028],
182
+ "invalid": [1028],
183
+ "classList": [32],
184
+ "errorMessage": [32]
185
+ }]);
186
+ function defineCustomElement$1() {
187
+ if (typeof customElements === "undefined") {
188
+ return;
189
+ }
190
+ const components = ["mg-input-textarea", "mg-character-left", "mg-icon", "mg-input-title", "mg-tooltip"];
191
+ components.forEach(tagName => { switch (tagName) {
192
+ case "mg-input-textarea":
193
+ if (!customElements.get(tagName)) {
194
+ customElements.define(tagName, MgInputTextarea$1);
195
+ }
196
+ break;
197
+ case "mg-character-left":
198
+ if (!customElements.get(tagName)) {
199
+ defineCustomElement$5();
200
+ }
201
+ break;
202
+ case "mg-icon":
203
+ if (!customElements.get(tagName)) {
204
+ defineCustomElement$4();
205
+ }
206
+ break;
207
+ case "mg-input-title":
208
+ if (!customElements.get(tagName)) {
209
+ defineCustomElement$3();
210
+ }
211
+ break;
212
+ case "mg-tooltip":
213
+ if (!customElements.get(tagName)) {
214
+ defineCustomElement$2();
215
+ }
216
+ break;
217
+ } });
218
+ }
219
+ defineCustomElement$1();
220
+
221
+ const MgInputTextarea = MgInputTextarea$1;
222
+ const defineCustomElement = defineCustomElement$1;
223
+
224
+ export { MgInputTextarea, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MgInputTitle extends Components.MgInputTitle, HTMLElement {}
4
+ export const MgInputTitle: {
5
+ prototype: MgInputTitle;
6
+ new (): MgInputTitle;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { M as MgInputTitle$1, d as defineCustomElement$1 } from './mg-input-title2.js';
2
+
3
+ const MgInputTitle = MgInputTitle$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { MgInputTitle, defineCustomElement };
@@ -0,0 +1,55 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+
3
+ const mgInputTitleCss = ".is-asterisk.sc-mg-input-title{color:hsl(var(--color-danger))}legend.mg-input-title.sc-mg-input-title{padding-left:0;padding-right:0}";
4
+
5
+ const MgInputTitle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ /**
10
+ * Switch from label to fieldset sementic
11
+ */
12
+ this.isLegend = false;
13
+ /**
14
+ * Component parent tagname
15
+ */
16
+ this.tagName = 'label';
17
+ this.getTagName = () => {
18
+ this.tagName = this.isLegend ? 'legend' : 'label';
19
+ };
20
+ }
21
+ /*************
22
+ * Lifecycle *
23
+ *************/
24
+ componentWillLoad() {
25
+ // Init tag name
26
+ this.getTagName();
27
+ }
28
+ // \u00A0 represent a &nbsp;
29
+ render() {
30
+ const TagName = this.tagName;
31
+ return (h(TagName, { class: "mg-input-title", htmlFor: this.isLegend ? undefined : this.identifier }, h("slot", null), this.required && [`\u00A0`, h("span", { class: "is-asterisk" }, "*")]));
32
+ }
33
+ static get style() { return mgInputTitleCss; }
34
+ }, [6, "mg-input-title", {
35
+ "identifier": [1],
36
+ "required": [4],
37
+ "isLegend": [4, "is-legend"],
38
+ "tagName": [32]
39
+ }]);
40
+ function defineCustomElement() {
41
+ if (typeof customElements === "undefined") {
42
+ return;
43
+ }
44
+ const components = ["mg-input-title"];
45
+ components.forEach(tagName => { switch (tagName) {
46
+ case "mg-input-title":
47
+ if (!customElements.get(tagName)) {
48
+ customElements.define(tagName, MgInputTitle);
49
+ }
50
+ break;
51
+ } });
52
+ }
53
+ defineCustomElement();
54
+
55
+ export { MgInputTitle as M, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MgInputToggle extends Components.MgInputToggle, HTMLElement {}
4
+ export const MgInputToggle: {
5
+ prototype: MgInputToggle;
6
+ new (): MgInputToggle;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;