@mgdis/mg-components 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/cjs/css-shim-629916b0.js +6 -0
  2. package/dist/cjs/index-369388eb.js +146 -0
  3. package/dist/cjs/{index-85a4a0b6.js → index-bead7dbd.js} +78 -2
  4. package/dist/cjs/loader.cjs.js +4 -4
  5. package/dist/cjs/mg-badge_21.cjs.entry.js +3313 -0
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-modal.cjs.entry.js +111 -0
  8. package/dist/cjs/mg-popover.cjs.entry.js +165 -0
  9. package/dist/cjs/popper-0c3964e7.js +1786 -0
  10. package/dist/cjs/{shadow-css-8940f82d.js → shadow-css-546083ef.js} +1 -1
  11. package/dist/collection/collection-manifest.json +4 -1
  12. package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -1
  13. package/dist/collection/components/atoms/mg-badge/mg-badge.js +11 -7
  14. package/dist/collection/components/atoms/mg-badge/mg-badge.stories.js +3 -0
  15. package/dist/collection/components/atoms/mg-button/mg-button.css +26 -17
  16. package/dist/collection/components/atoms/mg-button/mg-button.js +71 -2
  17. package/dist/collection/components/atoms/mg-button/mg-button.stories.js +5 -0
  18. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +12 -1
  19. package/dist/collection/components/atoms/mg-character-left/mg-character-left.stories.js +8 -0
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +8 -0
  21. package/dist/collection/components/atoms/mg-icon/mg-icon.css +5 -7
  22. package/dist/collection/components/atoms/mg-icon/mg-icon.js +11 -1
  23. package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +4 -4
  24. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +14 -3
  25. package/dist/collection/components/atoms/mg-tag/mg-tag.js +10 -3
  26. package/dist/collection/components/atoms/mg-tag/mg-tag.stories.js +3 -0
  27. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -0
  28. package/dist/collection/components/molecules/inputs/MgInput.js +20 -14
  29. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +9 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +103 -40
  31. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.js +6 -1
  32. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +27 -0
  33. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +125 -56
  34. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.stories.js +6 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +27 -0
  36. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +144 -68
  37. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.js +6 -1
  38. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +27 -0
  39. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +101 -35
  40. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.stories.js +6 -1
  41. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +9 -1
  42. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +115 -37
  43. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.js +6 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +28 -1
  45. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +132 -51
  46. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.stories.js +14 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +27 -0
  48. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +155 -53
  49. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.stories.js +7 -2
  50. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +27 -0
  51. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +108 -42
  52. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.js +7 -2
  53. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +4 -1
  54. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +60 -31
  55. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.js +6 -1
  56. package/dist/collection/components/molecules/mg-form/mg-form.css +15 -0
  57. package/dist/collection/components/molecules/mg-form/mg-form.js +269 -0
  58. package/dist/collection/components/molecules/mg-form/mg-form.stories.js +58 -0
  59. package/dist/collection/components/molecules/mg-message/mg-message.css +1 -1
  60. package/dist/collection/components/molecules/mg-message/mg-message.js +11 -4
  61. package/dist/collection/components/molecules/mg-message/mg-message.stories.js +5 -1
  62. package/dist/collection/components/molecules/mg-modal/mg-modal.css +54 -0
  63. package/dist/collection/components/molecules/mg-modal/mg-modal.js +233 -0
  64. package/dist/collection/components/molecules/mg-modal/mg-modal.stories.js +51 -0
  65. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +32 -12
  66. package/dist/collection/components/molecules/mg-pagination/mg-pagination.stories.js +1 -0
  67. package/dist/collection/components/molecules/mg-panel/mg-panel.css +42 -0
  68. package/dist/collection/components/molecules/mg-panel/mg-panel.js +255 -0
  69. package/dist/collection/components/molecules/mg-panel/mg-panel.stories.js +31 -0
  70. package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -2
  71. package/dist/collection/components/molecules/mg-popover/mg-popover.js +19 -4
  72. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +4 -1
  73. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +14 -3
  74. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +68 -20
  75. package/dist/collection/components/molecules/mg-tabs/mg-tabs.stories.js +10 -1
  76. package/dist/collection/stories/messages.stories.js +1 -1
  77. package/dist/collection/utils/components.utils.js +16 -9
  78. package/dist/collection/utils/locale.utils.js +6 -3
  79. package/dist/collection/utils/test.utils.js +27 -15
  80. package/dist/collection/variables.css +30 -1
  81. package/dist/collection/variables.scss +30 -1
  82. package/dist/components/MgInput.js +20 -14
  83. package/dist/components/components.utils.js +16 -9
  84. package/dist/components/index.d.ts +1 -1
  85. package/dist/components/index2.js +22 -12
  86. package/dist/components/locale.utils.js +6 -3
  87. package/dist/components/mg-badge2.js +9 -5
  88. package/dist/components/mg-button2.js +21 -2
  89. package/dist/components/mg-character-left2.js +12 -1
  90. package/dist/components/mg-form.d.ts +11 -0
  91. package/dist/components/mg-form.js +146 -0
  92. package/dist/components/mg-icon2.js +20 -2
  93. package/dist/components/mg-input-checkbox.js +65 -36
  94. package/dist/components/mg-input-date.js +87 -52
  95. package/dist/components/mg-input-numeric.js +105 -63
  96. package/dist/components/mg-input-password.js +60 -29
  97. package/dist/components/mg-input-radio.js +74 -34
  98. package/dist/components/mg-input-select2.js +89 -46
  99. package/dist/components/mg-input-text.js +1 -237
  100. package/dist/components/mg-input-text2.js +288 -0
  101. package/dist/components/mg-input-textarea.js +67 -36
  102. package/dist/components/mg-input-title2.js +13 -4
  103. package/dist/components/mg-input-toggle.js +30 -22
  104. package/dist/components/mg-message.js +10 -3
  105. package/dist/components/mg-modal.d.ts +11 -0
  106. package/dist/components/mg-modal.js +147 -0
  107. package/dist/components/mg-pagination.js +31 -11
  108. package/dist/components/mg-panel.d.ts +11 -0
  109. package/dist/components/mg-panel.js +210 -0
  110. package/dist/components/mg-popover.js +20 -5
  111. package/dist/components/mg-tabs.js +43 -11
  112. package/dist/components/mg-tag.js +8 -1
  113. package/dist/components/mg-tooltip2.js +9 -0
  114. package/dist/esm/css-shim-0993aa3b.js +4 -0
  115. package/dist/esm/{index-e3e84606.js → index-9e877561.js} +78 -2
  116. package/dist/esm/index-c346f52d.js +139 -0
  117. package/dist/esm/loader.js +4 -4
  118. package/dist/esm/mg-badge_21.entry.js +3289 -0
  119. package/dist/esm/mg-components.js +3 -3
  120. package/dist/esm/mg-modal.entry.js +107 -0
  121. package/dist/esm/mg-popover.entry.js +161 -0
  122. package/dist/esm/polyfills/css-shim.js +1 -1
  123. package/dist/esm/popper-8874fd6c.js +1784 -0
  124. package/dist/esm/{shadow-css-5d2d01ce.js → shadow-css-dfa0587f.js} +1 -1
  125. package/dist/esm-es5/css-shim-0993aa3b.js +1 -0
  126. package/dist/esm-es5/index-9e877561.js +1 -0
  127. package/dist/esm-es5/index-c346f52d.js +1 -0
  128. package/dist/esm-es5/loader.js +1 -1
  129. package/dist/esm-es5/mg-badge_21.entry.js +2 -0
  130. package/dist/esm-es5/mg-components.js +1 -1
  131. package/dist/esm-es5/mg-modal.entry.js +1 -0
  132. package/dist/esm-es5/mg-popover.entry.js +1 -0
  133. package/dist/esm-es5/popper-8874fd6c.js +1 -0
  134. package/dist/esm-es5/{shadow-css-5d2d01ce.js → shadow-css-dfa0587f.js} +0 -0
  135. package/dist/mg-components/mg-components.css +1 -1
  136. package/dist/mg-components/mg-components.esm.js +1 -1
  137. package/dist/mg-components/mg-components.js +2 -2
  138. package/dist/mg-components/p-3633e9e1.system.entry.js +2 -0
  139. package/dist/mg-components/p-3c14153d.js +1 -0
  140. package/dist/mg-components/p-55a22b35.system.js +1 -0
  141. package/dist/mg-components/{p-f6455ab3.js → p-5e796581.js} +0 -0
  142. package/dist/mg-components/p-656b5efb.system.js +1 -0
  143. package/dist/mg-components/p-68d6f104.js +1 -0
  144. package/dist/mg-components/{p-366a224e.js → p-6d49ed95.js} +1 -1
  145. package/dist/mg-components/p-70177194.entry.js +1 -0
  146. package/dist/mg-components/{p-71d57b8b.system.js → p-8b2d8a2a.system.js} +0 -0
  147. package/dist/mg-components/p-8cb61c3f.system.js +1 -0
  148. package/dist/mg-components/p-ace173b1.js +1 -0
  149. package/dist/mg-components/p-c46fbd54.entry.js +1 -0
  150. package/dist/mg-components/p-c90cc4bf.system.js +1 -0
  151. package/dist/mg-components/p-cd2a4acc.system.entry.js +1 -0
  152. package/dist/mg-components/p-de1164fa.system.entry.js +1 -0
  153. package/dist/mg-components/p-dfe25da3.entry.js +1 -0
  154. package/dist/mg-components/p-e4a502b5.system.js +1 -0
  155. package/dist/mg-components/variables.css +30 -1
  156. package/dist/mg-components/variables.scss +30 -1
  157. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +8 -4
  158. package/dist/types/components/atoms/mg-badge/mg-badge.stories.d.ts +5 -0
  159. package/dist/types/components/atoms/mg-button/mg-button.d.ts +22 -2
  160. package/dist/types/components/atoms/mg-button/mg-button.stories.d.ts +5 -0
  161. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +13 -2
  162. package/dist/types/components/atoms/mg-character-left/mg-character-left.stories.d.ts +9 -0
  163. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
  164. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +11 -1
  165. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +11 -1
  166. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +10 -3
  167. package/dist/types/components/atoms/mg-tag/mg-tag.stories.d.ts +5 -0
  168. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +11 -2
  169. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +8 -0
  170. package/dist/types/components/molecules/inputs/MgInput.d.ts +5 -4
  171. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +31 -11
  172. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.d.ts +5 -0
  173. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +39 -14
  174. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.stories.d.ts +5 -0
  175. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +53 -14
  176. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.d.ts +5 -0
  177. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +28 -9
  178. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +5 -0
  179. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +1 -1
  180. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +37 -8
  181. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.d.ts +5 -0
  182. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +1 -1
  183. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +30 -7
  184. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +14 -0
  185. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +46 -10
  186. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.stories.d.ts +5 -0
  187. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +30 -10
  188. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +5 -0
  189. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +1 -1
  190. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +27 -12
  191. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.d.ts +5 -0
  192. package/dist/types/components/molecules/mg-form/mg-form.d.ts +82 -0
  193. package/dist/types/components/molecules/mg-form/mg-form.stories.d.ts +11 -0
  194. package/dist/types/components/molecules/mg-message/mg-message.d.ts +11 -4
  195. package/dist/types/components/molecules/mg-message/mg-message.stories.d.ts +10 -0
  196. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +83 -0
  197. package/dist/types/components/molecules/mg-modal/mg-modal.stories.d.ts +13 -0
  198. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +23 -7
  199. package/dist/types/components/molecules/mg-pagination/mg-pagination.stories.d.ts +5 -0
  200. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +110 -0
  201. package/dist/types/components/molecules/mg-panel/mg-panel.stories.d.ts +6 -0
  202. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +18 -3
  203. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +5 -0
  204. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +21 -6
  205. package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +8 -0
  206. package/dist/types/components.d.ts +365 -78
  207. package/dist/types/locales/index.d.ts +15 -8
  208. package/dist/types/utils/components.utils.d.ts +16 -9
  209. package/dist/types/utils/locale.utils.d.ts +6 -3
  210. package/dist/types/utils/test.utils.d.ts +13 -1
  211. package/package.json +13 -9
  212. package/readme.md +3 -0
  213. package/dist/cjs/css-shim-a22512c4.js +0 -6
  214. package/dist/cjs/mg-badge_20.cjs.entry.js +0 -4661
  215. package/dist/esm/css-shim-7c240feb.js +0 -4
  216. package/dist/esm/mg-badge_20.entry.js +0 -4638
  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/mg-badge_20.entry.js +0 -2
  220. package/dist/mg-components/p-1cd24462.system.js +0 -1
  221. package/dist/mg-components/p-2e2f6b27.system.entry.js +0 -2
  222. package/dist/mg-components/p-422c429b.system.js +0 -1
  223. package/dist/mg-components/p-62fa3797.js +0 -1
  224. package/dist/mg-components/p-9a215712.system.js +0 -1
  225. package/dist/mg-components/p-cbf0464b.entry.js +0 -1
