@mgdis/mg-components 3.1.0 → 4.0.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 (241) hide show
  1. package/dist/cjs/{index-85a4a0b6.js → index-88560a66.js} +123 -48
  2. package/dist/cjs/index-a39c5567.js +233 -0
  3. package/dist/cjs/loader.cjs.js +3 -17
  4. package/dist/cjs/mg-badge_21.cjs.entry.js +3538 -0
  5. package/dist/cjs/mg-components.cjs.js +3 -7
  6. package/dist/cjs/mg-modal.cjs.entry.js +117 -0
  7. package/dist/cjs/mg-popover.cjs.entry.js +170 -0
  8. package/dist/cjs/popper-71bf3058.js +1790 -0
  9. package/dist/collection/collection-manifest.json +4 -1
  10. package/dist/collection/components/atoms/mg-badge/{mg-badge.stories.js → doc/mg-badge.stories.js} +4 -1
  11. package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -1
  12. package/dist/collection/components/atoms/mg-badge/mg-badge.css +0 -2
  13. package/dist/collection/components/atoms/mg-badge/mg-badge.js +26 -10
  14. package/dist/collection/components/atoms/mg-button/{mg-button.stories.js → doc/mg-button.stories.js} +7 -2
  15. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -1
  16. package/dist/collection/components/atoms/mg-button/mg-button.css +46 -49
  17. package/dist/collection/components/atoms/mg-button/mg-button.js +78 -4
  18. package/dist/collection/components/atoms/mg-character-left/{mg-character-left.stories.js → doc/mg-character-left.stories.js} +8 -0
  19. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +20 -46
  20. package/dist/collection/components/atoms/mg-icon/{mg-icon.stories.js → doc/mg-icon.stories.js} +1 -1
  21. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +104 -9
  22. package/dist/collection/components/atoms/mg-icon/mg-icon.css +9 -7
  23. package/dist/collection/components/atoms/mg-icon/mg-icon.js +33 -7
  24. package/dist/collection/components/atoms/mg-input-title/{mg-input-title.stories.js → doc/mg-input-title.stories.js} +0 -0
  25. package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +4 -4
  26. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +14 -3
  27. package/dist/collection/components/atoms/mg-tag/{mg-tag.stories.js → doc/mg-tag.stories.js} +4 -1
  28. package/dist/collection/components/atoms/mg-tag/mg-tag.js +28 -6
  29. package/dist/collection/components/atoms/mg-tooltip/{mg-tooltip.stories.js → doc/mg-tooltip.stories.js} +14 -1
  30. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +20 -0
  31. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +16 -2
  32. package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -7
  33. package/dist/collection/components/molecules/inputs/MgInput.js +25 -29
  34. package/dist/collection/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.js → doc/mg-input-checkbox.stories.js} +6 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +25 -11
  36. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +102 -52
  37. package/dist/collection/components/molecules/inputs/mg-input-date/{mg-input-date.stories.js → doc/mg-input-date.stories.js} +6 -1
  38. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +37 -9
  39. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +136 -66
  40. package/dist/collection/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.js → doc/mg-input-numeric.stories.js} +15 -3
  41. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +38 -10
  42. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +180 -80
  43. package/dist/collection/components/molecules/inputs/mg-input-password/{mg-input-password.stories.js → doc/mg-input-password.stories.js} +16 -2
  44. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +37 -9
  45. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +108 -47
  46. package/dist/collection/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.js → doc/mg-input-radio.stories.js} +6 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +25 -11
  48. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +113 -42
  49. package/dist/collection/components/molecules/inputs/mg-input-select/{mg-input-select.stories.js → doc/mg-input-select.stories.js} +22 -2
  50. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +39 -10
  51. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +145 -71
  52. package/dist/collection/components/molecules/inputs/mg-input-text/{mg-input-text.stories.js → doc/mg-input-text.stories.js} +17 -8
  53. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +69 -19
  54. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +184 -83
  55. package/dist/collection/components/molecules/inputs/mg-input-textarea/{mg-input-textarea.stories.js → doc/mg-input-textarea.stories.js} +16 -5
  56. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +69 -13
  57. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +163 -70
  58. package/dist/collection/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.js → doc/mg-input-toggle.stories.js} +6 -1
  59. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +22 -10
  60. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +68 -33
  61. package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +58 -0
  62. package/dist/collection/components/molecules/mg-form/mg-form.css +19 -0
  63. package/dist/collection/components/molecules/mg-form/mg-form.js +271 -0
  64. package/dist/collection/components/molecules/mg-message/{mg-message.stories.js → doc/mg-message.stories.js} +6 -2
  65. package/dist/collection/components/molecules/mg-message/mg-message.css +1 -1
  66. package/dist/collection/components/molecules/mg-message/mg-message.js +26 -11
  67. package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +51 -0
  68. package/dist/collection/components/molecules/mg-modal/mg-modal.css +52 -0
  69. package/dist/collection/components/molecules/mg-modal/mg-modal.js +240 -0
  70. package/dist/collection/components/molecules/mg-pagination/{mg-pagination.stories.js → doc/mg-pagination.stories.js} +1 -0
  71. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +47 -28
  72. package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +39 -0
  73. package/dist/collection/components/molecules/mg-panel/mg-panel.css +53 -0
  74. package/dist/collection/components/molecules/mg-panel/mg-panel.js +356 -0
  75. package/dist/collection/components/molecules/mg-popover/{mg-popover.stories.js → doc/mg-popover.stories.js} +10 -0
  76. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +20 -0
  77. package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -2
  78. package/dist/collection/components/molecules/mg-popover/mg-popover.js +37 -12
  79. package/dist/collection/components/molecules/mg-tabs/{mg-tabs.stories.js → doc/mg-tabs.stories.js} +20 -4
  80. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +11 -1
  81. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +17 -3
  82. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +139 -26
  83. package/dist/collection/locales/index.js +33 -4
  84. package/dist/collection/stories/helpers.stories.js +33 -0
  85. package/dist/collection/utils/components.utils.js +16 -9
  86. package/dist/collection/utils/locale.utils.js +13 -7
  87. package/dist/collection/utils/test.utils.js +27 -15
  88. package/dist/collection/variables.css +39 -5
  89. package/dist/collection/variables.scss +39 -5
  90. package/dist/components/MgInput.js +26 -37
  91. package/dist/components/components.utils.js +16 -9
  92. package/dist/components/index.d.ts +24 -6
  93. package/dist/components/index.js +23 -0
  94. package/dist/components/index2.js +116 -17
  95. package/dist/components/locale.utils.js +13 -8
  96. package/dist/components/mg-badge2.js +25 -9
  97. package/dist/components/mg-button2.js +29 -5
  98. package/dist/components/mg-character-left2.js +14 -26
  99. package/dist/components/mg-form.d.ts +11 -0
  100. package/dist/components/mg-form.js +148 -0
  101. package/dist/components/mg-icon2.js +138 -17
  102. package/dist/components/mg-input-checkbox.js +66 -53
  103. package/dist/components/mg-input-date.js +100 -69
  104. package/dist/components/mg-input-numeric.js +125 -81
  105. package/dist/components/mg-input-password.js +69 -48
  106. package/dist/components/mg-input-radio.js +74 -46
  107. package/dist/components/mg-input-select2.js +103 -71
  108. package/dist/components/mg-input-text.js +1 -237
  109. package/dist/components/mg-input-text2.js +300 -0
  110. package/dist/components/mg-input-textarea.js +100 -46
  111. package/dist/components/mg-input-title2.js +13 -4
  112. package/dist/components/mg-input-toggle.js +39 -31
  113. package/dist/components/mg-message.js +25 -10
  114. package/dist/components/mg-modal.d.ts +11 -0
  115. package/dist/components/mg-modal.js +153 -0
  116. package/dist/components/mg-pagination.js +45 -31
  117. package/dist/components/mg-panel.d.ts +11 -0
  118. package/dist/components/mg-panel.js +244 -0
  119. package/dist/components/mg-popover.js +31 -11
  120. package/dist/components/mg-tabs.js +113 -23
  121. package/dist/components/mg-tag.js +27 -5
  122. package/dist/components/mg-tooltip2.js +10 -1
  123. package/dist/components/popper.js +6 -2
  124. package/dist/esm/{index-e3e84606.js → index-bca81100.js} +124 -46
  125. package/dist/esm/index-e51ae032.js +228 -0
  126. package/dist/esm/loader.js +3 -17
  127. package/dist/esm/mg-badge_21.entry.js +3514 -0
  128. package/dist/esm/mg-components.js +3 -7
  129. package/dist/esm/mg-modal.entry.js +113 -0
  130. package/dist/esm/mg-popover.entry.js +166 -0
  131. package/dist/esm/polyfills/css-shim.js +1 -1
  132. package/dist/esm/popper-93ecb064.js +1788 -0
  133. package/dist/index.js +1 -1
  134. package/dist/mg-components/mg-components.css +1 -1
  135. package/dist/mg-components/mg-components.esm.js +1 -1
  136. package/dist/mg-components/p-003a1344.entry.js +1 -0
  137. package/dist/mg-components/p-462d648a.entry.js +1 -0
  138. package/dist/mg-components/p-4c66f794.js +1 -0
  139. package/dist/mg-components/p-5126ab10.entry.js +1 -0
  140. package/dist/mg-components/p-780bd52d.js +1 -0
  141. package/dist/mg-components/p-b14a3443.js +2 -0
  142. package/dist/mg-components/variables.css +39 -5
  143. package/dist/mg-components/variables.scss +39 -5
  144. package/dist/types/components/atoms/mg-badge/{mg-badge.stories.d.ts → doc/mg-badge.stories.d.ts} +5 -0
  145. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +16 -5
  146. package/dist/types/components/atoms/mg-button/{mg-button.stories.d.ts → doc/mg-button.stories.d.ts} +5 -0
  147. package/dist/types/components/atoms/mg-button/mg-button.d.ts +23 -3
  148. package/dist/types/components/atoms/mg-character-left/{mg-character-left.stories.d.ts → doc/mg-character-left.stories.d.ts} +9 -0
  149. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +16 -13
  150. package/dist/types/components/atoms/mg-icon/{mg-icon.stories.d.ts → doc/mg-icon.stories.d.ts} +0 -0
  151. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
  152. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +14 -4
  153. package/dist/types/components/atoms/mg-input-title/{mg-input-title.stories.d.ts → doc/mg-input-title.stories.d.ts} +0 -0
  154. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +11 -1
  155. package/dist/types/components/atoms/mg-tag/{mg-tag.stories.d.ts → doc/mg-tag.stories.d.ts} +5 -0
  156. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +18 -4
  157. package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +29 -0
  158. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +8 -0
  159. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +13 -3
  160. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +6 -4
  161. package/dist/types/components/molecules/inputs/MgInput.d.ts +7 -8
  162. package/dist/types/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.d.ts → doc/mg-input-checkbox.stories.d.ts} +5 -0
  163. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +36 -13
  164. package/dist/types/components/molecules/inputs/mg-input-date/{mg-input-date.stories.d.ts → doc/mg-input-date.stories.d.ts} +5 -0
  165. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +46 -15
  166. package/dist/types/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.d.ts → doc/mg-input-numeric.stories.d.ts} +11 -0
  167. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +61 -16
  168. package/dist/types/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.d.ts +22 -0
  169. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +35 -11
  170. package/dist/types/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.d.ts → doc/mg-input-radio.stories.d.ts} +5 -0
  171. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +1 -1
  172. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +42 -9
  173. package/dist/types/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.d.ts +34 -0
  174. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +1 -1
  175. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +37 -9
  176. package/dist/types/components/molecules/inputs/mg-input-text/{mg-input-text.stories.d.ts → doc/mg-input-text.stories.d.ts} +13 -0
  177. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +52 -16
  178. package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts +19 -0
  179. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +45 -17
  180. package/dist/types/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.d.ts → doc/mg-input-toggle.stories.d.ts} +5 -0
  181. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +1 -1
  182. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +29 -12
  183. package/dist/types/components/molecules/{mg-popover/mg-popover.stories.d.ts → mg-form/doc/mg-form.stories.d.ts} +3 -4
  184. package/dist/types/components/molecules/mg-form/mg-form.d.ts +83 -0
  185. package/dist/types/components/molecules/mg-message/{mg-message.stories.d.ts → doc/mg-message.stories.d.ts} +10 -0
  186. package/dist/types/components/molecules/mg-message/mg-message.d.ts +13 -4
  187. package/dist/types/components/molecules/mg-modal/doc/mg-modal.stories.d.ts +13 -0
  188. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +85 -0
  189. package/dist/types/components/molecules/mg-pagination/{mg-pagination.stories.d.ts → doc/mg-pagination.stories.d.ts} +5 -0
  190. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +31 -7
  191. package/dist/types/components/molecules/mg-panel/doc/mg-panel.stories.d.ts +11 -0
  192. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +139 -0
  193. package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +25 -0
  194. package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +8 -0
  195. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +27 -4
  196. package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +20 -0
  197. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +11 -0
  198. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +70 -6
  199. package/dist/types/components.d.ts +528 -211
  200. package/dist/types/locales/index.d.ts +108 -38
  201. package/dist/types/stories/{buttons.stories.d.ts → helpers.stories.d.ts} +1 -1
  202. package/dist/types/utils/components.utils.d.ts +16 -9
  203. package/dist/types/utils/locale.utils.d.ts +13 -6
  204. package/dist/types/utils/test.utils.d.ts +13 -1
  205. package/loader/index.js +1 -1
  206. package/package.json +45 -14
  207. package/readme.md +9 -35
  208. package/dist/cjs/css-shim-a22512c4.js +0 -6
  209. package/dist/cjs/mg-badge_20.cjs.entry.js +0 -4661
  210. package/dist/cjs/shadow-css-8940f82d.js +0 -390
  211. package/dist/collection/stories/buttons.stories.js +0 -43
  212. package/dist/collection/stories/messages.stories.js +0 -44
  213. package/dist/collection/stories/tags.stories.js +0 -13
  214. package/dist/esm/css-shim-7c240feb.js +0 -4
  215. package/dist/esm/mg-badge_20.entry.js +0 -4638
  216. package/dist/esm/shadow-css-5d2d01ce.js +0 -388
  217. package/dist/esm-es5/css-shim-7c240feb.js +0 -1
  218. package/dist/esm-es5/index-e3e84606.js +0 -1
  219. package/dist/esm-es5/index.js +0 -0
  220. package/dist/esm-es5/loader.js +0 -1
  221. package/dist/esm-es5/mg-badge_20.entry.js +0 -2
  222. package/dist/esm-es5/mg-components.js +0 -1
  223. package/dist/esm-es5/shadow-css-5d2d01ce.js +0 -12
  224. package/dist/mg-components/mg-components.js +0 -132
  225. package/dist/mg-components/p-1cd24462.system.js +0 -1
  226. package/dist/mg-components/p-2e2f6b27.system.entry.js +0 -2
  227. package/dist/mg-components/p-366a224e.js +0 -1
  228. package/dist/mg-components/p-422c429b.system.js +0 -1
  229. package/dist/mg-components/p-50ea2036.system.js +0 -1
  230. package/dist/mg-components/p-62fa3797.js +0 -1
  231. package/dist/mg-components/p-71d57b8b.system.js +0 -13
  232. package/dist/mg-components/p-9a215712.system.js +0 -1
  233. package/dist/mg-components/p-cbf0464b.entry.js +0 -1
  234. package/dist/mg-components/p-f6455ab3.js +0 -12
  235. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +0 -11
  236. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +0 -9
  237. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +0 -14
  238. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +0 -6
  239. package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +0 -7
  240. package/dist/types/stories/messages.stories.d.ts +0 -13
  241. package/dist/types/stories/tags.stories.d.ts +0 -5
