@mgdis/mg-components 5.0.0 → 5.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/loader.cjs.js +1 -1
- package/dist/cjs/{mg-badge_24.cjs.entry.js → mg-badge_27.cjs.entry.js} +892 -295
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
- package/dist/collection/components/atoms/mg-button/doc/mg-button.stories.js +1 -0
- package/dist/collection/components/atoms/mg-button/mg-button.css +8 -0
- package/dist/collection/components/atoms/mg-button/mg-button.js +41 -3
- package/dist/collection/components/atoms/mg-card/doc/mg-card.stories.js +18 -0
- package/dist/collection/components/atoms/mg-card/mg-card.css +7 -0
- package/dist/collection/components/atoms/mg-card/mg-card.js +26 -0
- package/dist/collection/components/atoms/mg-divider/doc/mg-divider.stories.js +18 -0
- package/dist/collection/components/atoms/mg-divider/mg-divider.css +9 -0
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +57 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +0 -5
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +0 -20
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +2 -1
- package/dist/collection/components/molecules/inputs/MgInput.js +3 -11
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +41 -20
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +50 -39
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +25 -6
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +42 -33
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +25 -6
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +36 -17
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +35 -14
- package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +2 -3
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +28 -6
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +36 -17
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +25 -6
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +38 -19
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +25 -6
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +37 -18
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
- package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +1 -0
- package/dist/collection/components/molecules/mg-details/mg-details.css +29 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +26 -4
- package/dist/collection/components/molecules/mg-form/mg-form.js +73 -27
- package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +6 -6
- package/dist/collection/components/molecules/mg-message/mg-message.js +1 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +2 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +48 -4
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +5 -14
- package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +0 -5
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
- package/dist/collection/utils/components.utils.js +10 -6
- package/dist/collection/utils/unit.test.utils.js +51 -0
- package/dist/collection/variables.css +23 -8
- package/dist/components/MgInput.js +4 -12
- package/dist/components/components.utils.js +11 -7
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/mg-badge2.js +1 -1
- package/dist/components/mg-button2.js +23 -4
- package/dist/components/mg-card.d.ts +11 -0
- package/dist/components/mg-card.js +42 -0
- package/dist/components/mg-details.js +8 -3
- package/dist/components/mg-divider.d.ts +11 -0
- package/dist/components/mg-divider.js +51 -0
- package/dist/components/mg-form.js +67 -26
- package/dist/components/mg-input-checkbox.js +36 -21
- package/dist/components/mg-input-date.js +44 -39
- package/dist/components/mg-input-numeric.js +37 -34
- package/dist/components/mg-input-password.js +32 -19
- package/dist/components/mg-input-radio.js +30 -15
- package/dist/components/mg-input-select2.js +32 -19
- package/dist/components/mg-input-text2.js +34 -21
- package/dist/components/mg-input-textarea.js +32 -19
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-message.js +1 -1
- package/dist/components/mg-modal.js +49 -5
- package/dist/components/mg-panel.js +1 -1
- package/dist/components/mg-popover.js +3 -2
- package/dist/components/mg-tag.js +1 -1
- package/dist/components/mg-tooltip2.js +2 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mg-badge_24.entry.js → mg-badge_27.entry.js} +839 -245
- package/dist/esm/mg-components.js +1 -1
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-b2b07c3f.entry.js +1 -0
- package/dist/mg-components/variables.css +23 -8
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +8 -2
- package/dist/types/components/atoms/mg-card/doc/mg-card.stories.d.ts +6 -0
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +11 -0
- package/dist/types/components/atoms/mg-divider/doc/mg-divider.stories.d.ts +6 -0
- package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +15 -0
- package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +0 -8
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +10 -8
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +3 -8
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +3 -8
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -3
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -3
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +5 -4
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -3
- package/dist/types/components/molecules/mg-details/mg-details.d.ts +4 -0
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +21 -1
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +3 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +11 -0
- package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +0 -6
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +1 -1
- package/dist/types/components.d.ts +55 -6
- package/dist/types/utils/components.utils.d.ts +7 -3
- package/package.json +9 -9
- package/dist/cjs/index-179621c8.js +0 -244
- package/dist/cjs/mg-modal.cjs.entry.js +0 -128
- package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +0 -20
- package/dist/collection/utils/test.utils.js +0 -38
- package/dist/esm/index-7efedd97.js +0 -238
- package/dist/esm/mg-modal.entry.js +0 -124
- package/dist/mg-components/p-5f89600c.js +0 -1
- package/dist/mg-components/p-b60a4c53.entry.js +0 -1
- package/dist/mg-components/p-df947fa5.entry.js +0 -1
- package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +0 -8
- package/dist/types/utils/test.utils.d.ts +0 -17
|
@@ -7,6 +7,7 @@ export declare class MgButton {
|
|
|
7
7
|
private onClickElementFn;
|
|
8
8
|
private classDisabled;
|
|
9
9
|
private classLoading;
|
|
10
|
+
private classFullWidth;
|
|
10
11
|
/**************
|
|
11
12
|
* Decorators *
|
|
12
13
|
**************/
|
|
@@ -32,6 +33,11 @@ export declare class MgButton {
|
|
|
32
33
|
* Define button type
|
|
33
34
|
*/
|
|
34
35
|
type: ButtonType;
|
|
36
|
+
/**
|
|
37
|
+
* Set button to full-width
|
|
38
|
+
*/
|
|
39
|
+
fullWidth: boolean;
|
|
40
|
+
validateFullWidth(newValue: any): void;
|
|
35
41
|
/**
|
|
36
42
|
* Define form id to attach button with.
|
|
37
43
|
* If this attribute is not set, the <button> is associated with its ancestor <form> element.
|
|
@@ -71,14 +77,14 @@ export declare class MgButton {
|
|
|
71
77
|
*/
|
|
72
78
|
private handleClick;
|
|
73
79
|
/**
|
|
74
|
-
* Handle
|
|
80
|
+
* Handle onKeydown event
|
|
75
81
|
*
|
|
76
82
|
* @param {KeyboardEvent} event keyboard event
|
|
77
83
|
* @returns {void}
|
|
78
84
|
*/
|
|
79
85
|
private handleKeydown;
|
|
80
86
|
/**
|
|
81
|
-
* Handle
|
|
87
|
+
* Handle onKeyup event
|
|
82
88
|
*
|
|
83
89
|
* @param {KeyboardEvent} event keyboard event
|
|
84
90
|
* @returns {void}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class MgDivider {
|
|
2
|
+
/**************
|
|
3
|
+
* Decorators *
|
|
4
|
+
**************/
|
|
5
|
+
/**
|
|
6
|
+
* Define component size
|
|
7
|
+
*/
|
|
8
|
+
size: 'regular' | 'full';
|
|
9
|
+
/**
|
|
10
|
+
* Render
|
|
11
|
+
*
|
|
12
|
+
* @returns {HTMLElement} HTML Element
|
|
13
|
+
*/
|
|
14
|
+
render(): HTMLElement;
|
|
15
|
+
}
|
|
@@ -6,15 +6,9 @@ declare const _default: {
|
|
|
6
6
|
};
|
|
7
7
|
argTypes: {
|
|
8
8
|
placement: {
|
|
9
|
-
options: readonly ["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
|
|
10
9
|
control: {
|
|
11
10
|
type: string;
|
|
12
11
|
};
|
|
13
|
-
table: {
|
|
14
|
-
defaultValue: {
|
|
15
|
-
summary: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
12
|
};
|
|
19
13
|
};
|
|
20
14
|
};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* List of all possibles placements
|
|
3
|
-
*/
|
|
4
|
-
export declare const placements: readonly ["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
|
|
5
|
-
/**
|
|
6
|
-
* Placement type from placements
|
|
7
|
-
*/
|
|
8
|
-
export declare type Placement = typeof placements[number];
|
|
9
1
|
export declare enum Guard {
|
|
10
2
|
FOCUS = "focus",
|
|
11
3
|
HOVER_TOOLTIP_ELEMENT = "hoverTooltipGuard",
|
|
@@ -7,6 +7,7 @@ export declare class MgInputCheckbox {
|
|
|
7
7
|
************/
|
|
8
8
|
private inputs;
|
|
9
9
|
private messages;
|
|
10
|
+
private hasDisplayedError;
|
|
10
11
|
/**************
|
|
11
12
|
* Decorators *
|
|
12
13
|
**************/
|
|
@@ -58,6 +59,7 @@ export declare class MgInputCheckbox {
|
|
|
58
59
|
* Define if input is disabled
|
|
59
60
|
*/
|
|
60
61
|
disabled: boolean;
|
|
62
|
+
handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void;
|
|
61
63
|
/**
|
|
62
64
|
* Add a tooltip message next to the input
|
|
63
65
|
*/
|
|
@@ -110,20 +112,20 @@ export declare class MgInputCheckbox {
|
|
|
110
112
|
* Handle blur event
|
|
111
113
|
*/
|
|
112
114
|
private handleBlur;
|
|
113
|
-
/**
|
|
114
|
-
* Check if input is valid
|
|
115
|
-
*/
|
|
116
|
-
private checkValidity;
|
|
117
|
-
/**
|
|
118
|
-
* Check input errors
|
|
119
|
-
*/
|
|
120
|
-
private checkError;
|
|
121
115
|
/**
|
|
122
116
|
* get invalid element
|
|
123
117
|
*
|
|
124
118
|
* @returns {HTMLInputElement} element
|
|
125
119
|
*/
|
|
126
120
|
private getInvalidElement;
|
|
121
|
+
/**
|
|
122
|
+
* Check if input is valid
|
|
123
|
+
*/
|
|
124
|
+
private checkValidity;
|
|
125
|
+
/**
|
|
126
|
+
* Set input error message
|
|
127
|
+
*/
|
|
128
|
+
private setErrorMessage;
|
|
127
129
|
/*************
|
|
128
130
|
* Lifecycle *
|
|
129
131
|
*************/
|
|
@@ -7,7 +7,7 @@ export declare class MgInputDate {
|
|
|
7
7
|
private input;
|
|
8
8
|
private messages;
|
|
9
9
|
private locale;
|
|
10
|
-
private
|
|
10
|
+
private hasDisplayedError;
|
|
11
11
|
/**************
|
|
12
12
|
* Decorators *
|
|
13
13
|
**************/
|
|
@@ -53,6 +53,7 @@ export declare class MgInputDate {
|
|
|
53
53
|
* Define if input is disabled
|
|
54
54
|
*/
|
|
55
55
|
disabled: boolean;
|
|
56
|
+
handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void;
|
|
56
57
|
/**
|
|
57
58
|
* Add a tooltip message next to the input
|
|
58
59
|
*/
|
|
@@ -120,18 +121,12 @@ export declare class MgInputDate {
|
|
|
120
121
|
* @returns {null | InputError} error code
|
|
121
122
|
*/
|
|
122
123
|
private getInputError;
|
|
123
|
-
/**
|
|
124
|
-
* Set error message
|
|
125
|
-
*
|
|
126
|
-
* @returns {void}
|
|
127
|
-
*/
|
|
128
|
-
private setErrorMessage;
|
|
129
124
|
/**
|
|
130
125
|
* Check input errors
|
|
131
126
|
*
|
|
132
127
|
* @returns {void}
|
|
133
128
|
*/
|
|
134
|
-
private
|
|
129
|
+
private setErrorMessage;
|
|
135
130
|
/*************
|
|
136
131
|
* Lifecycle *
|
|
137
132
|
*************/
|
|
@@ -11,7 +11,7 @@ export declare class MgInputNumeric {
|
|
|
11
11
|
private input;
|
|
12
12
|
private locale;
|
|
13
13
|
private messages;
|
|
14
|
-
private
|
|
14
|
+
private hasDisplayedError;
|
|
15
15
|
/**************
|
|
16
16
|
* Decorators *
|
|
17
17
|
**************/
|
|
@@ -62,6 +62,7 @@ export declare class MgInputNumeric {
|
|
|
62
62
|
* Define if input is disabled
|
|
63
63
|
*/
|
|
64
64
|
disabled: boolean;
|
|
65
|
+
handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void;
|
|
65
66
|
/**
|
|
66
67
|
* Define input width
|
|
67
68
|
*/
|
|
@@ -169,17 +170,11 @@ export declare class MgInputNumeric {
|
|
|
169
170
|
*/
|
|
170
171
|
private checkValidity;
|
|
171
172
|
/**
|
|
172
|
-
* Set error message
|
|
173
|
+
* Set input error message
|
|
173
174
|
*
|
|
174
175
|
* @returns {void}
|
|
175
176
|
*/
|
|
176
177
|
private setErrorMessage;
|
|
177
|
-
/**
|
|
178
|
-
* Check input errors
|
|
179
|
-
*
|
|
180
|
-
* @returns {void}
|
|
181
|
-
*/
|
|
182
|
-
private checkError;
|
|
183
178
|
/**
|
|
184
179
|
* Get input error code
|
|
185
180
|
*
|
|
@@ -7,7 +7,7 @@ export declare class MgInputPassword {
|
|
|
7
7
|
************/
|
|
8
8
|
private input;
|
|
9
9
|
private messages;
|
|
10
|
-
private
|
|
10
|
+
private hasDisplayedError;
|
|
11
11
|
/**************
|
|
12
12
|
* Decorators *
|
|
13
13
|
**************/
|
|
@@ -58,6 +58,7 @@ export declare class MgInputPassword {
|
|
|
58
58
|
* Define if input is disabled
|
|
59
59
|
*/
|
|
60
60
|
disabled: boolean;
|
|
61
|
+
handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void;
|
|
61
62
|
/**
|
|
62
63
|
* Define input width
|
|
63
64
|
*/
|
|
@@ -113,9 +114,9 @@ export declare class MgInputPassword {
|
|
|
113
114
|
*/
|
|
114
115
|
private checkValidity;
|
|
115
116
|
/**
|
|
116
|
-
*
|
|
117
|
+
* Set input error message
|
|
117
118
|
*/
|
|
118
|
-
private
|
|
119
|
+
private setErrorMessage;
|
|
119
120
|
/*************
|
|
120
121
|
* Lifecycle *
|
|
121
122
|
*************/
|
|
@@ -7,6 +7,7 @@ export declare class MgInputRadio {
|
|
|
7
7
|
************/
|
|
8
8
|
private inputs;
|
|
9
9
|
private messages;
|
|
10
|
+
private hasDisplayedError;
|
|
10
11
|
/**************
|
|
11
12
|
* Decorators *
|
|
12
13
|
**************/
|
|
@@ -62,6 +63,7 @@ export declare class MgInputRadio {
|
|
|
62
63
|
* Define if input is disabled
|
|
63
64
|
*/
|
|
64
65
|
disabled: boolean;
|
|
66
|
+
handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void;
|
|
65
67
|
/**
|
|
66
68
|
* Add a tooltip message next to the input
|
|
67
69
|
*/
|
|
@@ -124,11 +126,11 @@ export declare class MgInputRadio {
|
|
|
124
126
|
*/
|
|
125
127
|
private checkValidity;
|
|
126
128
|
/**
|
|
127
|
-
*
|
|
129
|
+
* Set input error message
|
|
128
130
|
*
|
|
129
131
|
* @returns {void}
|
|
130
132
|
*/
|
|
131
|
-
private
|
|
133
|
+
private setErrorMessage;
|
|
132
134
|
/**
|
|
133
135
|
* get invalid element
|
|
134
136
|
*
|
|
@@ -8,7 +8,7 @@ export declare class MgInputSelect {
|
|
|
8
8
|
************/
|
|
9
9
|
private input;
|
|
10
10
|
private messages;
|
|
11
|
-
private
|
|
11
|
+
private hasDisplayedError;
|
|
12
12
|
/**************
|
|
13
13
|
* Decorators *
|
|
14
14
|
**************/
|
|
@@ -72,6 +72,7 @@ export declare class MgInputSelect {
|
|
|
72
72
|
* Define if input is disabled
|
|
73
73
|
*/
|
|
74
74
|
disabled: boolean;
|
|
75
|
+
handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void;
|
|
75
76
|
/**
|
|
76
77
|
* Define input width
|
|
77
78
|
*/
|
|
@@ -139,9 +140,9 @@ export declare class MgInputSelect {
|
|
|
139
140
|
*/
|
|
140
141
|
private checkValidity;
|
|
141
142
|
/**
|
|
142
|
-
*
|
|
143
|
+
* Set input error message
|
|
143
144
|
*/
|
|
144
|
-
private
|
|
145
|
+
private setErrorMessage;
|
|
145
146
|
/*************
|
|
146
147
|
* Lifecycle *
|
|
147
148
|
*************/
|
|
@@ -11,7 +11,7 @@ export declare class MgInputText {
|
|
|
11
11
|
private characterLeftId;
|
|
12
12
|
private input;
|
|
13
13
|
private messages;
|
|
14
|
-
private
|
|
14
|
+
private hasDisplayedError;
|
|
15
15
|
/**************
|
|
16
16
|
* Decorators *
|
|
17
17
|
**************/
|
|
@@ -75,6 +75,7 @@ export declare class MgInputText {
|
|
|
75
75
|
* Define if input is disabled
|
|
76
76
|
*/
|
|
77
77
|
disabled: boolean;
|
|
78
|
+
handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void;
|
|
78
79
|
/**
|
|
79
80
|
* Define input width
|
|
80
81
|
*/
|
|
@@ -160,13 +161,13 @@ export declare class MgInputText {
|
|
|
160
161
|
*/
|
|
161
162
|
private checkValidity;
|
|
162
163
|
/**
|
|
163
|
-
*
|
|
164
|
+
* Set input error message
|
|
164
165
|
*
|
|
165
166
|
* @returns {void}
|
|
166
167
|
*/
|
|
167
|
-
private
|
|
168
|
+
private setErrorMessage;
|
|
168
169
|
/**
|
|
169
|
-
* Validate
|
|
170
|
+
* Validate pattern configuration
|
|
170
171
|
*
|
|
171
172
|
* @returns {void}
|
|
172
173
|
*/
|
|
@@ -10,7 +10,7 @@ export declare class MgInputTextarea {
|
|
|
10
10
|
private characterLeftId;
|
|
11
11
|
private input;
|
|
12
12
|
private messages;
|
|
13
|
-
private
|
|
13
|
+
private hasDisplayedError;
|
|
14
14
|
/**************
|
|
15
15
|
* Decorators *
|
|
16
16
|
**************/
|
|
@@ -65,6 +65,7 @@ export declare class MgInputTextarea {
|
|
|
65
65
|
* Define if input is disabled
|
|
66
66
|
*/
|
|
67
67
|
disabled: boolean;
|
|
68
|
+
handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void;
|
|
68
69
|
/**
|
|
69
70
|
* Define input width
|
|
70
71
|
*/
|
|
@@ -152,9 +153,9 @@ export declare class MgInputTextarea {
|
|
|
152
153
|
*/
|
|
153
154
|
private checkValidity;
|
|
154
155
|
/**
|
|
155
|
-
*
|
|
156
|
+
* Set input error message
|
|
156
157
|
*/
|
|
157
|
-
private
|
|
158
|
+
private setErrorMessage;
|
|
158
159
|
/**
|
|
159
160
|
* Validate pattern configuration
|
|
160
161
|
*/
|
|
@@ -6,12 +6,15 @@ export declare class MgForm {
|
|
|
6
6
|
************/
|
|
7
7
|
private mgInputs;
|
|
8
8
|
private mgButtons;
|
|
9
|
-
private
|
|
9
|
+
private classAllRequired;
|
|
10
10
|
private form;
|
|
11
11
|
private messages;
|
|
12
12
|
/**************
|
|
13
13
|
* Decorators *
|
|
14
14
|
**************/
|
|
15
|
+
/**
|
|
16
|
+
* Get component DOM element
|
|
17
|
+
*/
|
|
15
18
|
element: HTMLMgFormElement;
|
|
16
19
|
/**
|
|
17
20
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
@@ -31,6 +34,7 @@ export declare class MgForm {
|
|
|
31
34
|
* Define if form is disabled
|
|
32
35
|
*/
|
|
33
36
|
disabled: boolean;
|
|
37
|
+
handleAttributeChange(): void;
|
|
34
38
|
/**
|
|
35
39
|
* Define form valid state
|
|
36
40
|
*/
|
|
@@ -43,6 +47,10 @@ export declare class MgForm {
|
|
|
43
47
|
* Component classes
|
|
44
48
|
*/
|
|
45
49
|
classList: ClassList;
|
|
50
|
+
/**
|
|
51
|
+
* Required message
|
|
52
|
+
*/
|
|
53
|
+
requiredMessage: string;
|
|
46
54
|
/**
|
|
47
55
|
* Emitted event on form validity check
|
|
48
56
|
* Tells if form is valid or not
|
|
@@ -71,7 +79,19 @@ export declare class MgForm {
|
|
|
71
79
|
* @returns {void}
|
|
72
80
|
*/
|
|
73
81
|
private checkValidity;
|
|
82
|
+
/**
|
|
83
|
+
* Handle Form Submit
|
|
84
|
+
*
|
|
85
|
+
* @param {SubmitEvent} event submit event
|
|
86
|
+
* @returns {void}
|
|
87
|
+
*/
|
|
74
88
|
private handleFormSubmit;
|
|
89
|
+
/**
|
|
90
|
+
* Set mgInputs
|
|
91
|
+
*
|
|
92
|
+
* @returns {void}
|
|
93
|
+
*/
|
|
94
|
+
private setMgInputs;
|
|
75
95
|
/*************
|
|
76
96
|
* Lifecycle *
|
|
77
97
|
*************/
|
|
@@ -4,6 +4,7 @@ export declare class MgModal {
|
|
|
4
4
|
/************
|
|
5
5
|
* Internal *
|
|
6
6
|
************/
|
|
7
|
+
private modalFocusableElements;
|
|
7
8
|
private classHide;
|
|
8
9
|
private closeButtonId;
|
|
9
10
|
private titleId;
|
|
@@ -12,6 +13,9 @@ export declare class MgModal {
|
|
|
12
13
|
/**************
|
|
13
14
|
* Decorators *
|
|
14
15
|
**************/
|
|
16
|
+
/**
|
|
17
|
+
* Get component DOM element
|
|
18
|
+
*/
|
|
15
19
|
element: HTMLMgModalElement;
|
|
16
20
|
/**
|
|
17
21
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
@@ -60,6 +64,7 @@ export declare class MgModal {
|
|
|
60
64
|
* @returns {void}
|
|
61
65
|
*/
|
|
62
66
|
handleKeyDown(event: KeyboardEvent): void;
|
|
67
|
+
private setFocus;
|
|
63
68
|
/*************
|
|
64
69
|
* Handlers *
|
|
65
70
|
*************/
|
|
@@ -78,6 +83,12 @@ export declare class MgModal {
|
|
|
78
83
|
* @returns {void}
|
|
79
84
|
*/
|
|
80
85
|
componentWillLoad(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Add observer on component to set focus when displayed
|
|
88
|
+
*
|
|
89
|
+
* @returns {void}
|
|
90
|
+
*/
|
|
91
|
+
componentDidLoad(): void;
|
|
81
92
|
/**
|
|
82
93
|
* Render
|
|
83
94
|
*
|
|
@@ -12,15 +12,9 @@ declare const _default: {
|
|
|
12
12
|
};
|
|
13
13
|
argTypes: {
|
|
14
14
|
placement: {
|
|
15
|
-
options: readonly ["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
|
|
16
15
|
control: {
|
|
17
16
|
type: string;
|
|
18
17
|
};
|
|
19
|
-
table: {
|
|
20
|
-
defaultValue: {
|
|
21
|
-
summary: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
18
|
};
|
|
25
19
|
};
|
|
26
20
|
};
|