@@ -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';
@@ -15,19 +14,19 @@ export declare class MgInputPassword {
15
14
  * Component value
16
15
  */
17
16
  value: string;
17
+ handleValue(newValue: string): void;
18
18
  /**
19
19
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
20
20
  * If not set, it will be created.
21
21
  */
22
- identifier?: string;
22
+ identifier: string;
23
23
  /**
24
24
  * Input name
25
25
  * If not set the value equals the identifier
26
26
  */
27
- name?: string;
27
+ name: string;
28
28
  /**
29
29
  * Input label
30
- * Required
31
30
  */
32
31
  label: string;
33
32
  /**
@@ -68,11 +67,11 @@ export declare class MgInputPassword {
68
67
  */
69
68
  helpText: string;
70
69
  /**
71
- * Define input pattern to validate
70
+ * Define input valid state
72
71
  */
73
72
  valid: boolean;
74
73
  /**
75
- * Define input pattern error message
74
+ * Define input invalid state
76
75
  */
77
76
  invalid: boolean;
78
77
  /**
@@ -84,9 +83,19 @@ export declare class MgInputPassword {
84
83
  */
85
84
  errorMessage: string;
86
85
  /**
87
- * Emmited event when value change
86
+ * Emited event when value change
88
87
  */
89
88
  valueChange: EventEmitter<string>;
89
+ /**
90
+ * Emited event when checking validity
91
+ */
92
+ inputValid: EventEmitter<boolean>;
93
+ /**
94
+ * Public method to display errors
95
+ *
96
+ * @returns {Promise<void>}
97
+ */
98
+ displayError(): Promise<void>;
90
99
  /**
91
100
  * Handle input event
92
101
  */
@@ -106,6 +115,16 @@ export declare class MgInputPassword {
106
115
  /*************
107
116
  * Lifecycle *
108
117
  *************/
109
- componentWillLoad(): NodeJS.Timeout;
110
- render(): any;
118
+ /**
119
+ * Check if component props are well configured on init
120
+ *
121
+ * @returns {ReturnType<typeof setTimeout>} timeout
122
+ */
123
+ componentWillLoad(): ReturnType<typeof setTimeout>;
124
+ /**
125
+ * Render
126
+ *
127
+ * @returns {HTMLElement} HTML Element
128
+ */
129
+ render(): HTMLElement;
111
130
  }
@@ -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
  /**
@@ -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';
@@ -15,12 +14,13 @@ export declare class MgInputRadio {
15
14
  * Component value
16
15
  */
17
16
  value: any;
17
+ handleValue(newValue: any): void;
18
18
  /**
19
19
  * Items are the possible options to select
20
20
  * Required
21
21
  */
22
22
  items: string[] | RadioOption[];
23
- validateItems(newValue: any): void;
23
+ validateItems(newValue: string[] | RadioOption[]): void;
24
24
  /**
25
25
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
26
26
  * If not set, it will be created.
@@ -33,7 +33,6 @@ export declare class MgInputRadio {
33
33
  name: string;
34
34
  /**
35
35
  * Input label
36
- * Required
37
36
  */
38
37
  label: string;
39
38
  /**
@@ -69,11 +68,11 @@ export declare class MgInputRadio {
69
68
  */
70
69
  helpText: string;
71
70
  /**
72
- * Force valid component
71
+ * Define input valid state
73
72
  */
74
73
  valid: boolean;
75
74
  /**
76
- * Force invalid component
75
+ * Define input invalid state
77
76
  */
78
77
  invalid: boolean;
79
78
  /**
@@ -92,30 +91,60 @@ export declare class MgInputRadio {
92
91
  * Emitted event when value change
93
92
  */
94
93
  valueChange: EventEmitter<any>;
94
+ /**
95
+ * Emited event when checking validity
96
+ */
97
+ inputValid: EventEmitter<boolean>;
98
+ /**
99
+ * Public method to display errors
100
+ *
101
+ * @returns {Promise<void>}
102
+ */
103
+ displayError(): Promise<void>;
95
104
  /**
96
105
  * Handle input event
106
+ *
107
+ * @param {event} event input event
108
+ * @returns {void}
97
109
  */
98
110
  private handleInput;
99
111
  /**
100
112
  * Handle blur event
113
+ *
114
+ * @returns {void}
101
115
  */
102
116
  private handleBlur;
103
117
  /**
104
118
  * Check if input is valid
119
+ *
120
+ * @returns {void}
105
121
  */
106
122
  private checkValidity;
107
123
  /**
108
124
  * Check input errors
125
+ *
126
+ * @returns {void}
109
127
  */
110
128
  private checkError;
111
129
  /**
112
130
  * get invalid element
113
- * @returns element: HTMLInputElement
131
+ *
132
+ * @returns {HTMLInputElement} element
114
133
  */
115
134
  private getInvalidElement;
116
135
  /*************
117
136
  * Lifecycle *
118
137
  *************/
119
- componentWillLoad(): NodeJS.Timeout;
120
- render(): any;
138
+ /**
139
+ * Check if component props are well configured on init
140
+ *
141
+ * @returns {ReturnType<typeof setTimeout>} timeout
142
+ */
143
+ componentWillLoad(): ReturnType<typeof setTimeout>;
144
+ /**
145
+ * Render
146
+ *
147
+ * @returns {HTMLElement} HTML Element
148
+ */
149
+ render(): HTMLElement;
121
150
  }