@@ -9,6 +9,11 @@ declare const _default: {
9
9
  };
10
10
  };
11
11
  };
12
+ parameters: {
13
+ actions: {
14
+ handles: string[];
15
+ };
16
+ };
12
17
  };
13
18
  export default _default;
14
19
  export declare const MgInputRadio: any;
@@ -4,6 +4,6 @@
4
4
  */
5
5
  export declare type RadioOption = {
6
6
  title: string;
7
- value: any;
7
+ value: unknown;
8
8
  disabled?: boolean;
9
9
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
3
2
  import { ClassList } from '../../../../utils/components.utils';
4
3
  import { RadioOption } from './mg-input-radio.conf';
@@ -6,21 +5,26 @@ export declare class MgInputRadio {
6
5
  /************
7
6
  * Internal *
8
7
  ************/
9
- private classError;
10
8
  private inputs;
9
+ private messages;
11
10
  /**************
12
11
  * Decorators *
13
12
  **************/
13
+ /**
14
+ * Get component DOM element
15
+ */
16
+ element: HTMLMgInputRadioElement;
14
17
  /**
15
18
  * Component value
16
19
  */
17
20
  value: any;
21
+ handleValue(newValue: any): void;
18
22
  /**
19
23
  * Items are the possible options to select
20
24
  * Required
21
25
  */
22
26
  items: string[] | RadioOption[];
23
- validateItems(newValue: any): void;
27
+ validateItems(newValue: string[] | RadioOption[]): void;
24
28
  /**
25
29
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
26
30
  * If not set, it will be created.
@@ -33,7 +37,6 @@ export declare class MgInputRadio {
33
37
  name: string;
34
38
  /**
35
39
  * Input label
36
- * Required
37
40
  */
38
41
  label: string;
39
42
  /**
@@ -69,11 +72,11 @@ export declare class MgInputRadio {
69
72
  */
70
73
  helpText: string;
71
74
  /**
72
- * Force valid component
75
+ * Define input valid state
73
76
  */
74
77
  valid: boolean;
75
78
  /**
76
- * Force invalid component
79
+ * Define input invalid state
77
80
  */
78
81
  invalid: boolean;
79
82
  /**
@@ -92,30 +95,60 @@ export declare class MgInputRadio {
92
95
  * Emitted event when value change
93
96
  */
94
97
  valueChange: EventEmitter<any>;
98
+ /**
99
+ * Emited event when checking validity
100
+ */
101
+ inputValid: EventEmitter<boolean>;
102
+ /**
103
+ * Public method to display errors
104
+ *
105
+ * @returns {Promise<void>}
106
+ */
107
+ displayError(): Promise<void>;
95
108
  /**
96
109
  * Handle input event
110
+ *
111
+ * @param {event} event input event
112
+ * @returns {void}
97
113
  */
98
114
  private handleInput;
99
115
  /**
100
116
  * Handle blur event
117
+ *
118
+ * @returns {void}
101
119
  */
102
120
  private handleBlur;
103
121
  /**
104
122
  * Check if input is valid
123
+ *
124
+ * @returns {void}
105
125
  */
106
126
  private checkValidity;
107
127
  /**
108
128
  * Check input errors
129
+ *
130
+ * @returns {void}
109
131
  */
110
132
  private checkError;
111
133
  /**
112
134
  * get invalid element
113
- * @returns element: HTMLInputElement
135
+ *
136
+ * @returns {HTMLInputElement} element
114
137
  */
115
138
  private getInvalidElement;
116
139
  /*************
117
140
  * Lifecycle *
118
141
  *************/
119
- componentWillLoad(): NodeJS.Timeout;
120
- render(): any;
142
+ /**
143
+ * Check if component props are well configured on init
144
+ *
145
+ * @returns {ReturnType<typeof setTimeout>} timeout
146
+ */
147
+ componentWillLoad(): ReturnType<typeof setTimeout>;
148
+ /**
149
+ * Render
150
+ *
151
+ * @returns {HTMLElement} HTML Element
152
+ */
153
+ render(): HTMLElement;
121
154
  }
@@ -0,0 +1,34 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ argTypes: {
5
+ placeholder: {
6
+ table: {
7
+ defaultValue: {
8
+ summary: string;
9
+ };
10
+ };
11
+ };
12
+ mgWidth: {
13
+ options: (string | number)[];
14
+ control: {
15
+ type: string;
16
+ };
17
+ };
18
+ };
19
+ parameters: {
20
+ actions: {
21
+ handles: string[];
22
+ };
23
+ };
24
+ };
25
+ export default _default;
26
+ export declare const MgInputSelect: any;
27
+ /**
28
+ * Using object
29
+ */
30
+ export declare const WithObjectItems: any;
31
+ /**
32
+ * Using group object
33
+ */
34
+ export declare const WithGroups: any;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export declare type SelectOption = {
6
6
  title: string;
7
- value: any;
7
+ value: unknown;
8
8
  disabled?: boolean;
9
9
  group?: string;
10
10
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
3
2
  import { Width } from '../MgInput.conf';
4
3
  import { ClassList } from '../../../../utils/components.utils';
@@ -7,20 +6,26 @@ export declare class MgInputSelect {
7
6
  /************
8
7
  * Internal *
9
8
  ************/
10
- private classError;
11
9
  private input;
10
+ private messages;
11
+ private hasError;
12
12
  /**************
13
13
  * Decorators *
14
14
  **************/
15
+ /**
16
+ * Get component DOM element
17
+ */
18
+ element: HTMLMgInputSelectElement;
15
19
  /**
16
20
  * Component value
17
21
  */
18
22
  value: any;
23
+ handleValue(newValue: any): void;
19
24
  /**
20
25
  * Items are the possible options to select
21
26
  */
22
27
  items: string[] | SelectOption[];
23
- validateItems(newValue: any): void;
28
+ validateItems(newValue: string[] | SelectOption[]): void;
24
29
  /**
25
30
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
26
31
  * If not set, it will be created.
@@ -33,7 +38,6 @@ export declare class MgInputSelect {
33
38
  name: string;
34
39
  /**
35
40
  * Input label
36
- * Required
37
41
  */
38
42
  label: string;
39
43
  /**
@@ -72,7 +76,7 @@ export declare class MgInputSelect {
72
76
  /**
73
77
  * Define input width
74
78
  */
75
- width: Width;
79
+ mgWidth: Width;
76
80
  /**
77
81
  * Add a tooltip message next to the input
78
82
  */
@@ -106,9 +110,23 @@ export declare class MgInputSelect {
106
110
  */
107
111
  valueExist: boolean;
108
112
  /**
109
- * Emmited event when value change
113
+ * Does value match any item option
114
+ */
115
+ readonlyValue: string;
116
+ /**
117
+ * Emited event when value change
118
+ */
119
+ valueChange: EventEmitter<any>;
120
+ /**
121
+ * Emited event when checking validity
110
122
  */
111
- valueChange: EventEmitter<string>;
123
+ inputValid: EventEmitter<boolean>;
124
+ /**
125
+ * Public method to display errors
126
+ *
127
+ * @returns {Promise<void>}
128
+ */
129
+ displayError(): Promise<void>;
112
130
  /**
113
131
  * Handle input event
114
132
  */
@@ -128,6 +146,16 @@ export declare class MgInputSelect {
128
146
  /*************
129
147
  * Lifecycle *
130
148
  *************/
131
- componentWillLoad(): NodeJS.Timeout;
132
- render(): any;
149
+ /**
150
+ * Check if component props are well configured on init
151
+ *
152
+ * @returns {ReturnType<typeof setTimeout>} timeout
153
+ */
154
+ componentWillLoad(): ReturnType<typeof setTimeout>;
155
+ /**
156
+ * Render
157
+ *
158
+ * @returns {HTMLElement} HTML Element
159
+ */
160
+ render(): HTMLElement;
133
161
  }
@@ -1,6 +1,19 @@
1
1
  declare const _default: {
2
2
  component: string;
3
3
  title: string;
4
+ argTypes: {
5
+ mgWidth: {
6
+ options: (string | number)[];
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ };
12
+ parameters: {
13
+ actions: {
14
+ handles: string[];
15
+ };
16
+ };
4
17
  };
5
18
  export default _default;
6
19
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
3
2
  import { Width } from '../MgInput.conf';
4
3
  import { ClassList } from '../../../../utils/components.utils';
@@ -7,8 +6,12 @@ export declare class MgInputText {
7
6
  * Internal *
8
7
  ************/
9
8
  private classFocus;
10
- private classError;
9
+ private classIsInputGroupAppend;
10
+ private classHasIcon;
11
+ private characterLeftId;
11
12
  private input;
13
+ private messages;
14
+ private hasError;
12
15
  /**************
13
16
  * Decorators *
14
17
  **************/
@@ -20,19 +23,19 @@ export declare class MgInputText {
20
23
  * Component value
21
24
  */
22
25
  value: string;
26
+ handleValue(newValue: string): void;
23
27
  /**
24
28
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
25
29
  * If not set, it will be created.
26
30
  */
27
- identifier?: string;
31
+ identifier: string;
28
32
  /**
29
33
  * Input name
30
34
  * If not set the value equals the identifier
31
35
  */
32
- name?: string;
36
+ name: string;
33
37
  /**
34
38
  * Input label
35
- * Required
36
39
  */
37
40
  label: string;
38
41
  /**
@@ -43,6 +46,7 @@ export declare class MgInputText {
43
46
  * Input icon
44
47
  */
45
48
  icon: string;
49
+ validateIcon(newValue: string): void;
46
50
  /**
47
51
  * Define if label is displayed on top
48
52
  */
@@ -75,7 +79,7 @@ export declare class MgInputText {
75
79
  /**
76
80
  * Define input width
77
81
  */
78
- width: Width;
82
+ mgWidth: Width;
79
83
  /**
80
84
  * Define input pattern to validate
81
85
  */
@@ -92,20 +96,16 @@ export declare class MgInputText {
92
96
  * Define if component should display character left
93
97
  */
94
98
  displayCharacterLeft: boolean;
95
- /**
96
- * Template to use for characters left sentence
97
- */
98
- characterLeftTemplate: string;
99
99
  /**
100
100
  * Add a help text under the input, usually expected data format and example
101
101
  */
102
102
  helpText: string;
103
103
  /**
104
- * Define input pattern to validate
104
+ * Define input valid state
105
105
  */
106
106
  valid: boolean;
107
107
  /**
108
- * Define input pattern error message
108
+ * Define input invalid state
109
109
  */
110
110
  invalid: boolean;
111
111
  /**
@@ -117,35 +117,65 @@ export declare class MgInputText {
117
117
  */
118
118
  errorMessage: string;
119
119
  /**
120
- * Emmited event when value change
120
+ * Emited event when value change
121
121
  */
122
122
  valueChange: EventEmitter<string>;
123
+ /**
124
+ * Emited event when checking validity
125
+ */
126
+ inputValid: EventEmitter<boolean>;
127
+ /**
128
+ * Public method to play input focus
129
+ *
130
+ * @returns {Promise<void>}
131
+ */
132
+ setFocus(): Promise<void>;
133
+ /**
134
+ * Public method to display errors
135
+ *
136
+ * @returns {Promise<void>}
137
+ */
138
+ displayError(): Promise<void>;
123
139
  /**
124
140
  * Handle input event
141
+ *
142
+ * @returns {void}
125
143
  */
126
144
  private handleInput;
127
145
  /**
128
146
  * Handle focus event
147
+ *
148
+ * @returns {void}
129
149
  */
130
150
  private handleFocus;
131
151
  /**
132
152
  * Handle blur event
153
+ *
154
+ * @returns {void}
133
155
  */
134
156
  private handleBlur;
135
157
  /**
136
158
  * Check if input is valid
159
+ *
160
+ * @returns {void}
137
161
  */
138
162
  private checkValidity;
139
163
  /**
140
164
  * Check input errors
165
+ *
166
+ * @returns {void}
141
167
  */
142
168
  private checkError;
143
169
  /**
144
170
  * Validate patern configuration
171
+ *
172
+ * @returns {void}
145
173
  */
146
174
  private validatePattern;
147
175
  /**
148
176
  * Validate append slot
177
+ *
178
+ * @returns {void}
149
179
  */
150
180
  private validateAppendSlot;
151
181
  /*************
@@ -153,8 +183,14 @@ export declare class MgInputText {
153
183
  *************/
154
184
  /**
155
185
  * Check if component props are well configured on init
186
+ *
187
+ * @returns {ReturnType<typeof setTimeout>} timeout
188
+ */
189
+ componentWillLoad(): ReturnType<typeof setTimeout>;
190
+ /**
191
+ * Render
192
+ *
193
+ * @returns {HTMLElement} HTML Element
156
194
  */
157
- componentWillLoad(): NodeJS.Timeout;
158
- componentDidLoad(): void;
159
- render(): any;
195
+ render(): HTMLElement;
160
196
  }
@@ -0,0 +1,19 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ argTypes: {
5
+ mgWidth: {
6
+ options: (string | number)[];
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ };
12
+ parameters: {
13
+ actions: {
14
+ handles: string[];
15
+ };
16
+ };
17
+ };
18
+ export default _default;
19
+ export declare const MgInputTextarea: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
3
2
  import { Width } from '../MgInput.conf';
4
3
  import { ClassList } from '../../../../utils/components.utils';
@@ -7,28 +6,35 @@ export declare class MgInputTextarea {
7
6
  * Internal *
8
7
  ************/
9
8
  private classFocus;
10
- private classError;
9
+ private classHasDisplayCharacterLeft;
10
+ private characterLeftId;
11
11
  private input;
12
+ private messages;
13
+ private hasError;
12
14
  /**************
13
15
  * Decorators *
14
16
  **************/
17
+ /**
18
+ * Get component DOM element
19
+ */
20
+ element: HTMLMgInputTextareaElement;
15
21
  /**
16
22
  * Component value
17
23
  */
18
24
  value: string;
25
+ handleValue(newValue: string): void;
19
26
  /**
20
27
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
21
28
  * If not set, it will be created.
22
29
  */
23
- identifier?: string;
30
+ identifier: string;
24
31
  /**
25
32
  * Input name
26
33
  * If not set the value equals the identifier
27
34
  */
28
- name?: string;
35
+ name: string;
29
36
  /**
30
37
  * Input label
31
- * Required
32
38
  */
33
39
  label: string;
34
40
  /**
@@ -63,7 +69,7 @@ export declare class MgInputTextarea {
63
69
  /**
64
70
  * Define input width
65
71
  */
66
- width: Width;
72
+ mgWidth: Width;
67
73
  /**
68
74
  * Define input pattern to validate
69
75
  */
@@ -73,7 +79,7 @@ export declare class MgInputTextarea {
73
79
  */
74
80
  patternErrorMessage: string;
75
81
  /**
76
- * Define input pattern error message
82
+ * Define the number of visible text lines for the control
77
83
  */
78
84
  rows: number;
79
85
  /**
@@ -84,22 +90,23 @@ export declare class MgInputTextarea {
84
90
  * Define if component should display character left
85
91
  */
86
92
  displayCharacterLeft: boolean;
87
- /**
88
- * Template to use for characters left sentence
89
- */
90
- characterLeftTemplate: string;
93
+ validateDisplayCharacterLeft(newValue: boolean): void;
91
94
  /**
92
95
  * Add a help text under the input, usually expected data format and example
93
96
  */
94
97
  helpText: string;
95
98
  /**
96
- * Define input pattern to validate
99
+ * Define input valid state
97
100
  */
98
101
  valid: boolean;
99
102
  /**
100
- * Define input pattern error message
103
+ * Define input invalid state
101
104
  */
102
105
  invalid: boolean;
106
+ /**
107
+ * Define if input is resizable
108
+ */
109
+ resizable: 'none' | 'both' | 'horizontal' | 'vertical';
103
110
  /**
104
111
  * Component classes
105
112
  */
@@ -109,9 +116,19 @@ export declare class MgInputTextarea {
109
116
  */
110
117
  errorMessage: string;
111
118
  /**
112
- * Emmited event when value change
119
+ * Emited event when value change
113
120
  */
114
121
  valueChange: EventEmitter<string>;
122
+ /**
123
+ * Emited event when checking validity
124
+ */
125
+ inputValid: EventEmitter<boolean>;
126
+ /**
127
+ * Public method to display errors
128
+ *
129
+ * @returns {Promise<void>}
130
+ */
131
+ displayError(): Promise<void>;
115
132
  /**
116
133
  * Handle input event
117
134
  */
@@ -127,7 +144,8 @@ export declare class MgInputTextarea {
127
144
  /**
128
145
  * Get pattern validity
129
146
  * Pattern is not defined on textarea field : https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea
130
- * @returns {boolean}
147
+ *
148
+ * @returns {boolean} is pattern valid
131
149
  */
132
150
  private getPatternValidity;
133
151
  /**
@@ -145,6 +163,16 @@ export declare class MgInputTextarea {
145
163
  /*************
146
164
  * Lifecycle *
147
165
  *************/
148
- componentWillLoad(): NodeJS.Timeout;
149
- render(): any;
166
+ /**
167
+ * Check if component props are well configured on init
168
+ *
169
+ * @returns {ReturnType<typeof setTimeout>} timeout
170
+ */
171
+ componentWillLoad(): ReturnType<typeof setTimeout>;
172
+ /**
173
+ * Render
174
+ *
175
+ * @returns {HTMLElement} HTML Element
176
+ */
177
+ render(): HTMLElement;
150
178
  }
@@ -1,6 +1,11 @@
1
1
  declare const _default: {
2
2
  component: string;
3
3
  title: string;
4
+ parameters: {
5
+ actions: {
6
+ handles: string[];
7
+ };
8
+ };
4
9
  };
5
10
  export default _default;
6
11
  export declare const MgInputToggle: any;
@@ -4,5 +4,5 @@
4
4
  */
5
5
  export declare type ToggleValue = {
6
6
  title: string;
7
- value: any;
7
+ value: unknown;
8
8
  };