@mgdis/mg-components 6.13.1 → 6.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/events.utils-D5SAtkpQ.js +0 -3
- package/dist/cjs/index-CwjAofQ1.js +0 -3
- package/dist/cjs/index-DUJwxnoi.js +0 -3
- package/dist/cjs/{index-CATFkm3O.js → index-DzBkSgSK.js} +224 -122
- package/dist/cjs/index.cjs.js +0 -3
- package/dist/cjs/loader.cjs.js +3 -7
- package/dist/cjs/mg-action-more_37.cjs.entry.js +141 -75
- package/dist/cjs/mg-alert.cjs.entry.js +5 -8
- package/dist/cjs/mg-components.cjs.js +4 -8
- package/dist/cjs/mg-input-combobox.cjs.entry.js +7 -10
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +3 -6
- package/dist/cjs/mg-input.conf-WTsvDfpC.js +0 -3
- package/dist/cjs/mg-loader.cjs.entry.js +1 -4
- package/dist/cjs/mg-progress.cjs.entry.js +1 -4
- package/dist/collection/assets/icons/index.js +0 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +3 -4
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +4 -5
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +0 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +4 -5
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +0 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +9 -10
- package/dist/collection/components/atoms/mg-card/mg-card.conf.js +4 -0
- package/dist/collection/components/atoms/mg-card/mg-card.js +104 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +0 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +6 -7
- package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js +0 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -4
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -2
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +0 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +5 -6
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +33 -18
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +7 -6
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +21 -21
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +22 -20
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +17 -18
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +26 -27
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +18 -19
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +17 -17
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +18 -18
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +38 -32
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +25 -25
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +23 -24
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +15 -15
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.conf.js +0 -1
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +4 -3
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js +0 -1
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +4 -4
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.conf.js +0 -1
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +5 -6
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js +0 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +5 -3
- package/dist/collection/components/molecules/mg-alert/mg-alert.conf.js +0 -1
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +7 -8
- package/dist/collection/components/molecules/mg-details/mg-details.js +4 -5
- package/dist/collection/components/molecules/mg-form/mg-form.conf.js +0 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +9 -10
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js +0 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +2 -3
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +2 -3
- package/dist/collection/components/molecules/mg-message/mg-message.conf.js +0 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +4 -5
- package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js +0 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +6 -7
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +0 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +7 -7
- package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js +0 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +34 -11
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +2 -3
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +6 -7
- package/dist/collection/components/molecules/mg-progress/mg-progress.conf.js +0 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +5 -6
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js +0 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -4
- package/dist/collection/components/molecules/mg-table/mg-table.conf.js +0 -1
- package/dist/collection/components/molecules/mg-table/mg-table.js +4 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +0 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +6 -6
- package/dist/collection/index.js +0 -1
- package/dist/collection/locales/index.conf.js +0 -1
- package/dist/collection/locales/index.js +0 -1
- package/dist/collection/types/index.js +0 -1
- package/dist/collection/utils/behaviors.utils.js +0 -1
- package/dist/collection/utils/events.utils.js +0 -1
- package/dist/collection/utils/playwright.fixture.js +0 -1
- package/dist/collection/utils/unit.test.utils.js +0 -1
- package/dist/components/events.utils.js +0 -3
- package/dist/components/index.js +1 -4
- package/dist/components/index2.js +0 -3
- package/dist/components/index3.js +0 -3
- package/dist/components/mg-action-more.js +0 -3
- package/dist/components/mg-alert.js +4 -7
- package/dist/components/mg-badge.js +0 -3
- package/dist/components/mg-badge2.js +0 -3
- package/dist/components/mg-button.js +0 -3
- package/dist/components/mg-button2.js +0 -3
- package/dist/components/mg-card.js +0 -3
- package/dist/components/mg-card2.js +55 -6
- package/dist/components/mg-character-left.js +0 -3
- package/dist/components/mg-character-left2.js +0 -3
- package/dist/components/mg-details.js +0 -3
- package/dist/components/mg-divider.js +0 -3
- package/dist/components/mg-divider2.js +0 -3
- package/dist/components/mg-form.js +0 -3
- package/dist/components/mg-icon.js +0 -3
- package/dist/components/mg-icon2.js +0 -3
- package/dist/components/mg-illustrated-message.js +0 -3
- package/dist/components/mg-input-checkbox-paginated.js +0 -3
- package/dist/components/mg-input-checkbox-paginated2.js +0 -3
- package/dist/components/mg-input-checkbox.js +1 -4
- package/dist/components/mg-input-combobox.js +1 -4
- package/dist/components/mg-input-date.js +1 -4
- package/dist/components/mg-input-numeric.js +1 -4
- package/dist/components/mg-input-password.js +1 -4
- package/dist/components/mg-input-radio.js +1 -4
- package/dist/components/mg-input-rich-text-editor.js +0 -3
- package/dist/components/mg-input-select.js +0 -3
- package/dist/components/mg-input-select2.js +18 -15
- package/dist/components/mg-input-text.js +0 -3
- package/dist/components/mg-input-text2.js +1 -4
- package/dist/components/mg-input-textarea.js +1 -4
- package/dist/components/mg-input-title.js +0 -3
- package/dist/components/mg-input-title2.js +0 -3
- package/dist/components/mg-input-toggle.js +1 -4
- package/dist/components/mg-input.js +0 -3
- package/dist/components/mg-input2.js +16 -6
- package/dist/components/mg-item-more.js +0 -3
- package/dist/components/mg-item-more2.js +0 -3
- package/dist/components/mg-loader.js +0 -3
- package/dist/components/mg-loader2.js +0 -3
- package/dist/components/mg-menu-item.js +0 -3
- package/dist/components/mg-menu-item2.js +0 -3
- package/dist/components/mg-menu.js +0 -3
- package/dist/components/mg-message.js +0 -3
- package/dist/components/mg-message2.js +2 -5
- package/dist/components/mg-modal.js +1 -4
- package/dist/components/mg-pagination.js +0 -3
- package/dist/components/mg-pagination2.js +0 -3
- package/dist/components/mg-panel.js +7 -5
- package/dist/components/mg-popover-content.js +0 -3
- package/dist/components/mg-popover-content2.js +1 -4
- package/dist/components/mg-popover.js +0 -3
- package/dist/components/mg-popover2.js +0 -3
- package/dist/components/mg-progress.js +0 -3
- package/dist/components/mg-skip-links.js +4 -6
- package/dist/components/mg-table.js +1 -4
- package/dist/components/mg-tabs.js +1 -4
- package/dist/components/mg-tag.js +0 -3
- package/dist/components/mg-tooltip-content.js +0 -3
- package/dist/components/mg-tooltip-content2.js +0 -3
- package/dist/components/mg-tooltip.js +0 -3
- package/dist/components/mg-tooltip2.js +0 -3
- package/dist/components/popper.js +0 -3
- package/dist/esm/events.utils-yMGqY8YG.js +0 -3
- package/dist/esm/index-Bv7NHR-W.js +0 -3
- package/dist/esm/{index-CAuxALt5.js → index-Degtjvph.js} +205 -122
- package/dist/esm/index-Dr7GYvIz.js +0 -3
- package/dist/esm/index.js +0 -3
- package/dist/esm/loader.js +3 -7
- package/dist/esm/mg-action-more_37.entry.js +141 -75
- package/dist/esm/mg-alert.entry.js +5 -8
- package/dist/esm/mg-components.js +4 -8
- package/dist/esm/mg-input-combobox.entry.js +7 -10
- package/dist/esm/mg-input-rich-text-editor.entry.js +3 -6
- package/dist/esm/mg-input.conf-CNgv8hc5.js +0 -3
- package/dist/esm/mg-loader.entry.js +1 -4
- package/dist/esm/mg-progress.entry.js +1 -4
- package/dist/mg-components/index.esm.js +0 -2
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -2
- package/dist/mg-components/p-056ba467.entry.js +1 -0
- package/dist/mg-components/p-625c463c.entry.js +1 -0
- package/dist/mg-components/p-Bv7NHR-W.js +1 -2
- package/dist/mg-components/p-CNgv8hc5.js +1 -2
- package/dist/mg-components/p-Degtjvph.js +2 -0
- package/dist/mg-components/p-Dr7GYvIz.js +1 -2
- package/dist/mg-components/p-c522f3c1.entry.js +1 -0
- package/dist/mg-components/p-cac23bd7.entry.js +1 -0
- package/dist/mg-components/p-d13a6fdc.entry.js +1 -0
- package/dist/mg-components/p-e75f5383.entry.js +10 -0
- package/dist/mg-components/p-yMGqY8YG.js +1 -2
- package/dist/types/components/atoms/mg-card/mg-card.conf.d.ts +9 -0
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +20 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +5 -4
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +4 -0
- package/dist/types/components.d.ts +406 -3
- package/dist/types/stencil-public-runtime.d.ts +34 -6
- package/ide/intellij/web-types.json +263 -35
- package/ide/vscode/css-custom-data.json +3 -3
- package/ide/vscode/html-custom-data.json +88 -34
- package/package.json +16 -16
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -8
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
- package/dist/cjs/events.utils-D5SAtkpQ.js.map +0 -1
- package/dist/cjs/index-CATFkm3O.js.map +0 -1
- package/dist/cjs/index-CwjAofQ1.js.map +0 -1
- package/dist/cjs/index-DUJwxnoi.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/mg-action-more_37.cjs.entry.js.map +0 -1
- package/dist/cjs/mg-alert.cjs.entry.js.map +0 -1
- package/dist/cjs/mg-alert.entry.cjs.js.map +0 -1
- package/dist/cjs/mg-components.cjs.js.map +0 -1
- package/dist/cjs/mg-input-combobox.cjs.entry.js.map +0 -1
- package/dist/cjs/mg-input-combobox.entry.cjs.js.map +0 -1
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js.map +0 -1
- package/dist/cjs/mg-input-rich-text-editor.entry.cjs.js.map +0 -1
- package/dist/cjs/mg-input.conf-WTsvDfpC.js.map +0 -1
- package/dist/cjs/mg-loader.cjs.entry.js.map +0 -1
- package/dist/cjs/mg-loader.entry.cjs.js.map +0 -1
- package/dist/cjs/mg-progress.cjs.entry.js.map +0 -1
- package/dist/cjs/mg-progress.entry.cjs.js.map +0 -1
- package/dist/collection/assets/icons/index.js.map +0 -1
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js.map +0 -1
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js.map +0 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js.map +0 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +0 -1
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js.map +0 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js.map +0 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js.map +0 -1
- package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +0 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js.map +0 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +0 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js.map +0 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +0 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +0 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +0 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +0 -1
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.conf.js.map +0 -1
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js.map +0 -1
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js.map +0 -1
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js.map +0 -1
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.conf.js.map +0 -1
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js.map +0 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +0 -1
- package/dist/collection/components/molecules/mg-alert/mg-alert.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-alert/mg-alert.js.map +0 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js.map +0 -1
- package/dist/collection/components/molecules/mg-form/mg-form.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js.map +0 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +0 -1
- package/dist/collection/components/molecules/mg-loader/mg-loader.js.map +0 -1
- package/dist/collection/components/molecules/mg-message/mg-message.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js.map +0 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +0 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +0 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +0 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +0 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +0 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js.map +0 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +0 -1
- package/dist/collection/components/molecules/mg-table/mg-table.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-table/mg-table.js.map +0 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js.map +0 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/locales/index.conf.js.map +0 -1
- package/dist/collection/locales/index.js.map +0 -1
- package/dist/collection/types/index.js.map +0 -1
- package/dist/collection/utils/behaviors.utils.js.map +0 -1
- package/dist/collection/utils/events.utils.js.map +0 -1
- package/dist/collection/utils/playwright.fixture.js.map +0 -1
- package/dist/collection/utils/unit.test.utils.js.map +0 -1
- package/dist/components/events.utils.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js.map +0 -1
- package/dist/components/index3.js.map +0 -1
- package/dist/components/mg-action-more.js.map +0 -1
- package/dist/components/mg-alert.js.map +0 -1
- package/dist/components/mg-badge.js.map +0 -1
- package/dist/components/mg-badge2.js.map +0 -1
- package/dist/components/mg-button.js.map +0 -1
- package/dist/components/mg-button2.js.map +0 -1
- package/dist/components/mg-card.js.map +0 -1
- package/dist/components/mg-card2.js.map +0 -1
- package/dist/components/mg-character-left.js.map +0 -1
- package/dist/components/mg-character-left2.js.map +0 -1
- package/dist/components/mg-details.js.map +0 -1
- package/dist/components/mg-divider.js.map +0 -1
- package/dist/components/mg-divider2.js.map +0 -1
- package/dist/components/mg-form.js.map +0 -1
- package/dist/components/mg-icon.js.map +0 -1
- package/dist/components/mg-icon2.js.map +0 -1
- package/dist/components/mg-illustrated-message.js.map +0 -1
- package/dist/components/mg-input-checkbox-paginated.js.map +0 -1
- package/dist/components/mg-input-checkbox-paginated2.js.map +0 -1
- package/dist/components/mg-input-checkbox.js.map +0 -1
- package/dist/components/mg-input-combobox.js.map +0 -1
- package/dist/components/mg-input-date.js.map +0 -1
- package/dist/components/mg-input-numeric.js.map +0 -1
- package/dist/components/mg-input-password.js.map +0 -1
- package/dist/components/mg-input-radio.js.map +0 -1
- package/dist/components/mg-input-rich-text-editor.js.map +0 -1
- package/dist/components/mg-input-select.js.map +0 -1
- package/dist/components/mg-input-select2.js.map +0 -1
- package/dist/components/mg-input-text.js.map +0 -1
- package/dist/components/mg-input-text2.js.map +0 -1
- package/dist/components/mg-input-textarea.js.map +0 -1
- package/dist/components/mg-input-title.js.map +0 -1
- package/dist/components/mg-input-title2.js.map +0 -1
- package/dist/components/mg-input-toggle.js.map +0 -1
- package/dist/components/mg-input.js.map +0 -1
- package/dist/components/mg-input2.js.map +0 -1
- package/dist/components/mg-item-more.js.map +0 -1
- package/dist/components/mg-item-more2.js.map +0 -1
- package/dist/components/mg-loader.js.map +0 -1
- package/dist/components/mg-loader2.js.map +0 -1
- package/dist/components/mg-menu-item.js.map +0 -1
- package/dist/components/mg-menu-item2.js.map +0 -1
- package/dist/components/mg-menu.js.map +0 -1
- package/dist/components/mg-message.js.map +0 -1
- package/dist/components/mg-message2.js.map +0 -1
- package/dist/components/mg-modal.js.map +0 -1
- package/dist/components/mg-pagination.js.map +0 -1
- package/dist/components/mg-pagination2.js.map +0 -1
- package/dist/components/mg-panel.js.map +0 -1
- package/dist/components/mg-popover-content.js.map +0 -1
- package/dist/components/mg-popover-content2.js.map +0 -1
- package/dist/components/mg-popover.js.map +0 -1
- package/dist/components/mg-popover2.js.map +0 -1
- package/dist/components/mg-progress.js.map +0 -1
- package/dist/components/mg-skip-links.js.map +0 -1
- package/dist/components/mg-table.js.map +0 -1
- package/dist/components/mg-tabs.js.map +0 -1
- package/dist/components/mg-tag.js.map +0 -1
- package/dist/components/mg-tooltip-content.js.map +0 -1
- package/dist/components/mg-tooltip-content2.js.map +0 -1
- package/dist/components/mg-tooltip.js.map +0 -1
- package/dist/components/mg-tooltip2.js.map +0 -1
- package/dist/components/popper.js.map +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js +0 -6
- package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
- package/dist/esm/events.utils-yMGqY8YG.js.map +0 -1
- package/dist/esm/index-Bv7NHR-W.js.map +0 -1
- package/dist/esm/index-CAuxALt5.js.map +0 -1
- package/dist/esm/index-Dr7GYvIz.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/mg-action-more_37.entry.js.map +0 -1
- package/dist/esm/mg-alert.entry.js.map +0 -1
- package/dist/esm/mg-components.js.map +0 -1
- package/dist/esm/mg-input-combobox.entry.js.map +0 -1
- package/dist/esm/mg-input-rich-text-editor.entry.js.map +0 -1
- package/dist/esm/mg-input.conf-CNgv8hc5.js.map +0 -1
- package/dist/esm/mg-loader.entry.js.map +0 -1
- package/dist/esm/mg-progress.entry.js.map +0 -1
- package/dist/mg-components/index.esm.js.map +0 -1
- package/dist/mg-components/loader.esm.js.map +0 -1
- package/dist/mg-components/mg-alert.entry.esm.js.map +0 -1
- package/dist/mg-components/mg-components.esm.js.map +0 -1
- package/dist/mg-components/mg-input-combobox.entry.esm.js.map +0 -1
- package/dist/mg-components/mg-input-rich-text-editor.entry.esm.js.map +0 -1
- package/dist/mg-components/mg-loader.entry.esm.js.map +0 -1
- package/dist/mg-components/mg-progress.entry.esm.js.map +0 -1
- package/dist/mg-components/p-19cbc6e6.entry.js +0 -11
- package/dist/mg-components/p-19cbc6e6.entry.js.map +0 -1
- package/dist/mg-components/p-269e2a80.entry.js +0 -2
- package/dist/mg-components/p-269e2a80.entry.js.map +0 -1
- package/dist/mg-components/p-2dea7d37.entry.js +0 -2
- package/dist/mg-components/p-2dea7d37.entry.js.map +0 -1
- package/dist/mg-components/p-415f14fb.entry.js +0 -2
- package/dist/mg-components/p-415f14fb.entry.js.map +0 -1
- package/dist/mg-components/p-Bv7NHR-W.js.map +0 -1
- package/dist/mg-components/p-CAuxALt5.js +0 -3
- package/dist/mg-components/p-CAuxALt5.js.map +0 -1
- package/dist/mg-components/p-CNgv8hc5.js.map +0 -1
- package/dist/mg-components/p-DQuL1Twl.js +0 -2
- package/dist/mg-components/p-DQuL1Twl.js.map +0 -1
- package/dist/mg-components/p-Dr7GYvIz.js.map +0 -1
- package/dist/mg-components/p-fe974d2b.entry.js +0 -2
- package/dist/mg-components/p-fe974d2b.entry.js.map +0 -1
- package/dist/mg-components/p-fea46548.entry.js +0 -2
- package/dist/mg-components/p-fea46548.entry.js.map +0 -1
- package/dist/mg-components/p-yMGqY8YG.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"p-Dr7GYvIz.js","sources":["../helpers/dist/utils/index.js"],"sourcesContent":["/**\n * Class to manage component classlist\n */\nclass ClassList {\n /**\n * Available classes\n */\n classes;\n constructor(classlist = []) {\n this.classes = classlist;\n }\n /**\n * Add class\n * @param className - class name to add\n */\n add = (className) => {\n if (!this.has(className)) {\n this.classes.push(className);\n }\n };\n /**\n * Delete class\n * @param className - class name to delete\n */\n delete = (className) => {\n const index = this.classes.indexOf(className);\n if (index > -1) {\n this.classes.splice(index, 1);\n }\n };\n /**\n * Check if class exist in list\n * @param className - class name to check\n * @returns class name is in the list\n */\n has = (className) => {\n return this.classes.includes(className);\n };\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n join = () => {\n return this.classes.join(' ');\n };\n}\n\n/**\n * Check if a value is of object type.\n * @param object - The value to validate.\n * @returns `true` if the value is a valid object (non-null and not an array), otherwise `false`.\n */\nconst isObject = (object) => typeof object === 'object' && !Array.isArray(object) && object !== null;\n/**\n * Get object value from key\n * @param object - object to query\n * @param path - path of the property to get. Nested keys are allowed with `.` separators (eg: 'key0.key1.key2' = object[key0][key1][key2])\n * @param defaultValue - The value returned for `undefined` resolved values\n * @returns object value\n */\nconst getObjectValueFromKey = (object, path, defaultValue) => {\n const separator = '.';\n if (!isObject(object) || typeof path !== 'string') {\n return defaultValue;\n }\n const [current, ...next] = path.split(separator);\n if (next.length) {\n return getObjectValueFromKey(object[current], next.join(separator));\n }\n else {\n return object[current];\n }\n};\n\n/**\n * Typeguard function to check if all array items are strings.\n * @param items - items to check\n * @returns `true` if all items are strings\n */\nconst allItemsAreString = (items) => Array.isArray(items) && items.every(item => typeof item === 'string');\n/**\n * Validate string\n * @param value - value to check\n * @returns `true` if string is valid\n */\nconst isValidString = (value) => typeof value === 'string' && value.trim() !== '';\n/**\n * Stringify value\n * @param value - value to stringify\n * @returns stringified value\n */\nconst toString = (value) => (typeof value === 'object' ? JSON.stringify(value) : String(value));\n/**\n * Cleans string characters by removing special characters and converting to lowercase.\n * @param text - text to clean\n * @returns cleaned string\n * @example\n * ```ts\n * cleanString('âäàçéèêñù') // 'aaaceeenu'\n * cleanString('BATMAN') // 'batman'\n * ```\n */\nconst cleanString = (text) => typeof text === 'string'\n ? text\n .toLocaleLowerCase()\n .normalize('NFD')\n .replaceAll(/[\\u0300-\\u036f]/g, '')\n : text;\n\n/**\n * Convert a string to kebab-case.\n *\n * This function ensures:\n * - All characters are converted to lowercase. Based on : https://stackoverflow.com/questions/63116039/camelcase-to-kebab-case\n * - Non-alphabetic characters (except numbers and hyphens) are replaced with hyphens.\n * - Consecutive hyphens are replaced with a single hyphen.\n * - Leading and trailing hyphens are removed.\n *\n * @param str - The input string to convert.\n * @returns The kebab-case formatted string.\n *\n * @example\n * ```typescript\n * toKebabCase('XMLHttpRequest'); // 'xml-http-request'\n * ```\n */\nconst toKebabCase = (str) => str\n .replace(/[A-Z]+(?![a-z])|[A-Z]/g, (match, offset) => (offset > 0 ? '-' : '') + match.toLowerCase())\n .replace(/[^a-z0-9-]+/g, '-') // Replace non a-z, 0-9, or hyphen characters with a hyphen\n .replace(/--+/g, '-') // Replace multiple consecutive hyphens with a single hyphen\n .replace(/(?:^-)|(?:-$)/g, ''); // Remove leading hyphens or number or trailing hyphens\n\n/**\n * Create random ID\n * @param prefix - add prefix to created ID\n * @param length - ID length\n * @returns ID\n */\nconst createID = (prefix = '', length = 10) => {\n const randomBytes = new Uint8Array(length);\n crypto.getRandomValues(randomBytes);\n const hexString = Array.from(randomBytes)\n .map(byte => byte.toString(16).padStart(2, '0'))\n .join('')\n .slice(0, length);\n return prefix !== '' ? `${prefix}-${hexString}` : hexString;\n};\n/**\n * Validate html `id` format\n * @param newValue - id value to validate\n * @returns true if `id` is valid\n */\nconst isValideID = (newValue) => isValidString(newValue) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(newValue) !== null;\n/**\n * Format id from value\n * @param value - id to transforme\n * @returns valid id\n */\nconst formatID = (value) => {\n let id;\n if (typeof value === 'string') {\n id = value;\n }\n else if (Boolean(value) && typeof value === 'object' && (isObject(value) || Array.isArray(value))) {\n id = JSON.stringify(value);\n }\n else if (value !== null && value !== undefined && typeof value !== 'boolean' && typeof value !== 'object') {\n id = String(value);\n }\n return id ? toKebabCase(id) : id;\n};\n\n/**\n * Use to process code next tick in the event loop\n * @param callback - code to excute on next tick\n * @returns differed code excution\n */\nconst nextTick = async (callback) => {\n if (callback)\n return callback();\n};\n/**\n * Cursor possible values\n */\nconst Cursor = {\n FIRST: 'first',\n NEXT: 'next',\n PREVIOUS: 'previous',\n LAST: 'last',\n};\nconst DEFAULT_TOP = 10;\n/**\n * Define a valid Page object and navigate throw page items with cursor.\n * Page object entries follow the REST API page practices.\n */\nclass Page {\n /**\n * Define items\n */\n items = [];\n /**\n * Define total\n */\n total;\n /**\n * Define top\n */\n top = DEFAULT_TOP;\n /**\n * Define next\n */\n next;\n /**\n * Define base index\n */\n baseIndex = 1;\n constructor(init) {\n if (!isObject(init)) {\n throw new Error('Page - init must match IPage type.');\n }\n else {\n if (Array.isArray(init.items))\n this.items = init.items;\n if (typeof init.top === 'number')\n this.top = init.top;\n this.total = typeof init.total === 'number' ? init.total : this.items.length;\n this.next = init.next;\n }\n }\n /**\n * Get index of items from cursor\n * @param cursor - cursor to find\n * @param oldItem - previous item\n * @returns item index\n */\n getIndexFromCursor = (cursor = 'first', oldItem) => {\n const startIndex = 0;\n if (!Array.isArray(this.items) || !this.items.length)\n return null;\n const lastIndex = this.items.length - this.baseIndex;\n let newIndex;\n let oldIndex = startIndex;\n if (['previous', 'next'].includes(cursor) && oldItem) {\n const findedIndex = this.items.findIndex(item => JSON.stringify(item) === JSON.stringify(oldItem));\n if (findedIndex === -1)\n return startIndex;\n oldIndex = findedIndex;\n }\n // Update index from cursor\n if (cursor === 'first') {\n newIndex = startIndex;\n }\n else if (cursor === 'last') {\n newIndex = lastIndex;\n }\n else if (cursor === 'previous') {\n newIndex = JSON.stringify(this.items[oldIndex]) === JSON.stringify(this.items[startIndex]) ? lastIndex : oldIndex - this.baseIndex;\n }\n else if (cursor === 'next') {\n newIndex = JSON.stringify(this.items[oldIndex]) === JSON.stringify(this.items[lastIndex]) ? startIndex : oldIndex + this.baseIndex;\n }\n else {\n newIndex = startIndex;\n }\n return newIndex;\n };\n}\n/**\n * Paginate an items array to navigate into with pages.\n * It follow REST standard and allow to navigate in items array with a similar format.\n */\nclass Paginate {\n /**\n * Define paginated items\n */\n items = [];\n /* Privates */\n #top = DEFAULT_TOP;\n #next;\n #total;\n constructor(items, options) {\n if (Array.isArray(items))\n this.items = items;\n if (options && (['string', 'function'].includes(typeof options.next) || (isObject(options.next) && URL.canParse(options.next))))\n this.#next = options.next;\n if (typeof options?.top === 'number')\n this.#top = options.top;\n if (typeof options?.total === 'number')\n this.#total = options.total;\n }\n /**\n * Get page\n * @param offset - pagiantion offset\n * @param filter - filter methode\n * @returns formated page\n */\n getPage = (offset = 0, filter) => {\n const items = typeof filter === 'function' ? this.items.filter(filter) : this.items;\n let next;\n if (this.#next)\n next = this.#next;\n else if (items.length > offset + this.#top)\n next = () => this.getPage(offset + this.#top, filter);\n return new Page({\n items: items.slice(offset, offset + this.#top),\n total: this.#total,\n top: this.#top,\n next,\n });\n };\n}\n\n/**\n * Date RegExp, usefull to test if string is a follow the date pattern\n * @example\n * ```ts\n * dateRegExp.test('mystring') // false\n * dateRegExp.test('2020-12-31') // true\n * ```\n */\nconst dateRegExp = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/;\n/**\n * Formats a date object to a string with the pattern 'YYYY-MM-DD'.\n * @param date - date to parse\n * @returns string date with pattern 'YYYY-MM-DD'\n * @example\n * ```ts\n * dateToString(new Date('2023-12-24')) // '2023-12-24'\n * ```\n */\nconst dateToString = (date) => date.toISOString().split('T')[0];\n\n/**\n * Check if element belongs to the given tagNames list\n * @param element - element to check\n * @param tagNames - allowed tag names list\n * @returns `true` if element tagName is in the tagNames list\n */\nconst isTagName = (element, tagNames) => tagNames.includes(element?.tagName.toLowerCase());\n/**\n * CSS selector to select focusable elements.\n * @example\n * ```ts\n * const allFocusableElements: HTMLElement[] = Array.from(this.element.querySelectorAll(focusableElements));\n * ```\n */\nconst focusableElements = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier], mg-button';\n\n/**\n * Validate number\n * @param value - value to check\n * @returns `true` if number is valid\n */\nconst isValidNumber = (value) => typeof value === 'number' && !Number.isNaN(value);\n\n/**\n * Get windows\n * @param localWindow - the window we are lookink for other windows\n * @returns The list of windows found\n */\nconst getWindows = (localWindow) => {\n const parentWindows = getParentWindows(localWindow);\n const childWindows = getChildWindows(localWindow);\n return [localWindow, ...parentWindows, ...childWindows];\n};\n/**\n * Get parent windows\n * @param localWindow - the window we are lookink for parents\n * @param windows - The list of allready found windows\n * @returns The list of windows found\n */\nconst getParentWindows = (localWindow, windows = []) => {\n // Check if is in iframe\n if (localWindow.self !== localWindow.top) {\n // Check if we have permission to access parent\n try {\n const parentWindow = localWindow.parent;\n if (parentWindow) {\n windows.push(parentWindow);\n return getParentWindows(parentWindow, windows);\n }\n else\n return windows;\n }\n catch (err) {\n console.error('Different hosts between iframes:', err);\n return windows;\n }\n }\n return windows;\n};\n/**\n * Get child windows\n * @param localWindow - the window we are lookink for children\n * @param windows - The list of allready found windows\n * @returns The list of windows found\n */\nconst getChildWindows = (localWindow, windows = []) => {\n if (localWindow.frames.length > 0) {\n for (const childWindow of Array.from(localWindow.frames)) {\n windows.push(childWindow);\n getChildWindows(childWindow, windows);\n }\n }\n return windows;\n};\n\nexport { ClassList, Cursor, Page, Paginate, allItemsAreString, cleanString, createID, dateRegExp, dateToString, focusableElements, formatID, getChildWindows, getObjectValueFromKey, getParentWindows, getWindows, isObject, isTagName, isValidNumber, isValidString, isValideID, nextTick, toKebabCase, toString };\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA,MAAM,SAAS,CAAC;AAChB;AACA;AACA;AACA,IAAI,OAAO;AACX,IAAI,WAAW,CAAC,SAAS,GAAG,EAAE,EAAE;AAChC,QAAQ,IAAI,CAAC,OAAO,GAAG,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,GAAG,CAAC,SAAS,KAAK;AACzB,QAAQ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I,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE;AAClE,YAAY,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;AACrC,YAAY,eAAe,CAAC,WAAW,EAAE,OAAO,CAAC;AACjD;AACA;AACA,IAAI,OAAO,OAAO;AAClB,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,f as e,h as i,g as a}from"./p-CAuxALt5.js";import{C as h,t as o}from"./p-Dr7GYvIz.js";import{i as r}from"./p-Bv7NHR-W.js";const n=["info","warning","success","danger"];const c=["bar-left","background"];const l=".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}";const u=class{constructor(e){t(this,e);this.componentShow=s(this,"component-show");this.componentHide=s(this,"component-hide");this.componentClose=s(this,"component-close");this.classCloseButton="mg-c-alert--close-button";this.storedTimer=null;this.isFocused=false;this.isHovered=false;this.variant="info";this.variantStyle="bar-left";this.classCollection=new h(["mg-c-alert"]);this.hasActions=false;this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=true),this.delay*1e3)};this.clearTimer=()=>{clearTimeout(this.storedTimer)};this.timerEvents=t=>{this.clearTimer();const s=t.type==="mouseenter";this[s?"isHovered":"isFocused"]=true;this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this[t.type==="mouseleave"?"isHovered":"isFocused"]=false;if(!this.isFocused&&!this.isHovered)this.setTimer()}),{once:true})};this.handleClose=()=>{this.element.hidden=true;this.componentClose.emit()}}watchDelay(t){if(t!==undefined&&t<2){throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${o(t)}.`)}}watchVariant(t){if(t&&!n.includes(t)){throw new Error(`<mg-alert> prop "variant" must be one of: ${n.join(", ")}. Passed value: ${o(t)}.`)}}watchVariantStyle(t){if(t&&!c.includes(t)){throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${c.join(", ")}. Passed value: ${o(t)}.`)}}watchHidden(t){if(typeof t==="string"&&t===""){t=true}if(t){this.componentHide.emit();["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)}));this.clearTimer()}else{this.componentShow.emit();if(this.delay>1){this.setTimer();["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)}))}}e(this)}componentWillLoad(){this.messages=r(this.element).messages;this.watchVariant(this.variant);this.watchVariantStyle(this.variantStyle);this.watchDelay(this.delay);this.watchHidden(this.element.hidden);this.hasActions=this.element.querySelector('[slot="actions"]')!==null;if(!this.hasActions){this.classCollection.add(this.classCloseButton)}}render(){return i("mg-message",{key:"12216af414367fc3eea31cffb2d7e38c724038a3",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},i("slot",{key:"bdab00611363a879e8d2bd23442e62ab5e7238e3"}),this.hasActions?i("span",{slot:"actions"},i("slot",{name:"actions"})):i("span",{class:"mg-c-alert__close-button"},i("mg-button",{"is-icon":true,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},i("mg-icon",{icon:"cross"}))))}get element(){return a(this)}static get watchers(){return{delay:["watchDelay"],variant:["watchVariant"],variantStyle:["watchVariantStyle"],hidden:["watchHidden"]}}};u.style=l;export{u as mg_alert};
|
|
2
|
-
//# sourceMappingURL=p-fe974d2b.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["variants","variantStyles","mgAlertCss","MgAlert","constructor","hostRef","this","classCloseButton","storedTimer","isFocused","isHovered","variant","variantStyle","classCollection","ClassList","hasActions","setTimer","setTimeout","element","hidden","delay","clearTimer","clearTimeout","timerEvents","event","isMouseEvent","type","addEventListener","eventOut","once","handleClose","componentClose","emit","watchDelay","newValue","undefined","Error","toString","watchVariant","includes","join","watchVariantStyle","watchHidden","componentHide","forEach","removeEventListener","componentShow","forceUpdate","componentWillLoad","messages","initLocales","querySelector","add","render","h","key","class","role","slot","name","label","alert","closeButton","onClick","icon"],"sources":["src/components/molecules/mg-alert/mg-alert.conf.ts","../styles/dist/components/mg-alert.css?tag=mg-alert&encapsulation=shadow","src/components/molecules/mg-alert/mg-alert.tsx"],"sourcesContent":["import type { Variant, VariantStyle } from '../../../types';\n\n/**\n * List available variants\n */\nexport const variants = ['info', 'warning', 'success', 'danger'] as const;\n\n/**\n * Variant type\n */\nexport type VariantType = Variant & (typeof variants)[number];\n\n/**\n * List available variant styles\n */\nexport const variantStyles = ['bar-left', 'background'] as const;\n\n/**\n * VariantStyle type\n */\nexport type VariantStyleType = VariantStyle & (typeof variantStyles)[number];\n",".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing: 0 var(--mg-b-size-min-height) 0 0}/*# sourceMappingURL=mg-alert.css.map */\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch, forceUpdate } from '@stencil/core';\nimport { ClassList, toString } from '@mgdis/core-ui-helpers/dist/utils';\nimport { variants, variantStyles, VariantStyleType, VariantType } from './mg-alert.conf';\nimport { initLocales } from '../../../locales';\n\n/**\n * @slot - Alert content\n * @slot actions - Actions content\n */\n@Component({\n tag: 'mg-alert',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-alert.css',\n shadow: true,\n})\nexport class MgAlert {\n /************\n * Internal *\n ************/\n\n // Classes\n private readonly classCloseButton = 'mg-c-alert--close-button';\n\n // Stored timer setted when hide action is run from setTimeOut\n private storedTimer: ReturnType<typeof setTimeout> = null;\n\n // Manage hover\n private isFocused = false;\n private isHovered = false;\n\n // Locales\n private messages;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgAlertElement;\n\n /**\n * Add a delay to hide/close message when it passed\n * Value is defined in seconds and must greater than 2 seconds\n */\n @Prop() delay?: number;\n @Watch('delay')\n watchDelay(newValue: MgAlert['delay']): void {\n if (newValue !== undefined && newValue < 2) {\n throw new Error(`<mg-alert> prop \"delay\" must be greater than 2 seconds. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define variant\n */\n @Prop() variant?: VariantType = 'info';\n @Watch('variant')\n watchVariant(newValue: MgAlert['variant']): void {\n if (newValue && !variants.includes(newValue)) {\n throw new Error(`<mg-alert> prop \"variant\" must be one of: ${variants.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define variant style\n */\n @Prop() variantStyle?: VariantStyleType = 'bar-left';\n @Watch('variantStyle')\n watchVariantStyle(newValue: MgAlert['variantStyle']): void {\n if (newValue && !variantStyles.includes(newValue)) {\n throw new Error(`<mg-alert> prop \"variantStyle\" must be one of: ${variantStyles.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Watch hidden prop\n */\n // eslint-disable-next-line @stencil-community/no-unused-watch\n @Watch('hidden')\n watchHidden(newValue: boolean): void {\n if (typeof newValue === 'string' && newValue === '') {\n newValue = true;\n }\n if (newValue) {\n this.componentHide.emit();\n // Remove event Listener\n ['focusin', 'mouseenter'].forEach(event => {\n this.element.removeEventListener(event, this.timerEvents);\n });\n // Clear Timer\n this.clearTimer();\n } else {\n this.componentShow.emit();\n // If delay is set\n if (this.delay > 1) {\n // Start timer\n this.setTimer();\n // Stop timer when get focus or mouse enter\n ['focusin', 'mouseenter'].forEach(event => {\n this.element.addEventListener(event, this.timerEvents);\n });\n }\n }\n forceUpdate(this);\n }\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-alert']);\n\n /**\n * Define if component is using actions slot\n */\n @State() hasActions = false;\n\n /**\n * Emited event when alert is diplayed\n */\n @Event({ eventName: 'component-show' }) componentShow: EventEmitter<void>;\n\n /**\n * Emited event when alert is hidden\n */\n @Event({ eventName: 'component-hide' }) componentHide: EventEmitter<void>;\n\n /**\n * Emmited event when alert is closed\n */\n @Event({ eventName: 'component-close' }) componentClose: EventEmitter<void>;\n\n /**\n * Set timer\n */\n private setTimer = (): void => {\n this.storedTimer = setTimeout(() => (this.element.hidden = true), this.delay * 1000);\n };\n\n /**\n * Clear timer\n */\n private clearTimer = (): void => {\n clearTimeout(this.storedTimer);\n };\n\n /**\n * Event to add on element\n * @param event - event\n */\n private timerEvents = (event: MouseEvent | FocusEvent): void => {\n this.clearTimer();\n const isMouseEvent: boolean = event.type === 'mouseenter';\n // Needed to ensure we don't start the timer\n this[isMouseEvent ? 'isHovered' : 'isFocused'] = true;\n\n // Restart timer when loose focus AND mouse leave\n this.element.addEventListener(\n isMouseEvent ? 'mouseleave' : 'focusout',\n eventOut => {\n this[eventOut.type === 'mouseleave' ? 'isHovered' : 'isFocused'] = false;\n // Start timer if needed\n if (!this.isFocused && !this.isHovered) this.setTimer();\n },\n { once: true },\n );\n };\n\n /**\n * Handle close button\n */\n private handleClose = (): void => {\n this.element.hidden = true;\n this.componentClose.emit();\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentWillLoad(): void {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Validate\n this.watchVariant(this.variant);\n this.watchVariantStyle(this.variantStyle);\n this.watchDelay(this.delay);\n this.watchHidden(this.element.hidden);\n // Check if component has actions slot\n this.hasActions = this.element.querySelector('[slot=\"actions\"]') !== null;\n if (!this.hasActions) {\n this.classCollection.add(this.classCloseButton);\n }\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <mg-message\n class={this.classCollection.join()}\n role={['info', 'success'].includes(this.variant) ? 'status' : 'alert'}\n variant={this.variant}\n variantStyle={this.variantStyle}\n >\n <slot></slot>\n {this.hasActions ? (\n <span slot=\"actions\">\n <slot name=\"actions\"></slot>\n </span>\n ) : (\n <span class=\"mg-c-alert__close-button\">\n <mg-button is-icon variant=\"flat\" label={this.messages.alert.closeButton} onClick={this.handleClose}>\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n </span>\n )}\n </mg-message>\n );\n }\n}\n"],"mappings":"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
|
1
|
-
import{r,h as e,H as s}from"./p-CAuxALt5.js";import{c as a,t as o,e as t}from"./p-Dr7GYvIz.js";const i=["progressbar","meter"];const c="/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";const g=class{constructor(e){r(this,e);this.ariaRole="progressbar";this.value=0;this.min=0;this.max=100}watchLabel(r){if(!a(r)){throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${o(r)}.`)}}watchAriaRole(r){if(r&&!i.includes(r)){throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${i.join(", ")}. Passed value: ${o(r)}.`)}}watchValue(r){if(r!==undefined&&(!t(r)||!(r>=this.min&&r<=this.max)))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${o(r)}.`)}watchMin(r){if(r!==0&&r!==undefined&&(!t(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${o(r)}.`)}watchMax(r){if(r!==100&&r!==undefined&&(!t(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${o(r)}.`)}componentWillLoad(){this.watchLabel(this.label);this.watchAriaRole(this.ariaRole);this.watchMin(this.min);this.watchMax(this.max);this.watchValue(this.value)}render(){return e(s,{key:"e6d254a68f35c5019158ab17fcb0e4dfd1943ef8",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},e("div",{key:"5b427579ad97336076504a45013a0be00673f9a9",class:"mg-c-progress"},e("div",{key:"76dbdf88550caf51890e10c45c034d73cd02db5d",class:{"mg-c-progress__bar":true,"mg-c-progress__bar--active":this.value>this.min}},e("div",{key:"b0ab6f784cdb8cc25a40b83a0d97bcda5b5c1f9b",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:["watchLabel"],ariaRole:["watchAriaRole"],value:["watchValue"],min:["watchMin"],max:["watchMax"]}}};g.style=c;export{g as mg_progress};
|
|
2
|
-
//# sourceMappingURL=p-fea46548.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["roles","mgProgressCss","MgProgress","constructor","hostRef","this","ariaRole","value","min","max","watchLabel","newValue","isValidString","Error","toString","watchAriaRole","includes","join","watchValue","undefined","isValidNumber","watchMin","watchMax","componentWillLoad","label","render","h","Host","key","role","class","style","width","Math","round"],"sources":["src/components/molecules/mg-progress/mg-progress.conf.ts","../styles/dist/components/mg-progress.css?tag=mg-progress&encapsulation=shadow","src/components/molecules/mg-progress/mg-progress.tsx"],"sourcesContent":["import { AriaRole } from '../../../types';\n\n/**\n * List of all possibles roles\n */\nexport const roles = ['progressbar', 'meter'] as const;\n\n/**\n * Aria Role type from roles\n */\nexport type AriaRoleType = AriaRole & (typeof roles)[number];\n","/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}/*# sourceMappingURL=mg-progress.css.map */\n","import { Component, h, Host, Prop, Watch } from '@stencil/core';\nimport { isValidNumber, isValidString, toString } from '@mgdis/core-ui-helpers/dist/utils';\nimport { AriaRoleType, roles } from './mg-progress.conf';\n\n@Component({\n tag: 'mg-progress',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-progress.css',\n shadow: true,\n})\nexport class MgProgress {\n /**************\n * Decorators *\n **************/\n\n /**\n * Define label\n */\n @Prop() label!: string;\n @Watch('label')\n watchLabel(newValue: MgProgress['label']): void {\n if (!isValidString(newValue)) {\n throw new Error(`<mg-progress> prop \"label\" must be a valid string. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define progress role\n * - `progressbar` to indicate a progress, such as loading or percent completion of a task\n * - `meter` to indicate a graphical display of a numeric value that varies within a defined range\n */\n @Prop() ariaRole?: AriaRoleType = 'progressbar';\n @Watch('ariaRole')\n watchAriaRole(newValue: MgProgress['ariaRole']): void {\n if (newValue && !roles.includes(newValue)) {\n throw new Error(`<mg-progress> prop \"ariaRole\" must be one of: ${roles.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define current value\n * By default, it will be displayed as a percentage value.\n * If you don’t specify the min and max props, the value should be a number within the range of 0 to 100.\n */\n @Prop() value?: number = 0;\n @Watch('value')\n watchValue(newValue: MgProgress['value']): void {\n if (newValue !== undefined && (!isValidNumber(newValue) || !(newValue >= this.min && newValue <= this.max)))\n throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${toString(newValue)}.`);\n }\n\n /**\n * Define the minimum value in the range\n */\n @Prop() min?: number = 0;\n @Watch('min')\n watchMin(newValue: MgProgress['min']): void {\n if (newValue !== 0 && newValue !== undefined && (!isValidNumber(newValue) || newValue >= this.max))\n throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${toString(newValue)}.`);\n }\n\n /**\n * Define the maximum value in the range\n */\n @Prop() max?: number = 100;\n @Watch('max')\n watchMax(newValue: MgProgress['max']): void {\n if (newValue !== 100 && newValue !== undefined && (!isValidNumber(newValue) || newValue <= this.min))\n throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${toString(newValue)}.`);\n }\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentWillLoad(): void {\n // validate props\n this.watchLabel(this.label);\n this.watchAriaRole(this.ariaRole);\n this.watchMin(this.min);\n this.watchMax(this.max);\n this.watchValue(this.value);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host role={this.ariaRole} aria-label={this.label} aria-valuenow={this.value} aria-valuemin={this.min} aria-valuemax={this.max}>\n <div class=\"mg-c-progress\">\n <div class={{ 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min }}>\n <div\n class=\"mg-c-progress__fill\"\n style={{\n width: `${Math.round(((this.value - this.min) / (this.max - this.min)) * 100)}%`,\n }}\n ></div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"+FAKO,MAAMA,EAAQ,CAAC,cAAe,SCLrC,MAAMC,EAAgB,mpC,MCS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CAAKE,MAAO,CAAE,qBAAsB,KAAM,6BAA8BzB,KAAKE,MAAQF,KAAKG,MACxFkB,EAAA,OAAAE,IAAA,2CACEE,MAAM,sBACNC,MAAO,CACLC,MAAO,GAAGC,KAAKC,OAAQ7B,KAAKE,MAAQF,KAAKG,MAAQH,KAAKI,IAAMJ,KAAKG,KAAQ,a","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"p-yMGqY8YG.js","sources":["src/utils/events.utils.ts"],"sourcesContent":["/**\n * Keyboard keys\n */\nexport const Keys: Record<string, KeyboardEvent['key']> = {\n TAB: 'Tab',\n ENTER: 'Enter',\n DOWN: 'Down',\n UP: 'Up',\n LEFT: 'Left',\n RIGHT: 'Right',\n ARROWDOWN: 'ArrowDown',\n ARROWUP: 'ArrowUp',\n ARROWRIGHT: 'ArrowRight',\n ARROWLEFT: 'ArrowLeft',\n HOME: 'Home',\n END: 'End',\n ESC: 'Esc',\n ESCAPE: 'Escape',\n NUMPADENTER: 'NumpadEnter',\n SPACE: 'Space',\n};\n"],"names":[],"mappings":"AAAA;;AAEG;AACU,MAAA,IAAI,GAAyC;AACxD,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,KAAK,EAAE,OAAO;;;;;"}
|