@@ -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,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';
@@ -16,11 +15,12 @@ export declare class MgInputSelect {
16
15
  * Component value
17
16
  */
18
17
  value: any;
18
+ handleValue(newValue: any): void;
19
19
  /**
20
20
  * Items are the possible options to select
21
21
  */
22
22
  items: string[] | SelectOption[];
23
- validateItems(newValue: any): void;
23
+ validateItems(newValue: string[] | SelectOption[]): void;
24
24
  /**
25
25
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
26
26
  * If not set, it will be created.
@@ -33,7 +33,6 @@ export declare class MgInputSelect {
33
33
  name: string;
34
34
  /**
35
35
  * Input label
36
- * Required
37
36
  */
38
37
  label: string;
39
38
  /**
@@ -106,9 +105,23 @@ export declare class MgInputSelect {
106
105
  */
107
106
  valueExist: boolean;
108
107
  /**
109
- * Emmited event when value change
108
+ * Does value match any item option
109
+ */
110
+ readonlyValue: string;
111
+ /**
112
+ * Emited event when value change
110
113
  */
111
- valueChange: EventEmitter<string>;
114
+ valueChange: EventEmitter<any>;
115
+ /**
116
+ * Emited event when checking validity
117
+ */
118
+ inputValid: EventEmitter<boolean>;
119
+ /**
120
+ * Public method to display errors
121
+ *
122
+ * @returns {Promise<void>}
123
+ */
124
+ displayError(): Promise<void>;
112
125
  /**
113
126
  * Handle input event
114
127
  */
@@ -128,6 +141,16 @@ export declare class MgInputSelect {
128
141
  /*************
129
142
  * Lifecycle *
130
143
  *************/
131
- componentWillLoad(): NodeJS.Timeout;
132
- render(): any;
144
+ /**
145
+ * Check if component props are well configured on init
146
+ *
147
+ * @returns {ReturnType<typeof setTimeout>} timeout
148
+ */
149
+ componentWillLoad(): ReturnType<typeof setTimeout>;
150
+ /**
151
+ * Render
152
+ *
153
+ * @returns {HTMLElement} HTML Element
154
+ */
155
+ render(): HTMLElement;
133
156
  }
@@ -1,6 +1,20 @@
1
1
  declare const _default: {
2
2
  component: string;
3
3
  title: string;
4
+ parameters: {
5
+ actions: {
6
+ handles: string[];
7
+ };
8
+ };
9
+ argTypes: {
10
+ placeholder: {
11
+ table: {
12
+ defaultValue: {
13
+ summary: string;
14
+ };
15
+ };
16
+ };
17
+ };
4
18
  };
5
19
  export default _default;
6
20
  export declare const MgInputSelect: 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,6 +6,7 @@ export declare class MgInputText {
7
6
  * Internal *
8
7
  ************/
9
8
  private classFocus;
9
+ private isInputGroupAppend;
10
10
  private classError;
11
11
  private input;
12
12
  /**************
@@ -20,19 +20,19 @@ export declare class MgInputText {
20
20
  * Component value
21
21
  */
22
22
  value: string;
23
+ handleValue(newValue: string): void;
23
24
  /**
24
25
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
25
26
  * If not set, it will be created.
26
27
  */
27
- identifier?: string;
28
+ identifier: string;
28
29
  /**
29
30
  * Input name
30
31
  * If not set the value equals the identifier
31
32
  */
32
- name?: string;
33
+ name: string;
33
34
  /**
34
35
  * Input label
35
- * Required
36
36
  */
37
37
  label: string;
38
38
  /**
@@ -101,11 +101,11 @@ export declare class MgInputText {
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
  }
@@ -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
  /**
@@ -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';
@@ -16,19 +15,19 @@ export declare class MgInputTextarea {
16
15
  * Component value
17
16
  */
18
17
  value: string;
18
+ handleValue(newValue: string): void;
19
19
  /**
20
20
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
21
21
  * If not set, it will be created.
22
22
  */
23
- identifier?: string;
23
+ identifier: string;
24
24
  /**
25
25
  * Input name
26
26
  * If not set the value equals the identifier
27
27
  */
28
- name?: string;
28
+ name: string;
29
29
  /**
30
30
  * Input label
31
- * Required
32
31
  */
33
32
  label: string;
34
33
  /**
@@ -93,11 +92,11 @@ export declare class MgInputTextarea {
93
92
  */
94
93
  helpText: string;
95
94
  /**
96
- * Define input pattern to validate
95
+ * Define input valid state
97
96
  */
98
97
  valid: boolean;
99
98
  /**
100
- * Define input pattern error message
99
+ * Define input invalid state
101
100
  */
102
101
  invalid: boolean;
103
102
  /**
@@ -109,9 +108,19 @@ export declare class MgInputTextarea {
109
108
  */
110
109
  errorMessage: string;
111
110
  /**
112
- * Emmited event when value change
111
+ * Emited event when value change
113
112
  */
114
113
  valueChange: EventEmitter<string>;
114
+ /**
115
+ * Emited event when checking validity
116
+ */
117
+ inputValid: EventEmitter<boolean>;
118
+ /**
119
+ * Public method to display errors
120
+ *
121
+ * @returns {Promise<void>}
122
+ */
123
+ displayError(): Promise<void>;
115
124
  /**
116
125
  * Handle input event
117
126
  */
@@ -127,7 +136,8 @@ export declare class MgInputTextarea {
127
136
  /**
128
137
  * Get pattern validity
129
138
  * Pattern is not defined on textarea field : https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea
130
- * @returns {boolean}
139
+ *
140
+ * @returns {boolean} is pattern valid
131
141
  */
132
142
  private getPatternValidity;
133
143
  /**
@@ -145,6 +155,16 @@ export declare class MgInputTextarea {
145
155
  /*************
146
156
  * Lifecycle *
147
157
  *************/
148
- componentWillLoad(): NodeJS.Timeout;
149
- render(): any;
158
+ /**
159
+ * Check if component props are well configured on init
160
+ *
161
+ * @returns {ReturnType<typeof setTimeout>} timeout
162
+ */
163
+ componentWillLoad(): ReturnType<typeof setTimeout>;
164
+ /**
165
+ * Render
166
+ *
167
+ * @returns {HTMLElement} HTML Element
168
+ */
169
+ render(): HTMLElement;
150
170
  }
@@ -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 MgInputTextarea: 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
  };
@@ -18,26 +18,27 @@ export declare class MgInputToggle {
18
18
  /**
19
19
  * Component value
20
20
  */
21
- value?: any;
21
+ value: any;
22
+ handleValue(newValue: any): void;
22
23
  /**
23
24
  * Items are the possible options to select
24
- * Required
25
+ *
26
+ * @returns {void}
25
27
  */
26
28
  items: string[] | ToggleValue[];
27
- validateItems(newValue: any): void;
29
+ validateItems(newValue: string[] | ToggleValue[]): void;
28
30
  /**
29
31
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
30
32
  * If not set, it will be created.
31
33
  */
32
- identifier?: string;
34
+ identifier: string;
33
35
  /**
34
36
  * Input name
35
37
  * If not set the value equals the identifier
36
38
  */
37
- name?: string;
39
+ name: string;
38
40
  /**
39
41
  * Input label
40
- * Required
41
42
  */
42
43
  label: string;
43
44
  /**
@@ -51,12 +52,12 @@ export declare class MgInputToggle {
51
52
  /**
52
53
  * Define if toggle have on/off style
53
54
  */
54
- isOnOff?: boolean;
55
+ isOnOff: boolean;
55
56
  handleIsOnOff(newValue: boolean): void;
56
57
  /**
57
58
  * Define if toggle display icon
58
59
  */
59
- isIcon?: boolean;
60
+ isIcon: boolean;
60
61
  handleIsIcon(newValue: boolean): void;
61
62
  /**
62
63
  * Define if input is readonly
@@ -88,22 +89,31 @@ export declare class MgInputToggle {
88
89
  * Checked internal value
89
90
  */
90
91
  checked: boolean;
91
- handleChecked(newValue: any): void;
92
+ handleChecked(newValue: boolean): void;
92
93
  /**
93
- * Emmited event when value change
94
+ * Emited event when value change
94
95
  */
95
96
  valueChange: EventEmitter<any>;
97
+ /**
98
+ * Emited event when checking validity
99
+ */
100
+ inputValid: EventEmitter<boolean>;
96
101
  /**
97
102
  * Change checked value
103
+ *
104
+ * @returns {void}
98
105
  */
99
106
  private toggleChecked;
100
107
  /**
101
108
  * Slots validation
109
+ *
110
+ * @returns {void}
102
111
  */
103
112
  private validateSlots;
104
113
  /**
105
114
  * set checked state
106
- * @param newValue?
115
+ *
116
+ * @returns {void}
107
117
  */
108
118
  private setChecked;
109
119
  /*************
@@ -113,5 +123,10 @@ export declare class MgInputToggle {
113
123
  * Check if component props are well configured on init
114
124
  */
115
125
  componentWillLoad(): void;
116
- render(): any;
126
+ /**
127
+ * Render
128
+ *
129
+ * @returns {HTMLElement} HTML Element
130
+ */
131
+ render(): HTMLElement;
117
132
  }
@@ -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;