@mgdis/mg-components 6.15.0 → 6.17.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/events.utils-D5SAtkpQ.js +25 -0
- package/dist/cjs/{index-BGxkpQwi.js → index-DCZEYvlH.js} +48 -29
- package/dist/cjs/{index-iUZvsp-F.js → index-TUElr4Wv.js} +18 -30
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +100 -365
- package/dist/cjs/mg-alert.cjs.entry.js +2 -2
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-input-combobox.cjs.entry.js +78 -140
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +4 -4
- package/dist/cjs/{mg-input.conf-CwjEAih3.js → mg-input.conf-WTsvDfpC.js} +0 -7
- package/dist/cjs/mg-loader.cjs.entry.js +2 -2
- package/dist/cjs/mg-progress.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +5 -5
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +7 -7
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +6 -6
- package/dist/collection/components/atoms/mg-button/mg-button.js +13 -13
- package/dist/collection/components/atoms/mg-card/mg-card.js +2 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +32 -26
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -3
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +2 -2
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +6 -6
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +0 -6
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +37 -108
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +1 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +6 -8
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +42 -99
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +82 -167
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +27 -44
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +40 -55
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +26 -26
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +32 -86
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +26 -27
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +33 -82
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +33 -34
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +32 -32
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +27 -161
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +2 -4
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +4 -5
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +7 -7
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -4
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +4 -4
- package/dist/collection/components/molecules/mg-details/mg-details.js +6 -6
- package/dist/collection/components/molecules/mg-form/mg-form.js +13 -13
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +2 -2
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +3 -3
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +6 -6
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +7 -8
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +13 -13
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +6 -6
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +6 -6
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +0 -1
- package/dist/collection/components/molecules/mg-table/mg-table.js +2 -3
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +6 -7
- package/dist/collection/locales/en/messages.json +8 -13
- package/dist/collection/locales/fr/messages.json +8 -13
- package/dist/components/index2.js +1 -1
- package/dist/components/index3.js +18 -30
- package/dist/components/mg-action-more.js +4 -2
- package/dist/components/mg-alert.js +4 -2
- package/dist/components/mg-badge2.js +4 -2
- package/dist/components/mg-button2.js +4 -2
- package/dist/components/mg-card2.js +4 -2
- package/dist/components/mg-character-left2.js +4 -2
- package/dist/components/mg-details.js +99 -1
- package/dist/components/mg-divider2.js +4 -2
- package/dist/components/mg-form.js +4 -2
- package/dist/components/mg-icon2.js +29 -21
- package/dist/components/mg-illustrated-message.js +4 -2
- package/dist/components/mg-input-checkbox-paginated2.js +6 -7
- package/dist/components/mg-input-checkbox.js +23 -65
- package/dist/components/mg-input-combobox.js +64 -132
- package/dist/components/mg-input-date.js +8 -29
- package/dist/components/mg-input-numeric.js +8 -27
- package/dist/components/mg-input-password.js +6 -10
- package/dist/components/mg-input-radio.js +16 -55
- package/dist/components/mg-input-rich-text-editor.js +6 -10
- package/dist/components/mg-input-select2.js +12 -46
- package/dist/components/mg-input-text2.js +6 -10
- package/dist/components/mg-input-textarea.js +6 -10
- package/dist/components/mg-input-title2.js +4 -2
- package/dist/components/mg-input-toggle.js +15 -98
- package/dist/components/mg-input2.js +26 -101
- package/dist/components/mg-item-more2.js +8 -4
- package/dist/components/mg-loader2.js +4 -2
- package/dist/components/mg-menu-item2.js +4 -2
- package/dist/components/mg-message2.js +4 -2
- package/dist/components/mg-modal.js +4 -2
- package/dist/components/mg-pagination.js +6 -10
- package/dist/components/mg-panel.js +11 -15
- package/dist/components/mg-popover-content2.js +4 -2
- package/dist/components/mg-popover2.js +4 -2
- package/dist/components/mg-progress.js +4 -2
- package/dist/components/mg-skip-links.js +4 -2
- package/dist/components/mg-table.js +4 -2
- package/dist/components/mg-tabs2.js +4 -2
- package/dist/components/mg-tag.js +4 -2
- package/dist/components/mg-tooltip-content2.js +4 -2
- package/dist/components/mg-tooltip2.js +4 -2
- package/dist/esm/events.utils-yMGqY8YG.js +23 -0
- package/dist/esm/{index-CKB-AnCZ.js → index-CNX6lq0x.js} +18 -30
- package/dist/esm/{index-DhAOnZJn.js → index-T6kOJXP1.js} +48 -29
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +96 -361
- package/dist/esm/mg-alert.entry.js +2 -2
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-input-combobox.entry.js +59 -121
- package/dist/esm/mg-input-rich-text-editor.entry.js +4 -4
- package/dist/esm/{mg-input.conf-BAUTlb6r.js → mg-input.conf-CNgv8hc5.js} +1 -7
- package/dist/esm/mg-loader.entry.js +2 -2
- package/dist/esm/mg-progress.entry.js +1 -1
- package/dist/mg-components/locales/en/messages.json +8 -13
- package/dist/mg-components/locales/fr/messages.json +8 -13
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-47e19783.entry.js → p-0e6b40d6.entry.js} +1 -1
- package/dist/mg-components/{p-67af6274.entry.js → p-397bf67b.entry.js} +1 -1
- package/dist/mg-components/{p-a0fa44cf.entry.js → p-5dc3a1fb.entry.js} +1 -1
- package/dist/mg-components/p-8a69175b.entry.js +1 -0
- package/dist/mg-components/p-CNX6lq0x.js +1 -0
- package/dist/mg-components/p-CNgv8hc5.js +1 -0
- package/dist/mg-components/p-T6kOJXP1.js +2 -0
- package/dist/mg-components/{p-420daa1e.entry.js → p-c5da335e.entry.js} +1 -1
- package/dist/mg-components/p-d84d87ea.entry.js +1 -0
- package/dist/mg-components/p-yMGqY8YG.js +1 -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 +0 -5
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +0 -13
- package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +4 -15
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +3 -21
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +2 -16
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -18
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -18
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +4 -40
- package/dist/types/components.d.ts +7 -63
- package/dist/types/stencil-public-runtime.d.ts +39 -2
- package/dist/types/types/index.d.ts +1 -1
- package/ide/intellij/web-types.json +23 -304
- package/ide/vscode/html-custom-data.json +18 -113
- package/package.json +22 -22
- package/dist/cjs/mg-input.utils-D-ASK4ua.js +0 -49
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.utils.js +0 -21
- package/dist/components/mg-details2.js +0 -99
- package/dist/components/mg-input.utils.js +0 -24
- package/dist/esm/mg-input.utils-BYI03zSi.js +0 -46
- package/dist/mg-components/p-31856cff.entry.js +0 -1
- package/dist/mg-components/p-698dfc6c.entry.js +0 -1
- package/dist/mg-components/p-BAUTlb6r.js +0 -1
- package/dist/mg-components/p-CKB-AnCZ.js +0 -1
- package/dist/mg-components/p-DhAOnZJn.js +0 -2
- package/dist/mg-components/p-PuX-pdL4.js +0 -1
- package/dist/types/components/molecules/inputs/mg-input/mg-input.utils.d.ts +0 -8
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { isValideID, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
|
|
3
3
|
import { tooltipPositions, classFieldset, classReadonly, classDisabled, classVerticalList } from "./mg-input.conf";
|
|
4
|
-
import { initLocales } from "../../../../locales";
|
|
5
|
-
const isValidErrorMessageType = (msg) => isObject(msg) && ['summary', 'details'].every(key => typeof msg[key] === 'string');
|
|
6
4
|
/**
|
|
7
5
|
* @slot - Input content
|
|
8
6
|
*/
|
|
@@ -10,8 +8,6 @@ export class MgInput {
|
|
|
10
8
|
constructor() {
|
|
11
9
|
this.slotLabel = 'label';
|
|
12
10
|
this.slotError = 'error';
|
|
13
|
-
this.slotSummary = 'summary';
|
|
14
|
-
this.slotDetails = 'details';
|
|
15
11
|
this.slotHelpText = 'help-text';
|
|
16
12
|
// style
|
|
17
13
|
this.classInput = 'mg-c-input';
|
|
@@ -53,44 +49,6 @@ export class MgInput {
|
|
|
53
49
|
* Element is disabled
|
|
54
50
|
*/
|
|
55
51
|
this.isVerticalList = false;
|
|
56
|
-
/**
|
|
57
|
-
* Render error message details element
|
|
58
|
-
*/
|
|
59
|
-
this.renderErrorDetailsMessage = (message) => {
|
|
60
|
-
var _a, _b;
|
|
61
|
-
// remove error slot if it is NOT a MG-DETAIL
|
|
62
|
-
if (((_a = this.errorMessageSlotElement) === null || _a === void 0 ? void 0 : _a.nodeName) !== 'MG-DETAILS') {
|
|
63
|
-
(_b = this.errorMessageSlotElement) === null || _b === void 0 ? void 0 : _b.remove();
|
|
64
|
-
}
|
|
65
|
-
// create OR update error summary
|
|
66
|
-
let summarySlotElement = this.element.querySelector(`[slot=${this.slotError}] [slot=${this.slotSummary}]`);
|
|
67
|
-
if (summarySlotElement === null) {
|
|
68
|
-
summarySlotElement = document.createElement('span');
|
|
69
|
-
summarySlotElement.setAttribute('slot', this.slotSummary);
|
|
70
|
-
}
|
|
71
|
-
summarySlotElement.innerHTML = message.summary;
|
|
72
|
-
// create OR update error details
|
|
73
|
-
let detailsSlotElement = this.element.querySelector(`[slot=${this.slotError}] [slot=${this.slotDetails}]`);
|
|
74
|
-
if (detailsSlotElement === null) {
|
|
75
|
-
detailsSlotElement = document.createElement('p');
|
|
76
|
-
detailsSlotElement.setAttribute('slot', this.slotDetails);
|
|
77
|
-
detailsSlotElement.classList.add('mg-c-input__error-details');
|
|
78
|
-
}
|
|
79
|
-
detailsSlotElement.innerHTML = message.details;
|
|
80
|
-
// create error mg-details
|
|
81
|
-
let mgDetails = this.element.querySelector(`mg-details[slot=${this.slotError}]`);
|
|
82
|
-
if (mgDetails === null) {
|
|
83
|
-
mgDetails = document.createElement('mg-details');
|
|
84
|
-
mgDetails.classList.add('mg-c-input__error');
|
|
85
|
-
mgDetails.toggleClosed = this.messages.details.toggleClosed;
|
|
86
|
-
mgDetails.toggleOpened = this.messages.details.toggleOpened;
|
|
87
|
-
mgDetails.hideSummary = true;
|
|
88
|
-
mgDetails.appendChild(summarySlotElement);
|
|
89
|
-
mgDetails.appendChild(detailsSlotElement);
|
|
90
|
-
this.element.appendChild(mgDetails);
|
|
91
|
-
}
|
|
92
|
-
this.errorMessageSlotElement = mgDetails;
|
|
93
|
-
};
|
|
94
52
|
/**
|
|
95
53
|
* Get tooltip node
|
|
96
54
|
* @returns mg-tooltip
|
|
@@ -128,14 +86,16 @@ export class MgInput {
|
|
|
128
86
|
}
|
|
129
87
|
}
|
|
130
88
|
watchErrorMessage(newValue) {
|
|
131
|
-
|
|
89
|
+
var _a;
|
|
90
|
+
if (newValue !== undefined) {
|
|
132
91
|
this.element.classList.add(this.classHasError);
|
|
92
|
+
this.renderErrorMessage();
|
|
133
93
|
}
|
|
134
94
|
else {
|
|
135
95
|
this.element.classList.remove(this.classHasError);
|
|
96
|
+
(_a = this.errorMessageSlotElement) === null || _a === void 0 ? void 0 : _a.remove();
|
|
97
|
+
this.errorMessageSlotElement = undefined;
|
|
136
98
|
}
|
|
137
|
-
// update error message slot
|
|
138
|
-
this.renderErrorMessageSlot();
|
|
139
99
|
}
|
|
140
100
|
watchHelpText(newValue) {
|
|
141
101
|
var _a;
|
|
@@ -164,12 +124,14 @@ export class MgInput {
|
|
|
164
124
|
// Help text
|
|
165
125
|
if (this.helpText !== undefined) {
|
|
166
126
|
this.renderHelpText();
|
|
167
|
-
ariaDescribedbyIDs.
|
|
127
|
+
if (!ariaDescribedbyIDs.has(this.helpTextId))
|
|
128
|
+
ariaDescribedbyIDs.add(this.helpTextId);
|
|
168
129
|
}
|
|
169
130
|
// Error Message
|
|
170
131
|
if (this.errorMessage !== undefined) {
|
|
171
|
-
this.
|
|
172
|
-
ariaDescribedbyIDs.
|
|
132
|
+
this.renderErrorMessage();
|
|
133
|
+
if (!ariaDescribedbyIDs.has(this.helpTextErrorId))
|
|
134
|
+
ariaDescribedbyIDs.add(this.helpTextErrorId);
|
|
173
135
|
}
|
|
174
136
|
this.element.querySelectorAll('input,select,textarea,[role="switch"]').forEach(element => {
|
|
175
137
|
if (ariaDescribedbyIDs.size > 0) {
|
|
@@ -235,41 +197,17 @@ export class MgInput {
|
|
|
235
197
|
this.element.appendChild(labelSlotElement);
|
|
236
198
|
}
|
|
237
199
|
/**
|
|
238
|
-
* Render error message
|
|
239
|
-
*/
|
|
240
|
-
renderErrorStringMessage(message) {
|
|
241
|
-
var _a;
|
|
242
|
-
// remove error slot if it is a MG-DETAIL
|
|
243
|
-
if (((_a = this.errorMessageSlotElement) === null || _a === void 0 ? void 0 : _a.nodeName) === 'MG-DETAILS') {
|
|
244
|
-
this.errorMessageSlotElement.remove();
|
|
245
|
-
}
|
|
246
|
-
// create element if it does NOT exist
|
|
247
|
-
else if (this.errorMessageSlotElement === null) {
|
|
248
|
-
this.errorMessageSlotElement = document.createElement('div');
|
|
249
|
-
this.element.appendChild(this.errorMessageSlotElement);
|
|
250
|
-
}
|
|
251
|
-
this.errorMessageSlotElement.innerHTML = message;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Render error message slot element
|
|
200
|
+
* Render error message
|
|
255
201
|
*/
|
|
256
|
-
|
|
257
|
-
var _a;
|
|
202
|
+
renderErrorMessage() {
|
|
258
203
|
this.errorMessageSlotElement = this.element.querySelector(`[slot=${this.slotError}]`);
|
|
259
|
-
if (this.
|
|
260
|
-
|
|
261
|
-
this.renderErrorStringMessage(this.errorMessage);
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
this.renderErrorDetailsMessage(this.errorMessage);
|
|
265
|
-
}
|
|
204
|
+
if (this.errorMessageSlotElement === null) {
|
|
205
|
+
this.errorMessageSlotElement = document.createElement('div');
|
|
266
206
|
this.errorMessageSlotElement.setAttribute('slot', this.slotError);
|
|
267
|
-
this.
|
|
268
|
-
}
|
|
269
|
-
else {
|
|
270
|
-
(_a = this.errorMessageSlotElement) === null || _a === void 0 ? void 0 : _a.remove();
|
|
271
|
-
this.errorMessageSlotElement = undefined;
|
|
207
|
+
this.element.appendChild(this.errorMessageSlotElement);
|
|
272
208
|
}
|
|
209
|
+
this.errorMessageSlotElement.setAttribute('id', this.helpTextErrorId);
|
|
210
|
+
this.errorMessageSlotElement.innerHTML = this.errorMessage;
|
|
273
211
|
}
|
|
274
212
|
/**
|
|
275
213
|
* Render help text message
|
|
@@ -291,9 +229,6 @@ export class MgInput {
|
|
|
291
229
|
* Check if component props are well configured on init
|
|
292
230
|
*/
|
|
293
231
|
componentWillLoad() {
|
|
294
|
-
// Get locales
|
|
295
|
-
this.messages = initLocales(this.element).messages;
|
|
296
|
-
// Validate
|
|
297
232
|
this.watchIdentifier(this.identifier);
|
|
298
233
|
this.watchLabel();
|
|
299
234
|
this.watchClass();
|
|
@@ -318,7 +253,7 @@ export class MgInput {
|
|
|
318
253
|
*/
|
|
319
254
|
render() {
|
|
320
255
|
const isGroup = this.isFieldset && !this.isReadonly;
|
|
321
|
-
return (h(Host, { key: '
|
|
256
|
+
return (h(Host, { key: '7c4c22aaa8f8d250eafa9159a103a11e637b0cca', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: '2215e7b2d96e08507579a39d8e05b3e8a3d901fb', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: 'a4dbf4e36dd3ae5437d6dcb05d807f4faa0924b7', name: this.slotLabel }), this.tooltip && (this.tooltipPosition === 'label' || this.labelOnTop) && !this.labelHide && this.renderTooltip()), h("div", { key: '8e382a4857f469a9d6f77cad613183798df4d1e1', class: "mg-c-input__input-container" }, h("div", { key: 'f9897f90d44aab19614d4d40d77a8eb270c92847', class: "mg-c-input__input" }, h("slot", { key: 'c8d809d4ff0d0e660849825f016f9267da3a2d7e' }), this.tooltip && !this.labelOnTop && (this.tooltipPosition === 'input' || this.labelHide) && this.renderTooltip()), this.helptextMessageSlotElement && (h("div", { key: 'cebd6c083d088aebcdae6f032c6cdcf2387c3e27', class: "mg-c-input__help-text" }, h("slot", { key: '923fcc78b309d197e32522052b297ef0f58b1495', name: this.slotHelpText }))), !this.isDisabled && this.errorMessage && (h("div", { key: 'e706bff54ce21191a8c0940c60f6e99a91cfb9ec', class: "mg-c-input__error", "aria-live": "assertive" }, h("slot", { key: '6524debd3640df7b5e73ef4aa4415569eef1ecd8', name: this.slotError }))))));
|
|
322
257
|
}
|
|
323
258
|
static get is() { return "mg-input"; }
|
|
324
259
|
static get encapsulation() { return "shadow"; }
|
|
@@ -336,7 +271,6 @@ export class MgInput {
|
|
|
336
271
|
return {
|
|
337
272
|
"identifier": {
|
|
338
273
|
"type": "string",
|
|
339
|
-
"attribute": "identifier",
|
|
340
274
|
"mutable": false,
|
|
341
275
|
"complexType": {
|
|
342
276
|
"original": "string",
|
|
@@ -351,11 +285,11 @@ export class MgInput {
|
|
|
351
285
|
},
|
|
352
286
|
"getter": false,
|
|
353
287
|
"setter": false,
|
|
354
|
-
"reflect": false
|
|
288
|
+
"reflect": false,
|
|
289
|
+
"attribute": "identifier"
|
|
355
290
|
},
|
|
356
291
|
"label": {
|
|
357
292
|
"type": "string",
|
|
358
|
-
"attribute": "label",
|
|
359
293
|
"mutable": false,
|
|
360
294
|
"complexType": {
|
|
361
295
|
"original": "string",
|
|
@@ -370,11 +304,11 @@ export class MgInput {
|
|
|
370
304
|
},
|
|
371
305
|
"getter": false,
|
|
372
306
|
"setter": false,
|
|
373
|
-
"reflect": false
|
|
307
|
+
"reflect": false,
|
|
308
|
+
"attribute": "label"
|
|
374
309
|
},
|
|
375
310
|
"labelOnTop": {
|
|
376
311
|
"type": "boolean",
|
|
377
|
-
"attribute": "label-on-top",
|
|
378
312
|
"mutable": false,
|
|
379
313
|
"complexType": {
|
|
380
314
|
"original": "boolean",
|
|
@@ -390,11 +324,11 @@ export class MgInput {
|
|
|
390
324
|
"getter": false,
|
|
391
325
|
"setter": false,
|
|
392
326
|
"reflect": false,
|
|
327
|
+
"attribute": "label-on-top",
|
|
393
328
|
"defaultValue": "false"
|
|
394
329
|
},
|
|
395
330
|
"labelHide": {
|
|
396
331
|
"type": "boolean",
|
|
397
|
-
"attribute": "label-hide",
|
|
398
332
|
"mutable": false,
|
|
399
333
|
"complexType": {
|
|
400
334
|
"original": "boolean",
|
|
@@ -410,11 +344,11 @@ export class MgInput {
|
|
|
410
344
|
"getter": false,
|
|
411
345
|
"setter": false,
|
|
412
346
|
"reflect": false,
|
|
347
|
+
"attribute": "label-hide",
|
|
413
348
|
"defaultValue": "false"
|
|
414
349
|
},
|
|
415
350
|
"tooltip": {
|
|
416
351
|
"type": "string",
|
|
417
|
-
"attribute": "tooltip",
|
|
418
352
|
"mutable": false,
|
|
419
353
|
"complexType": {
|
|
420
354
|
"original": "string",
|
|
@@ -429,11 +363,11 @@ export class MgInput {
|
|
|
429
363
|
},
|
|
430
364
|
"getter": false,
|
|
431
365
|
"setter": false,
|
|
432
|
-
"reflect": false
|
|
366
|
+
"reflect": false,
|
|
367
|
+
"attribute": "tooltip"
|
|
433
368
|
},
|
|
434
369
|
"tooltipPosition": {
|
|
435
370
|
"type": "string",
|
|
436
|
-
"attribute": "tooltip-position",
|
|
437
371
|
"mutable": false,
|
|
438
372
|
"complexType": {
|
|
439
373
|
"original": "TooltipPosition",
|
|
@@ -455,11 +389,11 @@ export class MgInput {
|
|
|
455
389
|
"getter": false,
|
|
456
390
|
"setter": false,
|
|
457
391
|
"reflect": false,
|
|
392
|
+
"attribute": "tooltip-position",
|
|
458
393
|
"defaultValue": "'input'"
|
|
459
394
|
},
|
|
460
395
|
"required": {
|
|
461
396
|
"type": "boolean",
|
|
462
|
-
"attribute": "required",
|
|
463
397
|
"mutable": false,
|
|
464
398
|
"complexType": {
|
|
465
399
|
"original": "boolean",
|
|
@@ -475,22 +409,16 @@ export class MgInput {
|
|
|
475
409
|
"getter": false,
|
|
476
410
|
"setter": false,
|
|
477
411
|
"reflect": false,
|
|
412
|
+
"attribute": "required",
|
|
478
413
|
"defaultValue": "false"
|
|
479
414
|
},
|
|
480
415
|
"errorMessage": {
|
|
481
416
|
"type": "string",
|
|
482
|
-
"attribute": "error-message",
|
|
483
417
|
"mutable": false,
|
|
484
418
|
"complexType": {
|
|
485
|
-
"original": "string
|
|
486
|
-
"resolved": "string
|
|
487
|
-
"references": {
|
|
488
|
-
"ErrorMessageDetailsType": {
|
|
489
|
-
"location": "import",
|
|
490
|
-
"path": "./mg-input.conf",
|
|
491
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::ErrorMessageDetailsType"
|
|
492
|
-
}
|
|
493
|
-
}
|
|
419
|
+
"original": "string",
|
|
420
|
+
"resolved": "string",
|
|
421
|
+
"references": {}
|
|
494
422
|
},
|
|
495
423
|
"required": false,
|
|
496
424
|
"optional": true,
|
|
@@ -500,11 +428,11 @@ export class MgInput {
|
|
|
500
428
|
},
|
|
501
429
|
"getter": false,
|
|
502
430
|
"setter": false,
|
|
503
|
-
"reflect": false
|
|
431
|
+
"reflect": false,
|
|
432
|
+
"attribute": "error-message"
|
|
504
433
|
},
|
|
505
434
|
"helpText": {
|
|
506
435
|
"type": "string",
|
|
507
|
-
"attribute": "help-text",
|
|
508
436
|
"mutable": false,
|
|
509
437
|
"complexType": {
|
|
510
438
|
"original": "string",
|
|
@@ -519,11 +447,11 @@ export class MgInput {
|
|
|
519
447
|
},
|
|
520
448
|
"getter": false,
|
|
521
449
|
"setter": false,
|
|
522
|
-
"reflect": false
|
|
450
|
+
"reflect": false,
|
|
451
|
+
"attribute": "help-text"
|
|
523
452
|
},
|
|
524
453
|
"ariaDescribedbyIDs": {
|
|
525
454
|
"type": "string",
|
|
526
|
-
"attribute": "aria-describedby-i-ds",
|
|
527
455
|
"mutable": true,
|
|
528
456
|
"complexType": {
|
|
529
457
|
"original": "string[] | string",
|
|
@@ -539,6 +467,7 @@ export class MgInput {
|
|
|
539
467
|
"getter": false,
|
|
540
468
|
"setter": false,
|
|
541
469
|
"reflect": false,
|
|
470
|
+
"attribute": "aria-describedby-i-ds",
|
|
542
471
|
"defaultValue": "[]"
|
|
543
472
|
}
|
|
544
473
|
};
|
package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js
CHANGED
|
@@ -4,8 +4,7 @@ import { h } from "@stencil/core";
|
|
|
4
4
|
* @param props - MgInputCheckboxList Interface Props
|
|
5
5
|
* @returns input template
|
|
6
6
|
*/
|
|
7
|
-
export const MgInputCheckboxList = (props) =>
|
|
8
|
-
props.checkboxes.length > 0 && (h("ul", { class: "mg-c-input__input-group-container", role: "list", "aria-labelledby": props.labelledby, id: props.id }, props.checkboxes.map(input => {
|
|
7
|
+
export const MgInputCheckboxList = (props) => (h("ul", { class: "mg-c-input__input-group-container", role: "list", "aria-labelledby": props.labelledby, id: props.id }, props.checkboxes.map(input => {
|
|
9
8
|
var _a, _b;
|
|
10
9
|
return (h("li", { key: input._id, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled } }, h("input", { type: "checkbox", id: input._id, name: props.name, value: (_a = input.value) === null || _a === void 0 ? void 0 : _a.toString(), checked: Boolean(input.value), required: input.required, "aria-invalid": ((_b = props.invalid) === null || _b === void 0 ? void 0 : _b.toString()) || 'false', disabled: props.disabled || input.disabled, indeterminate: input.value === null, onInput: input._handleInput, onBlur: input._handleBlur, onKeyDown: input._handleKeydown }), h("label", { htmlFor: input._id }, input.title)));
|
|
11
10
|
})));
|
|
@@ -84,7 +84,6 @@ export class MgInputCheckboxPaginated {
|
|
|
84
84
|
return {
|
|
85
85
|
"readonly": {
|
|
86
86
|
"type": "boolean",
|
|
87
|
-
"attribute": "readonly",
|
|
88
87
|
"mutable": false,
|
|
89
88
|
"complexType": {
|
|
90
89
|
"original": "boolean",
|
|
@@ -100,11 +99,11 @@ export class MgInputCheckboxPaginated {
|
|
|
100
99
|
"getter": false,
|
|
101
100
|
"setter": false,
|
|
102
101
|
"reflect": false,
|
|
102
|
+
"attribute": "readonly",
|
|
103
103
|
"defaultValue": "false"
|
|
104
104
|
},
|
|
105
105
|
"disabled": {
|
|
106
106
|
"type": "boolean",
|
|
107
|
-
"attribute": "disabled",
|
|
108
107
|
"mutable": false,
|
|
109
108
|
"complexType": {
|
|
110
109
|
"original": "boolean",
|
|
@@ -120,11 +119,11 @@ export class MgInputCheckboxPaginated {
|
|
|
120
119
|
"getter": false,
|
|
121
120
|
"setter": false,
|
|
122
121
|
"reflect": false,
|
|
122
|
+
"attribute": "disabled",
|
|
123
123
|
"defaultValue": "false"
|
|
124
124
|
},
|
|
125
125
|
"name": {
|
|
126
126
|
"type": "string",
|
|
127
|
-
"attribute": "name",
|
|
128
127
|
"mutable": false,
|
|
129
128
|
"complexType": {
|
|
130
129
|
"original": "string",
|
|
@@ -139,11 +138,11 @@ export class MgInputCheckboxPaginated {
|
|
|
139
138
|
},
|
|
140
139
|
"getter": false,
|
|
141
140
|
"setter": false,
|
|
142
|
-
"reflect": false
|
|
141
|
+
"reflect": false,
|
|
142
|
+
"attribute": "name"
|
|
143
143
|
},
|
|
144
144
|
"invalid": {
|
|
145
145
|
"type": "boolean",
|
|
146
|
-
"attribute": "invalid",
|
|
147
146
|
"mutable": false,
|
|
148
147
|
"complexType": {
|
|
149
148
|
"original": "boolean",
|
|
@@ -158,11 +157,11 @@ export class MgInputCheckboxPaginated {
|
|
|
158
157
|
},
|
|
159
158
|
"getter": false,
|
|
160
159
|
"setter": false,
|
|
161
|
-
"reflect": false
|
|
160
|
+
"reflect": false,
|
|
161
|
+
"attribute": "invalid"
|
|
162
162
|
},
|
|
163
163
|
"checkboxes": {
|
|
164
164
|
"type": "unknown",
|
|
165
|
-
"attribute": "checkboxes",
|
|
166
165
|
"mutable": false,
|
|
167
166
|
"complexType": {
|
|
168
167
|
"original": "CheckboxItem[]",
|
|
@@ -186,7 +185,6 @@ export class MgInputCheckboxPaginated {
|
|
|
186
185
|
},
|
|
187
186
|
"messages": {
|
|
188
187
|
"type": "unknown",
|
|
189
|
-
"attribute": "messages",
|
|
190
188
|
"mutable": false,
|
|
191
189
|
"complexType": {
|
|
192
190
|
"original": "Record<string, string>",
|