@mgdis/mg-components 5.17.0 → 5.19.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/{mg-menu.conf-43aacf30.js → components.utils-dc9c8a53.js} +160 -7
- package/dist/cjs/components.utils-dc9c8a53.js.map +1 -0
- package/dist/cjs/index-c042e24b.js +18 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_34.cjs.entry.js +761 -582
- package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +5 -5
- package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +9 -9
- package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js +5 -5
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js.map +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +12 -12
- package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
- package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js +4 -4
- package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js.map +1 -1
- package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js +3 -3
- package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js.map +1 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js +9 -9
- 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 +3 -3
- 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 +4 -4
- package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +13 -15
- package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js +4 -4
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js.map +1 -1
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +5 -4
- 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 +9 -9
- package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js +23 -0
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js.map +1 -0
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js +5 -5
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +2 -2
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +37 -17
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js +7 -1
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js +9 -1
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/MgInput.js +12 -11
- package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +4 -4
- 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 +2 -2
- 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.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +111 -38
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js +21 -27
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js +62 -6
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +84 -13
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js +55 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +115 -44
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js +55 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +88 -15
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js +55 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +87 -14
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js +60 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +87 -14
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js +55 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js +5 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +151 -34
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js +147 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js +80 -7
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +110 -36
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js +69 -6
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +9 -9
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +2 -2
- 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.js +8 -9
- 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.js +6 -6
- 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 +5 -4
- package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
- package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js +1 -1
- package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js.map +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +6 -6
- package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
- package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js +4 -4
- package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js.map +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +7 -7
- 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 +5 -4
- 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 +8 -8
- package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
- package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js +11 -11
- package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js.map +1 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -8
- package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js +7 -7
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js.map +1 -1
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js +3 -3
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js.map +1 -1
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js +1 -1
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js.map +1 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +3 -3
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +17 -15
- package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js +3 -3
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js.map +1 -1
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js +11 -21
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +4 -4
- 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 +36 -16
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/test/{mg-popover.e2e.js → mg-popover.e2e.playwright.js} +54 -62
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js +12 -0
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js.map +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -6
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +34 -34
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js +13 -13
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js.map +1 -1
- package/dist/collection/locales/en/messages.json +3 -3
- package/dist/collection/locales/fr/messages.json +3 -3
- package/dist/collection/utils/components.utils.js +16 -0
- package/dist/collection/utils/components.utils.js.map +1 -1
- package/dist/collection/utils/components.utils.spec.js +22 -1
- package/dist/collection/utils/components.utils.spec.js.map +1 -1
- package/dist/collection/variables.css +1 -275
- package/dist/components/MgInput.js +17 -16
- package/dist/components/MgInput.js.map +1 -1
- package/dist/components/components.utils.js +17 -1
- package/dist/components/components.utils.js.map +1 -1
- package/dist/components/index2.js +6 -6
- package/dist/components/mg-action-more.js +5 -5
- package/dist/components/mg-action-more.js.map +1 -1
- package/dist/components/mg-badge2.js +8 -8
- package/dist/components/mg-badge2.js.map +1 -1
- package/dist/components/mg-button2.js +11 -11
- package/dist/components/mg-button2.js.map +1 -1
- package/dist/components/mg-card2.js +8 -8
- package/dist/components/mg-card2.js.map +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-character-left2.js.map +1 -1
- package/dist/components/mg-details.js +4 -3
- package/dist/components/mg-details.js.map +1 -1
- package/dist/components/mg-divider.js +3 -3
- package/dist/components/mg-divider.js.map +1 -1
- package/dist/components/mg-form.js +4 -4
- package/dist/components/mg-form.js.map +1 -1
- package/dist/components/mg-icon2.js +12 -14
- package/dist/components/mg-icon2.js.map +1 -1
- package/dist/components/mg-illustrated-message.js +7 -7
- package/dist/components/mg-illustrated-message.js.map +1 -1
- package/dist/components/mg-input-checkbox-paginated2.js +8 -8
- package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
- package/dist/components/mg-input-checkbox.js +70 -34
- package/dist/components/mg-input-checkbox.js.map +1 -1
- package/dist/components/mg-input-date.js +45 -12
- package/dist/components/mg-input-date.js.map +1 -1
- package/dist/components/mg-input-numeric.js +76 -43
- package/dist/components/mg-input-numeric.js.map +1 -1
- package/dist/components/mg-input-password.js +49 -14
- package/dist/components/mg-input-password.js.map +1 -1
- package/dist/components/mg-input-radio.js +48 -13
- package/dist/components/mg-input-radio.js.map +1 -1
- package/dist/components/mg-input-select2.js +48 -13
- package/dist/components/mg-input-select2.js.map +1 -1
- package/dist/components/mg-input-text2.js +83 -33
- package/dist/components/mg-input-text2.js.map +1 -1
- package/dist/components/mg-input-textarea.js +69 -35
- package/dist/components/mg-input-textarea.js.map +1 -1
- package/dist/components/mg-input-title2.js +4 -3
- package/dist/components/mg-input-title2.js.map +1 -1
- package/dist/components/mg-input-toggle.js +9 -9
- package/dist/components/mg-input-toggle.js.map +1 -1
- package/dist/components/mg-item-more.js +4 -3
- package/dist/components/mg-item-more.js.map +1 -1
- package/dist/components/mg-menu-item2.js +7 -8
- package/dist/components/mg-menu-item2.js.map +1 -1
- package/dist/components/mg-menu2.js +1 -1
- package/dist/components/mg-menu2.js.map +1 -1
- package/dist/components/mg-message.js +7 -7
- package/dist/components/mg-message.js.map +1 -1
- package/dist/components/mg-modal.js +7 -7
- package/dist/components/mg-modal.js.map +1 -1
- package/dist/components/mg-pagination2.js +2 -2
- package/dist/components/mg-pagination2.js.map +1 -1
- package/dist/components/mg-panel.js +16 -15
- package/dist/components/mg-panel.js.map +1 -1
- package/dist/components/mg-popover-content2.js +4 -4
- package/dist/components/mg-popover-content2.js.map +1 -1
- package/dist/components/mg-popover2.js +33 -14
- package/dist/components/mg-popover2.js.map +1 -1
- package/dist/components/mg-skip-links.js +4 -5
- package/dist/components/mg-skip-links.js.map +1 -1
- package/dist/components/mg-tabs.js +33 -33
- package/dist/components/mg-tabs.js.map +1 -1
- package/dist/components/mg-tag.js +8 -8
- package/dist/components/mg-tag.js.map +1 -1
- package/dist/components/mg-tooltip-content2.js +1 -1
- package/dist/components/mg-tooltip-content2.js.map +1 -1
- package/dist/components/mg-tooltip2.js +34 -15
- package/dist/components/mg-tooltip2.js.map +1 -1
- package/dist/esm/{mg-menu.conf-012fc9b4.js → components.utils-0f76010d.js} +153 -8
- package/dist/esm/components.utils-0f76010d.js.map +1 -0
- package/dist/esm/index-ce01e63b.js +18 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_34.entry.js +697 -518
- package/dist/esm/mg-action-more_34.entry.js.map +1 -1
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-item-more.entry.js +4 -4
- package/dist/esm/mg-item-more.entry.js.map +1 -1
- package/dist/mg-components/locales/en/messages.json +3 -3
- package/dist/mg-components/locales/fr/messages.json +3 -3
- 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-768fc594.entry.js +2 -0
- package/dist/mg-components/p-768fc594.entry.js.map +1 -0
- package/dist/mg-components/p-c9e2c669.js +2 -0
- package/dist/mg-components/p-c9e2c669.js.map +1 -0
- package/dist/mg-components/p-d2d6afec.entry.js +2 -0
- package/dist/mg-components/p-d2d6afec.entry.js.map +1 -0
- package/dist/mg-components/variables.css +1 -275
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +1 -1
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -1
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +4 -3
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +4 -4
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +22 -1
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +17 -2
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +35 -20
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +16 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +16 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +16 -1
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.conf.d.ts +12 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +30 -6
- package/dist/types/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +17 -5
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +2 -1
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +3 -3
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +2 -1
- package/dist/types/components/molecules/mg-popover/test/mg-popover.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +6 -5
- package/dist/types/components.d.ts +71 -13
- package/dist/types/utils/components.utils.d.ts +12 -0
- package/package.json +17 -18
- package/readme.md +0 -31
- package/dist/cjs/mg-menu.conf-43aacf30.js.map +0 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.css +0 -116
- package/dist/collection/components/atoms/mg-button/mg-button.css +0 -182
- package/dist/collection/components/atoms/mg-card/mg-card.css +0 -75
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.css +0 -3
- package/dist/collection/components/atoms/mg-divider/mg-divider.css +0 -9
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +0 -138
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +0 -12
- package/dist/collection/components/atoms/mg-tag/mg-tag.css +0 -131
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.js +0 -37
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.js.map +0 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.css +0 -43
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +0 -3
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +0 -268
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +0 -211
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +0 -257
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +0 -254
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +0 -179
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +0 -264
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +0 -304
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.js +0 -171
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.js.map +0 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +0 -303
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +0 -233
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.css +0 -37
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +0 -377
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +0 -39
- package/dist/collection/components/molecules/mg-details/mg-details.css +0 -64
- package/dist/collection/components/molecules/mg-form/mg-form.css +0 -19
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.css +0 -45
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.css +0 -30
- package/dist/collection/components/molecules/mg-message/mg-message.css +0 -82
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +0 -67
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +0 -47
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +0 -64
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.css +0 -135
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +0 -11
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.js.map +0 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.css +0 -28
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +0 -99
- package/dist/collection/styles/a11y.scss +0 -36
- package/dist/collection/styles/fonts.scss +0 -21
- package/dist/collection/styles/form.scss +0 -3
- package/dist/collection/styles/global.scss +0 -80
- package/dist/collection/styles/layout.scss +0 -29
- package/dist/collection/styles/main.scss +0 -23
- package/dist/collection/styles/mg-icon-animation.scss +0 -6
- package/dist/collection/styles/navigation-button.scss +0 -77
- package/dist/collection/styles/reset-mg-card-slotted-variables.scss +0 -11
- package/dist/collection/styles/typography.scss +0 -82
- package/dist/collection/styles/utilities.scss +0 -21
- package/dist/collection/test/typography.e2e.playwright.js +0 -12
- package/dist/collection/test/typography.e2e.playwright.js.map +0 -1
- package/dist/esm/mg-menu.conf-012fc9b4.js.map +0 -1
- package/dist/mg-components/p-1d7d6fa0.js +0 -2
- package/dist/mg-components/p-1d7d6fa0.js.map +0 -1
- package/dist/mg-components/p-9257e8f1.entry.js +0 -2
- package/dist/mg-components/p-9257e8f1.entry.js.map +0 -1
- package/dist/mg-components/p-caafc9cf.entry.js +0 -2
- package/dist/mg-components/p-caafc9cf.entry.js.map +0 -1
- package/dist/mg-components/styles/a11y.scss +0 -36
- package/dist/mg-components/styles/fonts.scss +0 -21
- package/dist/mg-components/styles/form.scss +0 -3
- package/dist/mg-components/styles/global.scss +0 -80
- package/dist/mg-components/styles/layout.scss +0 -29
- package/dist/mg-components/styles/main.scss +0 -23
- package/dist/mg-components/styles/mg-icon-animation.scss +0 -6
- package/dist/mg-components/styles/navigation-button.scss +0 -77
- package/dist/mg-components/styles/reset-mg-card-slotted-variables.scss +0 -11
- package/dist/mg-components/styles/typography.scss +0 -82
- package/dist/mg-components/styles/utilities.scss +0 -21
- /package/dist/types/{test/typography.e2e.playwright.d.ts → components/atoms/mg-tag/test/mg-tag.e2e.playwright.d.ts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
2
|
import { Width } from '../MgInput.conf';
|
|
3
3
|
import { ClassList } from '../../../../utils/components.utils';
|
|
4
|
+
import { DatalistOption, TextType } from './mg-input-text.conf';
|
|
4
5
|
export declare class MgInputText {
|
|
5
6
|
/************
|
|
6
7
|
* Internal *
|
|
@@ -9,6 +10,7 @@ export declare class MgInputText {
|
|
|
9
10
|
private classIsInputGroupAppend;
|
|
10
11
|
private classHasIcon;
|
|
11
12
|
private characterLeftId;
|
|
13
|
+
private datalistId;
|
|
12
14
|
private input;
|
|
13
15
|
private messages;
|
|
14
16
|
private hasDisplayedError;
|
|
@@ -40,7 +42,7 @@ export declare class MgInputText {
|
|
|
40
42
|
/**
|
|
41
43
|
* Input type
|
|
42
44
|
*/
|
|
43
|
-
type:
|
|
45
|
+
type: TextType;
|
|
44
46
|
/**
|
|
45
47
|
* Input icon
|
|
46
48
|
*/
|
|
@@ -59,6 +61,11 @@ export declare class MgInputText {
|
|
|
59
61
|
* It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.
|
|
60
62
|
*/
|
|
61
63
|
placeholder: string;
|
|
64
|
+
/**
|
|
65
|
+
* Define datalist options
|
|
66
|
+
*/
|
|
67
|
+
datalistoptions: DatalistOption[];
|
|
68
|
+
validateDatalistoptions(newValue: MgInputText['datalistoptions']): void;
|
|
62
69
|
/**
|
|
63
70
|
* Input max length
|
|
64
71
|
*/
|
|
@@ -88,6 +95,7 @@ export declare class MgInputText {
|
|
|
88
95
|
* Define input pattern error message
|
|
89
96
|
*/
|
|
90
97
|
patternErrorMessage: string;
|
|
98
|
+
validatePattern(newValue: string): void;
|
|
91
99
|
/**
|
|
92
100
|
* Add a tooltip message next to the input
|
|
93
101
|
*/
|
|
@@ -129,9 +137,23 @@ export declare class MgInputText {
|
|
|
129
137
|
*/
|
|
130
138
|
setFocus(): Promise<void>;
|
|
131
139
|
/**
|
|
132
|
-
*
|
|
140
|
+
* Display input error if it exists.
|
|
133
141
|
*/
|
|
134
142
|
displayError(): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Set an error and display a custom error message.
|
|
145
|
+
* This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
|
|
146
|
+
* It must be paired with an error message to display for the given context.
|
|
147
|
+
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
148
|
+
* @param valid - value indicating the validity
|
|
149
|
+
* @param errorMessage - the error message to display
|
|
150
|
+
*/
|
|
151
|
+
setError(valid: MgInputText['valid'], errorMessage: string): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* Method to set validity values
|
|
154
|
+
* @param newValue - valid new value
|
|
155
|
+
*/
|
|
156
|
+
private setValidity;
|
|
135
157
|
/**
|
|
136
158
|
* Handle input event
|
|
137
159
|
*/
|
|
@@ -150,16 +172,18 @@ export declare class MgInputText {
|
|
|
150
172
|
private checkValidity;
|
|
151
173
|
/**
|
|
152
174
|
* Set input error message
|
|
175
|
+
* @param errorMessage - errorMessage override
|
|
153
176
|
*/
|
|
154
177
|
private setErrorMessage;
|
|
155
|
-
/**
|
|
156
|
-
* Validate pattern configuration
|
|
157
|
-
*/
|
|
158
|
-
private validatePattern;
|
|
159
178
|
/**
|
|
160
179
|
* Validate append slot
|
|
161
180
|
*/
|
|
162
181
|
private validateAppendSlot;
|
|
182
|
+
/**
|
|
183
|
+
* Methode to control datalist display condition
|
|
184
|
+
* @returns true if display condition success
|
|
185
|
+
*/
|
|
186
|
+
private hasDatalist;
|
|
163
187
|
/*************
|
|
164
188
|
* Lifecycle *
|
|
165
189
|
*************/
|
package/dist/types/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -78,6 +78,7 @@ export declare class MgInputTextarea {
|
|
|
78
78
|
* Define input pattern error message
|
|
79
79
|
*/
|
|
80
80
|
patternErrorMessage: string;
|
|
81
|
+
validatePattern(newValue: string): void;
|
|
81
82
|
/**
|
|
82
83
|
* Define the number of visible text lines for the control
|
|
83
84
|
*/
|
|
@@ -124,9 +125,23 @@ export declare class MgInputTextarea {
|
|
|
124
125
|
*/
|
|
125
126
|
inputValid: EventEmitter<boolean>;
|
|
126
127
|
/**
|
|
127
|
-
*
|
|
128
|
+
* Display input error if it exists.
|
|
128
129
|
*/
|
|
129
130
|
displayError(): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Set an error and display a custom error message.
|
|
133
|
+
* This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
|
|
134
|
+
* It must be paired with an error message to display for the given context.
|
|
135
|
+
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
136
|
+
* @param valid - value indicating the validity
|
|
137
|
+
* @param errorMessage - the error message to display
|
|
138
|
+
*/
|
|
139
|
+
setError(valid: MgInputTextarea['valid'], errorMessage: string): Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* Method to set validity values
|
|
142
|
+
* @param newValue - valid new value
|
|
143
|
+
*/
|
|
144
|
+
private setValidity;
|
|
130
145
|
/**
|
|
131
146
|
* Handle input event
|
|
132
147
|
*/
|
|
@@ -151,12 +166,9 @@ export declare class MgInputTextarea {
|
|
|
151
166
|
private checkValidity;
|
|
152
167
|
/**
|
|
153
168
|
* Set input error message
|
|
169
|
+
* @param errorMessage - errorMessage override
|
|
154
170
|
*/
|
|
155
171
|
private setErrorMessage;
|
|
156
|
-
/**
|
|
157
|
-
* Validate pattern configuration
|
|
158
|
-
*/
|
|
159
|
-
private validatePattern;
|
|
160
172
|
/*************
|
|
161
173
|
* Lifecycle *
|
|
162
174
|
*************/
|
|
@@ -4,6 +4,7 @@ export declare class MgActionMore {
|
|
|
4
4
|
* Internal *
|
|
5
5
|
************/
|
|
6
6
|
private readonly name;
|
|
7
|
+
private readonly classBase;
|
|
7
8
|
private readonly mgPopoverIdentifier;
|
|
8
9
|
private messages;
|
|
9
10
|
/**************
|
|
@@ -41,7 +42,7 @@ export declare class MgActionMore {
|
|
|
41
42
|
* Methods *
|
|
42
43
|
***********/
|
|
43
44
|
/**
|
|
44
|
-
*
|
|
45
|
+
* Toggle expanded props
|
|
45
46
|
*/
|
|
46
47
|
private toggleExpanded;
|
|
47
48
|
/**
|
|
@@ -23,16 +23,16 @@ export declare class MgPanel {
|
|
|
23
23
|
* Panel title
|
|
24
24
|
*/
|
|
25
25
|
panelTitle: string;
|
|
26
|
-
validatePanelTitle(newValue:
|
|
26
|
+
validatePanelTitle(newValue: MgPanel['panelTitle']): void;
|
|
27
27
|
/**
|
|
28
28
|
* Panel title pattern
|
|
29
29
|
*/
|
|
30
30
|
titlePattern: string;
|
|
31
|
-
validatetitlePattern(newValue: string): void;
|
|
32
31
|
/**
|
|
33
32
|
* Panel title pattern error message
|
|
34
33
|
*/
|
|
35
34
|
titlePatternErrorMessage: string;
|
|
35
|
+
validateTitlePattern(newValue: string): void;
|
|
36
36
|
/**
|
|
37
37
|
* Define if panel title is editable
|
|
38
38
|
*/
|
|
@@ -46,7 +46,7 @@ export declare class MgPanel {
|
|
|
46
46
|
* Panel is opened
|
|
47
47
|
*/
|
|
48
48
|
expanded: boolean;
|
|
49
|
-
handleExpanded(newValue:
|
|
49
|
+
handleExpanded(newValue: MgPanel['expanded']): void;
|
|
50
50
|
/**
|
|
51
51
|
* Define expand toggle button display
|
|
52
52
|
*/
|
|
@@ -20,6 +20,7 @@ export declare class MgPopover {
|
|
|
20
20
|
* Needed by the input for accessibility `aria-decribedby`.
|
|
21
21
|
*/
|
|
22
22
|
identifier: string;
|
|
23
|
+
validateIdentifier(): void;
|
|
23
24
|
/**
|
|
24
25
|
* Popover placement
|
|
25
26
|
*/
|
|
@@ -33,7 +34,7 @@ export declare class MgPopover {
|
|
|
33
34
|
* Define if popover has a cross button
|
|
34
35
|
*/
|
|
35
36
|
closeButton: boolean;
|
|
36
|
-
validateCloseButton(newValue: MgPopover['
|
|
37
|
+
validateCloseButton(newValue: MgPopover['closeButton']): void;
|
|
37
38
|
/**
|
|
38
39
|
* Display popover
|
|
39
40
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -54,6 +54,12 @@ export declare class MgTabs {
|
|
|
54
54
|
* Emited event when active tab change
|
|
55
55
|
*/
|
|
56
56
|
activeTabChange: EventEmitter<number>;
|
|
57
|
+
/**
|
|
58
|
+
* Validate that new tab status can be `Status.ACTIVE`
|
|
59
|
+
* @param tab - tab item
|
|
60
|
+
* @returns true when tab match condition to get a `Status.ACTIVE`
|
|
61
|
+
*/
|
|
62
|
+
private isActivableTab;
|
|
57
63
|
/**
|
|
58
64
|
* Method to know if given tab has the given status
|
|
59
65
|
* @param tab - item tab key to set to ACTIVE status
|
|
@@ -74,11 +80,6 @@ export declare class MgTabs {
|
|
|
74
80
|
* @returns index
|
|
75
81
|
*/
|
|
76
82
|
private getTabItemIndex;
|
|
77
|
-
/**
|
|
78
|
-
* Method to get the active-tab value
|
|
79
|
-
* @returns of the active-tab
|
|
80
|
-
*/
|
|
81
|
-
private getActiveTab;
|
|
82
83
|
/**
|
|
83
84
|
* Handle click events on tabs
|
|
84
85
|
* @param event - mouse event
|
|
@@ -14,6 +14,7 @@ import { CheckboxItem, CheckboxType, CheckboxValue, SectionKind } from "./compon
|
|
|
14
14
|
import { Width } from "./components/molecules/inputs/MgInput.conf";
|
|
15
15
|
import { RadioOption } from "./components/molecules/inputs/mg-input-radio/mg-input-radio.conf";
|
|
16
16
|
import { SelectOption } from "./components/molecules/inputs/mg-input-select/mg-input-select.conf";
|
|
17
|
+
import { DatalistOption, TextType } from "./components/molecules/inputs/mg-input-text/mg-input-text.conf";
|
|
17
18
|
import { ToggleValue } from "./components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf";
|
|
18
19
|
import { IconType, SizeType, SlotLabelType } from "./components/molecules/mg-item-more/mg-item-more.conf";
|
|
19
20
|
import { Direction, ItemMoreType, MenuSizeType } from "./components/molecules/menu/mg-menu/mg-menu.conf";
|
|
@@ -34,6 +35,7 @@ export { CheckboxItem, CheckboxType, CheckboxValue, SectionKind } from "./compon
|
|
|
34
35
|
export { Width } from "./components/molecules/inputs/MgInput.conf";
|
|
35
36
|
export { RadioOption } from "./components/molecules/inputs/mg-input-radio/mg-input-radio.conf";
|
|
36
37
|
export { SelectOption } from "./components/molecules/inputs/mg-input-select/mg-input-select.conf";
|
|
38
|
+
export { DatalistOption, TextType } from "./components/molecules/inputs/mg-input-text/mg-input-text.conf";
|
|
37
39
|
export { ToggleValue } from "./components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf";
|
|
38
40
|
export { IconType, SizeType, SlotLabelType } from "./components/molecules/mg-item-more/mg-item-more.conf";
|
|
39
41
|
export { Direction, ItemMoreType, MenuSizeType } from "./components/molecules/menu/mg-menu/mg-menu.conf";
|
|
@@ -174,7 +176,7 @@ export namespace Components {
|
|
|
174
176
|
*/
|
|
175
177
|
"disabled": boolean;
|
|
176
178
|
/**
|
|
177
|
-
*
|
|
179
|
+
* Display input error if it exists.
|
|
178
180
|
*/
|
|
179
181
|
"displayError": () => Promise<void>;
|
|
180
182
|
/**
|
|
@@ -236,7 +238,7 @@ export namespace Components {
|
|
|
236
238
|
*/
|
|
237
239
|
"disabled": boolean;
|
|
238
240
|
/**
|
|
239
|
-
*
|
|
241
|
+
* Display input error if it exists.
|
|
240
242
|
*/
|
|
241
243
|
"displayError": () => Promise<void>;
|
|
242
244
|
/**
|
|
@@ -283,12 +285,18 @@ export namespace Components {
|
|
|
283
285
|
* Define if mg-input-checkbox is required
|
|
284
286
|
*/
|
|
285
287
|
"required": boolean;
|
|
288
|
+
/**
|
|
289
|
+
* Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
290
|
+
* @param valid - value indicating the validity
|
|
291
|
+
* @param errorMessage - the error message to display
|
|
292
|
+
*/
|
|
293
|
+
"setError": (valid: MgInputCheckbox['valid'], errorMessage: string) => Promise<void>;
|
|
286
294
|
/**
|
|
287
295
|
* Add a tooltip message next to the input
|
|
288
296
|
*/
|
|
289
297
|
"tooltip": string;
|
|
290
298
|
/**
|
|
291
|
-
* Define checkbox type
|
|
299
|
+
* Define checkbox type When it's undefined the type is dynamic: - With 0-5 items type is 'checkbox' - With 5-10 items type is 'multi' When it set the type is locked to the defined value. When type is dynamic OR with 'multi' type AND Over 10 items "search" feature is enabled
|
|
292
300
|
*/
|
|
293
301
|
"type": CheckboxType;
|
|
294
302
|
/**
|
|
@@ -335,7 +343,7 @@ export namespace Components {
|
|
|
335
343
|
*/
|
|
336
344
|
"disabled": boolean;
|
|
337
345
|
/**
|
|
338
|
-
*
|
|
346
|
+
* Display input error if it exists.
|
|
339
347
|
*/
|
|
340
348
|
"displayError": () => Promise<void>;
|
|
341
349
|
/**
|
|
@@ -382,6 +390,12 @@ export namespace Components {
|
|
|
382
390
|
* Define if input is required
|
|
383
391
|
*/
|
|
384
392
|
"required": boolean;
|
|
393
|
+
/**
|
|
394
|
+
* Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
395
|
+
* @param valid - value indicating the validity
|
|
396
|
+
* @param errorMessage - the error message to display
|
|
397
|
+
*/
|
|
398
|
+
"setError": (valid: MgInputDate['valid'], errorMessage: string) => Promise<void>;
|
|
385
399
|
/**
|
|
386
400
|
* Add a tooltip message next to the input
|
|
387
401
|
*/
|
|
@@ -409,7 +423,7 @@ export namespace Components {
|
|
|
409
423
|
*/
|
|
410
424
|
"disabled": boolean;
|
|
411
425
|
/**
|
|
412
|
-
*
|
|
426
|
+
* Display input error if it exists.
|
|
413
427
|
*/
|
|
414
428
|
"displayError": () => Promise<void>;
|
|
415
429
|
/**
|
|
@@ -468,6 +482,12 @@ export namespace Components {
|
|
|
468
482
|
* Define if input is required
|
|
469
483
|
*/
|
|
470
484
|
"required": boolean;
|
|
485
|
+
/**
|
|
486
|
+
* Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
487
|
+
* @param valid - value indicating the validity
|
|
488
|
+
* @param errorMessage - the error message to display
|
|
489
|
+
*/
|
|
490
|
+
"setError": (valid: MgInputNumeric['valid'], errorMessage: string) => Promise<void>;
|
|
471
491
|
/**
|
|
472
492
|
* Add a tooltip message next to the input
|
|
473
493
|
*/
|
|
@@ -491,7 +511,7 @@ export namespace Components {
|
|
|
491
511
|
*/
|
|
492
512
|
"disabled": boolean;
|
|
493
513
|
/**
|
|
494
|
-
*
|
|
514
|
+
* Display input error if it exists.
|
|
495
515
|
*/
|
|
496
516
|
"displayError": () => Promise<void>;
|
|
497
517
|
/**
|
|
@@ -538,6 +558,12 @@ export namespace Components {
|
|
|
538
558
|
* Define if input is required
|
|
539
559
|
*/
|
|
540
560
|
"required": boolean;
|
|
561
|
+
/**
|
|
562
|
+
* Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
563
|
+
* @param valid - value indicating the validity
|
|
564
|
+
* @param errorMessage - the error message to display
|
|
565
|
+
*/
|
|
566
|
+
"setError": (valid: MgInputPassword['valid'], errorMessage: string) => Promise<void>;
|
|
541
567
|
/**
|
|
542
568
|
* Add a tooltip message next to the input
|
|
543
569
|
*/
|
|
@@ -557,7 +583,7 @@ export namespace Components {
|
|
|
557
583
|
*/
|
|
558
584
|
"disabled": boolean;
|
|
559
585
|
/**
|
|
560
|
-
*
|
|
586
|
+
* Display input error if it exists.
|
|
561
587
|
*/
|
|
562
588
|
"displayError": () => Promise<void>;
|
|
563
589
|
/**
|
|
@@ -604,6 +630,12 @@ export namespace Components {
|
|
|
604
630
|
* Define if input is required
|
|
605
631
|
*/
|
|
606
632
|
"required": boolean;
|
|
633
|
+
/**
|
|
634
|
+
* Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
635
|
+
* @param valid - value indicating the validity
|
|
636
|
+
* @param errorMessage - the error message to display
|
|
637
|
+
*/
|
|
638
|
+
"setError": (valid: MgInputRadio['valid'], errorMessage: string) => Promise<void>;
|
|
607
639
|
/**
|
|
608
640
|
* Add a tooltip message next to the input
|
|
609
641
|
*/
|
|
@@ -623,7 +655,7 @@ export namespace Components {
|
|
|
623
655
|
*/
|
|
624
656
|
"disabled": boolean;
|
|
625
657
|
/**
|
|
626
|
-
*
|
|
658
|
+
* Display input error if it exists.
|
|
627
659
|
*/
|
|
628
660
|
"displayError": () => Promise<void>;
|
|
629
661
|
/**
|
|
@@ -682,6 +714,12 @@ export namespace Components {
|
|
|
682
714
|
* Define if input is required
|
|
683
715
|
*/
|
|
684
716
|
"required": boolean;
|
|
717
|
+
/**
|
|
718
|
+
* Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
719
|
+
* @param valid - value indicating the validity
|
|
720
|
+
* @param errorMessage - the error message to display
|
|
721
|
+
*/
|
|
722
|
+
"setError": (valid: MgInputSelect['valid'], errorMessage: string) => Promise<void>;
|
|
685
723
|
/**
|
|
686
724
|
* Add a tooltip message next to the input
|
|
687
725
|
*/
|
|
@@ -696,6 +734,10 @@ export namespace Components {
|
|
|
696
734
|
"value": any;
|
|
697
735
|
}
|
|
698
736
|
interface MgInputText {
|
|
737
|
+
/**
|
|
738
|
+
* Define datalist options
|
|
739
|
+
*/
|
|
740
|
+
"datalistoptions": DatalistOption[];
|
|
699
741
|
/**
|
|
700
742
|
* Define if input is disabled
|
|
701
743
|
*/
|
|
@@ -705,7 +747,7 @@ export namespace Components {
|
|
|
705
747
|
*/
|
|
706
748
|
"displayCharacterLeft": boolean;
|
|
707
749
|
/**
|
|
708
|
-
*
|
|
750
|
+
* Display input error if it exists.
|
|
709
751
|
*/
|
|
710
752
|
"displayError": () => Promise<void>;
|
|
711
753
|
/**
|
|
@@ -768,6 +810,12 @@ export namespace Components {
|
|
|
768
810
|
* Define if input is required
|
|
769
811
|
*/
|
|
770
812
|
"required": boolean;
|
|
813
|
+
/**
|
|
814
|
+
* Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
815
|
+
* @param valid - value indicating the validity
|
|
816
|
+
* @param errorMessage - the error message to display
|
|
817
|
+
*/
|
|
818
|
+
"setError": (valid: MgInputText['valid'], errorMessage: string) => Promise<void>;
|
|
771
819
|
/**
|
|
772
820
|
* Public method to play input focus
|
|
773
821
|
*/
|
|
@@ -779,7 +827,7 @@ export namespace Components {
|
|
|
779
827
|
/**
|
|
780
828
|
* Input type
|
|
781
829
|
*/
|
|
782
|
-
"type":
|
|
830
|
+
"type": TextType;
|
|
783
831
|
/**
|
|
784
832
|
* Define input valid state
|
|
785
833
|
*/
|
|
@@ -799,7 +847,7 @@ export namespace Components {
|
|
|
799
847
|
*/
|
|
800
848
|
"displayCharacterLeft": boolean;
|
|
801
849
|
/**
|
|
802
|
-
*
|
|
850
|
+
* Display input error if it exists.
|
|
803
851
|
*/
|
|
804
852
|
"displayError": () => Promise<void>;
|
|
805
853
|
/**
|
|
@@ -866,6 +914,12 @@ export namespace Components {
|
|
|
866
914
|
* Define the number of visible text lines for the control
|
|
867
915
|
*/
|
|
868
916
|
"rows": number;
|
|
917
|
+
/**
|
|
918
|
+
* Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
919
|
+
* @param valid - value indicating the validity
|
|
920
|
+
* @param errorMessage - the error message to display
|
|
921
|
+
*/
|
|
922
|
+
"setError": (valid: MgInputTextarea['valid'], errorMessage: string) => Promise<void>;
|
|
869
923
|
/**
|
|
870
924
|
* Add a tooltip message next to the input
|
|
871
925
|
*/
|
|
@@ -1807,7 +1861,7 @@ declare namespace LocalJSX {
|
|
|
1807
1861
|
*/
|
|
1808
1862
|
"tooltip"?: string;
|
|
1809
1863
|
/**
|
|
1810
|
-
* Define checkbox type
|
|
1864
|
+
* Define checkbox type When it's undefined the type is dynamic: - With 0-5 items type is 'checkbox' - With 5-10 items type is 'multi' When it set the type is locked to the defined value. When type is dynamic OR with 'multi' type AND Over 10 items "search" feature is enabled
|
|
1811
1865
|
*/
|
|
1812
1866
|
"type"?: CheckboxType;
|
|
1813
1867
|
/**
|
|
@@ -2239,6 +2293,10 @@ declare namespace LocalJSX {
|
|
|
2239
2293
|
"value"?: any;
|
|
2240
2294
|
}
|
|
2241
2295
|
interface MgInputText {
|
|
2296
|
+
/**
|
|
2297
|
+
* Define datalist options
|
|
2298
|
+
*/
|
|
2299
|
+
"datalistoptions"?: DatalistOption[];
|
|
2242
2300
|
/**
|
|
2243
2301
|
* Define if input is disabled
|
|
2244
2302
|
*/
|
|
@@ -2322,7 +2380,7 @@ declare namespace LocalJSX {
|
|
|
2322
2380
|
/**
|
|
2323
2381
|
* Input type
|
|
2324
2382
|
*/
|
|
2325
|
-
"type"?:
|
|
2383
|
+
"type"?: TextType;
|
|
2326
2384
|
/**
|
|
2327
2385
|
* Define input valid state
|
|
2328
2386
|
*/
|
|
@@ -67,3 +67,15 @@ export declare const getWindows: (localWindow: Window) => Window[];
|
|
|
67
67
|
* @returns The list of windows found
|
|
68
68
|
*/
|
|
69
69
|
export declare const getParentWindows: (localWindow: Window, windows?: Window[]) => Window[];
|
|
70
|
+
/**
|
|
71
|
+
* Validate string
|
|
72
|
+
* @param value - value to check
|
|
73
|
+
* @returns if string is valid
|
|
74
|
+
*/
|
|
75
|
+
export declare const isValidString: (value: unknown) => boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Clean string caraters
|
|
78
|
+
* @param text - text to cliean
|
|
79
|
+
* @returns cleanded string
|
|
80
|
+
*/
|
|
81
|
+
export declare const cleanString: (text: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgdis/mg-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.19.0",
|
|
4
4
|
"description": "MG Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@popperjs/core": "^2.11.7",
|
|
27
27
|
"@stencil/core": "^4.3.0",
|
|
28
|
-
"
|
|
29
|
-
"@mgdis/
|
|
28
|
+
"@mgdis/img": "1.3.0",
|
|
29
|
+
"@mgdis/styles": "1.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/core": "^7.20.12",
|
|
@@ -35,9 +35,8 @@
|
|
|
35
35
|
"@babel/preset-env": "^7.22.5",
|
|
36
36
|
"@babel/preset-react": "^7.22.5",
|
|
37
37
|
"@babel/preset-typescript": "^7.22.5",
|
|
38
|
-
"@playwright/test": "
|
|
38
|
+
"@playwright/test": "1.39.0",
|
|
39
39
|
"@pxtrn/storybook-addon-docs-stencil": "^6.4.1",
|
|
40
|
-
"@stencil/sass": "^1.5.2",
|
|
41
40
|
"@storybook/addon-a11y": "^7.2.0",
|
|
42
41
|
"@storybook/addon-actions": "^7.2.0",
|
|
43
42
|
"@storybook/addon-essentials": "^7.2.0",
|
|
@@ -48,21 +47,20 @@
|
|
|
48
47
|
"@storybook/html-webpack5": "^7.2.0",
|
|
49
48
|
"@storybook/preset-scss": "^1.0.3",
|
|
50
49
|
"@types/jest": "npm:@types/jest@^26",
|
|
51
|
-
"@types/jest-image-snapshot": "^
|
|
50
|
+
"@types/jest-image-snapshot": "^6.0.0",
|
|
52
51
|
"@types/node": "^18.15.10",
|
|
53
|
-
"babel-loader": "^
|
|
52
|
+
"babel-loader": "^9.0.0",
|
|
54
53
|
"babel-plugin-jsx-pragmatic": "^1.0.2",
|
|
55
|
-
"chromatic": "^
|
|
56
|
-
"css-loader": "^
|
|
54
|
+
"chromatic": "^7.0.0",
|
|
55
|
+
"css-loader": "^6.0.0",
|
|
57
56
|
"eslint": "^8.x",
|
|
58
57
|
"eslint-plugin-storybook": "^0.6.13",
|
|
59
58
|
"jest": "npm:jest@^26",
|
|
60
59
|
"jest-cli": "npm:jest-cli@^26",
|
|
61
|
-
"jest-image-snapshot": "^
|
|
62
|
-
"jest-junit": "^
|
|
60
|
+
"jest-image-snapshot": "^6.0.0",
|
|
61
|
+
"jest-junit": "^16.0.0",
|
|
63
62
|
"jest-transform-stub": "^2.0.0",
|
|
64
63
|
"jsx-dom": "^8.0.4",
|
|
65
|
-
"npm-run-all": "^4.1.5",
|
|
66
64
|
"prettier": "^2.8.4",
|
|
67
65
|
"puppeteer": "^13.7.0",
|
|
68
66
|
"react": "^18.2.0",
|
|
@@ -73,9 +71,9 @@
|
|
|
73
71
|
"storybook": "^7.2.0",
|
|
74
72
|
"style-loader": "^2.0.0",
|
|
75
73
|
"ts-node": "^10.9.1",
|
|
76
|
-
"typescript": "^
|
|
77
|
-
"@mgdis/linting-stencil": "1.1.0",
|
|
74
|
+
"typescript": "^5.0.0",
|
|
78
75
|
"eslint-config-stencil": "1.1.1",
|
|
76
|
+
"@mgdis/linting-stencil": "1.1.0",
|
|
79
77
|
"playwright-config": "1.0.0",
|
|
80
78
|
"tsconfig": "1.0.0"
|
|
81
79
|
},
|
|
@@ -84,16 +82,17 @@
|
|
|
84
82
|
"prebuild": "node ./bin/build-icons",
|
|
85
83
|
"build": "pnpm prebuild && stencil build --docs",
|
|
86
84
|
"start": "pnpm prebuild && stencil build --dev --watch --serve",
|
|
87
|
-
"lint": "
|
|
88
|
-
"lint:fix": "
|
|
85
|
+
"lint": "pnpm lint:es && pnpm lint:prettier",
|
|
86
|
+
"lint:fix": "pnpm lint:es:fix && pnpm lint:prettier:fix",
|
|
89
87
|
"lint:es": "eslint src/**/*.{ts,tsx}",
|
|
90
88
|
"lint:es:fix": "eslint src/**/*.{ts,tsx} --fix",
|
|
91
|
-
"lint:prettier": "prettier --check **/*.{ts,tsx,
|
|
92
|
-
"lint:prettier:fix": "prettier --write **/*.{ts,tsx,
|
|
89
|
+
"lint:prettier": "prettier --check **/*.{ts,tsx,html,mdx,json}",
|
|
90
|
+
"lint:prettier:fix": "prettier --write **/*.{ts,tsx,html,mdx,json}",
|
|
93
91
|
"test": "TZ=UTC stencil test --spec --e2e",
|
|
94
92
|
"test:unit": "TZ=UTC stencil test --spec --collectCoverage",
|
|
95
93
|
"test:e2e": "pnpm prebuild && stencil test --e2e --collectCoverage --collectCoverageFrom=\"src/**/*.e2e.ts\" --reporters=\"default\" --reporters=\"jest-junit\"",
|
|
96
94
|
"test:e2e:playwright": "pnpm --package=@pnpm/@playwright/test dlx playwright test",
|
|
95
|
+
"test:e2e:playwright:docker": "pnpm dlx @playwright/test test",
|
|
97
96
|
"test:watch": "stencil test --spec --e2e --watchAll",
|
|
98
97
|
"generate": "stencil generate",
|
|
99
98
|
"storybook": "storybook dev -p 6006",
|
package/readme.md
CHANGED
|
@@ -66,37 +66,6 @@ All of the MGDIS generated web components must use the prefix `mg`.
|
|
|
66
66
|
|
|
67
67
|
You will find how to use the library instructions in the [Getting Started section](./getting-started.md).
|
|
68
68
|
|
|
69
|
-
### Style
|
|
70
|
-
|
|
71
|
-
#### Naming methodology
|
|
72
|
-
|
|
73
|
-
MG Components is using [BEM](https://en.bem.info/) (Block, Element, Modifier) methodology with the [two dashes style](https://en.bem.info/methodology/naming-convention/#two-dashes-style) naming scheme.
|
|
74
|
-
|
|
75
|
-
#### Declaration organisation
|
|
76
|
-
|
|
77
|
-
When a selector contains too many declaration it is recommended to organize them by theme : Display, Decoration, Font, Others.
|
|
78
|
-
|
|
79
|
-
```CSS
|
|
80
|
-
.mg-button {
|
|
81
|
-
// Display
|
|
82
|
-
display: inline-block;
|
|
83
|
-
vertical-align: middle;
|
|
84
|
-
min-height: 3.5rem;
|
|
85
|
-
padding: 0.6rem 1.2rem;
|
|
86
|
-
// Decoration
|
|
87
|
-
background-image: none;
|
|
88
|
-
border-radius: 0.3rem;
|
|
89
|
-
border: 0.1rem solid transparent;
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
// Font
|
|
92
|
-
font-weight: normal;
|
|
93
|
-
text-align: center;
|
|
94
|
-
white-space: nowrap;
|
|
95
|
-
// Others
|
|
96
|
-
touch-action: manipulation;
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
69
|
### Storybook
|
|
101
70
|
|
|
102
71
|
The plugin [storybook-addon-docs-stencil
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"mg-menu.conf-43aacf30.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;MAOa,cAAc,GAAG,CAAC,MAAc,EAAE,MAAc,EAAE,QAAgB;EAC7E,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACvF,EAAE;AAEF;;;;;;MAMa,YAAY,GAAG,CAAC,MAAc,EAAE,MAAc;EACzD,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACtD,EAAE;AAEF;;;MAGa,UAAU,GAAG,gDAAgD;AAE1E;;;;;;MAMa,UAAU,GAAG,CAAC,IAAY,EAAE,MAAc;EACrD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;IACrE,OAAO,EAAE,CAAC;GACX;EACD,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,EAAE;AAEF;;;;;;;;AAQO,MAAM,iBAAiB,GAAG,CAAC,OAAoB,EAAE,QAAiB,EAAE,aAAqB;;EAE9F,MAAM,oBAAoB,GAAgB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;EACpE,MAAM,WAAW,GAAa,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,IAAI,CAAC,CAAC;EAC/F,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,QAAQ,IAAI,aAAa,CAAC;;EAE7F,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;;EAE/C,OAAO;IACL,MAAM;IACN,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,aAAa,CAAC;GAC5D,CAAC;AACJ,CAAC;;ACvDD,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,MAAM,QAAQ,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAE5B;;;;;MAKa,WAAW,GAAG,CAAC,OAAoB,KAA4D,iBAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,aAAa;;ACV9J;;;AAGYA;AAAZ,WAAY,SAAS;EACnB,kCAAqB,CAAA;EACrB,sCAAyB,CAAA;AAC3B,CAAC,EAHWA,iBAAS,KAATA,iBAAS,QAGpB;AAOD;;;MAGa,KAAK,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO;;;;;;;;;","names":["Direction"],"sources":["src/utils/locale.utils.ts","src/locales/index.ts","src/components/molecules/menu/mg-menu/mg-menu.conf.ts"],"sourcesContent":["/**\n * Format number to the locale currency\n * @param number - number to format\n * @param locale - locale to apply\n * @param currency - currency to apply\n * @returns formatted currency\n */\nexport const localeCurrency = (number: number, locale: string, currency: string): string => {\n return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(number);\n};\n\n/**\n * Format number to locale\n * @param number - number to format\n * @param locale - locale to apply\n * @returns formatted number\n */\nexport const localeNumber = (number: number, locale: string): string => {\n return new Intl.NumberFormat(locale).format(number);\n};\n\n/**\n * Date RegExp\n */\nexport const dateRegExp = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/;\n\n/**\n * Locale date format\n * @param date - date to format\n * @param locale - locale to apply\n * @returns formatted date\n */\nexport const localeDate = (date: string, locale: string): string => {\n if (typeof date !== 'string' || date === '' || !dateRegExp.test(date)) {\n return '';\n }\n return new Intl.DateTimeFormat(locale).format(new Date(date));\n};\n\n/**\n * Get locale and messages\n * We load the defined locale but for now we only support the first subtag for messages\n * @param element - element we need to get the language\n * @param messages - messages to use\n * @param defaultLocale - default messages locale\n * @returns messages object\n */\nexport const getLocaleMessages = (element: HTMLElement, messages: unknown, defaultLocale: string): { locale: string; messages: Record<string, unknown> } => {\n // Get local\n const closestLangAttribute: HTMLElement = element.closest('[lang]');\n const closestLang: string[] = Intl.NumberFormat.supportedLocalesOf(closestLangAttribute?.lang);\n const locale = closestLang.length > 0 ? closestLang[0] : navigator.language || defaultLocale;\n // Only keep first subtag\n const localeSubtag = locale.split('-').shift();\n // Return\n return {\n locale,\n messages: messages[localeSubtag] || messages[defaultLocale],\n };\n};\n","import en from './en/messages.json';\nimport fr from './fr/messages.json';\nimport { getLocaleMessages } from '../utils/locale.utils';\n\nconst defaultLocale = 'en';\nconst messages = { en, fr };\n\n/**\n * Get Intl object\n * @param element - element we need to get the language\n * @returns messages object\n */\nexport const initLocales = (element: HTMLElement): { locale: string; messages: Record<string, unknown> } => getLocaleMessages(element, messages, defaultLocale);\n","import { MgItemMore } from '../../mg-item-more/mg-item-more';\n\n/**\n * Menu direction type\n */\nexport enum Direction {\n VERTICAL = 'vertical',\n HORIZONTAL = 'horizontal',\n}\n\n/**\n * ItemMore prop type\n */\nexport type ItemMoreType = Pick<MgItemMore, 'icon' | 'slotlabel' | 'size'>;\n\n/**\n * List of all possibles sizes\n */\nexport const sizes = ['regular', 'medium', 'large'] as const;\n\n/**\n * item Size from sizes\n */\nexport type MenuSizeType = (typeof sizes)[number];\n"],"version":3}
|