@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
|
@@ -2,8 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { C as ClassList, i as isValidString } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$5, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index3.js';
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$7 } from './mg-details2.js';
|
|
5
|
+
import { d as defineCustomElement$7 } from './mg-button2.js';
|
|
7
6
|
import { d as defineCustomElement$6 } from './mg-icon2.js';
|
|
8
7
|
import { d as defineCustomElement$4 } from './mg-input-title2.js';
|
|
9
8
|
import { d as defineCustomElement$3 } from './mg-tooltip2.js';
|
|
@@ -12,9 +11,11 @@ import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
|
|
|
12
11
|
const mgInputPasswordCss = ".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input.mg-c-input--password .mg-c-input__input-icon{color:var(--mg-b-color-dark)}.mg-c-input.mg-c-input--password .mg-c-input__input-group{position:relative;flex-grow:1}.mg-c-input.mg-c-input--password .mg-c-input__append-button{position:absolute;right:0}.mg-c-input.mg-c-input--password .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height) + var(--mg-b-size-8))}.mg-c-input.mg-c-input--password .mg-c-input__box::-ms-reveal{display:none}";
|
|
13
12
|
|
|
14
13
|
const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class MgInputPassword extends HTMLElement {
|
|
15
|
-
constructor() {
|
|
14
|
+
constructor(registerHost) {
|
|
16
15
|
super();
|
|
17
|
-
|
|
16
|
+
if (registerHost !== false) {
|
|
17
|
+
this.__registerHost();
|
|
18
|
+
}
|
|
18
19
|
this.__attachShadow();
|
|
19
20
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
20
21
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
@@ -301,7 +302,7 @@ function defineCustomElement$1() {
|
|
|
301
302
|
if (typeof customElements === "undefined") {
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
304
|
-
const components = ["mg-input-password", "mg-button", "mg-
|
|
305
|
+
const components = ["mg-input-password", "mg-button", "mg-icon", "mg-input", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
305
306
|
components.forEach(tagName => { switch (tagName) {
|
|
306
307
|
case "mg-input-password":
|
|
307
308
|
if (!customElements.get(tagName)) {
|
|
@@ -309,11 +310,6 @@ function defineCustomElement$1() {
|
|
|
309
310
|
}
|
|
310
311
|
break;
|
|
311
312
|
case "mg-button":
|
|
312
|
-
if (!customElements.get(tagName)) {
|
|
313
|
-
defineCustomElement$8();
|
|
314
|
-
}
|
|
315
|
-
break;
|
|
316
|
-
case "mg-details":
|
|
317
313
|
if (!customElements.get(tagName)) {
|
|
318
314
|
defineCustomElement$7();
|
|
319
315
|
}
|
|
@@ -2,14 +2,12 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { C as ClassList, d as allItemsAreString, t as toString, i as isValidString } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$5, b as classFieldset, c as classReadonly, a as classDisabled } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index3.js';
|
|
5
|
-
import { d as defineErrorMessage } from './mg-input.utils.js';
|
|
6
|
-
import { d as defineCustomElement$7 } from './mg-details2.js';
|
|
7
5
|
import { d as defineCustomElement$6 } from './mg-icon2.js';
|
|
8
6
|
import { d as defineCustomElement$4 } from './mg-input-title2.js';
|
|
9
7
|
import { d as defineCustomElement$3 } from './mg-tooltip2.js';
|
|
10
8
|
import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
|
|
11
9
|
|
|
12
|
-
const mgInputRadioCss = ".mg-c-
|
|
10
|
+
const mgInputRadioCss = ".mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input.mg-c-input--fieldset{padding:0;border:0;margin-right:0;margin-left:0}.mg-c-input.mg-c-input--fieldset input[type=radio],.mg-c-input.mg-c-input--fieldset input[type=checkbox]{width:var(--mg-c-input-check-size);height:var(--mg-c-input-check-size);flex-shrink:0;margin:calc((var(--mg-b-font-size)*var(--mg-b-line-height) - var(--mg-c-input-check-size))/2) var(--mg-b-size-8) 0 0}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group{display:flex;align-items:start}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group-container{display:flex;flex-wrap:wrap;padding:0;margin:0;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);gap:var(--mg-b-size-12) var(--mg-b-size-24);list-style:none}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group.mg-c-input__input-group--disabled label{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--fieldset.mg-c-input--vertical-list .mg-c-input__input-group-container,.mg-c-input.mg-c-input--fieldset.mg-c-input--checkbox-multi .mg-c-input__input-group-container{flex-direction:column}.mg-c-input.mg-c-input--fieldset.mg-c-input--label-on-top .mg-c-input__input-group-container{margin-top:var(--mg-b-size-8)}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}";
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* type Option validation function
|
|
@@ -18,9 +16,11 @@ const mgInputRadioCss = ".mg-c-input__error-details{margin:0}.mg-c-input__readon
|
|
|
18
16
|
*/
|
|
19
17
|
const isOption = (option) => typeof option === 'object' && typeof option.title === 'string' && option.value !== undefined;
|
|
20
18
|
const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio extends HTMLElement {
|
|
21
|
-
constructor() {
|
|
19
|
+
constructor(registerHost) {
|
|
22
20
|
super();
|
|
23
|
-
|
|
21
|
+
if (registerHost !== false) {
|
|
22
|
+
this.__registerHost();
|
|
23
|
+
}
|
|
24
24
|
this.__attachShadow();
|
|
25
25
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
26
26
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
@@ -88,21 +88,11 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
88
88
|
// reset guard
|
|
89
89
|
this.handlerInProgress = undefined;
|
|
90
90
|
};
|
|
91
|
-
/**
|
|
92
|
-
* Test if component has items
|
|
93
|
-
* @returns truthy if component has items
|
|
94
|
-
*/
|
|
95
|
-
this.hasInputValue = () => { var _a; return ((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) > 0; };
|
|
96
|
-
/**
|
|
97
|
-
* Test if component has no value error message displayed
|
|
98
|
-
* @returns truthy if compent display no value error message
|
|
99
|
-
*/
|
|
100
|
-
this.hasNoValueErrorMessageDisplay = () => this.errorMessage === this.messages.errors.noValue;
|
|
101
91
|
/**
|
|
102
92
|
* Check if input is valid
|
|
103
93
|
*/
|
|
104
94
|
this.checkValidity = () => {
|
|
105
|
-
this.setValidity(this.readonly || this.disabled ||
|
|
95
|
+
this.setValidity(this.readonly || this.disabled || this.getInvalidElement() === undefined);
|
|
106
96
|
};
|
|
107
97
|
/**
|
|
108
98
|
* Set input error message
|
|
@@ -116,22 +106,11 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
116
106
|
if (errorMessage !== undefined) {
|
|
117
107
|
this.errorMessage = errorMessage;
|
|
118
108
|
}
|
|
119
|
-
else if (!this.hasInputValue()) {
|
|
120
|
-
this.errorMessage = this.messages.errors.noValue;
|
|
121
|
-
}
|
|
122
109
|
else if (invalidElement.validity.valueMissing) {
|
|
123
110
|
this.errorMessage = this.messages.errors.required;
|
|
124
111
|
}
|
|
125
112
|
}
|
|
126
113
|
};
|
|
127
|
-
/**
|
|
128
|
-
* Reset error message
|
|
129
|
-
*/
|
|
130
|
-
this.resetErrorMessage = () => {
|
|
131
|
-
this.checkValidity();
|
|
132
|
-
this.errorMessage = undefined;
|
|
133
|
-
this.hasDisplayedError = false;
|
|
134
|
-
};
|
|
135
114
|
/**
|
|
136
115
|
* get invalid element
|
|
137
116
|
* @returns element
|
|
@@ -153,29 +132,17 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
153
132
|
this.valueChange.emit(newValue);
|
|
154
133
|
}
|
|
155
134
|
validateItems(newValue) {
|
|
156
|
-
if ([undefined, null].includes(newValue) || (Array.isArray(newValue) && newValue.length === 0)) {
|
|
157
|
-
this.options = [];
|
|
158
|
-
this.displayError();
|
|
159
|
-
}
|
|
160
135
|
// Validate if items have required min length
|
|
161
|
-
|
|
136
|
+
if (typeof newValue === 'object' && newValue.length < 2) {
|
|
162
137
|
throw new Error(`<mg-input-radio> prop "items" require at least 2 items. Passed value: ${toString(newValue)}.`);
|
|
163
138
|
}
|
|
164
139
|
// String array
|
|
165
140
|
else if (allItemsAreString(newValue)) {
|
|
166
141
|
this.options = newValue.map(item => ({ title: item, value: item, disabled: this.disabled }));
|
|
167
|
-
// force to reset error when noValueError is displaied
|
|
168
|
-
if (this.invalid && this.hasNoValueErrorMessageDisplay()) {
|
|
169
|
-
this.resetErrorMessage();
|
|
170
|
-
}
|
|
171
142
|
}
|
|
172
143
|
// Object array
|
|
173
|
-
else if (
|
|
144
|
+
else if (newValue && newValue.every(item => isOption(item))) {
|
|
174
145
|
this.options = newValue;
|
|
175
|
-
// force to reset error when noValueError is displaied
|
|
176
|
-
if (this.invalid && this.hasNoValueErrorMessageDisplay()) {
|
|
177
|
-
this.resetErrorMessage();
|
|
178
|
-
}
|
|
179
146
|
}
|
|
180
147
|
else {
|
|
181
148
|
throw new Error(`<mg-input-radio> prop "items" is required and all items must be the same type, string or RadioOption. Passed value: ${toString(newValue)}.`);
|
|
@@ -271,7 +238,9 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
271
238
|
// - Keep everything in sync both inside and outside the component
|
|
272
239
|
return new Promise(resolve => {
|
|
273
240
|
requestAnimationFrame(() => {
|
|
274
|
-
this.
|
|
241
|
+
this.checkValidity();
|
|
242
|
+
this.errorMessage = undefined;
|
|
243
|
+
this.hasDisplayedError = false;
|
|
275
244
|
resolve();
|
|
276
245
|
});
|
|
277
246
|
});
|
|
@@ -317,12 +286,10 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
317
286
|
* @returns HTML Element
|
|
318
287
|
*/
|
|
319
288
|
render() {
|
|
320
|
-
return (h("mg-input", { key: '
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
this.inputs[index] = el;
|
|
325
|
-
} }), h("label", { htmlFor: this.identifier + '_' + index }, input.title))))))));
|
|
289
|
+
return (h("mg-input", { key: '048aa732e7f8593701c9397e571b97584bc5e37b', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && !this.value ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("ul", { class: "mg-c-input__input-group-container", role: "list" }, this.options.map((input, index) => (h("li", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
|
|
290
|
+
if (el !== null)
|
|
291
|
+
this.inputs[index] = el;
|
|
292
|
+
} }), h("label", { htmlFor: this.identifier + '_' + index }, input.title))))))));
|
|
326
293
|
}
|
|
327
294
|
get element() { return this; }
|
|
328
295
|
static get watchers() { return {
|
|
@@ -349,7 +316,6 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
349
316
|
"tooltip": [1],
|
|
350
317
|
"tooltipPosition": [1, "tooltip-position"],
|
|
351
318
|
"helpText": [1, "help-text"],
|
|
352
|
-
"noValueErrorDetail": [1, "no-value-error-detail"],
|
|
353
319
|
"valid": [1028],
|
|
354
320
|
"invalid": [1028],
|
|
355
321
|
"classCollection": [32],
|
|
@@ -372,18 +338,13 @@ function defineCustomElement$1() {
|
|
|
372
338
|
if (typeof customElements === "undefined") {
|
|
373
339
|
return;
|
|
374
340
|
}
|
|
375
|
-
const components = ["mg-input-radio", "mg-
|
|
341
|
+
const components = ["mg-input-radio", "mg-icon", "mg-input", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
376
342
|
components.forEach(tagName => { switch (tagName) {
|
|
377
343
|
case "mg-input-radio":
|
|
378
344
|
if (!customElements.get(tagName)) {
|
|
379
345
|
customElements.define(tagName, MgInputRadio$1);
|
|
380
346
|
}
|
|
381
347
|
break;
|
|
382
|
-
case "mg-details":
|
|
383
|
-
if (!customElements.get(tagName)) {
|
|
384
|
-
defineCustomElement$7();
|
|
385
|
-
}
|
|
386
|
-
break;
|
|
387
348
|
case "mg-icon":
|
|
388
349
|
if (!customElements.get(tagName)) {
|
|
389
350
|
defineCustomElement$6();
|
|
@@ -2,7 +2,6 @@ import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h } from
|
|
|
2
2
|
import { i as isValidString, C as ClassList, t as toString } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$5, c as classReadonly, a as classDisabled } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index3.js';
|
|
5
|
-
import { d as defineCustomElement$7 } from './mg-details2.js';
|
|
6
5
|
import { d as defineCustomElement$6 } from './mg-icon2.js';
|
|
7
6
|
import { d as defineCustomElement$4 } from './mg-input-title2.js';
|
|
8
7
|
import { d as defineCustomElement$3 } from './mg-tooltip2.js';
|
|
@@ -16383,12 +16382,14 @@ const quillSnowCss = "/*!\n * Quill Editor v2.0.3\n * https://quilljs.com\n * Co
|
|
|
16383
16382
|
|
|
16384
16383
|
const editorScss = quillSnowCss + "";
|
|
16385
16384
|
|
|
16386
|
-
const mgInputRichTextEditorCss = ".mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input__wrapper{display:flex;width:100%;flex-direction:column;border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light)}.mg-c-input__wrapper:focus-within{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus);outline:Highlight auto .1rem;outline:-webkit-focus-ring-color auto .1rem}.mg-c-input--has-error .mg-c-input__wrapper{border-color:var(--mg-b-color-danger)}.mg-c-input--disabled .mg-c-input__wrapper{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input--rich-text-editor .mg-c-input__readonly-value p{margin:0}.mg-c-input--rich-text-editor .mg-c-input__readonly-value p:not(:first-child){margin-top:1em}.mg-c-input--rich-text-editor .ql-toolbar{display:flex;flex-wrap:wrap;padding:var(--mg-b-size-8);border:0;border-radius:var(--mg-c-input-border-radius) var(--mg-c-input-border-radius) 0 0;background:var(--mg-b-color-neutral-0);border-block-end-width:var(--mg-c-input-border-width);border-block-end-color:var(--mg-c-input-color-border);border-block-end-style:solid}.mg-c-input--rich-text-editor .ql-toolbar .ql-formats{display:inline-flex;margin:inherit;gap:.2rem}.mg-c-input--rich-text-editor .ql-toolbar .ql-formats:not(:last-child)::after{width:.1rem;height:var(--mg-b-size-16);background:var(--mg-c-input-color-border);content:\"\";margin-block:var(--mg-b-size-8);margin-inline:var(--mg-b-size-8)}.mg-c-input--rich-text-editor .ql-toolbar button
|
|
16385
|
+
const mgInputRichTextEditorCss = ".mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input__wrapper{display:flex;width:100%;flex-direction:column;border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light)}.mg-c-input__wrapper:focus-within{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus);outline:Highlight auto .1rem;outline:-webkit-focus-ring-color auto .1rem}.mg-c-input--has-error .mg-c-input__wrapper{border-color:var(--mg-b-color-danger)}.mg-c-input--disabled .mg-c-input__wrapper{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input--rich-text-editor .mg-c-input__readonly-value p{margin:0}.mg-c-input--rich-text-editor .mg-c-input__readonly-value p:not(:first-child){margin-top:1em}.mg-c-input--rich-text-editor .ql-toolbar{display:flex;flex-wrap:wrap;padding:var(--mg-b-size-8);border:0;border-radius:var(--mg-c-input-border-radius) var(--mg-c-input-border-radius) 0 0;background:var(--mg-b-color-neutral-0);border-block-end-width:var(--mg-c-input-border-width);border-block-end-color:var(--mg-c-input-color-border);border-block-end-style:solid}.mg-c-input--rich-text-editor .ql-toolbar .ql-formats{display:inline-flex;margin:inherit;gap:.2rem}.mg-c-input--rich-text-editor .ql-toolbar .ql-formats:not(:last-child)::after{width:.1rem;height:var(--mg-b-size-16);background:var(--mg-c-input-color-border);content:\"\";margin-block:var(--mg-b-size-8);margin-inline:var(--mg-b-size-8)}.mg-c-input--rich-text-editor .ql-toolbar button .ql-fill,.mg-c-input--rich-text-editor .ql-toolbar button:hover .ql-fill,.mg-c-input--rich-text-editor .ql-toolbar button:focus .ql-fill,.mg-c-input--rich-text-editor .ql-toolbar button.ql-active .ql-fill{fill:currentcolor}.mg-c-input--rich-text-editor .ql-toolbar button:hover .ql-stroke,.mg-c-input--rich-text-editor .ql-toolbar button:focus .ql-stroke,.mg-c-input--rich-text-editor .ql-toolbar button.ql-active .ql-stroke,.mg-c-input--rich-text-editor .ql-toolbar button .ql-stroke{stroke:currentcolor}.mg-c-input--rich-text-editor .ql-toolbar button{display:flex;min-width:var(--mg-b-size-32);height:var(--mg-b-size-32);align-items:center;justify-content:center;padding:var(--mg-b-size-4);border:.1rem solid rgba(0,0,0,0);border-radius:var(--mg-b-size-radius);color:var(--mg-b-color-dark);float:inherit;transition-duration:.2s;transition-property:background-color,border-color;transition-timing-function:ease-in-out}.mg-c-input--rich-text-editor .ql-toolbar button svg{width:var(--mg-b-size-20);height:var(--mg-b-size-20)}.mg-c-input--rich-text-editor .ql-toolbar button:focus{color:var(--mg-b-color-dark)}.mg-c-input--rich-text-editor .ql-toolbar button:focus-visible,.mg-c-input--rich-text-editor .ql-toolbar button:hover,.mg-c-input--rich-text-editor .ql-toolbar button.ql-active{border-color:var(--mg-b-color-neutral-70);background:var(--mg-b-color-neutral-20);color:var(--mg-b-color-dark)}.mg-c-input--rich-text-editor .ql-toolbar button .ql-stroke{stroke-width:.12rem}.mg-c-input--rich-text-editor .ql-toolbar button .ql-stroke.ql-thin{stroke-width:.1rem}.mg-c-input--rich-text-editor .ql-toolbar button.ql-bold .ql-stroke{stroke-width:.2rem}.mg-c-input--rich-text-editor .ql-container{border:0;border-radius:0 0 var(--mg-c-input-border-radius) var(--mg-c-input-border-radius);margin:0 .1rem .1rem;background:var(--mg-b-color-neutral-0)}.mg-c-input--rich-text-editor .ql-editor{min-height:calc(calc(var(--mg-b-font-size) * var(--mg-b-line-height) * var(--mg-c-input-rich-text-editor-rows, 3)) + calc((var(--mg-b-size-min-height) - var(--mg-b-font-size) * var(--mg-b-line-height)) / 2));padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);color:var(--mg-b-color-dark);font-size:var(--mg-b-font-size)}.mg-c-input--rich-text-editor .ql-editor.ql-blank::before{right:var(--mg-b-size-8);left:var(--mg-b-size-8)}.mg-c-input--rich-text-editor .ql-editor p:not(:first-child){margin-top:1em}.mg-c-input--rich-text-editor.mg-c-input--disabled .ql-toolbar{pointer-events:none}.mg-c-input--rich-text-editor.mg-c-input--has-error .ql-toolbar{border-color:var(--mg-b-color-danger)}";
|
|
16387
16386
|
|
|
16388
16387
|
const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRichTextEditor extends HTMLElement$1 {
|
|
16389
|
-
constructor() {
|
|
16388
|
+
constructor(registerHost) {
|
|
16390
16389
|
super();
|
|
16391
|
-
|
|
16390
|
+
if (registerHost !== false) {
|
|
16391
|
+
this.__registerHost();
|
|
16392
|
+
}
|
|
16392
16393
|
this.__attachShadow();
|
|
16393
16394
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
16394
16395
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
@@ -16745,18 +16746,13 @@ function defineCustomElement$1() {
|
|
|
16745
16746
|
if (typeof customElements === "undefined") {
|
|
16746
16747
|
return;
|
|
16747
16748
|
}
|
|
16748
|
-
const components = ["mg-input-rich-text-editor", "mg-
|
|
16749
|
+
const components = ["mg-input-rich-text-editor", "mg-icon", "mg-input", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
16749
16750
|
components.forEach(tagName => { switch (tagName) {
|
|
16750
16751
|
case "mg-input-rich-text-editor":
|
|
16751
16752
|
if (!customElements.get(tagName)) {
|
|
16752
16753
|
customElements.define(tagName, MgInputRichTextEditor$1);
|
|
16753
16754
|
}
|
|
16754
16755
|
break;
|
|
16755
|
-
case "mg-details":
|
|
16756
|
-
if (!customElements.get(tagName)) {
|
|
16757
|
-
defineCustomElement$7();
|
|
16758
|
-
}
|
|
16759
|
-
break;
|
|
16760
16756
|
case "mg-icon":
|
|
16761
16757
|
if (!customElements.get(tagName)) {
|
|
16762
16758
|
defineCustomElement$6();
|
|
@@ -2,14 +2,12 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { C as ClassList, d as allItemsAreString, t as toString, i as isValidString } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$4, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index3.js';
|
|
5
|
-
import { d as defineErrorMessage } from './mg-input.utils.js';
|
|
6
|
-
import { d as defineCustomElement$6 } from './mg-details2.js';
|
|
7
5
|
import { d as defineCustomElement$5 } from './mg-icon2.js';
|
|
8
6
|
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
9
7
|
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
10
8
|
import { d as defineCustomElement$1 } from './mg-tooltip-content2.js';
|
|
11
9
|
|
|
12
|
-
const mgInputSelectCss = ".mg-c-
|
|
10
|
+
const mgInputSelectCss = ".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input__box{padding-top:0;padding-right:var(--mg-b-size-8);padding-bottom:0}@media screen and (max-width: 767px){.mg-c-input__box{width:100%}}";
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* Check if item is a well configured option
|
|
@@ -54,9 +52,11 @@ const groupOptions = (acc, { group, title, value, disabled }) => {
|
|
|
54
52
|
return acc;
|
|
55
53
|
};
|
|
56
54
|
const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect extends HTMLElement {
|
|
57
|
-
constructor() {
|
|
55
|
+
constructor(registerHost) {
|
|
58
56
|
super();
|
|
59
|
-
|
|
57
|
+
if (registerHost !== false) {
|
|
58
|
+
this.__registerHost();
|
|
59
|
+
}
|
|
60
60
|
this.__attachShadow();
|
|
61
61
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
62
62
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
@@ -147,16 +147,6 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
147
147
|
* @returns truthy if input.value is an item
|
|
148
148
|
*/
|
|
149
149
|
this.isInputValue = (item) => { var _a; return item.title === ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value); };
|
|
150
|
-
/**
|
|
151
|
-
* Test if component has items
|
|
152
|
-
* @returns truthy if component has items
|
|
153
|
-
*/
|
|
154
|
-
this.hasInputValue = () => { var _a; return ((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) > 0; };
|
|
155
|
-
/**
|
|
156
|
-
* Test if component has no value error message displayed
|
|
157
|
-
* @returns truthy if compent display no value error message
|
|
158
|
-
*/
|
|
159
|
-
this.hasNoValueErrorMessageDisplay = () => this.errorMessage === this.messages.errors.noValue;
|
|
160
150
|
/**
|
|
161
151
|
* Handle blur event
|
|
162
152
|
*/
|
|
@@ -176,7 +166,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
176
166
|
* Check if input is valid
|
|
177
167
|
*/
|
|
178
168
|
this.checkValidity = () => {
|
|
179
|
-
this.setValidity(!this.isDisabledValue() && (this.readonly || this.disabled ||
|
|
169
|
+
this.setValidity(!this.isDisabledValue() && (this.readonly || this.disabled || this.input.checkValidity()));
|
|
180
170
|
};
|
|
181
171
|
/**
|
|
182
172
|
* Set input error message
|
|
@@ -189,22 +179,11 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
189
179
|
if (errorMessage !== undefined) {
|
|
190
180
|
this.errorMessage = errorMessage;
|
|
191
181
|
}
|
|
192
|
-
else if (!this.hasInputValue()) {
|
|
193
|
-
this.errorMessage = this.messages.errors.noValue;
|
|
194
|
-
}
|
|
195
182
|
else if (this.input.validity.valueMissing) {
|
|
196
183
|
this.errorMessage = this.messages.errors.required;
|
|
197
184
|
}
|
|
198
185
|
}
|
|
199
186
|
};
|
|
200
|
-
/**
|
|
201
|
-
* Reset error message
|
|
202
|
-
*/
|
|
203
|
-
this.resetErrorMessage = () => {
|
|
204
|
-
this.checkValidity();
|
|
205
|
-
this.errorMessage = undefined;
|
|
206
|
-
this.hasDisplayedError = false;
|
|
207
|
-
};
|
|
208
187
|
/**
|
|
209
188
|
* Render option
|
|
210
189
|
* @param option - to render
|
|
@@ -222,11 +201,9 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
222
201
|
this.valueChange.emit(newValue);
|
|
223
202
|
}
|
|
224
203
|
validateItems(newValue) {
|
|
225
|
-
let resetMessage = false;
|
|
226
204
|
// Empty options
|
|
227
|
-
if (
|
|
205
|
+
if (newValue.length === 0) {
|
|
228
206
|
this.options = [];
|
|
229
|
-
this.displayError();
|
|
230
207
|
}
|
|
231
208
|
// String array
|
|
232
209
|
else if (allItemsAreString(newValue)) {
|
|
@@ -234,8 +211,6 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
234
211
|
this.valueExist = newValue.includes(this.value);
|
|
235
212
|
}
|
|
236
213
|
this.options = newValue.map(item => ({ title: item, value: item }));
|
|
237
|
-
// force to reset error when noValueError is displaied
|
|
238
|
-
resetMessage = this.invalid && this.hasNoValueErrorMessageDisplay();
|
|
239
214
|
}
|
|
240
215
|
// Object array
|
|
241
216
|
else if (allItemsAreOptions(newValue)) {
|
|
@@ -248,15 +223,10 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
248
223
|
else {
|
|
249
224
|
this.options = newValue;
|
|
250
225
|
}
|
|
251
|
-
// force to reset error when noValueError is displaied
|
|
252
|
-
resetMessage = this.invalid && this.hasNoValueErrorMessageDisplay();
|
|
253
226
|
}
|
|
254
227
|
else {
|
|
255
228
|
throw new Error(`<mg-input-select> prop "items" is required, can be an empty Array or all items must be the same type: string or Option. Passed value: ${toString(newValue)}.`);
|
|
256
229
|
}
|
|
257
|
-
if (resetMessage) {
|
|
258
|
-
this.resetErrorMessage();
|
|
259
|
-
}
|
|
260
230
|
}
|
|
261
231
|
watchReadonly(newValue) {
|
|
262
232
|
if (newValue)
|
|
@@ -350,7 +320,9 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
350
320
|
// - Keep everything in sync both inside and outside the component
|
|
351
321
|
return new Promise(resolve => {
|
|
352
322
|
requestAnimationFrame(() => {
|
|
353
|
-
this.
|
|
323
|
+
this.checkValidity();
|
|
324
|
+
this.errorMessage = undefined;
|
|
325
|
+
this.hasDisplayedError = false;
|
|
354
326
|
resolve();
|
|
355
327
|
});
|
|
356
328
|
});
|
|
@@ -402,7 +374,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
402
374
|
*/
|
|
403
375
|
render() {
|
|
404
376
|
const readonlyValue = this.getReadonlyValue();
|
|
405
|
-
return (h("mg-input", { key: '
|
|
377
|
+
return (h("mg-input", { key: '1394827503d3f2dd71efc6efa389ac707573d2ec', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("select", { class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
|
|
406
378
|
if (el !== null)
|
|
407
379
|
this.input = el;
|
|
408
380
|
} }, (!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder
|
|
@@ -436,7 +408,6 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
436
408
|
"tooltip": [1],
|
|
437
409
|
"tooltipPosition": [1, "tooltip-position"],
|
|
438
410
|
"helpText": [1, "help-text"],
|
|
439
|
-
"noValueErrorDetail": [1, "no-value-error-detail"],
|
|
440
411
|
"valid": [1028],
|
|
441
412
|
"invalid": [1028],
|
|
442
413
|
"classCollection": [32],
|
|
@@ -459,18 +430,13 @@ function defineCustomElement() {
|
|
|
459
430
|
if (typeof customElements === "undefined") {
|
|
460
431
|
return;
|
|
461
432
|
}
|
|
462
|
-
const components = ["mg-input-select", "mg-
|
|
433
|
+
const components = ["mg-input-select", "mg-icon", "mg-input", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
463
434
|
components.forEach(tagName => { switch (tagName) {
|
|
464
435
|
case "mg-input-select":
|
|
465
436
|
if (!customElements.get(tagName)) {
|
|
466
437
|
customElements.define(tagName, MgInputSelect);
|
|
467
438
|
}
|
|
468
439
|
break;
|
|
469
|
-
case "mg-details":
|
|
470
|
-
if (!customElements.get(tagName)) {
|
|
471
|
-
defineCustomElement$6();
|
|
472
|
-
}
|
|
473
|
-
break;
|
|
474
440
|
case "mg-icon":
|
|
475
441
|
if (!customElements.get(tagName)) {
|
|
476
442
|
defineCustomElement$5();
|
|
@@ -2,8 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { C as ClassList, i as isValidString, d as allItemsAreString, t as toString } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$4, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index3.js';
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$6 } from './mg-details2.js';
|
|
5
|
+
import { d as defineCustomElement$6 } from './mg-character-left2.js';
|
|
7
6
|
import { d as defineCustomElement$5 } from './mg-icon2.js';
|
|
8
7
|
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
9
8
|
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
@@ -32,9 +31,11 @@ const isOption = (option) => typeof option === 'object' && typeof option.title =
|
|
|
32
31
|
*/
|
|
33
32
|
const isDatalistOptions = (options) => allItemsAreString(options) || (Array.isArray(options) && options.every(isOption));
|
|
34
33
|
const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends HTMLElement {
|
|
35
|
-
constructor() {
|
|
34
|
+
constructor(registerHost) {
|
|
36
35
|
super();
|
|
37
|
-
|
|
36
|
+
if (registerHost !== false) {
|
|
37
|
+
this.__registerHost();
|
|
38
|
+
}
|
|
38
39
|
this.__attachShadow();
|
|
39
40
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
40
41
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
@@ -457,7 +458,7 @@ function defineCustomElement() {
|
|
|
457
458
|
if (typeof customElements === "undefined") {
|
|
458
459
|
return;
|
|
459
460
|
}
|
|
460
|
-
const components = ["mg-input-text", "mg-character-left", "mg-
|
|
461
|
+
const components = ["mg-input-text", "mg-character-left", "mg-icon", "mg-input", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
461
462
|
components.forEach(tagName => { switch (tagName) {
|
|
462
463
|
case "mg-input-text":
|
|
463
464
|
if (!customElements.get(tagName)) {
|
|
@@ -465,11 +466,6 @@ function defineCustomElement() {
|
|
|
465
466
|
}
|
|
466
467
|
break;
|
|
467
468
|
case "mg-character-left":
|
|
468
|
-
if (!customElements.get(tagName)) {
|
|
469
|
-
defineCustomElement$7();
|
|
470
|
-
}
|
|
471
|
-
break;
|
|
472
|
-
case "mg-details":
|
|
473
469
|
if (!customElements.get(tagName)) {
|
|
474
470
|
defineCustomElement$6();
|
|
475
471
|
}
|
|
@@ -2,8 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { C as ClassList, i as isValidString, t as toString } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$5, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index3.js';
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$7 } from './mg-details2.js';
|
|
5
|
+
import { d as defineCustomElement$7 } from './mg-character-left2.js';
|
|
7
6
|
import { d as defineCustomElement$6 } from './mg-icon2.js';
|
|
8
7
|
import { d as defineCustomElement$4 } from './mg-input-title2.js';
|
|
9
8
|
import { d as defineCustomElement$3 } from './mg-tooltip2.js';
|
|
@@ -12,9 +11,11 @@ import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
|
|
|
12
11
|
const mgInputTextareaCss = ".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input.mg-c-input--display-character-left mg-character-left{font-size:var(--mg-b-font-size-small);opacity:.6}.mg-c-input.mg-c-input--display-character-left .mg-c-input__input+.mg-c-input__help-text ::slotted(*),.mg-c-input.mg-c-input--display-character-left .mg-c-input__input+.mg-c-input__error ::slotted(*){margin-top:0}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input__input{align-items:start}.mg-c-input__box{display:block;height:auto;resize:none}.mg-c-input__box.mg-c-input__box--resizable{resize:both}.mg-c-input__box.mg-c-input__box--resizable-horizontal{resize:horizontal}.mg-c-input__box.mg-c-input__box--resizable-vertical{resize:vertical}.mg-c-input__readonly-value{white-space:pre-line}.mg-c-input__with-character-left{flex-grow:1}.mg-c-input__with-character-left mg-character-left{display:block;text-align:end;visibility:hidden}.mg-c-input.mg-u-is-focused .mg-c-input__with-character-left mg-character-left{visibility:visible}@-moz-document url-prefix(){.mg-c-input__box{overflow-x:hidden}}";
|
|
13
12
|
|
|
14
13
|
const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea extends HTMLElement {
|
|
15
|
-
constructor() {
|
|
14
|
+
constructor(registerHost) {
|
|
16
15
|
super();
|
|
17
|
-
|
|
16
|
+
if (registerHost !== false) {
|
|
17
|
+
this.__registerHost();
|
|
18
|
+
}
|
|
18
19
|
this.__attachShadow();
|
|
19
20
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
20
21
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
@@ -369,7 +370,7 @@ function defineCustomElement$1() {
|
|
|
369
370
|
if (typeof customElements === "undefined") {
|
|
370
371
|
return;
|
|
371
372
|
}
|
|
372
|
-
const components = ["mg-input-textarea", "mg-character-left", "mg-
|
|
373
|
+
const components = ["mg-input-textarea", "mg-character-left", "mg-icon", "mg-input", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
373
374
|
components.forEach(tagName => { switch (tagName) {
|
|
374
375
|
case "mg-input-textarea":
|
|
375
376
|
if (!customElements.get(tagName)) {
|
|
@@ -377,11 +378,6 @@ function defineCustomElement$1() {
|
|
|
377
378
|
}
|
|
378
379
|
break;
|
|
379
380
|
case "mg-character-left":
|
|
380
|
-
if (!customElements.get(tagName)) {
|
|
381
|
-
defineCustomElement$8();
|
|
382
|
-
}
|
|
383
|
-
break;
|
|
384
|
-
case "mg-details":
|
|
385
381
|
if (!customElements.get(tagName)) {
|
|
386
382
|
defineCustomElement$7();
|
|
387
383
|
}
|
|
@@ -4,9 +4,11 @@ import { i as isValidString, a as isValideID, t as toString } from './index2.js'
|
|
|
4
4
|
const mgInputTitleCss = ".mg-u-form-legacy.sc-mg-input-title{--mg-c-form-inputs-title-width:calc(100% / 3 - 20px)}.mg-u-is-asterisk.sc-mg-input-title{color:var(--mg-b-color-danger)}legend.mg-c-input-title.sc-mg-input-title{padding-right:0;padding-left:0}.mg-c-input-title__required.sc-mg-input-title{display:var(--mg-c-input-title-display, unset)}";
|
|
5
5
|
|
|
6
6
|
const MgInputTitle = /*@__PURE__*/ proxyCustomElement(class MgInputTitle extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
7
|
+
constructor(registerHost) {
|
|
8
8
|
super();
|
|
9
|
-
|
|
9
|
+
if (registerHost !== false) {
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
}
|
|
10
12
|
/**
|
|
11
13
|
* Switch from label to fieldset sementic
|
|
12
14
|
*/
|