@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.
- package/dist/cjs/css-shim-629916b0.js +6 -0
- package/dist/cjs/index-369388eb.js +146 -0
- package/dist/cjs/{index-85a4a0b6.js → index-bead7dbd.js} +78 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/mg-badge_21.cjs.entry.js +3313 -0
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-modal.cjs.entry.js +111 -0
- package/dist/cjs/mg-popover.cjs.entry.js +165 -0
- package/dist/cjs/popper-0c3964e7.js +1786 -0
- package/dist/cjs/{shadow-css-8940f82d.js → shadow-css-546083ef.js} +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +11 -7
- package/dist/collection/components/atoms/mg-badge/mg-badge.stories.js +3 -0
- package/dist/collection/components/atoms/mg-button/mg-button.css +26 -17
- package/dist/collection/components/atoms/mg-button/mg-button.js +71 -2
- package/dist/collection/components/atoms/mg-button/mg-button.stories.js +5 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +12 -1
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.stories.js +8 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +8 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +5 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +11 -1
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +4 -4
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +14 -3
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +10 -3
- package/dist/collection/components/atoms/mg-tag/mg-tag.stories.js +3 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -0
- package/dist/collection/components/molecules/inputs/MgInput.js +20 -14
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +9 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +103 -40
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +125 -56
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +144 -68
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +101 -35
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +9 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +115 -37
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +28 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +132 -51
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.stories.js +14 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +155 -53
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.stories.js +7 -2
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +108 -42
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.js +7 -2
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +4 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +60 -31
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.js +6 -1
- package/dist/collection/components/molecules/mg-form/mg-form.css +15 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +269 -0
- package/dist/collection/components/molecules/mg-form/mg-form.stories.js +58 -0
- package/dist/collection/components/molecules/mg-message/mg-message.css +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +11 -4
- package/dist/collection/components/molecules/mg-message/mg-message.stories.js +5 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +54 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +233 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.stories.js +51 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +32 -12
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.stories.js +1 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +42 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +255 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.stories.js +31 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +19 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +4 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +14 -3
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +68 -20
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.stories.js +10 -1
- package/dist/collection/stories/messages.stories.js +1 -1
- package/dist/collection/utils/components.utils.js +16 -9
- package/dist/collection/utils/locale.utils.js +6 -3
- package/dist/collection/utils/test.utils.js +27 -15
- package/dist/collection/variables.css +30 -1
- package/dist/collection/variables.scss +30 -1
- package/dist/components/MgInput.js +20 -14
- package/dist/components/components.utils.js +16 -9
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index2.js +22 -12
- package/dist/components/locale.utils.js +6 -3
- package/dist/components/mg-badge2.js +9 -5
- package/dist/components/mg-button2.js +21 -2
- package/dist/components/mg-character-left2.js +12 -1
- package/dist/components/mg-form.d.ts +11 -0
- package/dist/components/mg-form.js +146 -0
- package/dist/components/mg-icon2.js +20 -2
- package/dist/components/mg-input-checkbox.js +65 -36
- package/dist/components/mg-input-date.js +87 -52
- package/dist/components/mg-input-numeric.js +105 -63
- package/dist/components/mg-input-password.js +60 -29
- package/dist/components/mg-input-radio.js +74 -34
- package/dist/components/mg-input-select2.js +89 -46
- package/dist/components/mg-input-text.js +1 -237
- package/dist/components/mg-input-text2.js +288 -0
- package/dist/components/mg-input-textarea.js +67 -36
- package/dist/components/mg-input-title2.js +13 -4
- package/dist/components/mg-input-toggle.js +30 -22
- package/dist/components/mg-message.js +10 -3
- package/dist/components/mg-modal.d.ts +11 -0
- package/dist/components/mg-modal.js +147 -0
- package/dist/components/mg-pagination.js +31 -11
- package/dist/components/mg-panel.d.ts +11 -0
- package/dist/components/mg-panel.js +210 -0
- package/dist/components/mg-popover.js +20 -5
- package/dist/components/mg-tabs.js +43 -11
- package/dist/components/mg-tag.js +8 -1
- package/dist/components/mg-tooltip2.js +9 -0
- package/dist/esm/css-shim-0993aa3b.js +4 -0
- package/dist/esm/{index-e3e84606.js → index-9e877561.js} +78 -2
- package/dist/esm/index-c346f52d.js +139 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/mg-badge_21.entry.js +3289 -0
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/mg-modal.entry.js +107 -0
- package/dist/esm/mg-popover.entry.js +161 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/popper-8874fd6c.js +1784 -0
- package/dist/esm/{shadow-css-5d2d01ce.js → shadow-css-dfa0587f.js} +1 -1
- package/dist/esm-es5/css-shim-0993aa3b.js +1 -0
- package/dist/esm-es5/index-9e877561.js +1 -0
- package/dist/esm-es5/index-c346f52d.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mg-badge_21.entry.js +2 -0
- package/dist/esm-es5/mg-components.js +1 -1
- package/dist/esm-es5/mg-modal.entry.js +1 -0
- package/dist/esm-es5/mg-popover.entry.js +1 -0
- package/dist/esm-es5/popper-8874fd6c.js +1 -0
- package/dist/esm-es5/{shadow-css-5d2d01ce.js → shadow-css-dfa0587f.js} +0 -0
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-components.js +2 -2
- package/dist/mg-components/p-3633e9e1.system.entry.js +2 -0
- package/dist/mg-components/p-3c14153d.js +1 -0
- package/dist/mg-components/p-55a22b35.system.js +1 -0
- package/dist/mg-components/{p-f6455ab3.js → p-5e796581.js} +0 -0
- package/dist/mg-components/p-656b5efb.system.js +1 -0
- package/dist/mg-components/p-68d6f104.js +1 -0
- package/dist/mg-components/{p-366a224e.js → p-6d49ed95.js} +1 -1
- package/dist/mg-components/p-70177194.entry.js +1 -0
- package/dist/mg-components/{p-71d57b8b.system.js → p-8b2d8a2a.system.js} +0 -0
- package/dist/mg-components/p-8cb61c3f.system.js +1 -0
- package/dist/mg-components/p-ace173b1.js +1 -0
- package/dist/mg-components/p-c46fbd54.entry.js +1 -0
- package/dist/mg-components/p-c90cc4bf.system.js +1 -0
- package/dist/mg-components/p-cd2a4acc.system.entry.js +1 -0
- package/dist/mg-components/p-de1164fa.system.entry.js +1 -0
- package/dist/mg-components/p-dfe25da3.entry.js +1 -0
- package/dist/mg-components/p-e4a502b5.system.js +1 -0
- package/dist/mg-components/variables.css +30 -1
- package/dist/mg-components/variables.scss +30 -1
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +8 -4
- package/dist/types/components/atoms/mg-badge/mg-badge.stories.d.ts +5 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +22 -2
- package/dist/types/components/atoms/mg-button/mg-button.stories.d.ts +5 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +13 -2
- package/dist/types/components/atoms/mg-character-left/mg-character-left.stories.d.ts +9 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +11 -1
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +11 -1
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +10 -3
- package/dist/types/components/atoms/mg-tag/mg-tag.stories.d.ts +5 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +11 -2
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +8 -0
- package/dist/types/components/molecules/inputs/MgInput.d.ts +5 -4
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +31 -11
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +39 -14
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +53 -14
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +28 -9
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +37 -8
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +30 -7
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +14 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +46 -10
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +30 -10
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +27 -12
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.d.ts +5 -0
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +82 -0
- package/dist/types/components/molecules/mg-form/mg-form.stories.d.ts +11 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +11 -4
- package/dist/types/components/molecules/mg-message/mg-message.stories.d.ts +10 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +83 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.stories.d.ts +13 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +23 -7
- package/dist/types/components/molecules/mg-pagination/mg-pagination.stories.d.ts +5 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +110 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.stories.d.ts +6 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +18 -3
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +5 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +21 -6
- package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +8 -0
- package/dist/types/components.d.ts +365 -78
- package/dist/types/locales/index.d.ts +15 -8
- package/dist/types/utils/components.utils.d.ts +16 -9
- package/dist/types/utils/locale.utils.d.ts +6 -3
- package/dist/types/utils/test.utils.d.ts +13 -1
- package/package.json +13 -9
- package/readme.md +3 -0
- package/dist/cjs/css-shim-a22512c4.js +0 -6
- package/dist/cjs/mg-badge_20.cjs.entry.js +0 -4661
- package/dist/esm/css-shim-7c240feb.js +0 -4
- package/dist/esm/mg-badge_20.entry.js +0 -4638
- package/dist/esm-es5/css-shim-7c240feb.js +0 -1
- package/dist/esm-es5/index-e3e84606.js +0 -1
- package/dist/esm-es5/mg-badge_20.entry.js +0 -2
- package/dist/mg-components/p-1cd24462.system.js +0 -1
- package/dist/mg-components/p-2e2f6b27.system.entry.js +0 -2
- package/dist/mg-components/p-422c429b.system.js +0 -1
- package/dist/mg-components/p-62fa3797.js +0 -1
- package/dist/mg-components/p-9a215712.system.js +0 -1
- package/dist/mg-components/p-cbf0464b.entry.js +0 -1
|
@@ -20,7 +20,7 @@ export declare class MgButton {
|
|
|
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
|
|
23
|
+
identifier: string;
|
|
24
24
|
/**
|
|
25
25
|
* aria-label
|
|
26
26
|
* In case button text is not explicit enough
|
|
@@ -41,6 +41,19 @@ export declare class MgButton {
|
|
|
41
41
|
* Parent component have to remove the attribute 'disabled' when the process ends.
|
|
42
42
|
*/
|
|
43
43
|
disableOnClick: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Prop to set aria-expanded on button element
|
|
46
|
+
*/
|
|
47
|
+
expanded: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Prop to set aria-controls on button element
|
|
50
|
+
*/
|
|
51
|
+
controls: string;
|
|
52
|
+
/**
|
|
53
|
+
* Option to set aria-haspopup
|
|
54
|
+
* The aria-haspopup state informs assistive technology users that there is a popup and the type of popup it is, but provides no interactivity.
|
|
55
|
+
*/
|
|
56
|
+
haspopup: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
44
57
|
/**
|
|
45
58
|
* Define if button is loading, default to false.
|
|
46
59
|
* Trigger when button is clicked or key-up ['enter', 'space], then value change to true.
|
|
@@ -54,14 +67,21 @@ export declare class MgButton {
|
|
|
54
67
|
classList: ClassList;
|
|
55
68
|
/**
|
|
56
69
|
* Trigger actions onClick event
|
|
70
|
+
*
|
|
71
|
+
* @param {MouseEvent} event click event
|
|
72
|
+
* @returns {void}
|
|
57
73
|
*/
|
|
58
74
|
private handleClick;
|
|
59
75
|
/**
|
|
60
76
|
* Check if props are well configured on init
|
|
77
|
+
*
|
|
78
|
+
* @returns {void}
|
|
61
79
|
*/
|
|
62
80
|
componentWillLoad(): void;
|
|
63
81
|
/**
|
|
64
82
|
* Render component
|
|
83
|
+
*
|
|
84
|
+
* @returns {HTMLElement} html element
|
|
65
85
|
*/
|
|
66
|
-
render():
|
|
86
|
+
render(): HTMLElement;
|
|
67
87
|
}
|
|
@@ -28,12 +28,23 @@ export declare class MgCharacterLeft {
|
|
|
28
28
|
validateMaxlength(newValue: number): void;
|
|
29
29
|
/**
|
|
30
30
|
* Calculate number character left
|
|
31
|
-
*
|
|
31
|
+
*
|
|
32
|
+
* @returns {string} message
|
|
32
33
|
*/
|
|
33
34
|
private getMessage;
|
|
34
35
|
/*************
|
|
35
36
|
* Lifecycle *
|
|
36
37
|
*************/
|
|
38
|
+
/**
|
|
39
|
+
* Check if props are well configured on init
|
|
40
|
+
*
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*/
|
|
37
43
|
componentWillLoad(): void;
|
|
38
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Render component
|
|
46
|
+
*
|
|
47
|
+
* @returns {HTMLElement} HTML Element
|
|
48
|
+
*/
|
|
49
|
+
render(): HTMLElement;
|
|
39
50
|
}
|
|
@@ -25,12 +25,22 @@ export declare class MgIcon {
|
|
|
25
25
|
* Component classes
|
|
26
26
|
*/
|
|
27
27
|
classList: ClassList;
|
|
28
|
+
/**
|
|
29
|
+
* getIcon
|
|
30
|
+
*
|
|
31
|
+
* @returns {HTMLElement} icon html
|
|
32
|
+
*/
|
|
33
|
+
private getIcon;
|
|
28
34
|
/**
|
|
29
35
|
* Check if props are well configured on init
|
|
36
|
+
*
|
|
37
|
+
* @returns {void}
|
|
30
38
|
*/
|
|
31
39
|
componentWillLoad(): void;
|
|
32
40
|
/**
|
|
33
41
|
* Render component
|
|
42
|
+
*
|
|
43
|
+
* @returns {HTMLElement} HTML Element
|
|
34
44
|
*/
|
|
35
|
-
render():
|
|
45
|
+
render(): HTMLElement;
|
|
36
46
|
}
|
|
@@ -19,6 +19,16 @@ export declare class MgInputTitle {
|
|
|
19
19
|
/*************
|
|
20
20
|
* Lifecycle *
|
|
21
21
|
*************/
|
|
22
|
+
/**
|
|
23
|
+
* Init tag name
|
|
24
|
+
*
|
|
25
|
+
* @returns {void}
|
|
26
|
+
*/
|
|
22
27
|
componentWillLoad(): void;
|
|
23
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Render
|
|
30
|
+
*
|
|
31
|
+
* @returns {HTMLElement} HTML Element
|
|
32
|
+
*/
|
|
33
|
+
render(): HTMLElement;
|
|
24
34
|
}
|
|
@@ -3,23 +3,30 @@ export declare class MgTag {
|
|
|
3
3
|
/**
|
|
4
4
|
* Define button variant
|
|
5
5
|
*/
|
|
6
|
-
variant
|
|
6
|
+
variant: string;
|
|
7
7
|
validateVariant(newValue: string): void;
|
|
8
8
|
/**
|
|
9
9
|
* Define if button is using outline style
|
|
10
10
|
*/
|
|
11
|
-
outline
|
|
11
|
+
outline: boolean;
|
|
12
12
|
validateOutline(newValue: boolean): void;
|
|
13
13
|
/**
|
|
14
14
|
* Component classes
|
|
15
15
|
*/
|
|
16
16
|
classList: ClassList;
|
|
17
|
+
/*************
|
|
18
|
+
* Lifecycle *
|
|
19
|
+
*************/
|
|
17
20
|
/**
|
|
18
21
|
* Check if props are well configured on init
|
|
22
|
+
*
|
|
23
|
+
* @returns {void}
|
|
19
24
|
*/
|
|
20
25
|
componentWillLoad(): void;
|
|
21
26
|
/**
|
|
22
27
|
* Render
|
|
28
|
+
*
|
|
29
|
+
* @returns {HTMLElement} HTML Element
|
|
23
30
|
*/
|
|
24
|
-
render():
|
|
31
|
+
render(): HTMLElement;
|
|
25
32
|
}
|
|
@@ -28,18 +28,20 @@ export declare class MgTooltip {
|
|
|
28
28
|
* Display tooltip
|
|
29
29
|
*/
|
|
30
30
|
display: boolean;
|
|
31
|
-
handleDisplay(newVal:
|
|
31
|
+
handleDisplay(newVal: boolean): void;
|
|
32
32
|
/**
|
|
33
33
|
* Disable tooltip
|
|
34
34
|
*/
|
|
35
35
|
disabled: boolean;
|
|
36
36
|
/**
|
|
37
37
|
* Show tooltip
|
|
38
|
+
*
|
|
38
39
|
* @returns {void}
|
|
39
40
|
*/
|
|
40
41
|
private show;
|
|
41
42
|
/**
|
|
42
43
|
* Hide tooltip
|
|
44
|
+
*
|
|
43
45
|
* @returns {void}
|
|
44
46
|
*/
|
|
45
47
|
private hide;
|
|
@@ -50,7 +52,14 @@ export declare class MgTooltip {
|
|
|
50
52
|
* Get slotted element
|
|
51
53
|
* Check if it already contain an interactive element, if not we need to add a tabIndex attribute
|
|
52
54
|
* We need to attach the focused element to the tooltip (aria-describedby)
|
|
55
|
+
*
|
|
56
|
+
* @returns {void}
|
|
53
57
|
*/
|
|
54
58
|
componentDidLoad(): void;
|
|
55
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Render
|
|
61
|
+
*
|
|
62
|
+
* @returns {HTMLElement} HTML Element
|
|
63
|
+
*/
|
|
64
|
+
render(): HTMLElement;
|
|
56
65
|
}
|
|
@@ -8,3 +8,11 @@ export declare type Width = 2 | 4 | 16 | 'full';
|
|
|
8
8
|
export declare enum InputClass {
|
|
9
9
|
ERROR = "is-not-valid"
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Possible Input types
|
|
13
|
+
*/
|
|
14
|
+
export declare type HTMLMgInputsElement = HTMLMgInputCheckboxElement | HTMLMgInputDateElement | HTMLMgInputNumericElement | HTMLMgInputPasswordElement | HTMLMgInputRadioElement | HTMLMgInputSelectElement | HTMLMgInputTextElement | HTMLMgInputTextareaElement | (HTMLMgInputToggleElement & {
|
|
15
|
+
required: true;
|
|
16
|
+
invalid: false;
|
|
17
|
+
displayError: () => void;
|
|
18
|
+
});
|
|
@@ -26,10 +26,11 @@ interface MgInputProps {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Get input template
|
|
29
|
-
*
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @
|
|
29
|
+
*
|
|
30
|
+
* @param {MgInputProps} props MgInput Interface Props
|
|
31
|
+
* @param {VNode[]} children Represent scoped elements
|
|
32
|
+
* @param {FunctionalUtilities} utils Stencil.js utils
|
|
33
|
+
* @returns {VNode[]} input template
|
|
33
34
|
*/
|
|
34
35
|
export declare const MgInput: FunctionalComponent<MgInputProps>;
|
|
35
36
|
export {};
|
|
@@ -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 { CheckboxItem, CheckboxValue } from './mg-input-checkbox.conf';
|
|
@@ -17,20 +16,19 @@ export declare class MgInputCheckbox {
|
|
|
17
16
|
* Required
|
|
18
17
|
*/
|
|
19
18
|
value: CheckboxValue[];
|
|
20
|
-
validateValue(newValue:
|
|
19
|
+
validateValue(newValue: CheckboxValue[]): void;
|
|
21
20
|
/**
|
|
22
21
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
23
22
|
* If not set, it will be created.
|
|
24
23
|
*/
|
|
25
|
-
identifier
|
|
24
|
+
identifier: string;
|
|
26
25
|
/**
|
|
27
26
|
* Input name
|
|
28
27
|
* If not set the value equals the identifier
|
|
29
28
|
*/
|
|
30
|
-
name
|
|
29
|
+
name: string;
|
|
31
30
|
/**
|
|
32
31
|
* Input label
|
|
33
|
-
* Required
|
|
34
32
|
*/
|
|
35
33
|
label: string;
|
|
36
34
|
/**
|
|
@@ -67,11 +65,11 @@ export declare class MgInputCheckbox {
|
|
|
67
65
|
*/
|
|
68
66
|
helpText: string;
|
|
69
67
|
/**
|
|
70
|
-
*
|
|
68
|
+
* Define input valid state
|
|
71
69
|
*/
|
|
72
70
|
valid: boolean;
|
|
73
71
|
/**
|
|
74
|
-
*
|
|
72
|
+
* Define input invalid state
|
|
75
73
|
*/
|
|
76
74
|
invalid: boolean;
|
|
77
75
|
/**
|
|
@@ -90,9 +88,20 @@ export declare class MgInputCheckbox {
|
|
|
90
88
|
* Emitted event when value change
|
|
91
89
|
*/
|
|
92
90
|
valueChange: EventEmitter<CheckboxValue[]>;
|
|
91
|
+
/**
|
|
92
|
+
* Emited event when checking validity
|
|
93
|
+
*/
|
|
94
|
+
inputValid: EventEmitter<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Public method to display errors
|
|
97
|
+
*
|
|
98
|
+
* @returns {Promise<void>}
|
|
99
|
+
*/
|
|
100
|
+
displayError(): Promise<void>;
|
|
93
101
|
/**
|
|
94
102
|
* Handle input event
|
|
95
|
-
*
|
|
103
|
+
*
|
|
104
|
+
* @param {InputEvent} event input event
|
|
96
105
|
*/
|
|
97
106
|
private handleInput;
|
|
98
107
|
/**
|
|
@@ -109,12 +118,23 @@ export declare class MgInputCheckbox {
|
|
|
109
118
|
private checkError;
|
|
110
119
|
/**
|
|
111
120
|
* get invalid element
|
|
112
|
-
*
|
|
121
|
+
*
|
|
122
|
+
* @returns {HTMLInputElement} element
|
|
113
123
|
*/
|
|
114
124
|
private getInvalidElement;
|
|
115
125
|
/*************
|
|
116
126
|
* Lifecycle *
|
|
117
127
|
*************/
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Check if component props are well configured on init
|
|
130
|
+
*
|
|
131
|
+
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
132
|
+
*/
|
|
133
|
+
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
134
|
+
/**
|
|
135
|
+
* Render
|
|
136
|
+
*
|
|
137
|
+
* @returns {HTMLElement} HTML Element
|
|
138
|
+
*/
|
|
139
|
+
render(): HTMLElement;
|
|
120
140
|
}
|
|
@@ -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
|
export declare class MgInputDate {
|
|
@@ -14,20 +13,19 @@ export declare class MgInputDate {
|
|
|
14
13
|
* Component value
|
|
15
14
|
*/
|
|
16
15
|
value: string;
|
|
17
|
-
validateValue(newValue:
|
|
16
|
+
validateValue(newValue: string): void;
|
|
18
17
|
/**
|
|
19
18
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
20
19
|
* If not set, it will be created.
|
|
21
20
|
*/
|
|
22
|
-
identifier
|
|
21
|
+
identifier: string;
|
|
23
22
|
/**
|
|
24
23
|
* Input name
|
|
25
24
|
* If not set the value equals the identifier
|
|
26
25
|
*/
|
|
27
|
-
name
|
|
26
|
+
name: string;
|
|
28
27
|
/**
|
|
29
28
|
* Input label
|
|
30
|
-
* Required
|
|
31
29
|
*/
|
|
32
30
|
label: string;
|
|
33
31
|
/**
|
|
@@ -59,11 +57,11 @@ export declare class MgInputDate {
|
|
|
59
57
|
*/
|
|
60
58
|
helpText: string;
|
|
61
59
|
/**
|
|
62
|
-
* Define input
|
|
60
|
+
* Define input valid state
|
|
63
61
|
*/
|
|
64
62
|
valid: boolean;
|
|
65
63
|
/**
|
|
66
|
-
* Define input
|
|
64
|
+
* Define input invalid state
|
|
67
65
|
*/
|
|
68
66
|
invalid: boolean;
|
|
69
67
|
/**
|
|
@@ -71,13 +69,13 @@ export declare class MgInputDate {
|
|
|
71
69
|
* format: yyyy-mm-dd
|
|
72
70
|
*/
|
|
73
71
|
min: string;
|
|
74
|
-
validateMin(newValue:
|
|
72
|
+
validateMin(newValue: string): void;
|
|
75
73
|
/**
|
|
76
74
|
* Define input maximum date
|
|
77
75
|
* format: yyyy-mm-dd
|
|
78
76
|
*/
|
|
79
77
|
max: string;
|
|
80
|
-
validateMax(newValue:
|
|
78
|
+
validateMax(newValue: string): void;
|
|
81
79
|
/**
|
|
82
80
|
* Component classes
|
|
83
81
|
*/
|
|
@@ -87,9 +85,19 @@ export declare class MgInputDate {
|
|
|
87
85
|
*/
|
|
88
86
|
errorMessage: string;
|
|
89
87
|
/**
|
|
90
|
-
*
|
|
88
|
+
* Emited event when value change
|
|
91
89
|
*/
|
|
92
90
|
valueChange: EventEmitter<string>;
|
|
91
|
+
/**
|
|
92
|
+
* Emited event when checking validity
|
|
93
|
+
*/
|
|
94
|
+
inputValid: EventEmitter<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Public method to display errors
|
|
97
|
+
*
|
|
98
|
+
* @returns {Promise<void>}
|
|
99
|
+
*/
|
|
100
|
+
displayError(): Promise<void>;
|
|
93
101
|
/**
|
|
94
102
|
* Handle input event
|
|
95
103
|
*/
|
|
@@ -100,7 +108,9 @@ export declare class MgInputDate {
|
|
|
100
108
|
private handleBlur;
|
|
101
109
|
/**
|
|
102
110
|
* Date format validation
|
|
103
|
-
*
|
|
111
|
+
*
|
|
112
|
+
* @param {string} date date to validate
|
|
113
|
+
* @returns {void}
|
|
104
114
|
*/
|
|
105
115
|
private validateDateFormat;
|
|
106
116
|
/**
|
|
@@ -109,20 +119,35 @@ export declare class MgInputDate {
|
|
|
109
119
|
private checkValidity;
|
|
110
120
|
/**
|
|
111
121
|
* get input error code
|
|
112
|
-
*
|
|
122
|
+
*
|
|
123
|
+
* @returns {null | InputError} error code
|
|
113
124
|
*/
|
|
114
125
|
private getInputError;
|
|
115
126
|
/**
|
|
116
127
|
* Set error message
|
|
128
|
+
*
|
|
129
|
+
* @returns {void}
|
|
117
130
|
*/
|
|
118
131
|
private setErrorMessage;
|
|
119
132
|
/**
|
|
120
133
|
* Check input errors
|
|
134
|
+
*
|
|
135
|
+
* @returns {void}
|
|
121
136
|
*/
|
|
122
137
|
private checkError;
|
|
123
138
|
/*************
|
|
124
139
|
* Lifecycle *
|
|
125
140
|
*************/
|
|
126
|
-
|
|
127
|
-
|
|
141
|
+
/**
|
|
142
|
+
* Check if component props are well configured on init
|
|
143
|
+
*
|
|
144
|
+
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
145
|
+
*/
|
|
146
|
+
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
147
|
+
/**
|
|
148
|
+
* Render
|
|
149
|
+
*
|
|
150
|
+
* @returns {HTMLElement} HTML Element
|
|
151
|
+
*/
|
|
152
|
+
render(): HTMLElement;
|
|
128
153
|
}
|
|
@@ -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';
|
|
@@ -14,6 +13,9 @@ export declare class MgInputNumeric {
|
|
|
14
13
|
/**************
|
|
15
14
|
* Decorators *
|
|
16
15
|
**************/
|
|
16
|
+
/**
|
|
17
|
+
* Get component DOM element
|
|
18
|
+
*/
|
|
17
19
|
element: HTMLMgInputNumericElement;
|
|
18
20
|
/**
|
|
19
21
|
* Component value
|
|
@@ -24,15 +26,14 @@ export declare class MgInputNumeric {
|
|
|
24
26
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
25
27
|
* If not set, it will be created.
|
|
26
28
|
*/
|
|
27
|
-
identifier
|
|
29
|
+
identifier: string;
|
|
28
30
|
/**
|
|
29
31
|
* Input name
|
|
30
32
|
* If not set the value equals the identifier
|
|
31
33
|
*/
|
|
32
|
-
name
|
|
34
|
+
name: string;
|
|
33
35
|
/**
|
|
34
36
|
* Input label
|
|
35
|
-
* Required
|
|
36
37
|
*/
|
|
37
38
|
label: string;
|
|
38
39
|
/**
|
|
@@ -114,60 +115,98 @@ export declare class MgInputNumeric {
|
|
|
114
115
|
*/
|
|
115
116
|
errorMessage: string;
|
|
116
117
|
/**
|
|
117
|
-
*
|
|
118
|
-
* Change on focus/blur
|
|
118
|
+
* Define if input has focus
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
hasFocus: boolean;
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* Emited event when value change
|
|
123
123
|
*/
|
|
124
124
|
valueChange: EventEmitter<number>;
|
|
125
|
+
/**
|
|
126
|
+
* Emited event when checking validity
|
|
127
|
+
*/
|
|
128
|
+
inputValid: EventEmitter<boolean>;
|
|
129
|
+
/**
|
|
130
|
+
* Public method to display errors
|
|
131
|
+
*
|
|
132
|
+
* @returns {Promise<void>}
|
|
133
|
+
*/
|
|
134
|
+
displayError(): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Displayed value in input
|
|
137
|
+
* Change on focus/blur
|
|
138
|
+
*
|
|
139
|
+
* @returns {string} display value
|
|
140
|
+
*/
|
|
141
|
+
private displayValue;
|
|
125
142
|
/**
|
|
126
143
|
* Handle input event
|
|
144
|
+
*
|
|
145
|
+
* @returns {void}
|
|
127
146
|
*/
|
|
128
147
|
private handleInput;
|
|
129
148
|
/**
|
|
130
149
|
* Handle focus event
|
|
150
|
+
*
|
|
151
|
+
* @returns {void}
|
|
131
152
|
*/
|
|
132
153
|
private handleFocus;
|
|
133
154
|
/**
|
|
134
155
|
* Handle blur event
|
|
156
|
+
*
|
|
157
|
+
* @returns {void}
|
|
135
158
|
*/
|
|
136
159
|
private handleBlur;
|
|
137
160
|
/**
|
|
138
161
|
* Check if input is valid
|
|
162
|
+
*
|
|
163
|
+
* @returns {void}
|
|
139
164
|
*/
|
|
140
165
|
private checkValidity;
|
|
141
166
|
/**
|
|
142
167
|
* Set error message
|
|
168
|
+
*
|
|
169
|
+
* @returns {void}
|
|
143
170
|
*/
|
|
144
171
|
private setErrorMessage;
|
|
145
172
|
/**
|
|
146
173
|
* Check input errors
|
|
174
|
+
*
|
|
175
|
+
* @returns {void}
|
|
147
176
|
*/
|
|
148
177
|
private checkError;
|
|
149
178
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
179
|
+
* Get input error code
|
|
180
|
+
*
|
|
181
|
+
* @returns {null | InputError} error code
|
|
152
182
|
*/
|
|
153
183
|
private getInputError;
|
|
154
184
|
/**
|
|
155
185
|
* Format value based on type
|
|
156
|
-
*
|
|
186
|
+
*
|
|
187
|
+
* @param {number} value value to format
|
|
157
188
|
* @returns {string} formated local value
|
|
158
189
|
*/
|
|
159
190
|
private formatValue;
|
|
160
191
|
/**
|
|
161
192
|
* Validate append slot
|
|
193
|
+
*
|
|
194
|
+
* @returns {void}
|
|
162
195
|
*/
|
|
163
196
|
private validateAppendSlot;
|
|
164
197
|
/*************
|
|
165
198
|
* Lifecycle *
|
|
166
199
|
*************/
|
|
167
|
-
componentWillLoad(): NodeJS.Timeout;
|
|
168
|
-
componentDidLoad(): void;
|
|
169
200
|
/**
|
|
170
201
|
* Check if component props are well configured on init
|
|
202
|
+
*
|
|
203
|
+
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
204
|
+
*/
|
|
205
|
+
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
206
|
+
/**
|
|
207
|
+
* Render
|
|
208
|
+
*
|
|
209
|
+
* @returns {HTMLElement} HTML Element
|
|
171
210
|
*/
|
|
172
|
-
render():
|
|
211
|
+
render(): HTMLElement;
|
|
173
212
|
}
|