@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
|
@@ -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
|
|
22
|
+
identifier: string;
|
|
23
23
|
/**
|
|
24
24
|
* Input name
|
|
25
25
|
* If not set the value equals the identifier
|
|
26
26
|
*/
|
|
27
|
-
name
|
|
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
|
|
70
|
+
* Define input valid state
|
|
72
71
|
*/
|
|
73
72
|
valid: boolean;
|
|
74
73
|
/**
|
|
75
|
-
* Define input
|
|
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
|
-
*
|
|
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
|
-
|
|
110
|
-
|
|
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,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:
|
|
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
|
-
*
|
|
71
|
+
* Define input valid state
|
|
73
72
|
*/
|
|
74
73
|
valid: boolean;
|
|
75
74
|
/**
|
|
76
|
-
*
|
|
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
|
-
*
|
|
131
|
+
*
|
|
132
|
+
* @returns {HTMLInputElement} element
|
|
114
133
|
*/
|
|
115
134
|
private getInvalidElement;
|
|
116
135
|
/*************
|
|
117
136
|
* Lifecycle *
|
|
118
137
|
*************/
|
|
119
|
-
|
|
120
|
-
|
|
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
|
}
|
|
@@ -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:
|
|
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
|
-
*
|
|
108
|
+
* Does value match any item option
|
|
109
|
+
*/
|
|
110
|
+
readonlyValue: string;
|
|
111
|
+
/**
|
|
112
|
+
* Emited event when value change
|
|
110
113
|
*/
|
|
111
|
-
valueChange: EventEmitter<
|
|
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
|
-
|
|
132
|
-
|
|
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
|
|
28
|
+
identifier: string;
|
|
28
29
|
/**
|
|
29
30
|
* Input name
|
|
30
31
|
* If not set the value equals the identifier
|
|
31
32
|
*/
|
|
32
|
-
name
|
|
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
|
|
104
|
+
* Define input valid state
|
|
105
105
|
*/
|
|
106
106
|
valid: boolean;
|
|
107
107
|
/**
|
|
108
|
-
* Define input
|
|
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
|
-
*
|
|
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
|
-
|
|
158
|
-
componentDidLoad(): void;
|
|
159
|
-
render(): any;
|
|
195
|
+
render(): HTMLElement;
|
|
160
196
|
}
|
|
@@ -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
|
|
23
|
+
identifier: string;
|
|
24
24
|
/**
|
|
25
25
|
* Input name
|
|
26
26
|
* If not set the value equals the identifier
|
|
27
27
|
*/
|
|
28
|
-
name
|
|
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
|
|
95
|
+
* Define input valid state
|
|
97
96
|
*/
|
|
98
97
|
valid: boolean;
|
|
99
98
|
/**
|
|
100
|
-
* Define input
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
149
|
-
|
|
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
|
}
|
|
@@ -18,26 +18,27 @@ export declare class MgInputToggle {
|
|
|
18
18
|
/**
|
|
19
19
|
* Component value
|
|
20
20
|
*/
|
|
21
|
-
value
|
|
21
|
+
value: any;
|
|
22
|
+
handleValue(newValue: any): void;
|
|
22
23
|
/**
|
|
23
24
|
* Items are the possible options to select
|
|
24
|
-
*
|
|
25
|
+
*
|
|
26
|
+
* @returns {void}
|
|
25
27
|
*/
|
|
26
28
|
items: string[] | ToggleValue[];
|
|
27
|
-
validateItems(newValue:
|
|
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
|
|
34
|
+
identifier: string;
|
|
33
35
|
/**
|
|
34
36
|
* Input name
|
|
35
37
|
* If not set the value equals the identifier
|
|
36
38
|
*/
|
|
37
|
-
name
|
|
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
|
|
55
|
+
isOnOff: boolean;
|
|
55
56
|
handleIsOnOff(newValue: boolean): void;
|
|
56
57
|
/**
|
|
57
58
|
* Define if toggle display icon
|
|
58
59
|
*/
|
|
59
|
-
isIcon
|
|
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:
|
|
92
|
+
handleChecked(newValue: boolean): void;
|
|
92
93
|
/**
|
|
93
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Render
|
|
128
|
+
*
|
|
129
|
+
* @returns {HTMLElement} HTML Element
|
|
130
|
+
*/
|
|
131
|
+
render(): HTMLElement;
|
|
117
132
|
}
|