@mgdis/mg-components 3.2.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-bead7dbd.js → index-88560a66.js} +47 -48
- package/dist/cjs/{index-369388eb.js → index-a39c5567.js} +97 -10
- package/dist/cjs/loader.cjs.js +3 -17
- package/dist/cjs/mg-badge_21.cjs.entry.js +519 -294
- package/dist/cjs/mg-components.cjs.js +3 -7
- package/dist/cjs/mg-modal.cjs.entry.js +12 -6
- package/dist/cjs/mg-popover.cjs.entry.js +15 -10
- package/dist/cjs/{popper-0c3964e7.js → popper-71bf3058.js} +6 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/atoms/mg-badge/{mg-badge.stories.js → doc/mg-badge.stories.js} +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.css +0 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +15 -3
- package/dist/collection/components/atoms/mg-button/{mg-button.stories.js → doc/mg-button.stories.js} +2 -2
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.css +20 -32
- package/dist/collection/components/atoms/mg-button/mg-button.js +8 -3
- package/dist/collection/components/atoms/mg-character-left/{mg-character-left.stories.js → doc/mg-character-left.stories.js} +1 -1
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +10 -47
- package/dist/collection/components/atoms/mg-icon/{mg-icon.stories.js → doc/mg-icon.stories.js} +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +97 -10
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +4 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +22 -6
- package/dist/collection/components/atoms/mg-input-title/{mg-input-title.stories.js → doc/mg-input-title.stories.js} +0 -0
- package/dist/collection/components/atoms/mg-tag/{mg-tag.stories.js → doc/mg-tag.stories.js} +1 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +19 -4
- package/dist/collection/components/atoms/mg-tooltip/{mg-tooltip.stories.js → doc/mg-tooltip.stories.js} +14 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +20 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +7 -2
- package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -7
- package/dist/collection/components/molecules/inputs/MgInput.js +5 -15
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.js → doc/mg-input-checkbox.stories.js} +0 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +19 -13
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +8 -21
- package/dist/collection/components/molecules/inputs/mg-input-date/{mg-input-date.stories.js → doc/mg-input-date.stories.js} +0 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +19 -18
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +19 -18
- package/dist/collection/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.js → doc/mg-input-numeric.stories.js} +9 -2
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +20 -19
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +43 -19
- package/dist/collection/components/molecules/inputs/mg-input-password/{mg-input-password.stories.js → doc/mg-input-password.stories.js} +10 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +19 -18
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +17 -22
- package/dist/collection/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.js → doc/mg-input-radio.stories.js} +0 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +19 -13
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +8 -15
- package/dist/collection/components/molecules/inputs/mg-input-select/{mg-input-select.stories.js → doc/mg-input-select.stories.js} +10 -3
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +20 -18
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +24 -31
- package/dist/collection/components/molecules/inputs/mg-input-text/{mg-input-text.stories.js → doc/mg-input-text.stories.js} +11 -7
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +51 -28
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +42 -43
- package/dist/collection/components/molecules/inputs/mg-input-textarea/{mg-input-textarea.stories.js → doc/mg-input-textarea.stories.js} +10 -4
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +51 -22
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +66 -39
- package/dist/collection/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.js → doc/mg-input-toggle.stories.js} +0 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +18 -9
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +10 -4
- package/dist/collection/components/molecules/mg-form/{mg-form.stories.js → doc/mg-form.stories.js} +0 -0
- package/dist/collection/components/molecules/mg-form/mg-form.css +4 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
- package/dist/collection/components/molecules/mg-message/{mg-message.stories.js → doc/mg-message.stories.js} +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +15 -7
- package/dist/collection/components/molecules/mg-modal/{mg-modal.stories.js → doc/mg-modal.stories.js} +0 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +5 -7
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +12 -5
- package/dist/collection/components/molecules/mg-pagination/{mg-pagination.stories.js → doc/mg-pagination.stories.js} +0 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +17 -18
- package/dist/collection/components/molecules/mg-panel/{mg-panel.stories.js → doc/mg-panel.stories.js} +9 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +13 -4
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +119 -18
- package/dist/collection/components/molecules/mg-popover/{mg-popover.stories.js → doc/mg-popover.stories.js} +10 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +20 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +19 -9
- package/dist/collection/components/molecules/mg-tabs/{mg-tabs.stories.js → doc/mg-tabs.stories.js} +12 -5
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +7 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +3 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +92 -27
- package/dist/collection/locales/index.js +33 -4
- package/dist/collection/stories/helpers.stories.js +33 -0
- package/dist/collection/utils/locale.utils.js +7 -4
- package/dist/collection/variables.css +9 -4
- package/dist/collection/variables.scss +9 -4
- package/dist/components/MgInput.js +6 -23
- package/dist/components/index.d.ts +23 -5
- package/dist/components/index.js +23 -0
- package/dist/components/index2.js +97 -8
- package/dist/components/locale.utils.js +7 -5
- package/dist/components/mg-badge2.js +16 -4
- package/dist/components/mg-button2.js +10 -5
- package/dist/components/mg-character-left2.js +4 -27
- package/dist/components/mg-form.js +6 -4
- package/dist/components/mg-icon2.js +120 -17
- package/dist/components/mg-input-checkbox.js +11 -27
- package/dist/components/mg-input-date.js +21 -25
- package/dist/components/mg-input-numeric.js +28 -26
- package/dist/components/mg-input-password.js +18 -28
- package/dist/components/mg-input-radio.js +10 -22
- package/dist/components/mg-input-select2.js +24 -35
- package/dist/components/mg-input-text2.js +38 -26
- package/dist/components/mg-input-textarea.js +44 -21
- package/dist/components/mg-input-toggle.js +11 -11
- package/dist/components/mg-message.js +16 -8
- package/dist/components/mg-modal.js +11 -5
- package/dist/components/mg-pagination.js +16 -22
- package/dist/components/mg-panel.js +51 -17
- package/dist/components/mg-popover.js +13 -8
- package/dist/components/mg-tabs.js +80 -22
- package/dist/components/mg-tag.js +20 -5
- package/dist/components/mg-tooltip2.js +1 -1
- package/dist/components/popper.js +6 -2
- package/dist/esm/{index-9e877561.js → index-bca81100.js} +48 -46
- package/dist/esm/{index-c346f52d.js → index-e51ae032.js} +97 -8
- package/dist/esm/loader.js +3 -17
- package/dist/esm/mg-badge_21.entry.js +516 -291
- package/dist/esm/mg-components.js +3 -7
- package/dist/esm/mg-modal.entry.js +12 -6
- package/dist/esm/mg-popover.entry.js +15 -10
- package/dist/esm/{popper-8874fd6c.js → popper-93ecb064.js} +6 -2
- package/dist/index.js +1 -1
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-462d648a.entry.js +1 -0
- package/dist/mg-components/p-4c66f794.js +1 -0
- package/dist/mg-components/p-5126ab10.entry.js +1 -0
- package/dist/mg-components/p-766c918b.entry.js +1 -0
- package/dist/mg-components/p-780bd52d.js +1 -0
- package/dist/mg-components/p-b14a3443.js +2 -0
- package/dist/mg-components/variables.css +9 -4
- package/dist/mg-components/variables.scss +9 -4
- package/dist/types/components/atoms/mg-badge/{mg-badge.stories.d.ts → doc/mg-badge.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +8 -1
- package/dist/types/components/atoms/mg-button/{mg-button.stories.d.ts → doc/mg-button.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +1 -1
- package/dist/types/components/atoms/mg-character-left/{mg-character-left.stories.d.ts → doc/mg-character-left.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +5 -13
- package/dist/types/components/atoms/mg-icon/{mg-icon.stories.d.ts → doc/mg-icon.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +3 -3
- package/dist/types/components/atoms/mg-input-title/{mg-input-title.stories.d.ts → doc/mg-input-title.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-tag/{mg-tag.stories.d.ts → doc/mg-tag.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +8 -1
- package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +29 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +8 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +2 -1
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +0 -6
- package/dist/types/components/molecules/inputs/MgInput.d.ts +2 -4
- package/dist/types/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.d.ts → doc/mg-input-checkbox.stories.d.ts} +0 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +5 -2
- package/dist/types/components/molecules/inputs/mg-input-date/{mg-input-date.stories.d.ts → doc/mg-input-date.stories.d.ts} +0 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +7 -1
- package/dist/types/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.d.ts → doc/mg-input-numeric.stories.d.ts} +6 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +8 -2
- package/dist/types/components/molecules/inputs/mg-input-password/{mg-input-password.stories.d.ts → doc/mg-input-password.stories.d.ts} +8 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +7 -2
- package/dist/types/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.d.ts → doc/mg-input-radio.stories.d.ts} +0 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +5 -1
- package/dist/types/components/molecules/inputs/mg-input-select/{mg-input-select.stories.d.ts → doc/mg-input-select.stories.d.ts} +11 -5
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +7 -2
- package/dist/types/components/molecules/inputs/mg-input-text/{mg-input-text.stories.d.ts → doc/mg-input-text.stories.d.ts} +8 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +7 -7
- package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts +19 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +15 -7
- package/dist/types/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.d.ts → doc/mg-input-toggle.stories.d.ts} +0 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +2 -0
- package/dist/types/components/molecules/mg-form/{mg-form.stories.d.ts → doc/mg-form.stories.d.ts} +0 -0
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -0
- package/dist/types/components/molecules/mg-message/{mg-message.stories.d.ts → doc/mg-message.stories.d.ts} +0 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +2 -0
- package/dist/types/components/molecules/mg-modal/{mg-modal.stories.d.ts → doc/mg-modal.stories.d.ts} +0 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +2 -0
- package/dist/types/components/molecules/mg-pagination/{mg-pagination.stories.d.ts → doc/mg-pagination.stories.d.ts} +0 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +8 -0
- package/dist/types/components/molecules/{inputs/mg-input-textarea/mg-input-textarea.stories.d.ts → mg-panel/doc/mg-panel.stories.d.ts} +1 -1
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +29 -0
- package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +25 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +8 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +9 -1
- package/dist/types/components/molecules/mg-tabs/{mg-tabs.stories.d.ts → doc/mg-tabs.stories.d.ts} +5 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +7 -1
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +49 -0
- package/dist/types/components.d.ts +181 -151
- package/dist/types/locales/index.d.ts +109 -46
- package/dist/types/stories/{buttons.stories.d.ts → helpers.stories.d.ts} +1 -1
- package/dist/types/utils/locale.utils.d.ts +7 -3
- package/loader/index.js +1 -1
- package/package.json +14 -14
- package/readme.md +6 -35
- package/dist/cjs/css-shim-629916b0.js +0 -6
- package/dist/cjs/shadow-css-546083ef.js +0 -390
- package/dist/collection/stories/buttons.stories.js +0 -43
- package/dist/collection/stories/messages.stories.js +0 -44
- package/dist/collection/stories/tags.stories.js +0 -13
- package/dist/esm/css-shim-0993aa3b.js +0 -4
- package/dist/esm/shadow-css-dfa0587f.js +0 -388
- package/dist/esm-es5/css-shim-0993aa3b.js +0 -1
- package/dist/esm-es5/index-9e877561.js +0 -1
- package/dist/esm-es5/index-c346f52d.js +0 -1
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +0 -1
- package/dist/esm-es5/mg-badge_21.entry.js +0 -2
- package/dist/esm-es5/mg-components.js +0 -1
- package/dist/esm-es5/mg-modal.entry.js +0 -1
- package/dist/esm-es5/mg-popover.entry.js +0 -1
- package/dist/esm-es5/popper-8874fd6c.js +0 -1
- package/dist/esm-es5/shadow-css-dfa0587f.js +0 -12
- package/dist/mg-components/mg-components.js +0 -132
- package/dist/mg-components/p-3633e9e1.system.entry.js +0 -2
- package/dist/mg-components/p-3c14153d.js +0 -1
- package/dist/mg-components/p-50ea2036.system.js +0 -1
- package/dist/mg-components/p-55a22b35.system.js +0 -1
- package/dist/mg-components/p-5e796581.js +0 -12
- package/dist/mg-components/p-656b5efb.system.js +0 -1
- package/dist/mg-components/p-68d6f104.js +0 -1
- package/dist/mg-components/p-6d49ed95.js +0 -1
- package/dist/mg-components/p-70177194.entry.js +0 -1
- package/dist/mg-components/p-8b2d8a2a.system.js +0 -13
- package/dist/mg-components/p-8cb61c3f.system.js +0 -1
- package/dist/mg-components/p-ace173b1.js +0 -1
- package/dist/mg-components/p-c46fbd54.entry.js +0 -1
- package/dist/mg-components/p-c90cc4bf.system.js +0 -1
- package/dist/mg-components/p-cd2a4acc.system.entry.js +0 -1
- package/dist/mg-components/p-de1164fa.system.entry.js +0 -1
- package/dist/mg-components/p-dfe25da3.entry.js +0 -1
- package/dist/mg-components/p-e4a502b5.system.js +0 -1
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-panel/mg-panel.stories.d.ts +0 -6
- package/dist/types/components/molecules/mg-popover/mg-popover.stories.d.ts +0 -12
- package/dist/types/stories/messages.stories.d.ts +0 -13
- package/dist/types/stories/tags.stories.d.ts +0 -5
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { M as MgInput } from './MgInput.js';
|
|
3
3
|
import { c as createID, C as ClassList } from './components.utils.js';
|
|
4
4
|
import { l as localeDate, d as dateRegExp } from './locale.utils.js';
|
|
5
|
-
import {
|
|
6
|
-
import { d as defineCustomElement$5 } from './mg-character-left2.js';
|
|
5
|
+
import { i as initLocales } from './index2.js';
|
|
7
6
|
import { d as defineCustomElement$4 } 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';
|
|
@@ -16,7 +15,7 @@ var InputError;
|
|
|
16
15
|
InputError["REQUIRED"] = "required";
|
|
17
16
|
})(InputError || (InputError = {}));
|
|
18
17
|
|
|
19
|
-
const mgInputDateCss = ":host{display:block}.mg-input{display
|
|
18
|
+
const mgInputDateCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container mg-icon{display:flex}.mg-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0%;border-bottom-right-radius:0%}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--label-on-top .mg-input__box{width:auto;max-width:100%}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}";
|
|
20
19
|
|
|
21
20
|
const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
22
21
|
constructor() {
|
|
@@ -25,11 +24,8 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
25
24
|
this.__attachShadow();
|
|
26
25
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
27
26
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
************/
|
|
31
|
-
// classes
|
|
32
|
-
this.classError = InputClass.ERROR;
|
|
27
|
+
// hasError (triggered by blur event)
|
|
28
|
+
this.hasError = false;
|
|
33
29
|
/**
|
|
34
30
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
35
31
|
* If not set, it will be created.
|
|
@@ -65,14 +61,16 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
65
61
|
*/
|
|
66
62
|
this.handleInput = () => {
|
|
67
63
|
this.checkValidity();
|
|
64
|
+
if (this.hasError) {
|
|
65
|
+
this.checkError();
|
|
66
|
+
}
|
|
68
67
|
this.value = this.input.value;
|
|
69
68
|
};
|
|
70
69
|
/**
|
|
71
70
|
* Handle blur event
|
|
72
71
|
*/
|
|
73
72
|
this.handleBlur = () => {
|
|
74
|
-
this.
|
|
75
|
-
this.checkError();
|
|
73
|
+
this.displayError();
|
|
76
74
|
};
|
|
77
75
|
/**
|
|
78
76
|
* Check if input is valid
|
|
@@ -123,16 +121,16 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
123
121
|
const inputError = this.getInputError();
|
|
124
122
|
// required
|
|
125
123
|
if (inputError === InputError.REQUIRED) {
|
|
126
|
-
this.errorMessage = messages.errors[inputError];
|
|
124
|
+
this.errorMessage = this.messages.errors[inputError];
|
|
127
125
|
}
|
|
128
126
|
// min, max & minMax
|
|
129
127
|
else if ([InputError.MIN, InputError.MAX, InputError.MINMAX].includes(inputError)) {
|
|
130
|
-
this.errorMessage = messages.errors.date[inputError].replace('{min}', localeDate(this.min)).replace('{max}', localeDate(this.max));
|
|
128
|
+
this.errorMessage = this.messages.errors.date[inputError].replace('{min}', localeDate(this.min, this.locale)).replace('{max}', localeDate(this.max, this.locale));
|
|
131
129
|
}
|
|
132
130
|
// wrong date format
|
|
133
131
|
// element.validity.badInput is default error message
|
|
134
132
|
else {
|
|
135
|
-
this.errorMessage = messages.errors.date.badInput.replace('{min}', ((_a = this.min) === null || _a === void 0 ? void 0 : _a.length) > 0 ? localeDate(this.min) : localeDate('1900-01-01'));
|
|
133
|
+
this.errorMessage = this.messages.errors.date.badInput.replace('{min}', ((_a = this.min) === null || _a === void 0 ? void 0 : _a.length) > 0 ? localeDate(this.min, this.locale) : localeDate('1900-01-01', this.locale));
|
|
136
134
|
}
|
|
137
135
|
};
|
|
138
136
|
/**
|
|
@@ -145,10 +143,6 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
145
143
|
this.errorMessage = undefined;
|
|
146
144
|
if (!this.valid) {
|
|
147
145
|
this.setErrorMessage();
|
|
148
|
-
this.classList.add(this.classError);
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
this.classList.delete(this.classError);
|
|
152
146
|
}
|
|
153
147
|
};
|
|
154
148
|
}
|
|
@@ -174,6 +168,7 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
174
168
|
async displayError() {
|
|
175
169
|
this.checkValidity();
|
|
176
170
|
this.checkError();
|
|
171
|
+
this.hasError = this.invalid;
|
|
177
172
|
}
|
|
178
173
|
/**
|
|
179
174
|
* Date format validation
|
|
@@ -195,6 +190,11 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
195
190
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
196
191
|
*/
|
|
197
192
|
componentWillLoad() {
|
|
193
|
+
// Get locales
|
|
194
|
+
const locales = initLocales(this.element);
|
|
195
|
+
this.locale = locales.locale;
|
|
196
|
+
this.messages = locales.messages;
|
|
197
|
+
// Validate
|
|
198
198
|
this.validateValue(this.value);
|
|
199
199
|
this.validateMin(this.min);
|
|
200
200
|
this.validateMax(this.max);
|
|
@@ -211,8 +211,9 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
211
211
|
* @returns {HTMLElement} HTML Element
|
|
212
212
|
*/
|
|
213
213
|
render() {
|
|
214
|
-
return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly,
|
|
214
|
+
return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: localeDate(this.value, this.locale), tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "date", class: "mg-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, onInput: this.handleInput, onBlur: this.handleBlur, pattern: "[0-9]{4}-[0-9]{2}-[0-9]{2}", ref: el => (this.input = el) })));
|
|
215
215
|
}
|
|
216
|
+
get element() { return this; }
|
|
216
217
|
static get watchers() { return {
|
|
217
218
|
"value": ["validateValue"],
|
|
218
219
|
"min": ["validateMin"],
|
|
@@ -243,18 +244,13 @@ function defineCustomElement$1() {
|
|
|
243
244
|
if (typeof customElements === "undefined") {
|
|
244
245
|
return;
|
|
245
246
|
}
|
|
246
|
-
const components = ["mg-input-date", "mg-
|
|
247
|
+
const components = ["mg-input-date", "mg-icon", "mg-input-title", "mg-tooltip"];
|
|
247
248
|
components.forEach(tagName => { switch (tagName) {
|
|
248
249
|
case "mg-input-date":
|
|
249
250
|
if (!customElements.get(tagName)) {
|
|
250
251
|
customElements.define(tagName, MgInputDate$1);
|
|
251
252
|
}
|
|
252
253
|
break;
|
|
253
|
-
case "mg-character-left":
|
|
254
|
-
if (!customElements.get(tagName)) {
|
|
255
|
-
defineCustomElement$5();
|
|
256
|
-
}
|
|
257
|
-
break;
|
|
258
254
|
case "mg-icon":
|
|
259
255
|
if (!customElements.get(tagName)) {
|
|
260
256
|
defineCustomElement$4();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { M as MgInput } from './MgInput.js';
|
|
3
3
|
import { c as createID, C as ClassList } from './components.utils.js';
|
|
4
|
-
import {
|
|
4
|
+
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { a as localeCurrency, b as localeNumber } from './locale.utils.js';
|
|
6
|
-
import { d as defineCustomElement$5 } from './mg-character-left2.js';
|
|
7
6
|
import { d as defineCustomElement$4 } 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';
|
|
@@ -20,7 +19,7 @@ var InputError;
|
|
|
20
19
|
InputError["REQUIRED"] = "required";
|
|
21
20
|
})(InputError || (InputError = {}));
|
|
22
21
|
|
|
23
|
-
const mgInputNumericCss = ":host{display:block}.mg-input{display
|
|
22
|
+
const mgInputNumericCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container mg-icon{display:flex}.mg-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0%;border-bottom-right-radius:0%}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--label-on-top .mg-input__box{width:auto;max-width:100%}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input.mg-input--width-full:not(.mg-input--label-on-top){justify-content:space-between}.mg-input.mg-input--width-full .mg-input__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}.mg-input .mg-input__box{text-align:var(--mg-inputs-text-align, right)}";
|
|
24
23
|
|
|
25
24
|
const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
26
25
|
constructor() {
|
|
@@ -29,8 +28,8 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
29
28
|
this.__attachShadow();
|
|
30
29
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
31
30
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
32
|
-
//
|
|
33
|
-
this.
|
|
31
|
+
// hasError (triggered by blur event)
|
|
32
|
+
this.hasError = false;
|
|
34
33
|
/**
|
|
35
34
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
36
35
|
* If not set, it will be created.
|
|
@@ -61,6 +60,10 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
61
60
|
* Define numeric type
|
|
62
61
|
*/
|
|
63
62
|
this.type = types[0];
|
|
63
|
+
/**
|
|
64
|
+
* Define currency
|
|
65
|
+
*/
|
|
66
|
+
this.currency = 'USD';
|
|
64
67
|
/**
|
|
65
68
|
* Override integer length
|
|
66
69
|
* integer is the number before the decimal point
|
|
@@ -87,6 +90,9 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
87
90
|
this.handleInput = () => {
|
|
88
91
|
// Check validity
|
|
89
92
|
this.checkValidity();
|
|
93
|
+
if (this.hasError) {
|
|
94
|
+
this.checkError();
|
|
95
|
+
}
|
|
90
96
|
this.value = this.input.value;
|
|
91
97
|
};
|
|
92
98
|
/**
|
|
@@ -103,9 +109,8 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
103
109
|
* @returns {void}
|
|
104
110
|
*/
|
|
105
111
|
this.handleBlur = () => {
|
|
106
|
-
//
|
|
107
|
-
this.
|
|
108
|
-
this.checkError();
|
|
112
|
+
// Display Error
|
|
113
|
+
this.displayError();
|
|
109
114
|
this.hasFocus = false;
|
|
110
115
|
};
|
|
111
116
|
/**
|
|
@@ -131,10 +136,10 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
131
136
|
this.setErrorMessage = () => {
|
|
132
137
|
const inputError = this.getInputError();
|
|
133
138
|
if (inputError === InputError.REQUIRED) {
|
|
134
|
-
this.errorMessage = messages.errors[inputError];
|
|
139
|
+
this.errorMessage = this.messages.errors[inputError];
|
|
135
140
|
}
|
|
136
141
|
else {
|
|
137
|
-
this.errorMessage = messages.errors.numeric[inputError].replace('{min}', `${this.formatValue(this.min)}`).replace('{max}', `${this.formatValue(this.max)}`);
|
|
142
|
+
this.errorMessage = this.messages.errors.numeric[inputError].replace('{min}', `${this.formatValue(this.min)}`).replace('{max}', `${this.formatValue(this.max)}`);
|
|
138
143
|
}
|
|
139
144
|
};
|
|
140
145
|
/**
|
|
@@ -148,10 +153,6 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
148
153
|
// Update class
|
|
149
154
|
if (!this.valid) {
|
|
150
155
|
this.setErrorMessage();
|
|
151
|
-
this.classList.add(this.classError);
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
this.classList.delete(this.classError);
|
|
155
156
|
}
|
|
156
157
|
};
|
|
157
158
|
/**
|
|
@@ -188,7 +189,7 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
188
189
|
* @param {number} value value to format
|
|
189
190
|
* @returns {string} formated local value
|
|
190
191
|
*/
|
|
191
|
-
this.formatValue = (value) => (this.type === 'currency' ? localeCurrency(value) : localeNumber(value));
|
|
192
|
+
this.formatValue = (value) => (this.type === 'currency' ? localeCurrency(value, this.locale, this.currency) : localeNumber(value, this.locale));
|
|
192
193
|
/**
|
|
193
194
|
* Validate append slot
|
|
194
195
|
*
|
|
@@ -224,7 +225,7 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
224
225
|
// emit numeric value
|
|
225
226
|
this.numericValue = this.value !== '' && this.value !== null ? parseFloat(this.value.replace(',', '.')) : null;
|
|
226
227
|
this.valueChange.emit(this.numericValue);
|
|
227
|
-
// Set
|
|
228
|
+
// Set readonlyValue
|
|
228
229
|
this.readonlyValue = this.numericValue !== null ? this.formatValue(this.numericValue) : '';
|
|
229
230
|
}
|
|
230
231
|
}
|
|
@@ -232,7 +233,6 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
232
233
|
if (!types.includes(newValue)) {
|
|
233
234
|
throw new Error(`<mg-input-numeric> prop "type" must be one of : ${types.join(', ')}`);
|
|
234
235
|
}
|
|
235
|
-
this.classList.add(`mg-input--numeric--${this.type}`);
|
|
236
236
|
}
|
|
237
237
|
validateIntegerLength(newValue) {
|
|
238
238
|
if (newValue < 1) {
|
|
@@ -252,6 +252,7 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
252
252
|
async displayError() {
|
|
253
253
|
this.checkValidity();
|
|
254
254
|
this.checkError();
|
|
255
|
+
this.hasError = this.invalid;
|
|
255
256
|
}
|
|
256
257
|
/**
|
|
257
258
|
* Displayed value in input
|
|
@@ -271,6 +272,11 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
271
272
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
272
273
|
*/
|
|
273
274
|
componentWillLoad() {
|
|
275
|
+
// Get locales
|
|
276
|
+
const locales = initLocales(this.element);
|
|
277
|
+
this.locale = locales.locale;
|
|
278
|
+
this.messages = locales.messages;
|
|
279
|
+
// Validate
|
|
274
280
|
this.validateValue(this.value);
|
|
275
281
|
this.validateType(this.type);
|
|
276
282
|
this.validateIntegerLength(this.integerLength);
|
|
@@ -289,7 +295,7 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
289
295
|
* @returns {HTMLElement} HTML Element
|
|
290
296
|
*/
|
|
291
297
|
render() {
|
|
292
|
-
return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly,
|
|
298
|
+
return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: this.mgWidth, disabled: this.disabled, value: this.value, readonlyValue: this.readonlyValue, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "text", class: "mg-input__box", value: this.displayValue(), id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => (this.input = el) }), h("slot", { name: "append-input" })));
|
|
293
299
|
}
|
|
294
300
|
get element() { return this; }
|
|
295
301
|
static get watchers() { return {
|
|
@@ -310,10 +316,11 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
310
316
|
"required": [4],
|
|
311
317
|
"readonly": [4],
|
|
312
318
|
"disabled": [4],
|
|
313
|
-
"
|
|
319
|
+
"mgWidth": [8, "mg-width"],
|
|
314
320
|
"tooltip": [1],
|
|
315
321
|
"helpText": [1, "help-text"],
|
|
316
322
|
"type": [1],
|
|
323
|
+
"currency": [1],
|
|
317
324
|
"max": [2],
|
|
318
325
|
"min": [2],
|
|
319
326
|
"integerLength": [2, "integer-length"],
|
|
@@ -329,18 +336,13 @@ function defineCustomElement$1() {
|
|
|
329
336
|
if (typeof customElements === "undefined") {
|
|
330
337
|
return;
|
|
331
338
|
}
|
|
332
|
-
const components = ["mg-input-numeric", "mg-
|
|
339
|
+
const components = ["mg-input-numeric", "mg-icon", "mg-input-title", "mg-tooltip"];
|
|
333
340
|
components.forEach(tagName => { switch (tagName) {
|
|
334
341
|
case "mg-input-numeric":
|
|
335
342
|
if (!customElements.get(tagName)) {
|
|
336
343
|
customElements.define(tagName, MgInputNumeric$1);
|
|
337
344
|
}
|
|
338
345
|
break;
|
|
339
|
-
case "mg-character-left":
|
|
340
|
-
if (!customElements.get(tagName)) {
|
|
341
|
-
defineCustomElement$5();
|
|
342
|
-
}
|
|
343
|
-
break;
|
|
344
346
|
case "mg-icon":
|
|
345
347
|
if (!customElements.get(tagName)) {
|
|
346
348
|
defineCustomElement$4();
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { M as MgInput } from './MgInput.js';
|
|
3
3
|
import { c as createID, C as ClassList } from './components.utils.js';
|
|
4
|
-
import {
|
|
5
|
-
import { d as defineCustomElement$5 } from './mg-character-left2.js';
|
|
4
|
+
import { i as initLocales } from './index2.js';
|
|
6
5
|
import { d as defineCustomElement$4 } from './mg-icon2.js';
|
|
7
6
|
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
8
7
|
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
9
8
|
|
|
10
|
-
const mgInputPasswordCss = ":host{display:block}.mg-input{display
|
|
9
|
+
const mgInputPasswordCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container mg-icon{display:flex}.mg-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0%;border-bottom-right-radius:0%}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--label-on-top .mg-input__box{width:auto;max-width:100%}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input.mg-input--width-full:not(.mg-input--label-on-top){justify-content:space-between}.mg-input.mg-input--width-full .mg-input__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}";
|
|
11
10
|
|
|
12
11
|
const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
13
12
|
constructor() {
|
|
@@ -16,11 +15,8 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
16
15
|
this.__attachShadow();
|
|
17
16
|
this.valueChange = createEvent(this, "value-change", 7);
|
|
18
17
|
this.inputValid = createEvent(this, "input-valid", 7);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
************/
|
|
22
|
-
// classes
|
|
23
|
-
this.classError = InputClass.ERROR;
|
|
18
|
+
// hasError (triggered by blur event)
|
|
19
|
+
this.hasError = false;
|
|
24
20
|
/**
|
|
25
21
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
26
22
|
* If not set, it will be created.
|
|
@@ -50,7 +46,7 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
50
46
|
/**
|
|
51
47
|
* Define input width
|
|
52
48
|
*/
|
|
53
|
-
this.
|
|
49
|
+
this.mgWidth = 'full';
|
|
54
50
|
/**
|
|
55
51
|
* Component classes
|
|
56
52
|
*/
|
|
@@ -60,14 +56,16 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
60
56
|
*/
|
|
61
57
|
this.handleInput = () => {
|
|
62
58
|
this.checkValidity();
|
|
59
|
+
if (this.hasError) {
|
|
60
|
+
this.checkError();
|
|
61
|
+
}
|
|
63
62
|
this.value = this.input.value;
|
|
64
63
|
};
|
|
65
64
|
/**
|
|
66
65
|
* Handle blur event
|
|
67
66
|
*/
|
|
68
67
|
this.handleBlur = () => {
|
|
69
|
-
this.
|
|
70
|
-
this.checkError();
|
|
68
|
+
this.displayError();
|
|
71
69
|
};
|
|
72
70
|
/**
|
|
73
71
|
* Check if input is valid
|
|
@@ -90,14 +88,7 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
90
88
|
this.errorMessage = undefined;
|
|
91
89
|
// required
|
|
92
90
|
if (!this.valid && this.input.validity.valueMissing) {
|
|
93
|
-
this.errorMessage = messages.errors.required;
|
|
94
|
-
}
|
|
95
|
-
// Update class
|
|
96
|
-
if (this.valid) {
|
|
97
|
-
this.classList.delete(this.classError);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
this.classList.add(this.classError);
|
|
91
|
+
this.errorMessage = this.messages.errors.required;
|
|
101
92
|
}
|
|
102
93
|
};
|
|
103
94
|
}
|
|
@@ -112,6 +103,7 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
112
103
|
async displayError() {
|
|
113
104
|
this.checkValidity();
|
|
114
105
|
this.checkError();
|
|
106
|
+
this.hasError = this.invalid;
|
|
115
107
|
}
|
|
116
108
|
/*************
|
|
117
109
|
* Lifecycle *
|
|
@@ -122,6 +114,8 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
122
114
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
123
115
|
*/
|
|
124
116
|
componentWillLoad() {
|
|
117
|
+
// Get locales
|
|
118
|
+
this.messages = initLocales(this.element).messages;
|
|
125
119
|
// Check validity when component is ready
|
|
126
120
|
// return a promise to process action only in the FIRST render().
|
|
127
121
|
// https://stenciljs.com/docs/component-lifecycle#componentwillload
|
|
@@ -135,8 +129,9 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
135
129
|
* @returns {HTMLElement} HTML Element
|
|
136
130
|
*/
|
|
137
131
|
render() {
|
|
138
|
-
return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly,
|
|
132
|
+
return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: this.mgWidth, disabled: this.disabled, value: this.value, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "password", class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, onInput: this.handleInput, onBlur: this.handleBlur, ref: el => (this.input = el) })));
|
|
139
133
|
}
|
|
134
|
+
get element() { return this; }
|
|
140
135
|
static get watchers() { return {
|
|
141
136
|
"value": ["handleValue"]
|
|
142
137
|
}; }
|
|
@@ -152,7 +147,7 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
152
147
|
"required": [4],
|
|
153
148
|
"readonly": [4],
|
|
154
149
|
"disabled": [4],
|
|
155
|
-
"
|
|
150
|
+
"mgWidth": [8, "mg-width"],
|
|
156
151
|
"tooltip": [1],
|
|
157
152
|
"helpText": [1, "help-text"],
|
|
158
153
|
"valid": [1028],
|
|
@@ -165,18 +160,13 @@ function defineCustomElement$1() {
|
|
|
165
160
|
if (typeof customElements === "undefined") {
|
|
166
161
|
return;
|
|
167
162
|
}
|
|
168
|
-
const components = ["mg-input-password", "mg-
|
|
163
|
+
const components = ["mg-input-password", "mg-icon", "mg-input-title", "mg-tooltip"];
|
|
169
164
|
components.forEach(tagName => { switch (tagName) {
|
|
170
165
|
case "mg-input-password":
|
|
171
166
|
if (!customElements.get(tagName)) {
|
|
172
167
|
customElements.define(tagName, MgInputPassword$1);
|
|
173
168
|
}
|
|
174
169
|
break;
|
|
175
|
-
case "mg-character-left":
|
|
176
|
-
if (!customElements.get(tagName)) {
|
|
177
|
-
defineCustomElement$5();
|
|
178
|
-
}
|
|
179
|
-
break;
|
|
180
170
|
case "mg-icon":
|
|
181
171
|
if (!customElements.get(tagName)) {
|
|
182
172
|
defineCustomElement$4();
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { M as MgInput } from './MgInput.js';
|
|
3
3
|
import { c as createID, C as ClassList, a as allItemsAreString } from './components.utils.js';
|
|
4
|
-
import {
|
|
5
|
-
import { d as defineCustomElement$5 } from './mg-character-left2.js';
|
|
4
|
+
import { i as initLocales } from './index2.js';
|
|
6
5
|
import { d as defineCustomElement$4 } from './mg-icon2.js';
|
|
7
6
|
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
8
7
|
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
9
8
|
|
|
10
|
-
const mgInputRadioCss = ":host{display:block}.mg-input{display
|
|
9
|
+
const mgInputRadioCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container mg-icon{display:flex}.mg-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}fieldset.mg-input{border:0;margin-left:0;margin-right:0;padding:0}fieldset.mg-input input[type=radio],fieldset.mg-input input[type=checkbox]{flex-shrink:0;width:var(--mg-input-check-size);height:var(--mg-input-check-size);margin-top:calc((var(--font-size) * var(--line-height) - var(--mg-input-check-size)) / 2);margin-right:0.6rem;margin-bottom:0;margin-left:0}fieldset.mg-input.mg-input--label-on-top .mg-input__input-group-container{margin-top:0.7rem}.mg-input__input-container mg-tooltip{margin-left:3rem}.mg-input__input-group-container{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;column-gap:2.3rem;row-gap:1rem;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2)}.mg-input__input-group-container--vertical{flex-direction:column}.mg-input__input-group{display:flex;align-items:top}.mg-input__input-group.mg-input__input-group--disabled label{opacity:0.3}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}";
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* type Option validation function
|
|
@@ -26,8 +25,6 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
26
25
|
/************
|
|
27
26
|
* Internal *
|
|
28
27
|
************/
|
|
29
|
-
// classes
|
|
30
|
-
this.classError = InputClass.ERROR;
|
|
31
28
|
// HTML selector
|
|
32
29
|
this.inputs = [];
|
|
33
30
|
/**
|
|
@@ -112,14 +109,7 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
112
109
|
// Set error message
|
|
113
110
|
this.errorMessage = undefined;
|
|
114
111
|
if (!this.valid && invalidElement.validity.valueMissing) {
|
|
115
|
-
this.errorMessage = messages.errors.required;
|
|
116
|
-
}
|
|
117
|
-
// Update class
|
|
118
|
-
if (this.valid) {
|
|
119
|
-
this.classList.delete(this.classError);
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
this.classList.add(this.classError);
|
|
112
|
+
this.errorMessage = this.messages.errors.required;
|
|
123
113
|
}
|
|
124
114
|
};
|
|
125
115
|
/**
|
|
@@ -167,7 +157,9 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
167
157
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
168
158
|
*/
|
|
169
159
|
componentWillLoad() {
|
|
170
|
-
//
|
|
160
|
+
// Get locales
|
|
161
|
+
this.messages = initLocales(this.element).messages;
|
|
162
|
+
// Validate
|
|
171
163
|
this.validateItems(this.items);
|
|
172
164
|
// Check validity when component is ready
|
|
173
165
|
// return a promise to process action only in the FIRST render().
|
|
@@ -182,8 +174,9 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
182
174
|
* @returns {HTMLElement} HTML Element
|
|
183
175
|
*/
|
|
184
176
|
render() {
|
|
185
|
-
return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, disabled: this.disabled, readonly: this.readonly,
|
|
177
|
+
return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, disabled: this.disabled, readonly: this.readonly, mgWidth: undefined, value: this.value, readonlyValue: this.value, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: true }, h("ul", { class: { 'mg-input__input-group-container': true, 'mg-input__input-group-container--vertical': this.inputVerticalList } }, this.options.map((input, index) => (h("li", { class: { 'mg-input__input-group': true, 'mg-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 => this.inputs.push(el) }), h("label", { htmlFor: this.identifier + '_' + index }, input.title)))))));
|
|
186
178
|
}
|
|
179
|
+
get element() { return this; }
|
|
187
180
|
static get watchers() { return {
|
|
188
181
|
"value": ["handleValue"],
|
|
189
182
|
"items": ["validateItems"]
|
|
@@ -214,18 +207,13 @@ function defineCustomElement$1() {
|
|
|
214
207
|
if (typeof customElements === "undefined") {
|
|
215
208
|
return;
|
|
216
209
|
}
|
|
217
|
-
const components = ["mg-input-radio", "mg-
|
|
210
|
+
const components = ["mg-input-radio", "mg-icon", "mg-input-title", "mg-tooltip"];
|
|
218
211
|
components.forEach(tagName => { switch (tagName) {
|
|
219
212
|
case "mg-input-radio":
|
|
220
213
|
if (!customElements.get(tagName)) {
|
|
221
214
|
customElements.define(tagName, MgInputRadio$1);
|
|
222
215
|
}
|
|
223
216
|
break;
|
|
224
|
-
case "mg-character-left":
|
|
225
|
-
if (!customElements.get(tagName)) {
|
|
226
|
-
defineCustomElement$5();
|
|
227
|
-
}
|
|
228
|
-
break;
|
|
229
217
|
case "mg-icon":
|
|
230
218
|
if (!customElements.get(tagName)) {
|
|
231
219
|
defineCustomElement$4();
|