@mgdis/mg-components 3.3.0 → 4.1.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/.storybook/utils.js +24 -0
- package/dist/cjs/{index-369388eb.js → index-179621c8.js} +108 -10
- package/dist/cjs/{index-bead7dbd.js → index-88560a66.js} +47 -48
- package/dist/cjs/loader.cjs.js +3 -17
- package/dist/cjs/mg-badge_24.cjs.entry.js +5687 -0
- package/dist/cjs/mg-components.cjs.js +3 -7
- package/dist/cjs/mg-modal.cjs.entry.js +12 -6
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/atoms/mg-badge/{mg-badge.stories.js → doc/mg-badge.stories.js} +10 -6
- 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} +16 -13
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +4 -0
- package/dist/collection/components/atoms/mg-button/mg-button.css +6 -30
- package/dist/collection/components/atoms/mg-button/mg-button.js +53 -22
- package/dist/collection/components/atoms/mg-character-left/doc/mg-character-left.stories.js +20 -0
- 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} +12 -4
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +99 -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/doc/mg-input-title.stories.js +21 -0
- package/dist/collection/components/atoms/mg-tag/{mg-tag.stories.js → doc/mg-tag.stories.js} +10 -8
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +19 -4
- package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +58 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +26 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +71 -13
- 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} +3 -15
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +22 -15
- 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} +3 -12
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +22 -20
- 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 -13
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +23 -21
- 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 -12
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +22 -20
- 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} +3 -14
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +22 -15
- 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 -16
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +23 -20
- 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} +18 -25
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +54 -30
- 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} +11 -14
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +54 -24
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +64 -37
- package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +57 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +21 -11
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +25 -10
- package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +25 -0
- package/dist/collection/components/molecules/mg-details/mg-details.css +14 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +141 -0
- package/dist/collection/components/molecules/mg-form/{mg-form.stories.js → doc/mg-form.stories.js} +9 -6
- package/dist/collection/components/molecules/mg-form/mg-form.css +5 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +53 -7
- package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +22 -0
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.css +37 -0
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +74 -0
- package/dist/collection/components/molecules/mg-message/{mg-message.stories.js → doc/mg-message.stories.js} +10 -16
- package/dist/collection/components/molecules/mg-message/mg-message.js +15 -7
- package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +43 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +5 -7
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +10 -4
- package/dist/collection/components/molecules/mg-pagination/doc/mg-pagination.stories.js +20 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +17 -18
- package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +29 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +4 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +12 -16
- package/dist/collection/components/molecules/mg-popover/{mg-popover.stories.js → doc/mg-popover.stories.js} +22 -16
- package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +20 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +43 -13
- package/dist/collection/components/molecules/mg-tabs/{mg-tabs.stories.js → doc/mg-tabs.stories.js} +20 -15
- 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 +75 -29
- package/dist/collection/locales/index.js +33 -4
- package/dist/collection/stories/helpers.stories.js +41 -0
- package/dist/collection/stories/icons.stories.js +10 -2
- package/dist/collection/stories/typography.stories.js +8 -1
- package/dist/collection/utils/components.utils.js +10 -0
- package/dist/collection/utils/locale.utils.js +7 -4
- package/dist/collection/variables.css +10 -5
- package/dist/collection/variables.scss +10 -5
- package/dist/components/MgInput.js +6 -23
- package/dist/components/components.utils.js +11 -1
- package/dist/components/index.d.ts +25 -5
- package/dist/components/index.js +25 -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 +14 -17
- package/dist/components/mg-character-left2.js +4 -27
- package/dist/components/mg-details.d.ts +11 -0
- package/dist/components/mg-details.js +87 -0
- package/dist/components/mg-form.js +40 -8
- package/dist/components/mg-icon2.js +122 -17
- package/dist/components/mg-illustrated-message.d.ts +11 -0
- package/dist/components/mg-illustrated-message.js +68 -0
- 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 +43 -20
- package/dist/components/mg-input-toggle.js +27 -18
- 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 +9 -12
- package/dist/components/mg-popover.js +22 -12
- package/dist/components/mg-tabs.js +77 -22
- package/dist/components/mg-tag.js +20 -5
- package/dist/components/mg-tooltip2.js +74 -12
- package/dist/components/popper.js +6 -2
- package/dist/esm/{index-c346f52d.js → index-7efedd97.js} +107 -8
- package/dist/esm/{index-9e877561.js → index-bca81100.js} +48 -46
- package/dist/esm/loader.js +3 -17
- package/dist/esm/mg-badge_24.entry.js +5660 -0
- package/dist/esm/mg-components.js +3 -7
- package/dist/esm/mg-modal.entry.js +12 -6
- 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-5f89600c.js +1 -0
- package/dist/mg-components/p-a2883dc7.entry.js +1 -0
- package/dist/mg-components/p-b14a3443.js +2 -0
- package/dist/mg-components/p-cffe0519.entry.js +1 -0
- package/dist/mg-components/variables.css +10 -5
- package/dist/mg-components/variables.scss +10 -5
- 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} +6 -0
- package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +8 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +12 -1
- package/dist/types/{stories/tags.stories.d.ts → components/atoms/mg-character-left/doc/mg-character-left.stories.d.ts} +2 -1
- 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 +24 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +13 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +27 -2
- 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/{mg-input-textarea.stories.d.ts → doc/mg-input-textarea.stories.d.ts} +8 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +14 -6
- 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-details/doc/mg-details.stories.d.ts +11 -0
- package/dist/types/components/molecules/mg-details/mg-details.d.ts +49 -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 +14 -0
- package/dist/types/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.d.ts +6 -0
- package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +28 -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/mg-panel/{mg-panel.stories.d.ts → doc/mg-panel.stories.d.ts} +0 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +5 -0
- package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +28 -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 +15 -2
- package/dist/types/components/molecules/mg-tabs/{mg-tabs.stories.d.ts → doc/mg-tabs.stories.d.ts} +0 -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 +44 -0
- package/dist/types/components.d.ts +240 -147
- package/dist/types/home/runner/work/mg-components/mg-components/.stencil/.storybook/utils.d.ts +1 -0
- 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/components.utils.d.ts +8 -0
- package/dist/types/utils/locale.utils.d.ts +7 -3
- package/loader/index.js +1 -1
- package/package.json +16 -16
- package/readme.md +6 -35
- package/dist/cjs/css-shim-629916b0.js +0 -6
- package/dist/cjs/mg-badge_21.cjs.entry.js +0 -3358
- package/dist/cjs/mg-popover.cjs.entry.js +0 -161
- package/dist/cjs/popper-0c3964e7.js +0 -1786
- package/dist/cjs/shadow-css-546083ef.js +0 -390
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.stories.js +0 -23
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.stories.js +0 -21
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.stories.js +0 -26
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.js +0 -78
- package/dist/collection/components/molecules/mg-modal/mg-modal.stories.js +0 -51
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.stories.js +0 -24
- package/dist/collection/components/molecules/mg-panel/mg-panel.stories.js +0 -39
- 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/mg-badge_21.entry.js +0 -3334
- package/dist/esm/mg-popover.entry.js +0 -157
- package/dist/esm/popper-8874fd6c.js +0 -1784
- 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-136c8d6f.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-6f173f62.system.entry.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-b7488a4c.entry.js +0 -1
- package/dist/mg-components/p-c1ffb2e1.entry.js +0 -1
- package/dist/mg-components/p-c90cc4bf.system.js +0 -1
- package/dist/mg-components/p-de1164fa.system.entry.js +0 -1
- package/dist/mg-components/p-e4a502b5.system.js +0 -1
- package/dist/types/components/atoms/mg-character-left/mg-character-left.stories.d.ts +0 -16
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-popover/mg-popover.stories.d.ts +0 -12
- package/dist/types/stories/messages.stories.d.ts +0 -13
|
@@ -1,13 +1,13 @@
|
|
|
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 { d as defineCustomElement$5 } from './mg-character-left2.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './mg-icon2.js';
|
|
7
7
|
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
8
8
|
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
9
9
|
|
|
10
|
-
const mgInputTextareaCss = ":host{display:block}.mg-input{display
|
|
10
|
+
const mgInputTextareaCss = ":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-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__input mg-icon,.mg-input__error mg-icon{display:flex}.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}.mg-input mg-character-left{opacity:0.6;font-size:1.1rem}.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__help-text,.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__error{margin-top:0}.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{display:block;height:auto;resize:none}.mg-input .mg-input__box.mg-input__box--resizable{resize:both}.mg-input .mg-input__box.mg-input__box--resizable-horizontal{resize:horizontal}.mg-input .mg-input__box.mg-input__box--resizable-vertical{resize:vertical}.mg-input__with-character-left{width:100%}.mg-input__with-character-left mg-character-left{display:block;visibility:hidden;margin-top:0.2rem;text-align:end}.mg-input.is-focused .mg-input__with-character-left mg-character-left{visibility:visible}@-moz-document url-prefix(){.mg-input__box{overflow-x:hidden}}";
|
|
11
11
|
|
|
12
12
|
const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
13
13
|
constructor() {
|
|
@@ -21,7 +21,9 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
21
21
|
************/
|
|
22
22
|
// classes
|
|
23
23
|
this.classFocus = 'is-focused';
|
|
24
|
-
this.
|
|
24
|
+
this.classHasDisplayCharacterLeft = 'mg-input--has-display-character-left';
|
|
25
|
+
// hasError (triggered by blur event)
|
|
26
|
+
this.hasError = false;
|
|
25
27
|
/**
|
|
26
28
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
27
29
|
* If not set, it will be created.
|
|
@@ -55,7 +57,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
55
57
|
/**
|
|
56
58
|
* Define input width
|
|
57
59
|
*/
|
|
58
|
-
this.
|
|
60
|
+
this.mgWidth = 'full';
|
|
59
61
|
/**
|
|
60
62
|
* Define the number of visible text lines for the control
|
|
61
63
|
*/
|
|
@@ -64,6 +66,10 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
64
66
|
* Define if component should display character left
|
|
65
67
|
*/
|
|
66
68
|
this.displayCharacterLeft = true;
|
|
69
|
+
/**
|
|
70
|
+
* Define if input is resizable
|
|
71
|
+
*/
|
|
72
|
+
this.resizable = 'none';
|
|
67
73
|
/**
|
|
68
74
|
* Component classes
|
|
69
75
|
*/
|
|
@@ -72,6 +78,10 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
72
78
|
* Handle input event
|
|
73
79
|
*/
|
|
74
80
|
this.handleInput = () => {
|
|
81
|
+
if (this.hasError) {
|
|
82
|
+
this.checkValidity();
|
|
83
|
+
this.checkError();
|
|
84
|
+
}
|
|
75
85
|
this.value = this.input.value;
|
|
76
86
|
};
|
|
77
87
|
/**
|
|
@@ -88,9 +98,8 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
88
98
|
// Manage focus
|
|
89
99
|
this.classList.delete(this.classFocus);
|
|
90
100
|
this.classList = new ClassList(this.classList.classes);
|
|
91
|
-
//
|
|
92
|
-
this.
|
|
93
|
-
this.checkError();
|
|
101
|
+
// Display Error
|
|
102
|
+
this.displayError();
|
|
94
103
|
};
|
|
95
104
|
/**
|
|
96
105
|
* Get pattern validity
|
|
@@ -124,14 +133,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
124
133
|
}
|
|
125
134
|
// required
|
|
126
135
|
else if (!this.valid && this.input.validity.valueMissing) {
|
|
127
|
-
this.errorMessage = messages.errors.required;
|
|
128
|
-
}
|
|
129
|
-
// Update class
|
|
130
|
-
if (this.valid) {
|
|
131
|
-
this.classList.delete(this.classError);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
this.classList.add(this.classError);
|
|
136
|
+
this.errorMessage = this.messages.errors.required;
|
|
135
137
|
}
|
|
136
138
|
};
|
|
137
139
|
/**
|
|
@@ -150,6 +152,14 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
150
152
|
this.checkValidity();
|
|
151
153
|
this.valueChange.emit(newValue);
|
|
152
154
|
}
|
|
155
|
+
validateDisplayCharacterLeft(newValue) {
|
|
156
|
+
if (newValue) {
|
|
157
|
+
this.classList.add(this.classHasDisplayCharacterLeft);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
this.classList.delete(this.classHasDisplayCharacterLeft);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
153
163
|
/**
|
|
154
164
|
* Public method to display errors
|
|
155
165
|
*
|
|
@@ -158,6 +168,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
158
168
|
async displayError() {
|
|
159
169
|
this.checkValidity();
|
|
160
170
|
this.checkError();
|
|
171
|
+
this.hasError = this.invalid;
|
|
161
172
|
}
|
|
162
173
|
/*************
|
|
163
174
|
* Lifecycle *
|
|
@@ -168,6 +179,11 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
168
179
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
169
180
|
*/
|
|
170
181
|
componentWillLoad() {
|
|
182
|
+
// Get locales
|
|
183
|
+
this.messages = initLocales(this.element).messages;
|
|
184
|
+
this.characterLeftId = `${this.identifier}-character-left`;
|
|
185
|
+
// Validate
|
|
186
|
+
this.validateDisplayCharacterLeft(this.displayCharacterLeft);
|
|
171
187
|
this.validatePattern();
|
|
172
188
|
// Check validity when component is ready
|
|
173
189
|
// return a promise to process action only in the FIRST render().
|
|
@@ -182,10 +198,17 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
182
198
|
* @returns {HTMLElement} HTML Element
|
|
183
199
|
*/
|
|
184
200
|
render() {
|
|
185
|
-
return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly,
|
|
201
|
+
return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [this.characterLeftId], 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: undefined, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("div", { class: "mg-input__with-character-left" }, h("textarea", { class: {
|
|
202
|
+
'mg-input__box': true,
|
|
203
|
+
'mg-input__box--resizable': this.resizable === 'both',
|
|
204
|
+
'mg-input__box--resizable-horizontal': this.resizable === 'horizontal',
|
|
205
|
+
'mg-input__box--resizable-vertical': this.resizable === 'vertical',
|
|
206
|
+
}, value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, rows: this.rows, maxlength: this.maxlength, disabled: this.disabled, required: this.required, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => (this.input = el) }), this.displayCharacterLeft && this.maxlength && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength })))));
|
|
186
207
|
}
|
|
208
|
+
get element() { return this; }
|
|
187
209
|
static get watchers() { return {
|
|
188
|
-
"value": ["handleValue"]
|
|
210
|
+
"value": ["handleValue"],
|
|
211
|
+
"displayCharacterLeft": ["validateDisplayCharacterLeft"]
|
|
189
212
|
}; }
|
|
190
213
|
static get style() { return mgInputTextareaCss; }
|
|
191
214
|
}, [1, "mg-input-textarea", {
|
|
@@ -200,16 +223,16 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
200
223
|
"required": [4],
|
|
201
224
|
"readonly": [4],
|
|
202
225
|
"disabled": [4],
|
|
203
|
-
"
|
|
226
|
+
"mgWidth": [8, "mg-width"],
|
|
204
227
|
"pattern": [1],
|
|
205
228
|
"patternErrorMessage": [1, "pattern-error-message"],
|
|
206
229
|
"rows": [2],
|
|
207
230
|
"tooltip": [1],
|
|
208
231
|
"displayCharacterLeft": [4, "display-character-left"],
|
|
209
|
-
"characterLeftTemplate": [1, "character-left-template"],
|
|
210
232
|
"helpText": [1, "help-text"],
|
|
211
233
|
"valid": [1028],
|
|
212
234
|
"invalid": [1028],
|
|
235
|
+
"resizable": [1],
|
|
213
236
|
"classList": [32],
|
|
214
237
|
"errorMessage": [32],
|
|
215
238
|
"displayError": [64]
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
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 { d as defineCustomElement$5 } from './mg-character-left2.js';
|
|
5
4
|
import { d as defineCustomElement$4 } from './mg-icon2.js';
|
|
6
5
|
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
7
6
|
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
8
7
|
|
|
9
|
-
const mgInputToggleCss = ":host{display:block}.mg-input{display
|
|
8
|
+
const mgInputToggleCss = ":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-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__input mg-icon,.mg-input__error mg-icon{display:flex}.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.mg-input--toggle .mg-input__input-container{flex:auto;min-width:0}.mg-input__button-toggle{display:flex;padding:0.2rem;min-width:0;background-color:hsl(var(--color-light));border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:calc((var(--font-size) * var(--line-height) + 2 * (0.7rem + var(--mg-inputs-border-width))) / var(--mg-input-toggle-border-radius-ratio));font-size:inherit;line-height:inherit;cursor:pointer}.mg-input__button-toggle:disabled{cursor:default}.mg-input__toggle-item-container{padding:0.5rem 0.9rem;border:0;box-sizing:border-box;border-radius:calc((var(--font-size) * var(--line-height) + 1rem) / var(--mg-input-toggle-border-radius-ratio));background-color:unset;font-weight:unset;color:hsl(var(--color-dark));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mg-input__toggle-item-container:first-of-type{font-weight:600;color:hsl(var(--color-info));background-color:hsl(var(--color-info-h), calc(var(--color-info-s) - 64%), calc(var(--color-info-l) + 55%))}.mg-input.mg-input--toggle-is-active .mg-input__toggle-item-container:first-of-type{background-color:unset;font-weight:unset;color:hsl(var(--color-dark))}.mg-input.mg-input--toggle-is-active .mg-input__toggle-item-container:last-of-type{font-weight:600;color:hsl(var(--color-info));background-color:hsl(var(--color-info-h), calc(var(--color-info-s) - 64%), calc(var(--color-info-l) + 55%))}.mg-input.mg-input--toggle-icon .mg-input__toggle-item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--font-size) * var(--line-height) + 1rem);height:calc(var(--font-size) * var(--line-height) + 1rem);padding:0;visibility:hidden}.mg-input.mg-input--toggle-icon .mg-input__toggle-item-container:first-of-type{visibility:visible}.mg-input.mg-input--toggle-icon .mg-input__toggle-item-container ::slotted(mg-icon){display:flex}.mg-input.mg-input--toggle-icon.mg-input--toggle-is-active .mg-input__toggle-item-container:first-of-type{visibility:hidden}.mg-input.mg-input--toggle-icon.mg-input--toggle-is-active .mg-input__toggle-item-container:last-of-type{visibility:visible}.mg-input.mg-input--toggle-on-off .mg-input__toggle-item-container:first-of-type{font-weight:600;color:hsl(var(--color-dark));background-color:hsl(var(--color-dark-h), calc(var(--color-dark-s) - 30%), calc(var(--color-dark-l) + 75%))}.mg-input.mg-input--toggle-on-off.mg-input--toggle-is-active .mg-input__toggle-item-container:first-of-type{background-color:unset;font-weight:unset;color:hsl(var(--color-dark))}.mg-input.mg-input--toggle-readonly .mg-input__button-toggle{border-color:transparent;background-color:transparent;cursor:initial}.mg-input.mg-input--toggle-readonly .mg-input__toggle-item-container:last-of-type{display:none}.mg-input.mg-input--toggle-readonly.mg-input--toggle-is-active .mg-input__toggle-item-container:first-of-type{display:none}.mg-input.mg-input--toggle-readonly.mg-input--toggle-is-active .mg-input__toggle-item-container:last-of-type{display:flex}.mg-input.mg-input--toggle-disabled .mg-input__button-toggle{opacity:0.3}";
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* type Option validation function
|
|
@@ -29,6 +28,8 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
29
28
|
this.classReadonly = 'mg-input--toggle-readonly';
|
|
30
29
|
this.classDisabled = 'mg-input--toggle-disabled';
|
|
31
30
|
this.classIsActive = 'mg-input--toggle-is-active';
|
|
31
|
+
this.classOnOff = 'mg-input--toggle-on-off';
|
|
32
|
+
this.classIcon = 'mg-input--toggle-icon';
|
|
32
33
|
/**
|
|
33
34
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
34
35
|
* If not set, it will be created.
|
|
@@ -116,11 +117,15 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
116
117
|
}
|
|
117
118
|
handleIsOnOff(newValue) {
|
|
118
119
|
if (newValue)
|
|
119
|
-
this.classList.add(
|
|
120
|
+
this.classList.add(this.classOnOff);
|
|
121
|
+
else
|
|
122
|
+
this.classList.delete(this.classOnOff);
|
|
120
123
|
}
|
|
121
124
|
handleIsIcon(newValue) {
|
|
122
125
|
if (newValue)
|
|
123
|
-
this.classList.add(
|
|
126
|
+
this.classList.add(this.classIcon);
|
|
127
|
+
else
|
|
128
|
+
this.classList.delete(this.classIcon);
|
|
124
129
|
}
|
|
125
130
|
handleReadonly(newValue) {
|
|
126
131
|
if (newValue)
|
|
@@ -149,14 +154,23 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
149
154
|
* @returns {void}
|
|
150
155
|
*/
|
|
151
156
|
setChecked() {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
const optionTrueValueIndex = this.options.map(option => option.value).findIndex(value => value === true);
|
|
158
|
+
if ([0, 1].includes(optionTrueValueIndex)) {
|
|
159
|
+
// has "value" props type is not a boolean, it is bind/render as an attributes/props
|
|
160
|
+
// true props will be represent by "true" string so we convert it has boolean
|
|
161
|
+
// true attribute will be represent by "" string so we convert it has boolean
|
|
162
|
+
// https://stenciljs.com/docs/properties
|
|
163
|
+
if (['', 'true'].includes(this.value) && this.options.find(option => option.value) !== undefined) {
|
|
164
|
+
this.value = true;
|
|
165
|
+
}
|
|
166
|
+
// when options are boolean values and ordered as [true,false] instead [false,true]
|
|
167
|
+
// we need to reversed the checked value logic
|
|
168
|
+
const selectedValue = this.value === this.options[optionTrueValueIndex].value;
|
|
169
|
+
this.checked = optionTrueValueIndex === 0 ? !selectedValue : selectedValue;
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.checked = this.value === this.options[1].value;
|
|
158
173
|
}
|
|
159
|
-
this.checked = this.value === this.options[1].value;
|
|
160
174
|
}
|
|
161
175
|
/*************
|
|
162
176
|
* Lifecycle *
|
|
@@ -183,7 +197,7 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
183
197
|
* @returns {HTMLElement} HTML Element
|
|
184
198
|
*/
|
|
185
199
|
render() {
|
|
186
|
-
return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, readonly: undefined,
|
|
200
|
+
return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, readonly: undefined, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: !this.readonly && this.tooltip, helpText: this.helpText, errorMessage: undefined, isFieldset: false }, h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked }, h("span", { "aria-hidden": "true", class: "mg-input__toggle-item-container" }, h("slot", { name: "item-1" })), h("span", { "aria-hidden": "true", class: "mg-input__toggle-item-container" }, h("slot", { name: "item-2" })))));
|
|
187
201
|
}
|
|
188
202
|
get element() { return this; }
|
|
189
203
|
static get watchers() { return {
|
|
@@ -218,18 +232,13 @@ function defineCustomElement$1() {
|
|
|
218
232
|
if (typeof customElements === "undefined") {
|
|
219
233
|
return;
|
|
220
234
|
}
|
|
221
|
-
const components = ["mg-input-toggle", "mg-
|
|
235
|
+
const components = ["mg-input-toggle", "mg-icon", "mg-input-title", "mg-tooltip"];
|
|
222
236
|
components.forEach(tagName => { switch (tagName) {
|
|
223
237
|
case "mg-input-toggle":
|
|
224
238
|
if (!customElements.get(tagName)) {
|
|
225
239
|
customElements.define(tagName, MgInputToggle$1);
|
|
226
240
|
}
|
|
227
241
|
break;
|
|
228
|
-
case "mg-character-left":
|
|
229
|
-
if (!customElements.get(tagName)) {
|
|
230
|
-
defineCustomElement$5();
|
|
231
|
-
}
|
|
232
|
-
break;
|
|
233
242
|
case "mg-icon":
|
|
234
243
|
if (!customElements.get(tagName)) {
|
|
235
244
|
defineCustomElement$4();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as createID, C as ClassList } from './components.utils.js';
|
|
3
|
-
import {
|
|
3
|
+
import { i as initLocales } from './index2.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './mg-button2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './mg-icon2.js';
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ import { d as defineCustomElement$2 } from './mg-icon2.js';
|
|
|
9
9
|
*/
|
|
10
10
|
const variants = ['info', 'warning', 'success', 'danger'];
|
|
11
11
|
|
|
12
|
-
const mgMessageCss = ".mg-message{display:inline-block;position:relative
|
|
12
|
+
const mgMessageCss = ".mg-message{display:inline-block;position:relative;box-sizing:border-box;min-height:var(--default-size);overflow:hidden;background-color:white;border-radius:var(--mg-message-border-radius);box-shadow:var(--box-shadow)}.mg-message::before{content:\"\";position:absolute;top:0;left:0;width:0.3rem;height:100%}.mg-message.mg-message--info::before{background-color:hsl(var(--color-info))}.mg-message.mg-message--info .mg-message__icon{color:hsl(var(--color-info))}.mg-message.mg-message--warning::before{background-color:hsl(var(--color-warning))}.mg-message.mg-message--warning .mg-message__icon{color:hsl(var(--color-warning))}.mg-message.mg-message--success::before{background-color:hsl(var(--color-success))}.mg-message.mg-message--success .mg-message__icon{color:hsl(var(--color-success))}.mg-message.mg-message--danger::before{background-color:hsl(var(--color-danger))}.mg-message.mg-message--danger .mg-message__icon{color:hsl(var(--color-danger))}.mg-message.mg-message--close-button{padding-right:3.4rem}.mg-message.mg-message--hide{display:none}.mg-message ::slotted(*){margin:0;padding:0}.mg-message__icon{position:absolute;top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2);left:1.3rem;line-height:1}.mg-message__content{display:flex;flex-wrap:wrap;justify-content:flex-end;align-content:stretch;padding:0 1rem 0 3.8rem}.mg-message__content-slot{flex-grow:1;margin:0.84rem 0}.mg-message__content-separator{display:inline-block;width:4.5rem;height:0}.mg-message__content-actions-slot{padding:1rem 0;text-align:right}.mg-message__close-button{position:absolute;top:0;right:0}.mg-message,mg-message{max-width:100%}";
|
|
13
13
|
|
|
14
14
|
const MgMessage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
15
15
|
constructor() {
|
|
@@ -21,6 +21,9 @@ const MgMessage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
21
21
|
/************
|
|
22
22
|
* Internal *
|
|
23
23
|
************/
|
|
24
|
+
// classes
|
|
25
|
+
this.classHide = 'mg-message--hide';
|
|
26
|
+
// IDs
|
|
24
27
|
this.closeButtonId = '';
|
|
25
28
|
// Stored timer setted when hide action is run from setTimeOut
|
|
26
29
|
this.storedTimer = null;
|
|
@@ -94,10 +97,12 @@ const MgMessage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
94
97
|
if (!variants.includes(newValue)) {
|
|
95
98
|
throw new Error(`<mg-message> prop "variant" must be one of : ${variants.join(', ')}`);
|
|
96
99
|
}
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
else {
|
|
101
|
+
if (oldValue !== undefined) {
|
|
102
|
+
this.classList.delete(`mg-message--${oldValue}`);
|
|
103
|
+
}
|
|
104
|
+
this.classList.add(`mg-message--${newValue}`);
|
|
99
105
|
}
|
|
100
|
-
this.classList.add(`mg-message--${this.variant}`);
|
|
101
106
|
}
|
|
102
107
|
validateCloseButton(newValue) {
|
|
103
108
|
if (newValue && this.hasActions) {
|
|
@@ -108,11 +113,11 @@ const MgMessage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
108
113
|
validateHide(newValue) {
|
|
109
114
|
if (newValue) {
|
|
110
115
|
this.componentHide.emit();
|
|
111
|
-
this.classList.add(
|
|
116
|
+
this.classList.add(this.classHide);
|
|
112
117
|
}
|
|
113
118
|
else {
|
|
114
119
|
this.componentShow.emit();
|
|
115
|
-
this.classList.delete(
|
|
120
|
+
this.classList.delete(this.classHide);
|
|
116
121
|
}
|
|
117
122
|
this.hideWithDelay();
|
|
118
123
|
}
|
|
@@ -123,6 +128,9 @@ const MgMessage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
123
128
|
* Check if component props are well configured on init
|
|
124
129
|
*/
|
|
125
130
|
componentWillLoad() {
|
|
131
|
+
// Get locales
|
|
132
|
+
this.messages = initLocales(this.element).messages;
|
|
133
|
+
// Validate
|
|
126
134
|
this.validateVariant(this.variant);
|
|
127
135
|
// Check if close button is an can be activated
|
|
128
136
|
this.hasActions = this.element.querySelector('[slot="actions"]') !== null;
|
|
@@ -140,7 +148,7 @@ const MgMessage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
140
148
|
* @returns {HTMLElement} HTML Element
|
|
141
149
|
*/
|
|
142
150
|
render() {
|
|
143
|
-
return (h("div", { id: this.identifier, class: this.classList.join(), role: this.variant === 'info' ? 'status' : 'alert' }, h("span", { class: "mg-message__icon" }, h("mg-icon", { icon: this.getIcon() })), h("div", { class: "mg-message__content" }, h("span", { class: "mg-message__content-slot" }, h("slot", null)), this.hasActions && h("span", { class: "mg-message__content-separator" }), this.hasActions && (h("span", { class: "mg-message__content-actions-slot" }, h("slot", { name: "actions" })))), this.closeButton && (h("span", { class: "mg-message__close-button" }, h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: messages.message.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" }))))));
|
|
151
|
+
return (h("div", { id: this.identifier, class: this.classList.join(), role: this.variant === 'info' ? 'status' : 'alert' }, h("span", { class: "mg-message__icon" }, h("mg-icon", { icon: this.getIcon() })), h("div", { class: "mg-message__content" }, h("span", { class: "mg-message__content-slot" }, h("slot", null)), this.hasActions && h("span", { class: "mg-message__content-separator" }), this.hasActions && (h("span", { class: "mg-message__content-actions-slot" }, h("slot", { name: "actions" })))), this.closeButton && (h("span", { class: "mg-message__close-button" }, h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.message.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" }))))));
|
|
144
152
|
}
|
|
145
153
|
get element() { return this; }
|
|
146
154
|
static get watchers() { return {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as createID, C as ClassList } from './components.utils.js';
|
|
3
|
-
import {
|
|
3
|
+
import { i as initLocales } from './index2.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './mg-button2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './mg-icon2.js';
|
|
6
6
|
|
|
7
|
-
const mgModalCss = ".mg-modal{display
|
|
7
|
+
const mgModalCss = ".mg-modal{display:flex;justify-content:center;align-items:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;padding:2rem 0;background-color:hsla(var(--color-light), 85%)}.mg-modal__dialog{display:flex;flex-direction:column;align-self:center;row-gap:3rem;padding:1.5rem 2.5rem;width:60rem;height:fit-content;max-width:100%;max-height:100%;box-sizing:border-box;background-color:hsl(var(--color-light));box-shadow:var(--box-shadow);border-radius:var(--mg-modal-border-radius)}.mg-modal__header{margin-bottom:0.5rem}.mg-modal__title{margin:0;font-family:var(--font-family-heading);font-size:var(--mg-modal-title-font-size);font-weight:600}.mg-modal__close-button{float:right;height:var(--mg-modal-title-font-size);margin-top:calc((var(--default-size) - var(--mg-modal-title-font-size) * var(--line-height)) / 2 * -1);margin-right:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2 * -1)}.mg-modal .mg-modal__content{overflow-y:auto}.mg-modal .mg-modal__content::slotted(*){font-size:var(--mg-modal-content-font-size)}.mg-modal.mg-modal--hide{display:none}";
|
|
8
8
|
|
|
9
9
|
const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -16,6 +16,9 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
16
16
|
/************
|
|
17
17
|
* Internal *
|
|
18
18
|
************/
|
|
19
|
+
// Classes
|
|
20
|
+
this.classHide = 'mg-modal--hide';
|
|
21
|
+
// IDs
|
|
19
22
|
this.closeButtonId = '';
|
|
20
23
|
this.titleId = '';
|
|
21
24
|
/**
|
|
@@ -58,11 +61,11 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
58
61
|
validateHide(newValue) {
|
|
59
62
|
if (newValue) {
|
|
60
63
|
this.componentHide.emit();
|
|
61
|
-
this.classList.add(
|
|
64
|
+
this.classList.add(this.classHide);
|
|
62
65
|
}
|
|
63
66
|
else {
|
|
64
67
|
this.componentShow.emit();
|
|
65
|
-
this.classList.delete(
|
|
68
|
+
this.classList.delete(this.classHide);
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
/**
|
|
@@ -86,6 +89,9 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
86
89
|
* @returns {void}
|
|
87
90
|
*/
|
|
88
91
|
componentWillLoad() {
|
|
92
|
+
// Get locales
|
|
93
|
+
this.messages = initLocales(this.element).messages;
|
|
94
|
+
// Validate
|
|
89
95
|
this.hasActions = this.element.querySelector('[slot="actions"]') !== null;
|
|
90
96
|
this.hasContent = this.element.querySelector('[slot="content"]') !== null;
|
|
91
97
|
if (this.closeButton) {
|
|
@@ -100,7 +106,7 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
100
106
|
* @returns {HTMLElement} HTML Element
|
|
101
107
|
*/
|
|
102
108
|
render() {
|
|
103
|
-
return (h("section", { role: "dialog", id: this.identifier, class: this.classList.join(), tabindex: "-1", "aria-labelledby": this.titleId, "aria-modal": "true", "aria-hidden": this.hide }, h("article", { class: "mg-modal__dialog" }, h("header", { class: "mg-modal__header" }, this.closeButton && (h("span", { class: "mg-modal__close-button" }, h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" })))), h("h1", { class: "mg-modal__title", id: this.titleId }, this.modalTitle)), this.hasContent && (h("article", { class: "mg-modal__content" }, h("slot", { name: "content" }))), this.hasActions && (h("footer", { class: "mg-modal__footer" }, h("slot", { name: "actions" }))))));
|
|
109
|
+
return (h("section", { role: "dialog", id: this.identifier, class: this.classList.join(), tabindex: "-1", "aria-labelledby": this.titleId, "aria-modal": "true", "aria-hidden": this.hide }, h("article", { class: "mg-modal__dialog" }, h("header", { class: "mg-modal__header" }, this.closeButton && (h("span", { class: "mg-modal__close-button" }, h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" })))), h("h1", { class: "mg-modal__title", id: this.titleId }, this.modalTitle)), this.hasContent && (h("article", { class: "mg-modal__content" }, h("slot", { name: "content" }))), this.hasActions && (h("footer", { class: "mg-modal__footer" }, h("slot", { name: "actions" }))))));
|
|
104
110
|
}
|
|
105
111
|
get element() { return this; }
|
|
106
112
|
static get watchers() { return {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as createID } from './components.utils.js';
|
|
3
|
-
import {
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$6 } from './mg-character-left2.js';
|
|
3
|
+
import { i as initLocales } from './index2.js';
|
|
4
|
+
import { d as defineCustomElement$6 } from './mg-button2.js';
|
|
6
5
|
import { d as defineCustomElement$5 } from './mg-icon2.js';
|
|
7
6
|
import { d as defineCustomElement$4 } from './mg-input-select2.js';
|
|
8
7
|
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
@@ -14,7 +13,7 @@ var NavigationAction;
|
|
|
14
13
|
NavigationAction["PREVIOUS"] = "previous";
|
|
15
14
|
})(NavigationAction || (NavigationAction = {}));
|
|
16
15
|
|
|
17
|
-
const mgPaginationCss = ".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-pagination__nav{display
|
|
16
|
+
const mgPaginationCss = ".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-pagination__nav{display:flex;align-items:center;flex-direction:row}.mg-pagination__nav mg-input-select{margin-right:0.5rem}.mg-pagination__button{display:flex}.mg-pagination__button:first-of-type{margin-right:1rem}.mg-pagination__button:last-of-type{margin-left:1rem}";
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* Range generator
|
|
@@ -43,19 +42,11 @@ const MgPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
43
42
|
this.__registerHost();
|
|
44
43
|
this.__attachShadow();
|
|
45
44
|
this.currentPageChange = createEvent(this, "current-page-change", 7);
|
|
46
|
-
/**************
|
|
47
|
-
* Decorators *
|
|
48
|
-
**************/
|
|
49
45
|
/**
|
|
50
46
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
51
47
|
* If not set, it will be created.
|
|
52
48
|
*/
|
|
53
49
|
this.identifier = createID('mg-pagination');
|
|
54
|
-
/**
|
|
55
|
-
* Panignation label. Is a short description.
|
|
56
|
-
* Customize default value can be usefull to improve accessibility
|
|
57
|
-
*/
|
|
58
|
-
this.label = 'pagination';
|
|
59
50
|
/**
|
|
60
51
|
* Component total pages
|
|
61
52
|
*/
|
|
@@ -119,8 +110,15 @@ const MgPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
119
110
|
* @returns {void}
|
|
120
111
|
*/
|
|
121
112
|
componentWillLoad() {
|
|
113
|
+
// Get locales
|
|
114
|
+
this.messages = initLocales(this.element).messages;
|
|
115
|
+
// Validate
|
|
122
116
|
this.validateTotalPages(this.totalPages);
|
|
123
117
|
this.validateCurrentPage(this.currentPage);
|
|
118
|
+
// Set default label
|
|
119
|
+
if (this.label === undefined || this.label === '') {
|
|
120
|
+
this.label = this.messages.pagination.label;
|
|
121
|
+
}
|
|
124
122
|
}
|
|
125
123
|
/**
|
|
126
124
|
* Render
|
|
@@ -128,11 +126,12 @@ const MgPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
128
126
|
* @returns {HTMLElement} HTML Element
|
|
129
127
|
*/
|
|
130
128
|
render() {
|
|
131
|
-
const navigationActionButton = (disabled, action) => (h("mg-button", { identifier: `${this.identifier}-button-${action}`, class: "mg-pagination__button", label: messages.pagination[`${action}Page`],
|
|
129
|
+
const navigationActionButton = (disabled, action) => (h("mg-button", { identifier: `${this.identifier}-button-${action}`, class: "mg-pagination__button", label: this.messages.pagination[`${action}Page`],
|
|
132
130
|
// eslint-disable-next-line react/jsx-no-bind
|
|
133
|
-
onClick: () => this.handleGoToPage(action), disabled: disabled, variant: "flat" }, action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }), messages.general[action], action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
|
|
134
|
-
return (h("nav", { "aria-label": this.label, id: this.identifier, class: "mg-pagination__nav" }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }), h("span", { class: "sr-only" }, messages.pagination.page, " ", this.currentPage), h("span", null, "/ ", this.totalPages, " ", this.totalPages > 1 ? messages.pagination.pages : messages.pagination.page), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT)));
|
|
131
|
+
onClick: () => this.handleGoToPage(action), disabled: disabled, variant: "flat" }, action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }), this.messages.general[action], action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
|
|
132
|
+
return (h("nav", { "aria-label": this.label, id: this.identifier, class: "mg-pagination__nav" }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }), h("span", { class: "sr-only" }, this.messages.pagination.page, " ", this.currentPage), h("span", null, "/ ", this.totalPages, " ", this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT)));
|
|
135
133
|
}
|
|
134
|
+
get element() { return this; }
|
|
136
135
|
static get watchers() { return {
|
|
137
136
|
"totalPages": ["validateTotalPages"],
|
|
138
137
|
"currentPage": ["validateCurrentPage"]
|
|
@@ -140,7 +139,7 @@ const MgPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
140
139
|
static get style() { return mgPaginationCss; }
|
|
141
140
|
}, [1, "mg-pagination", {
|
|
142
141
|
"identifier": [1],
|
|
143
|
-
"label": [
|
|
142
|
+
"label": [1025],
|
|
144
143
|
"totalPages": [2, "total-pages"],
|
|
145
144
|
"currentPage": [1538, "current-page"]
|
|
146
145
|
}]);
|
|
@@ -148,7 +147,7 @@ function defineCustomElement$1() {
|
|
|
148
147
|
if (typeof customElements === "undefined") {
|
|
149
148
|
return;
|
|
150
149
|
}
|
|
151
|
-
const components = ["mg-pagination", "mg-button", "mg-
|
|
150
|
+
const components = ["mg-pagination", "mg-button", "mg-icon", "mg-input-select", "mg-input-title", "mg-tooltip"];
|
|
152
151
|
components.forEach(tagName => { switch (tagName) {
|
|
153
152
|
case "mg-pagination":
|
|
154
153
|
if (!customElements.get(tagName)) {
|
|
@@ -156,11 +155,6 @@ function defineCustomElement$1() {
|
|
|
156
155
|
}
|
|
157
156
|
break;
|
|
158
157
|
case "mg-button":
|
|
159
|
-
if (!customElements.get(tagName)) {
|
|
160
|
-
defineCustomElement$7();
|
|
161
|
-
}
|
|
162
|
-
break;
|
|
163
|
-
case "mg-character-left":
|
|
164
158
|
if (!customElements.get(tagName)) {
|
|
165
159
|
defineCustomElement$6();
|
|
166
160
|
}
|