@mgdis/mg-components 5.19.2 → 5.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{components.utils-dc9c8a53.js → components.utils-cd908d4e.js} +102 -99
- package/dist/cjs/components.utils-cd908d4e.js.map +1 -0
- package/dist/cjs/{index-c042e24b.js → index-8532b5e9.js} +320 -137
- package/dist/cjs/index-8532b5e9.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_34.cjs.entry.js +5130 -5057
- package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-components.cjs.js.map +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +224 -224
- package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
- package/dist/collection/assets/icons/index.js +193 -183
- package/dist/collection/assets/icons/index.js.map +1 -0
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +161 -161
- package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +362 -347
- package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js +126 -126
- package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -1
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +101 -101
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js.map +1 -1
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +47 -47
- package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +231 -231
- package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +132 -132
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +158 -158
- package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +46 -46
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +3 -3
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +398 -398
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
- package/dist/collection/components/molecules/inputs/MgInput.conf.js +8 -0
- package/dist/collection/components/molecules/inputs/MgInput.conf.js.map +1 -1
- package/dist/collection/components/molecules/inputs/MgInput.js +84 -84
- package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +8 -8
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +266 -266
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +4 -4
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +789 -791
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +4 -4
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +589 -572
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +4 -4
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +779 -767
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +537 -520
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +566 -550
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +701 -689
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js +0 -4
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +771 -754
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +706 -689
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +527 -522
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +2 -2
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +263 -263
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +6 -6
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +423 -423
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js.map +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +214 -214
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +155 -150
- package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +332 -335
- package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +85 -85
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +189 -189
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +325 -304
- package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +317 -317
- package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +2 -2
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js.map +1 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +216 -216
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +409 -399
- package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +91 -91
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +336 -329
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +94 -94
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +4 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js.map +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +348 -343
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
- package/dist/collection/locales/fr/messages.json +4 -4
- package/dist/collection/locales/index.spec.js +20 -20
- package/dist/collection/locales/index.spec.js.map +1 -1
- package/dist/collection/utils/behaviors.utils.js +127 -127
- package/dist/collection/utils/behaviors.utils.js.map +1 -1
- package/dist/collection/utils/behaviors.utils.spec.js +42 -42
- package/dist/collection/utils/behaviors.utils.spec.js.map +1 -1
- package/dist/collection/utils/components.utils.js +77 -75
- package/dist/collection/utils/components.utils.js.map +1 -1
- package/dist/collection/utils/components.utils.spec.js +150 -135
- package/dist/collection/utils/components.utils.spec.js.map +1 -1
- package/dist/collection/utils/e2e.test.utils.js +21 -21
- package/dist/collection/utils/e2e.test.utils.js.map +1 -1
- package/dist/collection/utils/locale.utils.js +17 -17
- package/dist/collection/utils/locale.utils.js.map +1 -1
- package/dist/collection/utils/locale.utils.spec.js +45 -45
- package/dist/collection/utils/locale.utils.spec.js.map +1 -1
- package/dist/collection/utils/playwright.e2e.test.utils.js +41 -41
- package/dist/collection/utils/playwright.e2e.test.utils.js.map +1 -1
- package/dist/collection/utils/playwright.fixture.js +24 -0
- package/dist/collection/utils/playwright.fixture.js.map +1 -0
- package/dist/collection/utils/unit.test.utils.js +50 -50
- package/dist/collection/utils/unit.test.utils.js.map +1 -1
- package/dist/components/MgInput.js +105 -97
- package/dist/components/MgInput.js.map +1 -1
- package/dist/components/components.utils.js +78 -76
- package/dist/components/components.utils.js.map +1 -1
- package/dist/components/index2.js +21 -21
- package/dist/components/index2.js.map +1 -1
- package/dist/components/mg-action-more.d.ts +2 -2
- package/dist/components/mg-action-more.js +173 -173
- package/dist/components/mg-action-more.js.map +1 -1
- package/dist/components/mg-badge.d.ts +2 -2
- package/dist/components/mg-badge2.js +83 -83
- package/dist/components/mg-badge2.js.map +1 -1
- package/dist/components/mg-button.d.ts +2 -2
- package/dist/components/mg-button2.js +182 -167
- package/dist/components/mg-button2.js.map +1 -1
- package/dist/components/mg-card.d.ts +2 -2
- package/dist/components/mg-card2.js +77 -77
- package/dist/components/mg-card2.js.map +1 -1
- package/dist/components/mg-character-left.d.ts +2 -2
- package/dist/components/mg-character-left2.js +50 -50
- package/dist/components/mg-character-left2.js.map +1 -1
- package/dist/components/mg-details.d.ts +2 -2
- package/dist/components/mg-details.js +69 -69
- package/dist/components/mg-details.js.map +1 -1
- package/dist/components/mg-divider.d.ts +2 -2
- package/dist/components/mg-divider.js +30 -30
- package/dist/components/mg-divider.js.map +1 -1
- package/dist/components/mg-form.d.ts +2 -2
- package/dist/components/mg-form.js +171 -179
- package/dist/components/mg-form.js.map +1 -1
- package/dist/components/mg-icon.d.ts +2 -2
- package/dist/components/mg-icon2.js +327 -309
- package/dist/components/mg-icon2.js.map +1 -1
- package/dist/components/mg-illustrated-message.d.ts +2 -2
- package/dist/components/mg-illustrated-message.js +51 -51
- package/dist/components/mg-illustrated-message.js.map +1 -1
- package/dist/components/mg-input-checkbox-paginated.d.ts +2 -2
- package/dist/components/mg-input-checkbox-paginated2.js +170 -170
- package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
- package/dist/components/mg-input-checkbox.d.ts +2 -2
- package/dist/components/mg-input-checkbox.js +478 -480
- package/dist/components/mg-input-checkbox.js.map +1 -1
- package/dist/components/mg-input-date.d.ts +2 -2
- package/dist/components/mg-input-date.js +266 -260
- package/dist/components/mg-input-date.js.map +1 -1
- package/dist/components/mg-input-numeric.d.ts +2 -2
- package/dist/components/mg-input-numeric.js +354 -348
- package/dist/components/mg-input-numeric.js.map +1 -1
- package/dist/components/mg-input-password.d.ts +2 -2
- package/dist/components/mg-input-password.js +205 -199
- package/dist/components/mg-input-password.js.map +1 -1
- package/dist/components/mg-input-radio.d.ts +2 -2
- package/dist/components/mg-input-radio.js +236 -231
- package/dist/components/mg-input-radio.js.map +1 -1
- package/dist/components/mg-input-select.d.ts +2 -2
- package/dist/components/mg-input-select2.js +316 -310
- package/dist/components/mg-input-select2.js.map +1 -1
- package/dist/components/mg-input-text.d.ts +2 -2
- package/dist/components/mg-input-text2.js +306 -300
- package/dist/components/mg-input-text2.js.map +1 -1
- package/dist/components/mg-input-textarea.d.ts +2 -2
- package/dist/components/mg-input-textarea.js +277 -271
- package/dist/components/mg-input-textarea.js.map +1 -1
- package/dist/components/mg-input-title.d.ts +2 -2
- package/dist/components/mg-input-title2.js +60 -60
- package/dist/components/mg-input-title2.js.map +1 -1
- package/dist/components/mg-input-toggle.d.ts +2 -2
- package/dist/components/mg-input-toggle.js +251 -251
- package/dist/components/mg-input-toggle.js.map +1 -1
- package/dist/components/mg-item-more.d.ts +2 -2
- package/dist/components/mg-item-more.js +285 -285
- package/dist/components/mg-item-more.js.map +1 -1
- package/dist/components/mg-menu-item.d.ts +2 -2
- package/dist/components/mg-menu-item2.js +345 -345
- package/dist/components/mg-menu-item2.js.map +1 -1
- package/dist/components/mg-menu.conf.js +2 -2
- package/dist/components/mg-menu.conf.js.map +1 -1
- package/dist/components/mg-menu.d.ts +2 -2
- package/dist/components/mg-menu2.js +176 -176
- package/dist/components/mg-menu2.js.map +1 -1
- package/dist/components/mg-message.d.ts +2 -2
- package/dist/components/mg-message.js +198 -193
- package/dist/components/mg-message.js.map +1 -1
- package/dist/components/mg-modal.d.ts +2 -2
- package/dist/components/mg-modal.js +198 -198
- package/dist/components/mg-modal.js.map +1 -1
- package/dist/components/mg-pagination.d.ts +2 -2
- package/dist/components/mg-pagination2.js +133 -133
- package/dist/components/mg-pagination2.js.map +1 -1
- package/dist/components/mg-panel.d.ts +2 -2
- package/dist/components/mg-panel.js +238 -238
- package/dist/components/mg-panel.js.map +1 -1
- package/dist/components/mg-popover-content.d.ts +2 -2
- package/dist/components/mg-popover-content2.js +70 -70
- package/dist/components/mg-popover-content2.js.map +1 -1
- package/dist/components/mg-popover.d.ts +2 -2
- package/dist/components/mg-popover2.js +224 -222
- package/dist/components/mg-popover2.js.map +1 -1
- package/dist/components/mg-skip-links.d.ts +2 -2
- package/dist/components/mg-skip-links.js +57 -57
- package/dist/components/mg-skip-links.js.map +1 -1
- package/dist/components/mg-tabs.d.ts +2 -2
- package/dist/components/mg-tabs.js +243 -243
- package/dist/components/mg-tabs.js.map +1 -1
- package/dist/components/mg-tag.d.ts +2 -2
- package/dist/components/mg-tag.js +97 -97
- package/dist/components/mg-tag.js.map +1 -1
- package/dist/components/mg-tooltip-content.d.ts +2 -2
- package/dist/components/mg-tooltip-content2.js +30 -30
- package/dist/components/mg-tooltip-content2.js.map +1 -1
- package/dist/components/mg-tooltip.d.ts +2 -2
- package/dist/components/mg-tooltip2.js +316 -316
- package/dist/components/mg-tooltip2.js.map +1 -1
- package/dist/components/popper.js +6 -12
- package/dist/components/popper.js.map +1 -1
- package/dist/esm/{components.utils-0f76010d.js → components.utils-0d67c31c.js} +102 -100
- package/dist/esm/components.utils-0d67c31c.js.map +1 -0
- package/dist/esm/{index-ce01e63b.js → index-f34a3a2c.js} +320 -137
- package/dist/esm/index-f34a3a2c.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_34.entry.js +5130 -5057
- package/dist/esm/mg-action-more_34.entry.js.map +1 -1
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-components.js.map +1 -1
- package/dist/esm/mg-item-more.entry.js +224 -224
- package/dist/esm/mg-item-more.entry.js.map +1 -1
- package/dist/mg-components/locales/fr/messages.json +4 -4
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-components.esm.js.map +1 -1
- package/dist/mg-components/p-629454f7.entry.js +2 -0
- package/dist/mg-components/p-629454f7.entry.js.map +1 -0
- package/dist/mg-components/p-7444ff40.js +3 -0
- package/dist/mg-components/p-7444ff40.js.map +1 -0
- package/dist/mg-components/p-af42d17b.js +2 -0
- package/dist/mg-components/p-af42d17b.js.map +1 -0
- package/dist/mg-components/{p-01ebc95a.entry.js → p-e0fb0f3c.entry.js} +2 -2
- package/dist/mg-components/p-e0fb0f3c.entry.js.map +1 -0
- package/dist/types/assets/icons/index.d.ts +193 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +41 -41
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +100 -96
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +39 -39
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +37 -37
- package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +12 -12
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +56 -56
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +34 -34
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +51 -51
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.d.ts +12 -12
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +3 -3
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +113 -113
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +10 -3
- package/dist/types/components/molecules/inputs/MgInput.d.ts +17 -16
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +100 -100
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +26 -26
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +262 -260
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.conf.d.ts +4 -4
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +150 -149
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.d.ts +4 -4
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +223 -222
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +142 -141
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +3 -3
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +152 -151
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +6 -6
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +193 -192
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.conf.d.ts +1 -6
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +195 -194
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +181 -180
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +141 -141
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +2 -2
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +97 -97
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +6 -6
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +179 -179
- package/dist/types/components/molecules/mg-action-more/mg-action-more.conf.d.ts +12 -11
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +72 -72
- package/dist/types/components/molecules/mg-details/mg-details.d.ts +45 -45
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +103 -104
- package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +27 -27
- package/dist/types/components/molecules/mg-item-more/mg-item-more.conf.d.ts +5 -5
- package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +61 -61
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +100 -93
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +107 -107
- package/dist/types/components/molecules/mg-pagination/mg-pagination.conf.d.ts +2 -2
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +74 -74
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +149 -149
- package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +43 -43
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +88 -88
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.conf.d.ts +2 -2
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +40 -40
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +10 -10
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +118 -118
- package/dist/types/components.d.ts +296 -32
- package/dist/types/locales/index.d.ts +172 -172
- package/dist/types/stencil-public-runtime.d.ts +29 -0
- package/dist/types/utils/behaviors.utils.d.ts +65 -65
- package/dist/types/utils/components.utils.d.ts +32 -26
- package/dist/types/utils/locale.utils.d.ts +2 -2
- package/dist/types/utils/playwright.fixture.d.ts +3 -0
- package/dist/types/utils/unit.test.utils.d.ts +5 -5
- package/package.json +33 -47
- package/dist/cjs/components.utils-dc9c8a53.js.map +0 -1
- package/dist/cjs/index-c042e24b.js.map +0 -1
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js +0 -33
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js.map +0 -1
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js +0 -70
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js.map +0 -1
- package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js +0 -91
- package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js.map +0 -1
- package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js +0 -142
- package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js.map +0 -1
- package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js +0 -36
- package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js.map +0 -1
- package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js +0 -43
- package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js.map +0 -1
- package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js +0 -15
- package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js.map +0 -1
- package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js +0 -42
- package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js.map +0 -1
- package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js +0 -11
- package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js.map +0 -1
- package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js +0 -14
- package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js.map +0 -1
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js +0 -55
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js.map +0 -1
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js +0 -84
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js.map +0 -1
- package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.js +0 -12
- package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.js.map +0 -1
- package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js +0 -23
- package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js.map +0 -1
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js +0 -23
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js.map +0 -1
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js +0 -71
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js.map +0 -1
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js +0 -138
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js.map +0 -1
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js +0 -272
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js +0 -237
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js +0 -640
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js +0 -123
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js +0 -379
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js +0 -212
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js +0 -456
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js +0 -115
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js +0 -289
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js +0 -154
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js +0 -355
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js +0 -194
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js +0 -399
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js +0 -147
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js +0 -353
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js +0 -129
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js +0 -318
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.js +0 -108
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js +0 -247
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js.map +0 -1
- package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.js +0 -239
- package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js +0 -175
- package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js.map +0 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.js +0 -100
- package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js +0 -295
- package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js +0 -128
- package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js +0 -187
- package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js +0 -30
- package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js +0 -42
- package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js +0 -169
- package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js.map +0 -1
- package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js +0 -277
- package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js +0 -39
- package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js.map +0 -1
- package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js +0 -36
- package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js +0 -85
- package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js +0 -106
- package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js +0 -64
- package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js.map +0 -1
- package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js +0 -109
- package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js +0 -62
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js +0 -40
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js.map +0 -1
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js +0 -26
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js +0 -122
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js +0 -57
- package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js +0 -121
- package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js +0 -106
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js +0 -213
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.playwright.js +0 -140
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js +0 -142
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js +0 -55
- package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js.map +0 -1
- package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js +0 -55
- package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js.map +0 -1
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js +0 -76
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js.map +0 -1
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js +0 -332
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js.map +0 -1
- package/dist/collection/utils/stencil.e2e.test.utils.js +0 -33
- package/dist/collection/utils/stencil.e2e.test.utils.js.map +0 -1
- package/dist/esm/components.utils-0f76010d.js.map +0 -1
- package/dist/esm/index-ce01e63b.js.map +0 -1
- package/dist/mg-components/p-01ebc95a.entry.js.map +0 -1
- package/dist/mg-components/p-1aa89acf.js +0 -3
- package/dist/mg-components/p-1aa89acf.js.map +0 -1
- package/dist/mg-components/p-71a5a848.entry.js +0 -2
- package/dist/mg-components/p-71a5a848.entry.js.map +0 -1
- package/dist/mg-components/p-c9e2c669.js +0 -2
- package/dist/mg-components/p-c9e2c669.js.map +0 -1
- package/dist/types/components/atoms/mg-badge/test/mg-badge.e2e.playwright.d.ts +0 -1
- package/dist/types/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.d.ts +0 -1
- package/dist/types/components/atoms/mg-tag/test/mg-tag.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.d.ts +0 -2
- package/dist/types/components/molecules/mg-details/test/mg-details.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.template.d.ts +0 -12
- package/dist/types/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/mg-panel/test/mg-panel.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/mg-popover/test/mg-popover.e2e.playwright.d.ts +0 -1
- package/dist/types/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.d.ts +0 -1
- package/dist/types/utils/stencil.e2e.test.utils.d.ts +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"mg-input-numeric.js","mappings":";;;;;;;;;AAAA;;;AAGO,MAAM,KAAK,GAAa,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAElE,IAAY,UAKX;AALD,WAAY,UAAU;EACpB,yBAAW,CAAA;EACX,yBAAW,CAAA;EACX,+BAAiB,CAAA;EACjB,mCAAqB,CAAA;AACvB,CAAC,EALW,UAAU,KAAV,UAAU;;ACLtB,MAAM,iBAAiB,GAAG,itLAAitL;;MCa9tLA,gBAAc;;;;;;;;IAkBjB,sBAAiB,GAAG,KAAK,CAAC;;;;IA4R1B,gBAAW,GAAG;;MAEpB,IAAI,CAAC,aAAa,EAAE,CAAC;MACrB,IAAI,IAAI,CAAC,iBAAiB,EAAE;QA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ric/mg-input-numeric.conf.ts","../styles/dist/components/mg-input-numeric.css?tag=mg-input-numeric&encapsulation=shadow","src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.tsx"],"sourcesContent":["/**\n * List of all possibles types\n */\nexport const types: string[] = ['decimal', 'integer', 'currency'];\n\nexport enum InputError {\n MIN = 'min',\n MAX = 'max',\n MINMAX = 'minMax',\n REQUIRED = 'required',\n}\n",":host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;max-width:100%;min-height:var(--default-size);align-items:flex-start;margin-bottom:var(--mg-inputs-margin-bottom, 0)}.mg-c-input mg-input-title{width:var(--mg-inputs-title-width, auto);flex-shrink:var(--mg-inputs-shrink, 1);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-c-input__error{display:inline-block;padding:.3rem .8rem;border-radius:.3rem;margin-top:.2rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-c-input__input-container{min-height:var(--default-size)}.mg-c-input__input-container>strong{display:inline-block;min-height:var(--font-size);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2)}.mg-c-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-c-input__input-container .mg-c-input__help-text,.mg-c-input__input-container .mg-c-input__error{font-size:1.2rem;text-align:start}.mg-c-input.mg-c-input--label-on-top{flex-direction:column}.mg-c-input.mg-c-input--label-on-top .mg-c-input__input-container{width:100%}.mg-c-input__title{display:flex;align-items:baseline;margin-bottom:.3rem}.mg-c-input__title mg-input-title{width:auto;flex-shrink:1;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-c-input__title mg-tooltip{margin-top:0}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__input{display:flex}.mg-c-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input__input.mg-c-input__input--has-error .mg-c-input__box{border-color:hsl(var(--color-danger))}.mg-c-input__input+.mg-c-input__help-text,.mg-c-input__input+.mg-c-input__error{margin-top:.5rem}.mg-c-input__input .mg-c-input__box:disabled,.mg-c-input__input-group--disabled label,.mg-c-input.mg-c-input--toggle-disabled .mg-c-input__input .mg-c-input__button-toggle,.mg-c-input.mg-c-input--checkbox-multi-disabled .mg-c-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-c-input__box{height:var(--default-size);box-sizing:border-box;padding:calc((var(--default-size) - var(--font-size)*var(--line-height))/2) var(--mg-inputs-spacer);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));color:hsl(var(--color-dark));font-family:inherit;font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 .6rem hsl(var(--mg-inputs-color-shadow-focus-hsl)/50%)}.mg-c-input__box:disabled{opacity:.3}.mg-c-input.mg-c-input--label-on-top .mg-c-input__box{width:auto;max-width:100%}.mg-c-input.mg-c-input--is-input-group-append{--mg-button-border-radius-top-left: 0;--mg-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:-0.1rem;border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--is-input-group-append.mg-c-input--readonly slot[name=append-input]{display:none}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right: 0;--mg-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width: 0}.mg-c-input.mg-c-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-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input:not(.mg-c-input--label-on-top) .mg-c-input__box{width:100%;min-width:5rem;max-width:calc(17.7rem + var(--mg-inputs-spacer)*2)}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:space-between}.mg-c-input.mg-c-input--width-full.mg-c-input--label-on-top .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container{width:100%;flex:auto}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container .mg-c-input__box{max-width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__input{width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__with-character-left{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__box{min-width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-4 .mg-c-input__input-container .mg-c-input__box{max-width:7rem}.mg-c-input.mg-c-input--width-2 .mg-c-input__input-container .mg-c-input__box{max-width:5rem}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media(prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input .mg-c-input__box{text-align:var(--mg-inputs-text-align, right)}/*# sourceMappingURL=mg-input-numeric.css.map */\n","import { Component, Element, Event, h, Prop, EventEmitter, State, Watch, Method } from '@stencil/core';\nimport { MgInput } from '../MgInput';\nimport { Width } from '../MgInput.conf';\nimport { types, InputError } from './mg-input-numeric.conf';\nimport { ClassList, isValidString } from '../../../../utils/components.utils';\nimport { initLocales } from '../../../../locales/';\nimport { localeCurrency, localeNumber } from '../../../../utils/locale.utils';\n\n@Component({\n tag: 'mg-input-numeric',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-numeric.css',\n shadow: true,\n})\nexport class MgInputNumeric {\n /************\n * Internal *\n ************/\n\n // Manage different values\n private storedValue: string;\n private numericValue: number;\n private readonlyValue: string;\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private locale: string;\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputNumericElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n validateValue(newValue: MgInputNumeric['value']): void {\n // has input value is always render as string we get a stringified value or a '' for nullish value, so we test string type\n if (typeof newValue === 'string') {\n // Split number and decimal\n const [integer, decimal = ''] = newValue.replace('-', '').split(/[.,]/);\n // Regex\n const regex = this.type === 'integer' ? /^-?\\d+$/ : /^-?\\d+(?:[.,]\\d*)?$/;\n // Filter input\n if (this.isValidValue(newValue, regex, integer, decimal)) {\n this.storedValue = newValue;\n } else {\n newValue = this.handleInvalidValue();\n }\n // Set value and input value\n this.updateValues(newValue);\n }\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop: boolean;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop() placeholder: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width;\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip: string;\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText: string;\n\n /**\n * Define numeric type\n */\n @Prop() type: string = types[0];\n @Watch('type')\n validateType(newValue: MgInputNumeric['type']): void {\n if (!types.includes(newValue)) {\n throw new Error(`<mg-input-numeric> prop \"type\" must be one of: ${types.join(', ')}`);\n }\n }\n\n /**\n * Define currency\n */\n @Prop() currency = 'USD';\n\n /**\n * Maximum value\n */\n @Prop() max: number;\n\n /**\n * Minimum value\n */\n @Prop() min: number;\n\n /**\n * Override integer length\n * integer is the number before the decimal point\n */\n @Prop() integerLength = 13;\n @Watch('integerLength')\n validateIntegerLength(newValue: MgInputNumeric['integerLength']): void {\n if (newValue < 1) {\n throw new Error(`<mg-input-numeric> prop \"integer-length\" must be a positive number.`);\n }\n }\n\n /**\n * Override decimal length\n * decimal is the number after the decimal point\n */\n @Prop() decimalLength = 2;\n @Watch('decimalLength')\n validateDecimalLength(newValue: MgInputNumeric['decimalLength']): void {\n if (newValue < 1) {\n throw new Error(`<mg-input-numeric> prop \"decimal-length\" must be a positive number, consider using prop \"type\" to \"integer\" instead.`);\n }\n }\n\n /**\n * Define input pattern to validate\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input pattern error message\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--numeric']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Define if input has focus\n */\n @State() hasFocus = false;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<number>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<boolean>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n async displayError(): Promise<void> {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputNumeric['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-numeric> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-numeric> method \"setError()\" param \"errorMessage\" must be a string');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputNumeric['valid']) {\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n this.inputValid.emit(this.valid);\n }\n\n /**\n * Checks if the given value is valid according to the defined rules.\n * @param value - The input value to validate.\n * @param regex - The regular expression for validation.\n * @param integer - The integer part of the value.\n * @param decimal - The decimal part of the value.\n * @returns Returns true if the value is valid, otherwise false.\n */\n private isValidValue(value: string, regex: RegExp, integer: string, decimal: string): boolean {\n return (\n ['', '-'].includes(value) || (regex.exec(value) !== null && integer.length <= this.integerLength && decimal.length <= (this.type === 'integer' ? 0 : this.decimalLength))\n );\n }\n\n /**\n * Handles invalid input values and returns a corrected value.\n * @returns The corrected value.\n */\n private handleInvalidValue(): string | null {\n return this.storedValue ?? null;\n }\n\n /**\n * Updates the component values based on the validated input value.\n * @param newValue - The validated input value.\n */\n private updateValues(newValue: string | null): void {\n this.value = newValue;\n if (this.input !== undefined) this.input.value = this.value;\n\n this.numericValue = !['', null].includes(this.value) ? parseFloat(this.value.replace(',', '.')) : null;\n this.valueChange.emit(this.numericValue);\n\n this.readonlyValue = this.numericValue !== null ? this.formatValue(this.numericValue) : '';\n }\n\n /**\n * Displayed value in input\n * Change on focus/blur\n * @returns display value\n */\n private displayValue(): MgInputNumeric['value'] | MgInputNumeric['readonlyValue'] {\n return this.hasFocus ? this.value : this.readonlyValue;\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n // Check validity\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle focus event\n */\n private handleFocus = (): void => {\n this.hasFocus = true;\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n if (this.value === '-') this.value = '';\n // Display Error\n this.displayError();\n this.hasFocus = false;\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.getInputError() === null);\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n const inputError = this.getInputError();\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n } else if (inputError === InputError.REQUIRED) {\n this.errorMessage = this.messages.errors[inputError];\n } else {\n this.errorMessage = this.messages.errors.numeric[inputError].replace('{min}', `${this.formatValue(this.min)}`).replace('{max}', `${this.formatValue(this.max)}`);\n }\n }\n };\n\n /**\n * Get input error code\n * @returns error code\n */\n private getInputError = (): null | InputError => {\n let inputError = null;\n const hasNotEmptyValues = (toControl: unknown[]) => !toControl.some(value => [null, undefined].includes(value));\n\n if (!hasNotEmptyValues([this.input])) return inputError;\n\n // required\n if (!this.input.checkValidity() && this.input.validity.valueMissing) {\n inputError = InputError.REQUIRED;\n }\n // Min & Max\n else if (hasNotEmptyValues([this.min, this.numericValue]) && this.numericValue < this.min && this.max === undefined) {\n // Only a min value is set\n inputError = InputError.MIN;\n } else if (hasNotEmptyValues([this.max, this.numericValue]) && this.numericValue > this.max && this.min === undefined) {\n // Only a max value is set\n inputError = InputError.MAX;\n } else if (hasNotEmptyValues([this.min, this.max, this.numericValue]) && (this.numericValue < this.min || this.numericValue > this.max)) {\n // both min and max values are set\n inputError = InputError.MINMAX;\n }\n return inputError;\n };\n\n /**\n * Format value based on type\n * @param value - value to format\n * @returns formated local value\n */\n private formatValue = (value: number): string => (this.type === 'currency' ? localeCurrency(value, this.locale, this.currency) : localeNumber(value, this.locale));\n\n /**\n * Validate append slot\n */\n private validateAppendSlot = (): void => {\n const slotAppendInput: HTMLSlotElement = this.element.querySelector('[slot=\"append-input\"]');\n if (slotAppendInput !== null) {\n this.classCollection.add(slotAppendInput.nodeName === 'MG-BUTTON' ? 'mg-c-input--is-input-group-append' : 'mg-c-input--is-append-input-slot-content');\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n const locales = initLocales(this.element);\n this.locale = locales.locale;\n this.messages = locales.messages;\n // Validate component config\n this.validateType(this.type);\n this.validateIntegerLength(this.integerLength);\n this.validateDecimalLength(this.decimalLength);\n // validate value\n this.validateValue(this.value);\n this.validateAppendSlot();\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <MgInput\n identifier={this.identifier}\n classCollection={this.classCollection}\n ariaDescribedbyIDs={[]}\n label={this.label}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n readonly={this.readonly}\n mgWidth={this.mgWidth}\n disabled={this.disabled}\n value={this.value}\n readonlyValue={this.readonlyValue}\n tooltip={this.tooltip}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n isFieldset={false}\n >\n <input\n type=\"text\"\n class=\"mg-c-input__box\"\n value={this.displayValue()}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n <slot name=\"append-input\"></slot>\n </MgInput>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"mg-input-numeric.js","mappings":";;;;;;;;;AAAA;;;AAGO,MAAM,KAAK,GAAa,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAElE,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;AACvB,CAAC,EALW,UAAU,KAAV,UAAU;;ACLtB,MAAM,iBAAiB,GAAG,itLAAitL;;MCa9tLA,gBAAc;;;;;;;;QAkBjB,sBAAiB,GAAG,KAAK,CAAC;;;;QA8R1B,gBAAW,GAAG;;YAEpB,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;aACxB;YACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;SAC/B,CAAC;;;;QAKM,gBAAW,GAAG;YACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;SACtB,CAAC;;;;QAKM,eAAU,GAAG;YACnB,IAAI,IAAI,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["MgInputNumeric"],"sources":["src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts","../styles/dist/components/mg-input-numeric.css?tag=mg-input-numeric&encapsulation=shadow","src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.tsx"],"sourcesContent":["/**\n * List of all possibles types\n */\nexport const types: string[] = ['decimal', 'integer', 'currency'];\n\nexport enum InputError {\n MIN = 'min',\n MAX = 'max',\n MINMAX = 'minMax',\n REQUIRED = 'required',\n}\n",":host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;max-width:100%;min-height:var(--default-size);align-items:flex-start;margin-bottom:var(--mg-inputs-margin-bottom, 0)}.mg-c-input mg-input-title{width:var(--mg-inputs-title-width, auto);flex-shrink:var(--mg-inputs-shrink, 1);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-c-input__error{display:inline-block;padding:.3rem .8rem;border-radius:.3rem;margin-top:.2rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-c-input__input-container{min-height:var(--default-size)}.mg-c-input__input-container>strong{display:inline-block;min-height:var(--font-size);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2)}.mg-c-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-c-input__input-container .mg-c-input__help-text,.mg-c-input__input-container .mg-c-input__error{font-size:1.2rem;text-align:start}.mg-c-input.mg-c-input--label-on-top{flex-direction:column}.mg-c-input.mg-c-input--label-on-top .mg-c-input__input-container{width:100%}.mg-c-input__title{display:flex;align-items:baseline;margin-bottom:.3rem}.mg-c-input__title mg-input-title{width:auto;flex-shrink:1;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-c-input__title mg-tooltip{margin-top:0}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__input{display:flex}.mg-c-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input__input.mg-c-input__input--has-error .mg-c-input__box{border-color:hsl(var(--color-danger))}.mg-c-input__input+.mg-c-input__help-text,.mg-c-input__input+.mg-c-input__error{margin-top:.5rem}.mg-c-input__input .mg-c-input__box:disabled,.mg-c-input__input-group--disabled label,.mg-c-input.mg-c-input--toggle-disabled .mg-c-input__input .mg-c-input__button-toggle,.mg-c-input.mg-c-input--checkbox-multi-disabled .mg-c-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-c-input__box{height:var(--default-size);box-sizing:border-box;padding:calc((var(--default-size) - var(--font-size)*var(--line-height))/2) var(--mg-inputs-spacer);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));color:hsl(var(--color-dark));font-family:inherit;font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 .6rem hsl(var(--mg-inputs-color-shadow-focus-hsl)/50%)}.mg-c-input__box:disabled{opacity:.3}.mg-c-input.mg-c-input--label-on-top .mg-c-input__box{width:auto;max-width:100%}.mg-c-input.mg-c-input--is-input-group-append{--mg-button-border-radius-top-left: 0;--mg-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:-0.1rem;border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--is-input-group-append.mg-c-input--readonly slot[name=append-input]{display:none}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right: 0;--mg-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width: 0}.mg-c-input.mg-c-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-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input:not(.mg-c-input--label-on-top) .mg-c-input__box{width:100%;min-width:5rem;max-width:calc(17.7rem + var(--mg-inputs-spacer)*2)}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:space-between}.mg-c-input.mg-c-input--width-full.mg-c-input--label-on-top .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container{width:100%;flex:auto}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container .mg-c-input__box{max-width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__input{width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__with-character-left{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__box{min-width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-4 .mg-c-input__input-container .mg-c-input__box{max-width:7rem}.mg-c-input.mg-c-input--width-2 .mg-c-input__input-container .mg-c-input__box{max-width:5rem}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media(prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input .mg-c-input__box{text-align:var(--mg-inputs-text-align, right)}/*# sourceMappingURL=mg-input-numeric.css.map */\n","import { Component, Element, Event, h, Prop, EventEmitter, State, Watch, Method } from '@stencil/core';\nimport { MgInput } from '../MgInput';\nimport { Handler, Width } from '../MgInput.conf';\nimport { types, InputError } from './mg-input-numeric.conf';\nimport { ClassList, isValidString } from '../../../../utils/components.utils';\nimport { initLocales } from '../../../../locales/';\nimport { localeCurrency, localeNumber } from '../../../../utils/locale.utils';\n\n@Component({\n tag: 'mg-input-numeric',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-numeric.css',\n shadow: true,\n})\nexport class MgInputNumeric {\n /************\n * Internal *\n ************/\n\n // Manage different values\n private storedValue: string;\n private numericValue: number;\n private readonlyValue: string;\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private locale: string;\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n private handlerInProgress: Handler;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputNumericElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n validateValue(newValue: MgInputNumeric['value']): void {\n // has input value is always render as string we get a stringified value or a '' for nullish value, so we test string type\n if (typeof newValue === 'string') {\n // Split number and decimal\n const [integer, decimal = ''] = newValue.replace('-', '').split(/[.,]/);\n // Regex\n const regex = this.type === 'integer' ? /^-?\\d+$/ : /^-?\\d+(?:[.,]\\d*)?$/;\n // Filter input\n if (this.isValidValue(newValue, regex, integer, decimal)) {\n this.storedValue = newValue;\n } else {\n newValue = this.handleInvalidValue();\n }\n // Set value and input value\n this.updateValues(newValue);\n }\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop: boolean;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop() placeholder: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width;\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip: string;\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText: string;\n\n /**\n * Define numeric type\n */\n @Prop() type: string = types[0];\n @Watch('type')\n validateType(newValue: MgInputNumeric['type']): void {\n if (!types.includes(newValue)) {\n throw new Error(`<mg-input-numeric> prop \"type\" must be one of: ${types.join(', ')}`);\n }\n }\n\n /**\n * Define currency\n */\n @Prop() currency = 'USD';\n\n /**\n * Maximum value\n */\n @Prop() max: number;\n\n /**\n * Minimum value\n */\n @Prop() min: number;\n\n /**\n * Override integer length\n * integer is the number before the decimal point\n */\n @Prop() integerLength = 13;\n @Watch('integerLength')\n validateIntegerLength(newValue: MgInputNumeric['integerLength']): void {\n if (newValue < 1) {\n throw new Error(`<mg-input-numeric> prop \"integer-length\" must be a positive number.`);\n }\n }\n\n /**\n * Override decimal length\n * decimal is the number after the decimal point\n */\n @Prop() decimalLength = 2;\n @Watch('decimalLength')\n validateDecimalLength(newValue: MgInputNumeric['decimalLength']): void {\n if (newValue < 1) {\n throw new Error(`<mg-input-numeric> prop \"decimal-length\" must be a positive number, consider using prop \"type\" to \"integer\" instead.`);\n }\n }\n\n /**\n * Define input pattern to validate\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input pattern error message\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--numeric']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Define if input has focus\n */\n @State() hasFocus: boolean;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<number>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputNumericElement['valid']>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n async displayError(): Promise<void> {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputNumeric['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-numeric> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-numeric> method \"setError()\" param \"errorMessage\" must be a string');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputNumeric['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === Handler.BLUR && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Checks if the given value is valid according to the defined rules.\n * @param value - The input value to validate.\n * @param regex - The regular expression for validation.\n * @param integer - The integer part of the value.\n * @param decimal - The decimal part of the value.\n * @returns Returns true if the value is valid, otherwise false.\n */\n private isValidValue(value: string, regex: RegExp, integer: string, decimal: string): boolean {\n return (\n ['', '-'].includes(value) || (regex.exec(value) !== null && integer.length <= this.integerLength && decimal.length <= (this.type === 'integer' ? 0 : this.decimalLength))\n );\n }\n\n /**\n * Handles invalid input values and returns a corrected value.\n * @returns The corrected value.\n */\n private handleInvalidValue(): string | null {\n return this.storedValue ?? null;\n }\n\n /**\n * Updates the component values based on the validated input value.\n * @param newValue - The validated input value.\n */\n private updateValues(newValue: string | null): void {\n this.value = newValue;\n if (this.input !== undefined) this.input.value = this.value;\n\n this.numericValue = !['', null].includes(this.value) ? parseFloat(this.value.replace(',', '.')) : null;\n this.valueChange.emit(this.numericValue);\n\n this.readonlyValue = this.numericValue !== null ? this.formatValue(this.numericValue) : '';\n }\n\n /**\n * Displayed value in input\n * Change on focus/blur\n * @returns display value\n */\n private displayValue(): MgInputNumeric['value'] | MgInputNumeric['readonlyValue'] {\n return this.hasFocus ? this.value : this.readonlyValue;\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n // Check validity\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle focus event\n */\n private handleFocus = (): void => {\n this.hasFocus = true;\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n if (this.value === '-') this.value = '';\n // Display Error\n this.handlerInProgress = Handler.BLUR;\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n this.hasFocus = false;\n });\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.getInputError() === null);\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n const inputError = this.getInputError();\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n } else if (inputError === InputError.REQUIRED) {\n this.errorMessage = this.messages.errors[inputError];\n } else {\n this.errorMessage = this.messages.errors.numeric[inputError].replace('{min}', `${this.formatValue(this.min)}`).replace('{max}', `${this.formatValue(this.max)}`);\n }\n }\n };\n\n /**\n * Get input error code\n * @returns error code\n */\n private getInputError = (): null | InputError => {\n let inputError = null;\n const hasNotEmptyValues = (toControl: unknown[]) => !toControl.some(value => [null, undefined].includes(value));\n\n if (!hasNotEmptyValues([this.input])) return inputError;\n\n // required\n if (!this.input.checkValidity() && this.input.validity.valueMissing) {\n inputError = InputError.REQUIRED;\n }\n // Min & Max\n else if (hasNotEmptyValues([this.min, this.numericValue]) && this.numericValue < this.min && this.max === undefined) {\n // Only a min value is set\n inputError = InputError.MIN;\n } else if (hasNotEmptyValues([this.max, this.numericValue]) && this.numericValue > this.max && this.min === undefined) {\n // Only a max value is set\n inputError = InputError.MAX;\n } else if (hasNotEmptyValues([this.min, this.max, this.numericValue]) && (this.numericValue < this.min || this.numericValue > this.max)) {\n // both min and max values are set\n inputError = InputError.MINMAX;\n }\n return inputError;\n };\n\n /**\n * Format value based on type\n * @param value - value to format\n * @returns formated local value\n */\n private formatValue = (value: number): string => (this.type === 'currency' ? localeCurrency(value, this.locale, this.currency) : localeNumber(value, this.locale));\n\n /**\n * Validate append slot\n */\n private validateAppendSlot = (): void => {\n const slotAppendInput: HTMLSlotElement = this.element.querySelector('[slot=\"append-input\"]');\n if (slotAppendInput !== null) {\n this.classCollection.add(slotAppendInput.nodeName === 'MG-BUTTON' ? 'mg-c-input--is-input-group-append' : 'mg-c-input--is-append-input-slot-content');\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n const locales = initLocales(this.element);\n this.locale = locales.locale;\n this.messages = locales.messages;\n // Validate component config\n this.validateType(this.type);\n this.validateIntegerLength(this.integerLength);\n this.validateDecimalLength(this.decimalLength);\n // validate value\n this.validateValue(this.value);\n this.validateAppendSlot();\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <MgInput\n identifier={this.identifier}\n classCollection={this.classCollection}\n ariaDescribedbyIDs={[]}\n label={this.label}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n readonly={this.readonly}\n mgWidth={this.mgWidth}\n disabled={this.disabled}\n value={this.value}\n readonlyValue={this.readonlyValue}\n tooltip={this.tooltip}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n isFieldset={false}\n >\n <input\n type=\"text\"\n class=\"mg-c-input__box\"\n value={this.displayValue()}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n <slot name=\"append-input\"></slot>\n </MgInput>\n );\n }\n}\n"],"version":3}
|
|
@@ -2,8 +2,8 @@ import type { Components, JSX } from "../types/components";
|
|
|
2
2
|
|
|
3
3
|
interface MgInputPassword extends Components.MgInputPassword, HTMLElement {}
|
|
4
4
|
export const MgInputPassword: {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
prototype: MgInputPassword;
|
|
6
|
+
new (): MgInputPassword;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Used to define this component and all nested components recursively.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { M as MgInput } from './MgInput.js';
|
|
2
|
+
import { H as Handler, M as MgInput } from './MgInput.js';
|
|
3
3
|
import { C as ClassList, i as isValidString } from './components.utils.js';
|
|
4
4
|
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './mg-icon2.js';
|
|
@@ -10,217 +10,223 @@ import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
|
|
|
10
10
|
const mgInputPasswordCss = ":host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;max-width:100%;min-height:var(--default-size);align-items:flex-start;margin-bottom:var(--mg-inputs-margin-bottom, 0)}.mg-c-input mg-input-title{width:var(--mg-inputs-title-width, auto);flex-shrink:var(--mg-inputs-shrink, 1);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-c-input__error{display:inline-block;padding:.3rem .8rem;border-radius:.3rem;margin-top:.2rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-c-input__input-container{min-height:var(--default-size)}.mg-c-input__input-container>strong{display:inline-block;min-height:var(--font-size);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2)}.mg-c-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-c-input__input-container .mg-c-input__help-text,.mg-c-input__input-container .mg-c-input__error{font-size:1.2rem;text-align:start}.mg-c-input.mg-c-input--label-on-top{flex-direction:column}.mg-c-input.mg-c-input--label-on-top .mg-c-input__input-container{width:100%}.mg-c-input__title{display:flex;align-items:baseline;margin-bottom:.3rem}.mg-c-input__title mg-input-title{width:auto;flex-shrink:1;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-c-input__title mg-tooltip{margin-top:0}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__input{display:flex}.mg-c-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input__input.mg-c-input__input--has-error .mg-c-input__box{border-color:hsl(var(--color-danger))}.mg-c-input__input+.mg-c-input__help-text,.mg-c-input__input+.mg-c-input__error{margin-top:.5rem}.mg-c-input__input .mg-c-input__box:disabled,.mg-c-input__input-group--disabled label,.mg-c-input.mg-c-input--toggle-disabled .mg-c-input__input .mg-c-input__button-toggle,.mg-c-input.mg-c-input--checkbox-multi-disabled .mg-c-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-c-input__box{height:var(--default-size);box-sizing:border-box;padding:calc((var(--default-size) - var(--font-size)*var(--line-height))/2) var(--mg-inputs-spacer);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));color:hsl(var(--color-dark));font-family:inherit;font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 .6rem hsl(var(--mg-inputs-color-shadow-focus-hsl)/50%)}.mg-c-input__box:disabled{opacity:.3}.mg-c-input.mg-c-input--label-on-top .mg-c-input__box{width:auto;max-width:100%}.mg-c-input.mg-c-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:-0.1rem;border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--is-input-group-append.mg-c-input--readonly slot[name=append-input]{display:none}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-c-input.mg-c-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-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input:not(.mg-c-input--label-on-top) .mg-c-input__box{width:100%;min-width:5rem;max-width:calc(17.7rem + var(--mg-inputs-spacer)*2)}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:space-between}.mg-c-input.mg-c-input--width-full.mg-c-input--label-on-top .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container{width:100%;flex:auto}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container .mg-c-input__box{max-width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__input{width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__with-character-left{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__box{min-width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-4 .mg-c-input__input-container .mg-c-input__box{max-width:7rem}.mg-c-input.mg-c-input--width-2 .mg-c-input__input-container .mg-c-input__box{max-width:5rem}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}";
|
|
11
11
|
|
|
12
12
|
const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class MgInputPassword extends HTMLElement {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.__registerHost();
|
|
16
|
+
this.__attachShadow();
|
|
17
|
+
this.valueChange = createEvent(this, "value-change", 7);
|
|
18
|
+
this.inputValid = createEvent(this, "input-valid", 7);
|
|
19
|
+
// hasDisplayedError (triggered by blur event)
|
|
20
|
+
this.hasDisplayedError = false;
|
|
21
|
+
/**
|
|
22
|
+
* Handle input event
|
|
23
|
+
*/
|
|
24
|
+
this.handleInput = () => {
|
|
25
|
+
this.checkValidity();
|
|
26
|
+
if (this.hasDisplayedError) {
|
|
27
|
+
this.setErrorMessage();
|
|
28
|
+
}
|
|
29
|
+
this.value = this.input.value;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Handle blur event
|
|
33
|
+
*/
|
|
34
|
+
this.handleBlur = () => {
|
|
35
|
+
this.handlerInProgress = Handler.BLUR;
|
|
36
|
+
this.displayError().finally(() => {
|
|
37
|
+
// reset guard
|
|
38
|
+
this.handlerInProgress = undefined;
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Check if input is valid
|
|
43
|
+
*/
|
|
44
|
+
this.checkValidity = () => {
|
|
45
|
+
var _a;
|
|
46
|
+
this.setValidity(this.readonly || this.disabled || (((_a = this.input) === null || _a === void 0 ? void 0 : _a.checkValidity) !== undefined ? this.input.checkValidity() : true));
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Set input error message
|
|
50
|
+
* @param errorMessage - errorMessage override
|
|
51
|
+
*/
|
|
52
|
+
this.setErrorMessage = (errorMessage) => {
|
|
53
|
+
// Set error message
|
|
54
|
+
this.errorMessage = undefined;
|
|
55
|
+
if (!this.valid) {
|
|
56
|
+
if (errorMessage !== undefined) {
|
|
57
|
+
this.errorMessage = errorMessage;
|
|
58
|
+
}
|
|
59
|
+
// required
|
|
60
|
+
else if (this.input.validity.valueMissing) {
|
|
61
|
+
this.errorMessage = this.messages.errors.required;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
this.value = undefined;
|
|
66
|
+
this.identifier = undefined;
|
|
67
|
+
this.name = this.identifier;
|
|
68
|
+
this.label = undefined;
|
|
69
|
+
this.labelOnTop = undefined;
|
|
70
|
+
this.labelHide = false;
|
|
71
|
+
this.placeholder = undefined;
|
|
72
|
+
this.required = false;
|
|
73
|
+
this.readonly = false;
|
|
74
|
+
this.disabled = false;
|
|
75
|
+
this.mgWidth = 'full';
|
|
76
|
+
this.tooltip = undefined;
|
|
77
|
+
this.helpText = undefined;
|
|
78
|
+
this.valid = undefined;
|
|
79
|
+
this.invalid = undefined;
|
|
80
|
+
this.classCollection = new ClassList(['mg-c-input--password']);
|
|
81
|
+
this.errorMessage = undefined;
|
|
82
|
+
}
|
|
83
|
+
handleValue(newValue) {
|
|
84
|
+
this.valueChange.emit(newValue);
|
|
85
|
+
}
|
|
86
|
+
handleValidityChange(newValue, _oldValue, prop) {
|
|
87
|
+
if (this.input !== undefined) {
|
|
88
|
+
this.input[prop] = newValue;
|
|
89
|
+
this.checkValidity();
|
|
90
|
+
if (this.hasDisplayedError) {
|
|
91
|
+
this.setErrorMessage();
|
|
92
|
+
this.hasDisplayedError = false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
21
96
|
/**
|
|
22
|
-
*
|
|
97
|
+
* Display input error if it exists.
|
|
23
98
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (this.hasDisplayedError) {
|
|
99
|
+
async displayError() {
|
|
100
|
+
this.checkValidity();
|
|
27
101
|
this.setErrorMessage();
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Handle blur event
|
|
33
|
-
*/
|
|
34
|
-
this.handleBlur = () => {
|
|
35
|
-
this.displayError();
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Check if input is valid
|
|
39
|
-
*/
|
|
40
|
-
this.checkValidity = () => {
|
|
41
|
-
var _a;
|
|
42
|
-
this.setValidity(this.readonly || this.disabled || (((_a = this.input) === null || _a === void 0 ? void 0 : _a.checkValidity) !== undefined ? this.input.checkValidity() : true));
|
|
43
|
-
};
|
|
102
|
+
this.hasDisplayedError = this.invalid;
|
|
103
|
+
}
|
|
44
104
|
/**
|
|
45
|
-
* Set
|
|
46
|
-
*
|
|
105
|
+
* Set an error and display a custom error message.
|
|
106
|
+
* This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
|
|
107
|
+
* It must be paired with an error message to display for the given context.
|
|
108
|
+
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
109
|
+
* @param valid - value indicating the validity
|
|
110
|
+
* @param errorMessage - the error message to display
|
|
47
111
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (!this.valid) {
|
|
52
|
-
if (errorMessage !== undefined) {
|
|
53
|
-
this.errorMessage = errorMessage;
|
|
112
|
+
async setError(valid, errorMessage) {
|
|
113
|
+
if (typeof valid !== 'boolean') {
|
|
114
|
+
throw new Error('<mg-input-password> method "setError()" param "valid" must be a boolean');
|
|
54
115
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
116
|
+
else if (!isValidString(errorMessage)) {
|
|
117
|
+
throw new Error('<mg-input-password> method "setError()" param "errorMessage" must be a string');
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
this.setValidity(valid);
|
|
121
|
+
this.setErrorMessage(valid ? undefined : errorMessage);
|
|
122
|
+
this.hasDisplayedError = this.invalid;
|
|
58
123
|
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
this.value = undefined;
|
|
62
|
-
this.identifier = undefined;
|
|
63
|
-
this.name = this.identifier;
|
|
64
|
-
this.label = undefined;
|
|
65
|
-
this.labelOnTop = undefined;
|
|
66
|
-
this.labelHide = false;
|
|
67
|
-
this.placeholder = undefined;
|
|
68
|
-
this.required = false;
|
|
69
|
-
this.readonly = false;
|
|
70
|
-
this.disabled = false;
|
|
71
|
-
this.mgWidth = 'full';
|
|
72
|
-
this.tooltip = undefined;
|
|
73
|
-
this.helpText = undefined;
|
|
74
|
-
this.valid = undefined;
|
|
75
|
-
this.invalid = undefined;
|
|
76
|
-
this.classCollection = new ClassList(['mg-c-input--password']);
|
|
77
|
-
this.errorMessage = undefined;
|
|
78
|
-
}
|
|
79
|
-
handleValue(newValue) {
|
|
80
|
-
this.valueChange.emit(newValue);
|
|
81
|
-
}
|
|
82
|
-
handleValidityChange(newValue, _oldValue, prop) {
|
|
83
|
-
if (this.input !== undefined) {
|
|
84
|
-
this.input[prop] = newValue;
|
|
85
|
-
this.checkValidity();
|
|
86
|
-
if (this.hasDisplayedError) {
|
|
87
|
-
this.setErrorMessage();
|
|
88
|
-
this.hasDisplayedError = false;
|
|
89
|
-
}
|
|
90
124
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
* This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
|
|
103
|
-
* It must be paired with an error message to display for the given context.
|
|
104
|
-
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
105
|
-
* @param valid - value indicating the validity
|
|
106
|
-
* @param errorMessage - the error message to display
|
|
107
|
-
*/
|
|
108
|
-
async setError(valid, errorMessage) {
|
|
109
|
-
if (typeof valid !== 'boolean') {
|
|
110
|
-
throw new Error('<mg-input-password> method "setError()" param "valid" must be a boolean');
|
|
125
|
+
/**
|
|
126
|
+
* Method to set validity values
|
|
127
|
+
* @param newValue - valid new value
|
|
128
|
+
*/
|
|
129
|
+
setValidity(newValue) {
|
|
130
|
+
const oldValidValue = this.valid;
|
|
131
|
+
this.valid = newValue;
|
|
132
|
+
this.invalid = !this.valid;
|
|
133
|
+
// We need to send valid event even if it is the same value
|
|
134
|
+
if (this.handlerInProgress === undefined || (this.handlerInProgress === Handler.BLUR && this.valid !== oldValidValue))
|
|
135
|
+
this.inputValid.emit(this.valid);
|
|
111
136
|
}
|
|
112
|
-
|
|
113
|
-
|
|
137
|
+
/*************
|
|
138
|
+
* Lifecycle *
|
|
139
|
+
*************/
|
|
140
|
+
/**
|
|
141
|
+
* Check if component props are well configured on init
|
|
142
|
+
* @returns timeout
|
|
143
|
+
*/
|
|
144
|
+
componentWillLoad() {
|
|
145
|
+
// Get locales
|
|
146
|
+
this.messages = initLocales(this.element).messages;
|
|
147
|
+
// Check validity when component is ready
|
|
148
|
+
// return a promise to process action only in the FIRST render().
|
|
149
|
+
// https://stenciljs.com/docs/component-lifecycle#componentwillload
|
|
150
|
+
return setTimeout(() => {
|
|
151
|
+
this.checkValidity();
|
|
152
|
+
}, 0);
|
|
114
153
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
154
|
+
/**
|
|
155
|
+
* Render
|
|
156
|
+
* @returns HTML Element
|
|
157
|
+
*/
|
|
158
|
+
render() {
|
|
159
|
+
return (h(MgInput, { identifier: this.identifier, classCollection: this.classCollection, 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-c-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
|
|
160
|
+
if (el !== null)
|
|
161
|
+
this.input = el;
|
|
162
|
+
} })));
|
|
119
163
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
// We need to send valid event even if it is the same value
|
|
129
|
-
this.inputValid.emit(this.valid);
|
|
130
|
-
}
|
|
131
|
-
/*************
|
|
132
|
-
* Lifecycle *
|
|
133
|
-
*************/
|
|
134
|
-
/**
|
|
135
|
-
* Check if component props are well configured on init
|
|
136
|
-
* @returns timeout
|
|
137
|
-
*/
|
|
138
|
-
componentWillLoad() {
|
|
139
|
-
// Get locales
|
|
140
|
-
this.messages = initLocales(this.element).messages;
|
|
141
|
-
// Check validity when component is ready
|
|
142
|
-
// return a promise to process action only in the FIRST render().
|
|
143
|
-
// https://stenciljs.com/docs/component-lifecycle#componentwillload
|
|
144
|
-
return setTimeout(() => {
|
|
145
|
-
this.checkValidity();
|
|
146
|
-
}, 0);
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Render
|
|
150
|
-
* @returns HTML Element
|
|
151
|
-
*/
|
|
152
|
-
render() {
|
|
153
|
-
return (h(MgInput, { identifier: this.identifier, classCollection: this.classCollection, 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-c-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
|
|
154
|
-
if (el !== null)
|
|
155
|
-
this.input = el;
|
|
156
|
-
} })));
|
|
157
|
-
}
|
|
158
|
-
get element() { return this; }
|
|
159
|
-
static get watchers() { return {
|
|
160
|
-
"value": ["handleValue"],
|
|
161
|
-
"required": ["handleValidityChange"],
|
|
162
|
-
"readonly": ["handleValidityChange"],
|
|
163
|
-
"disabled": ["handleValidityChange"]
|
|
164
|
-
}; }
|
|
165
|
-
static get style() { return mgInputPasswordCss; }
|
|
164
|
+
get element() { return this; }
|
|
165
|
+
static get watchers() { return {
|
|
166
|
+
"value": ["handleValue"],
|
|
167
|
+
"required": ["handleValidityChange"],
|
|
168
|
+
"readonly": ["handleValidityChange"],
|
|
169
|
+
"disabled": ["handleValidityChange"]
|
|
170
|
+
}; }
|
|
171
|
+
static get style() { return mgInputPasswordCss; }
|
|
166
172
|
}, [1, "mg-input-password", {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
173
|
+
"value": [1537],
|
|
174
|
+
"identifier": [1],
|
|
175
|
+
"name": [1],
|
|
176
|
+
"label": [1],
|
|
177
|
+
"labelOnTop": [4, "label-on-top"],
|
|
178
|
+
"labelHide": [4, "label-hide"],
|
|
179
|
+
"placeholder": [1],
|
|
180
|
+
"required": [4],
|
|
181
|
+
"readonly": [4],
|
|
182
|
+
"disabled": [4],
|
|
183
|
+
"mgWidth": [8, "mg-width"],
|
|
184
|
+
"tooltip": [1],
|
|
185
|
+
"helpText": [1, "help-text"],
|
|
186
|
+
"valid": [1028],
|
|
187
|
+
"invalid": [1028],
|
|
188
|
+
"classCollection": [32],
|
|
189
|
+
"errorMessage": [32],
|
|
190
|
+
"displayError": [64],
|
|
191
|
+
"setError": [64]
|
|
192
|
+
}, undefined, {
|
|
193
|
+
"value": ["handleValue"],
|
|
194
|
+
"required": ["handleValidityChange"],
|
|
195
|
+
"readonly": ["handleValidityChange"],
|
|
196
|
+
"disabled": ["handleValidityChange"]
|
|
197
|
+
}]);
|
|
192
198
|
function defineCustomElement$1() {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
199
|
+
if (typeof customElements === "undefined") {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const components = ["mg-input-password", "mg-icon", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
203
|
+
components.forEach(tagName => { switch (tagName) {
|
|
204
|
+
case "mg-input-password":
|
|
205
|
+
if (!customElements.get(tagName)) {
|
|
206
|
+
customElements.define(tagName, MgInputPassword$1);
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
case "mg-icon":
|
|
210
|
+
if (!customElements.get(tagName)) {
|
|
211
|
+
defineCustomElement$5();
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
case "mg-input-title":
|
|
215
|
+
if (!customElements.get(tagName)) {
|
|
216
|
+
defineCustomElement$4();
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
case "mg-tooltip":
|
|
220
|
+
if (!customElements.get(tagName)) {
|
|
221
|
+
defineCustomElement$3();
|
|
222
|
+
}
|
|
223
|
+
break;
|
|
224
|
+
case "mg-tooltip-content":
|
|
225
|
+
if (!customElements.get(tagName)) {
|
|
226
|
+
defineCustomElement$2();
|
|
227
|
+
}
|
|
228
|
+
break;
|
|
229
|
+
} });
|
|
224
230
|
}
|
|
225
231
|
defineCustomElement$1();
|
|
226
232
|
|