@mgdis/mg-components 5.4.0 → 5.5.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/{index-94497267.js → index-c3450336.js} +0 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{mg-badge_29.cjs.entry.js → mg-badge_30.cjs.entry.js} +380 -625
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/atoms/mg-badge/doc/mg-badge.stories.js +0 -7
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +4 -7
- package/dist/collection/components/atoms/mg-button/doc/mg-button.stories.js +0 -7
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.css +13 -0
- package/dist/collection/components/atoms/mg-button/mg-button.js +12 -29
- package/dist/collection/components/atoms/mg-card/mg-card.css +6 -1
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +2 -3
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -6
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +5 -12
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +4 -8
- package/dist/collection/components/atoms/mg-tag/doc/mg-tag.stories.js +1 -9
- package/dist/collection/components/atoms/mg-tag/mg-tag.css +58 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +60 -15
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +6 -19
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +17 -33
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +17 -25
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +24 -47
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +17 -29
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +18 -33
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +23 -33
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +23 -41
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +23 -45
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +16 -33
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +4 -7
- package/dist/collection/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.js +8 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +4 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +13 -24
- package/dist/collection/components/molecules/mg-details/mg-details.js +4 -8
- package/dist/collection/components/molecules/mg-form/mg-form.js +8 -22
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.css +2 -2
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -6
- package/dist/collection/components/molecules/mg-message/mg-message.css +13 -19
- package/dist/collection/components/molecules/mg-message/mg-message.js +8 -27
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +12 -7
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -26
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +4 -13
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +10 -5
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +11 -22
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +13 -9
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +7 -23
- package/dist/collection/components/molecules/mg-skip-links/doc/mg-skip-links.stories.js +24 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js +1 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.css +28 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +77 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +10 -23
- package/dist/collection/locales/en/messages.json +3 -0
- package/dist/collection/locales/fr/messages.json +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +8 -0
- package/dist/components/mg-badge2.js +4 -7
- package/dist/components/mg-button2.js +13 -30
- package/dist/components/mg-card.js +1 -37
- package/dist/components/mg-card2.js +39 -0
- package/dist/components/mg-character-left2.js +2 -3
- package/dist/components/mg-details.js +4 -8
- package/dist/components/mg-divider.js +0 -6
- package/dist/components/mg-form.js +8 -22
- package/dist/components/mg-icon2.js +5 -12
- package/dist/components/mg-illustrated-message.js +1 -7
- package/dist/components/mg-input-checkbox.js +17 -33
- package/dist/components/mg-input-date.js +17 -25
- package/dist/components/mg-input-numeric.js +24 -47
- package/dist/components/mg-input-password.js +17 -29
- package/dist/components/mg-input-radio.js +18 -33
- package/dist/components/mg-input-select2.js +24 -34
- package/dist/components/mg-input-text2.js +23 -41
- package/dist/components/mg-input-textarea.js +23 -45
- package/dist/components/mg-input-title2.js +4 -8
- package/dist/components/mg-input-toggle.js +16 -33
- package/dist/components/mg-menu-item.js +14 -25
- package/dist/components/mg-menu.js +4 -7
- package/dist/components/mg-message.js +17 -30
- package/dist/components/mg-modal.js +18 -30
- package/dist/components/mg-pagination.js +4 -13
- package/dist/components/mg-panel.js +20 -25
- package/dist/components/mg-popover.js +16 -26
- package/dist/components/mg-skip-links.d.ts +11 -0
- package/dist/components/mg-skip-links.js +66 -0
- package/dist/components/mg-tabs.js +10 -23
- package/dist/components/mg-tag.js +34 -12
- package/dist/components/mg-tooltip2.js +6 -19
- package/dist/esm/{index-aad0184c.js → index-78edde1d.js} +0 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-badge_29.entry.js → mg-badge_30.entry.js} +380 -626
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/mg-components/locales/en/messages.json +3 -0
- package/dist/mg-components/locales/fr/messages.json +3 -0
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-3899d5d2.js → p-125c54ca.js} +0 -0
- package/dist/mg-components/p-4961c96c.entry.js +1 -0
- package/dist/types/components/atoms/mg-badge/doc/mg-badge.stories.d.ts +0 -11
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -1
- package/dist/types/components/atoms/mg-button/doc/mg-button.stories.d.ts +0 -11
- package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +2 -2
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +6 -6
- package/dist/types/components/atoms/mg-tag/doc/mg-tag.stories.d.ts +0 -13
- package/dist/types/components/atoms/mg-tag/mg-tag.conf.d.ts +5 -1
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +27 -6
- package/dist/types/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.d.ts +1 -0
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +1 -1
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -1
- package/dist/types/components/molecules/mg-skip-links/doc/mg-skip-links.stories.d.ts +11 -0
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.conf.d.ts +7 -0
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +34 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +2 -2
- package/dist/types/components.d.ts +37 -6
- package/dist/types/locales/index.d.ts +6 -0
- package/dist/types/stencil-public-runtime.d.ts +5 -0
- package/dist/types/utils/unit.test.utils.d.ts +42 -0
- package/package.json +36 -31
- package/readme.md +3 -1
- package/dist/mg-components/p-059a9a59.entry.js +0 -1
|
@@ -26,31 +26,6 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
26
26
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
27
27
|
// hasDisplayedError (triggered by blur event)
|
|
28
28
|
this.hasDisplayedError = false;
|
|
29
|
-
/**
|
|
30
|
-
* Input name
|
|
31
|
-
* If not set the value equals the identifier
|
|
32
|
-
*/
|
|
33
|
-
this.name = this.identifier;
|
|
34
|
-
/**
|
|
35
|
-
* Define if label is visible
|
|
36
|
-
*/
|
|
37
|
-
this.labelHide = false;
|
|
38
|
-
/**
|
|
39
|
-
* Define if input is required
|
|
40
|
-
*/
|
|
41
|
-
this.required = false;
|
|
42
|
-
/**
|
|
43
|
-
* Define if input is readonly
|
|
44
|
-
*/
|
|
45
|
-
this.readonly = false;
|
|
46
|
-
/**
|
|
47
|
-
* Define if input is disabled
|
|
48
|
-
*/
|
|
49
|
-
this.disabled = false;
|
|
50
|
-
/**
|
|
51
|
-
* Component classes
|
|
52
|
-
*/
|
|
53
|
-
this.classList = new ClassList(['mg-input--date']);
|
|
54
29
|
/**
|
|
55
30
|
* Handle input event
|
|
56
31
|
*/
|
|
@@ -129,6 +104,23 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
129
104
|
}
|
|
130
105
|
}
|
|
131
106
|
};
|
|
107
|
+
this.value = undefined;
|
|
108
|
+
this.identifier = undefined;
|
|
109
|
+
this.name = this.identifier;
|
|
110
|
+
this.label = undefined;
|
|
111
|
+
this.labelOnTop = undefined;
|
|
112
|
+
this.labelHide = false;
|
|
113
|
+
this.required = false;
|
|
114
|
+
this.readonly = false;
|
|
115
|
+
this.disabled = false;
|
|
116
|
+
this.tooltip = undefined;
|
|
117
|
+
this.helpText = undefined;
|
|
118
|
+
this.valid = undefined;
|
|
119
|
+
this.invalid = undefined;
|
|
120
|
+
this.min = undefined;
|
|
121
|
+
this.max = undefined;
|
|
122
|
+
this.classList = new ClassList(['mg-input--date']);
|
|
123
|
+
this.errorMessage = undefined;
|
|
132
124
|
}
|
|
133
125
|
validateValue(newValue) {
|
|
134
126
|
if (newValue !== undefined && newValue !== null && (typeof newValue !== 'string' || !dateRegExp.test(newValue))) {
|
|
@@ -30,53 +30,6 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
30
30
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
31
31
|
// hasDisplayedError (triggered by blur event)
|
|
32
32
|
this.hasDisplayedError = false;
|
|
33
|
-
/**
|
|
34
|
-
* Input name
|
|
35
|
-
* If not set the value equals the identifier
|
|
36
|
-
*/
|
|
37
|
-
this.name = this.identifier;
|
|
38
|
-
/**
|
|
39
|
-
* Define if label is visible
|
|
40
|
-
*/
|
|
41
|
-
this.labelHide = false;
|
|
42
|
-
/**
|
|
43
|
-
* Define if input is required
|
|
44
|
-
*/
|
|
45
|
-
this.required = false;
|
|
46
|
-
/**
|
|
47
|
-
* Define if input is readonly
|
|
48
|
-
*/
|
|
49
|
-
this.readonly = false;
|
|
50
|
-
/**
|
|
51
|
-
* Define if input is disabled
|
|
52
|
-
*/
|
|
53
|
-
this.disabled = false;
|
|
54
|
-
/**
|
|
55
|
-
* Define numeric type
|
|
56
|
-
*/
|
|
57
|
-
this.type = types[0];
|
|
58
|
-
/**
|
|
59
|
-
* Define currency
|
|
60
|
-
*/
|
|
61
|
-
this.currency = 'USD';
|
|
62
|
-
/**
|
|
63
|
-
* Override integer length
|
|
64
|
-
* integer is the number before the decimal point
|
|
65
|
-
*/
|
|
66
|
-
this.integerLength = 13;
|
|
67
|
-
/**
|
|
68
|
-
* Override decimal length
|
|
69
|
-
* decimal is the number after the decimal point
|
|
70
|
-
*/
|
|
71
|
-
this.decimalLength = 2;
|
|
72
|
-
/**
|
|
73
|
-
* Component classes
|
|
74
|
-
*/
|
|
75
|
-
this.classList = new ClassList(['mg-input--numeric']);
|
|
76
|
-
/**
|
|
77
|
-
* Define if input has focus
|
|
78
|
-
*/
|
|
79
|
-
this.hasFocus = false;
|
|
80
33
|
/**
|
|
81
34
|
* Handle input event
|
|
82
35
|
*
|
|
@@ -183,6 +136,30 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
183
136
|
this.classList.add(slotAppendInput.nodeName === 'MG-BUTTON' ? 'mg-input--is-input-group-append' : 'mg-input--is-append-input-slot-content');
|
|
184
137
|
}
|
|
185
138
|
};
|
|
139
|
+
this.value = undefined;
|
|
140
|
+
this.identifier = undefined;
|
|
141
|
+
this.name = this.identifier;
|
|
142
|
+
this.label = undefined;
|
|
143
|
+
this.labelOnTop = undefined;
|
|
144
|
+
this.labelHide = false;
|
|
145
|
+
this.placeholder = undefined;
|
|
146
|
+
this.required = false;
|
|
147
|
+
this.readonly = false;
|
|
148
|
+
this.disabled = false;
|
|
149
|
+
this.mgWidth = undefined;
|
|
150
|
+
this.tooltip = undefined;
|
|
151
|
+
this.helpText = undefined;
|
|
152
|
+
this.type = types[0];
|
|
153
|
+
this.currency = 'USD';
|
|
154
|
+
this.max = undefined;
|
|
155
|
+
this.min = undefined;
|
|
156
|
+
this.integerLength = 13;
|
|
157
|
+
this.decimalLength = 2;
|
|
158
|
+
this.valid = undefined;
|
|
159
|
+
this.invalid = undefined;
|
|
160
|
+
this.classList = new ClassList(['mg-input--numeric']);
|
|
161
|
+
this.errorMessage = undefined;
|
|
162
|
+
this.hasFocus = false;
|
|
186
163
|
}
|
|
187
164
|
validateValue(newValue) {
|
|
188
165
|
if (newValue !== undefined && newValue !== null) {
|
|
@@ -17,35 +17,6 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
17
17
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
18
18
|
// hasDisplayedError (triggered by blur event)
|
|
19
19
|
this.hasDisplayedError = false;
|
|
20
|
-
/**
|
|
21
|
-
* Input name
|
|
22
|
-
* If not set the value equals the identifier
|
|
23
|
-
*/
|
|
24
|
-
this.name = this.identifier;
|
|
25
|
-
/**
|
|
26
|
-
* Define if label is visible
|
|
27
|
-
*/
|
|
28
|
-
this.labelHide = false;
|
|
29
|
-
/**
|
|
30
|
-
* Define if input is required
|
|
31
|
-
*/
|
|
32
|
-
this.required = false;
|
|
33
|
-
/**
|
|
34
|
-
* Define if input is readonly
|
|
35
|
-
*/
|
|
36
|
-
this.readonly = false;
|
|
37
|
-
/**
|
|
38
|
-
* Define if input is disabled
|
|
39
|
-
*/
|
|
40
|
-
this.disabled = false;
|
|
41
|
-
/**
|
|
42
|
-
* Define input width
|
|
43
|
-
*/
|
|
44
|
-
this.mgWidth = 'full';
|
|
45
|
-
/**
|
|
46
|
-
* Component classes
|
|
47
|
-
*/
|
|
48
|
-
this.classList = new ClassList(['mg-input--password']);
|
|
49
20
|
/**
|
|
50
21
|
* Handle input event
|
|
51
22
|
*/
|
|
@@ -83,6 +54,23 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
83
54
|
this.errorMessage = this.messages.errors.required;
|
|
84
55
|
}
|
|
85
56
|
};
|
|
57
|
+
this.value = undefined;
|
|
58
|
+
this.identifier = undefined;
|
|
59
|
+
this.name = this.identifier;
|
|
60
|
+
this.label = undefined;
|
|
61
|
+
this.labelOnTop = undefined;
|
|
62
|
+
this.labelHide = false;
|
|
63
|
+
this.placeholder = undefined;
|
|
64
|
+
this.required = false;
|
|
65
|
+
this.readonly = false;
|
|
66
|
+
this.disabled = false;
|
|
67
|
+
this.mgWidth = 'full';
|
|
68
|
+
this.tooltip = undefined;
|
|
69
|
+
this.helpText = undefined;
|
|
70
|
+
this.valid = undefined;
|
|
71
|
+
this.invalid = undefined;
|
|
72
|
+
this.classList = new ClassList(['mg-input--password']);
|
|
73
|
+
this.errorMessage = undefined;
|
|
86
74
|
}
|
|
87
75
|
handleValue(newValue) {
|
|
88
76
|
this.valueChange.emit(newValue);
|
|
@@ -29,39 +29,6 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
29
29
|
this.inputs = [];
|
|
30
30
|
// hasDisplayedError (triggered by blur event)
|
|
31
31
|
this.hasDisplayedError = false;
|
|
32
|
-
/**
|
|
33
|
-
* Input name
|
|
34
|
-
* If not set the value equals the identifier
|
|
35
|
-
*/
|
|
36
|
-
this.name = this.identifier;
|
|
37
|
-
/**
|
|
38
|
-
* Define if label is displayed on top
|
|
39
|
-
*/
|
|
40
|
-
this.labelOnTop = false;
|
|
41
|
-
/**
|
|
42
|
-
* Define if label is visible
|
|
43
|
-
*/
|
|
44
|
-
this.labelHide = false;
|
|
45
|
-
/**
|
|
46
|
-
* Define if inputs are display verticaly
|
|
47
|
-
*/
|
|
48
|
-
this.inputVerticalList = false;
|
|
49
|
-
/**
|
|
50
|
-
* Define if input is required
|
|
51
|
-
*/
|
|
52
|
-
this.required = false;
|
|
53
|
-
/**
|
|
54
|
-
* Define if input is readonly
|
|
55
|
-
*/
|
|
56
|
-
this.readonly = false;
|
|
57
|
-
/**
|
|
58
|
-
* Define if input is disabled
|
|
59
|
-
*/
|
|
60
|
-
this.disabled = false;
|
|
61
|
-
/**
|
|
62
|
-
* Component classes
|
|
63
|
-
*/
|
|
64
|
-
this.classList = new ClassList(['mg-input--radio']);
|
|
65
32
|
/**
|
|
66
33
|
* Handle input event
|
|
67
34
|
*
|
|
@@ -111,6 +78,24 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
111
78
|
* @returns {HTMLInputElement} element
|
|
112
79
|
*/
|
|
113
80
|
this.getInvalidElement = () => this.inputs.find((input) => !input.disabled && !input.readOnly && !input.checkValidity());
|
|
81
|
+
this.value = undefined;
|
|
82
|
+
this.items = undefined;
|
|
83
|
+
this.identifier = undefined;
|
|
84
|
+
this.name = this.identifier;
|
|
85
|
+
this.label = undefined;
|
|
86
|
+
this.labelOnTop = false;
|
|
87
|
+
this.labelHide = false;
|
|
88
|
+
this.inputVerticalList = false;
|
|
89
|
+
this.required = false;
|
|
90
|
+
this.readonly = false;
|
|
91
|
+
this.disabled = false;
|
|
92
|
+
this.tooltip = undefined;
|
|
93
|
+
this.helpText = undefined;
|
|
94
|
+
this.valid = undefined;
|
|
95
|
+
this.invalid = undefined;
|
|
96
|
+
this.classList = new ClassList(['mg-input--radio']);
|
|
97
|
+
this.errorMessage = undefined;
|
|
98
|
+
this.options = undefined;
|
|
114
99
|
}
|
|
115
100
|
handleValue(newValue) {
|
|
116
101
|
this.valueChange.emit(newValue);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { M as MgInput } from './MgInput.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as allItemsAreString, C as ClassList } from './components.utils.js';
|
|
4
4
|
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$3 } from './mg-icon2.js';
|
|
6
6
|
import { d as defineCustomElement$2 } from './mg-input-title2.js';
|
|
@@ -53,39 +53,6 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
53
53
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
54
54
|
// hasDisplayedError (triggered by blur event)
|
|
55
55
|
this.hasDisplayedError = false;
|
|
56
|
-
/**
|
|
57
|
-
* Input name
|
|
58
|
-
* If not set the value equals the identifier
|
|
59
|
-
*/
|
|
60
|
-
this.name = this.identifier;
|
|
61
|
-
/**
|
|
62
|
-
* Define if label is visible
|
|
63
|
-
*/
|
|
64
|
-
this.labelHide = false;
|
|
65
|
-
/**
|
|
66
|
-
* Option to remove placeholder
|
|
67
|
-
*/
|
|
68
|
-
this.placeholderHide = false;
|
|
69
|
-
/**
|
|
70
|
-
* Option to disable placeholder
|
|
71
|
-
*/
|
|
72
|
-
this.placeholderDisabled = false;
|
|
73
|
-
/**
|
|
74
|
-
* Define if input is required
|
|
75
|
-
*/
|
|
76
|
-
this.required = false;
|
|
77
|
-
/**
|
|
78
|
-
* Define if input is readonly
|
|
79
|
-
*/
|
|
80
|
-
this.readonly = false;
|
|
81
|
-
/**
|
|
82
|
-
* Define if input is disabled
|
|
83
|
-
*/
|
|
84
|
-
this.disabled = false;
|
|
85
|
-
/**
|
|
86
|
-
* Component classes
|
|
87
|
-
*/
|
|
88
|
-
this.classList = new ClassList(['mg-input--select']);
|
|
89
56
|
/**
|
|
90
57
|
* Handle input event
|
|
91
58
|
*/
|
|
@@ -127,6 +94,29 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
127
94
|
this.errorMessage = this.messages.errors.required;
|
|
128
95
|
}
|
|
129
96
|
};
|
|
97
|
+
this.value = undefined;
|
|
98
|
+
this.items = undefined;
|
|
99
|
+
this.identifier = undefined;
|
|
100
|
+
this.name = this.identifier;
|
|
101
|
+
this.label = undefined;
|
|
102
|
+
this.labelOnTop = undefined;
|
|
103
|
+
this.labelHide = false;
|
|
104
|
+
this.placeholder = undefined;
|
|
105
|
+
this.placeholderHide = false;
|
|
106
|
+
this.placeholderDisabled = false;
|
|
107
|
+
this.required = false;
|
|
108
|
+
this.readonly = false;
|
|
109
|
+
this.disabled = false;
|
|
110
|
+
this.mgWidth = undefined;
|
|
111
|
+
this.tooltip = undefined;
|
|
112
|
+
this.helpText = undefined;
|
|
113
|
+
this.valid = undefined;
|
|
114
|
+
this.invalid = undefined;
|
|
115
|
+
this.classList = new ClassList(['mg-input--select']);
|
|
116
|
+
this.errorMessage = undefined;
|
|
117
|
+
this.options = undefined;
|
|
118
|
+
this.valueExist = undefined;
|
|
119
|
+
this.readonlyValue = undefined;
|
|
130
120
|
}
|
|
131
121
|
handleValue(newValue) {
|
|
132
122
|
if (newValue !== null) {
|
|
@@ -25,47 +25,6 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
25
25
|
this.classHasIcon = 'mg-input--has-icon';
|
|
26
26
|
// hasDisplayedError (triggered by blur event)
|
|
27
27
|
this.hasDisplayedError = false;
|
|
28
|
-
/**
|
|
29
|
-
* Input name
|
|
30
|
-
* If not set the value equals the identifier
|
|
31
|
-
*/
|
|
32
|
-
this.name = this.identifier;
|
|
33
|
-
/**
|
|
34
|
-
* Input type
|
|
35
|
-
*/
|
|
36
|
-
this.type = 'text';
|
|
37
|
-
/**
|
|
38
|
-
* Define if label is visible
|
|
39
|
-
*/
|
|
40
|
-
this.labelHide = false;
|
|
41
|
-
/**
|
|
42
|
-
* Input max length
|
|
43
|
-
*/
|
|
44
|
-
this.maxlength = 400;
|
|
45
|
-
/**
|
|
46
|
-
* Define if input is required
|
|
47
|
-
*/
|
|
48
|
-
this.required = false;
|
|
49
|
-
/**
|
|
50
|
-
* Define if input is readonly
|
|
51
|
-
*/
|
|
52
|
-
this.readonly = false;
|
|
53
|
-
/**
|
|
54
|
-
* Define if input is disabled
|
|
55
|
-
*/
|
|
56
|
-
this.disabled = false;
|
|
57
|
-
/**
|
|
58
|
-
* Define input width
|
|
59
|
-
*/
|
|
60
|
-
this.mgWidth = 'full';
|
|
61
|
-
/**
|
|
62
|
-
* Define if component should display character left
|
|
63
|
-
*/
|
|
64
|
-
this.displayCharacterLeft = true;
|
|
65
|
-
/**
|
|
66
|
-
* Component classes
|
|
67
|
-
*/
|
|
68
|
-
this.classList = new ClassList(['mg-input--text']);
|
|
69
28
|
/**
|
|
70
29
|
* Handle input event
|
|
71
30
|
*
|
|
@@ -156,6 +115,29 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
156
115
|
this.classList.add('mg-input--has-buttons-group-append');
|
|
157
116
|
}
|
|
158
117
|
};
|
|
118
|
+
this.value = undefined;
|
|
119
|
+
this.identifier = undefined;
|
|
120
|
+
this.name = this.identifier;
|
|
121
|
+
this.label = undefined;
|
|
122
|
+
this.type = 'text';
|
|
123
|
+
this.icon = undefined;
|
|
124
|
+
this.labelOnTop = undefined;
|
|
125
|
+
this.labelHide = false;
|
|
126
|
+
this.placeholder = undefined;
|
|
127
|
+
this.maxlength = 400;
|
|
128
|
+
this.required = false;
|
|
129
|
+
this.readonly = false;
|
|
130
|
+
this.disabled = false;
|
|
131
|
+
this.mgWidth = 'full';
|
|
132
|
+
this.pattern = undefined;
|
|
133
|
+
this.patternErrorMessage = undefined;
|
|
134
|
+
this.tooltip = undefined;
|
|
135
|
+
this.displayCharacterLeft = true;
|
|
136
|
+
this.helpText = undefined;
|
|
137
|
+
this.valid = undefined;
|
|
138
|
+
this.invalid = undefined;
|
|
139
|
+
this.classList = new ClassList(['mg-input--text']);
|
|
140
|
+
this.errorMessage = undefined;
|
|
159
141
|
}
|
|
160
142
|
handleValue(newValue) {
|
|
161
143
|
this.valueChange.emit(newValue);
|
|
@@ -24,51 +24,6 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
24
24
|
this.classHasDisplayCharacterLeft = 'mg-input--has-display-character-left';
|
|
25
25
|
// hasDisplayedError (triggered by blur event)
|
|
26
26
|
this.hasDisplayedError = false;
|
|
27
|
-
/**
|
|
28
|
-
* Input name
|
|
29
|
-
* If not set the value equals the identifier
|
|
30
|
-
*/
|
|
31
|
-
this.name = this.identifier;
|
|
32
|
-
/**
|
|
33
|
-
* Define if label is visible
|
|
34
|
-
*/
|
|
35
|
-
this.labelHide = false;
|
|
36
|
-
/**
|
|
37
|
-
* Input max length
|
|
38
|
-
*/
|
|
39
|
-
this.maxlength = 4000;
|
|
40
|
-
/**
|
|
41
|
-
* Define if input is required
|
|
42
|
-
*/
|
|
43
|
-
this.required = false;
|
|
44
|
-
/**
|
|
45
|
-
* Define if input is readonly
|
|
46
|
-
*/
|
|
47
|
-
this.readonly = false;
|
|
48
|
-
/**
|
|
49
|
-
* Define if input is disabled
|
|
50
|
-
*/
|
|
51
|
-
this.disabled = false;
|
|
52
|
-
/**
|
|
53
|
-
* Define input width
|
|
54
|
-
*/
|
|
55
|
-
this.mgWidth = 'full';
|
|
56
|
-
/**
|
|
57
|
-
* Define the number of visible text lines for the control
|
|
58
|
-
*/
|
|
59
|
-
this.rows = 3;
|
|
60
|
-
/**
|
|
61
|
-
* Define if component should display character left
|
|
62
|
-
*/
|
|
63
|
-
this.displayCharacterLeft = true;
|
|
64
|
-
/**
|
|
65
|
-
* Define if input is resizable
|
|
66
|
-
*/
|
|
67
|
-
this.resizable = 'none';
|
|
68
|
-
/**
|
|
69
|
-
* Component classes
|
|
70
|
-
*/
|
|
71
|
-
this.classList = new ClassList(['mg-input--textarea']);
|
|
72
27
|
/**
|
|
73
28
|
* Handle input event
|
|
74
29
|
*/
|
|
@@ -139,6 +94,29 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
139
94
|
throw new Error('<mg-input-textarea> prop "pattern" must be paired with the prop "patternErrorMessage"');
|
|
140
95
|
}
|
|
141
96
|
};
|
|
97
|
+
this.value = undefined;
|
|
98
|
+
this.identifier = undefined;
|
|
99
|
+
this.name = this.identifier;
|
|
100
|
+
this.label = undefined;
|
|
101
|
+
this.labelOnTop = undefined;
|
|
102
|
+
this.labelHide = false;
|
|
103
|
+
this.placeholder = undefined;
|
|
104
|
+
this.maxlength = 4000;
|
|
105
|
+
this.required = false;
|
|
106
|
+
this.readonly = false;
|
|
107
|
+
this.disabled = false;
|
|
108
|
+
this.mgWidth = 'full';
|
|
109
|
+
this.pattern = undefined;
|
|
110
|
+
this.patternErrorMessage = undefined;
|
|
111
|
+
this.rows = 3;
|
|
112
|
+
this.tooltip = undefined;
|
|
113
|
+
this.displayCharacterLeft = true;
|
|
114
|
+
this.helpText = undefined;
|
|
115
|
+
this.valid = undefined;
|
|
116
|
+
this.invalid = undefined;
|
|
117
|
+
this.resizable = 'none';
|
|
118
|
+
this.classList = new ClassList(['mg-input--textarea']);
|
|
119
|
+
this.errorMessage = undefined;
|
|
142
120
|
}
|
|
143
121
|
handleValue(newValue) {
|
|
144
122
|
this.checkValidity();
|
|
@@ -6,17 +6,13 @@ const MgInputTitle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
|
-
/**
|
|
10
|
-
* Switch from label to fieldset sementic
|
|
11
|
-
*/
|
|
12
|
-
this.isLegend = false;
|
|
13
|
-
/**
|
|
14
|
-
* Component parent tagname
|
|
15
|
-
*/
|
|
16
|
-
this.tagName = 'label';
|
|
17
9
|
this.getTagName = () => {
|
|
18
10
|
this.tagName = this.isLegend ? 'legend' : 'label';
|
|
19
11
|
};
|
|
12
|
+
this.identifier = undefined;
|
|
13
|
+
this.required = undefined;
|
|
14
|
+
this.isLegend = false;
|
|
15
|
+
this.tagName = 'label';
|
|
20
16
|
}
|
|
21
17
|
validateIdentifier(newValue) {
|
|
22
18
|
if (typeof newValue !== 'string' || newValue.trim() === '') {
|
|
@@ -30,39 +30,6 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
30
30
|
this.classIsActive = 'mg-input--toggle-is-active';
|
|
31
31
|
this.classOnOff = 'mg-input--toggle-on-off';
|
|
32
32
|
this.classIcon = 'mg-input--toggle-icon';
|
|
33
|
-
/**
|
|
34
|
-
* Input name
|
|
35
|
-
* If not set the value equals the identifier
|
|
36
|
-
*/
|
|
37
|
-
this.name = this.identifier;
|
|
38
|
-
/**
|
|
39
|
-
* Define if label is visible
|
|
40
|
-
*/
|
|
41
|
-
this.labelHide = false;
|
|
42
|
-
/**
|
|
43
|
-
* Define if toggle have on/off style
|
|
44
|
-
*/
|
|
45
|
-
this.isOnOff = false;
|
|
46
|
-
/**
|
|
47
|
-
* Define if toggle display icon
|
|
48
|
-
*/
|
|
49
|
-
this.isIcon = false;
|
|
50
|
-
/**
|
|
51
|
-
* Define if input is readonly
|
|
52
|
-
*/
|
|
53
|
-
this.readonly = false;
|
|
54
|
-
/**
|
|
55
|
-
* Define if input is disabled
|
|
56
|
-
*/
|
|
57
|
-
this.disabled = false;
|
|
58
|
-
/**
|
|
59
|
-
* Component classes
|
|
60
|
-
*/
|
|
61
|
-
this.classList = new ClassList(['mg-input--toggle']);
|
|
62
|
-
/**
|
|
63
|
-
* Checked internal value
|
|
64
|
-
*/
|
|
65
|
-
this.checked = false;
|
|
66
33
|
/**
|
|
67
34
|
* Change checked value
|
|
68
35
|
*
|
|
@@ -87,6 +54,22 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
87
54
|
slots.forEach(slot => slot.setAttribute('title', slot.textContent));
|
|
88
55
|
}
|
|
89
56
|
};
|
|
57
|
+
this.value = undefined;
|
|
58
|
+
this.items = undefined;
|
|
59
|
+
this.identifier = undefined;
|
|
60
|
+
this.name = this.identifier;
|
|
61
|
+
this.label = undefined;
|
|
62
|
+
this.labelOnTop = undefined;
|
|
63
|
+
this.labelHide = false;
|
|
64
|
+
this.isOnOff = false;
|
|
65
|
+
this.isIcon = false;
|
|
66
|
+
this.readonly = false;
|
|
67
|
+
this.disabled = false;
|
|
68
|
+
this.tooltip = undefined;
|
|
69
|
+
this.helpText = undefined;
|
|
70
|
+
this.classList = new ClassList(['mg-input--toggle']);
|
|
71
|
+
this.options = undefined;
|
|
72
|
+
this.checked = false;
|
|
90
73
|
}
|
|
91
74
|
handleValue(newValue) {
|
|
92
75
|
// Swich to the right option
|