@gov-design-system-ce/components 4.1.0-rc1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{colors-976f6dff.js → colors-f7c8eadd.js} +7 -9
- package/dist/cjs/colors-f7c8eadd.js.map +1 -0
- package/dist/cjs/{constants-e2807da6.js → constants-49f0efa6.js} +2 -2
- package/dist/cjs/{constants-e2807da6.js.map → constants-49f0efa6.js.map} +1 -1
- package/dist/cjs/{constants-43c0c51b.js → constants-4dfa23e3.js} +2 -2
- package/dist/cjs/{constants-43c0c51b.js.map → constants-4dfa23e3.js.map} +1 -1
- package/dist/cjs/{constants-441d1af4.js → constants-82929d01.js} +2 -2
- package/dist/cjs/{constants-441d1af4.js.map → constants-82929d01.js.map} +1 -1
- package/dist/cjs/{constants-bd0d66ac.js → constants-b9fece07.js} +2 -2
- package/dist/cjs/{constants-bd0d66ac.js.map → constants-b9fece07.js.map} +1 -1
- package/dist/cjs/{constants-5037cdc9.js → constants-c0886404.js} +2 -2
- package/dist/cjs/{constants-5037cdc9.js.map → constants-c0886404.js.map} +1 -1
- package/dist/cjs/{constants-861428a4.js → constants-f464dc4c.js} +2 -2
- package/dist/cjs/{constants-861428a4.js.map → constants-f464dc4c.js.map} +1 -1
- package/dist/cjs/core.cjs.js +2 -2
- package/dist/cjs/{form-c1aec07a.js → form-4e66039a.js} +4 -3
- package/dist/cjs/form-4e66039a.js.map +1 -0
- package/dist/cjs/gov-accordion-item.cjs.entry.js +11 -9
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +4 -5
- package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +14 -15
- package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +7 -8
- package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +7 -8
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +12 -13
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +7 -8
- package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-chip.cjs.entry.js +13 -14
- package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-container.cjs.entry.js +3 -11
- package/dist/cjs/gov-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js +3 -3
- package/dist/cjs/gov-dialog.cjs.entry.js +7 -8
- package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/gov-empty.cjs.entry.js +5 -6
- package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js +3 -3
- package/dist/cjs/gov-flex_4.cjs.entry.js +322 -0
- package/dist/cjs/gov-flex_4.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +6 -8
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +9 -10
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +7 -7
- package/dist/cjs/gov-form-file.cjs.entry.js +12 -8
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +5 -6
- package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input_2.cjs.entry.js +14 -13
- package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +13 -29
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-password-power.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-radio-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +8 -9
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-select.cjs.entry.js +10 -11
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +9 -10
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +3 -3
- package/dist/cjs/gov-grid.cjs.entry.js +3 -3
- package/dist/cjs/gov-infobar.cjs.entry.js +7 -8
- package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-layout-column.cjs.entry.js +3 -3
- package/dist/cjs/gov-layout.cjs.entry.js +3 -3
- package/dist/cjs/gov-lifecycle.cjs.entry.js +47 -0
- package/dist/cjs/gov-lifecycle.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-link.cjs.entry.js +51 -0
- package/dist/cjs/gov-link.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-loading.cjs.entry.js +5 -6
- package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +6 -7
- package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +8 -9
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +5 -6
- package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +8 -9
- package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +7 -8
- package/dist/cjs/gov-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +6 -6
- package/dist/cjs/gov-tabs.cjs.entry.js +7 -8
- package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tag.cjs.entry.js +11 -12
- package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js +3 -3
- package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tiles.cjs.entry.js +3 -3
- package/dist/cjs/gov-toast.cjs.entry.js +10 -11
- package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +5 -5
- package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +12 -13
- package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +10 -11
- package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard.cjs.entry.js +10 -11
- package/dist/cjs/gov-wizard.cjs.entry.js.map +1 -1
- package/dist/cjs/{win-587f4614.js → gov.log-bfea3151.js} +16 -4
- package/dist/cjs/gov.log-bfea3151.js.map +1 -0
- package/dist/cjs/{index-1af4880c.js → index-7ff4447c.js} +20 -12
- package/dist/cjs/index-7ff4447c.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{props-b8a955b2.js → props-d189860c.js} +2 -2
- package/dist/cjs/{props-b8a955b2.js.map → props-d189860c.js.map} +1 -1
- package/dist/cjs/{string.utils-2335838f.js → string.utils-b84c81cf.js} +2 -1
- package/dist/cjs/string.utils-b84c81cf.js.map +1 -0
- package/dist/cjs/{template-b070338f.js → template-39939fd6.js} +1 -20
- package/dist/cjs/template-39939fd6.js.map +1 -0
- package/dist/cjs/{wcag-31089f70.js → wcag-2927ff73.js} +5 -6
- package/dist/cjs/wcag-2927ff73.js.map +1 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +8 -5
- package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +6 -35
- package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments.js +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.js +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
- package/dist/collection/components/gov-button/button/gov-button.js +9 -9
- package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
- package/dist/collection/components/gov-card/gov-card.js +1 -1
- package/dist/collection/components/gov-card/gov-card.js.map +1 -1
- package/dist/collection/components/gov-chip/gov-chip.js +16 -16
- package/dist/collection/components/gov-chip/gov-chip.js.map +1 -1
- package/dist/collection/components/gov-container/gov-container.js +2 -38
- package/dist/collection/components/gov-container/gov-container.js.map +1 -1
- package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
- package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
- package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
- package/dist/collection/components/gov-empty/gov-empty.js +1 -1
- package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
- package/dist/collection/components/gov-flex/constants.js +4 -0
- package/dist/collection/components/gov-flex/constants.js.map +1 -0
- package/dist/collection/components/gov-flex/gov-flex.js +127 -0
- package/dist/collection/components/gov-flex/gov-flex.js.map +1 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +1 -20
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +6 -20
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.css +7 -36
- package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
- package/dist/collection/components/gov-form/input/constants.js +1 -0
- package/dist/collection/components/gov-form/input/constants.js.map +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +5 -3
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
- package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +5 -29
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/constants.js +1 -1
- package/dist/collection/components/gov-form/switch/constants.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.js +2 -2
- package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
- package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
- package/dist/collection/components/gov-grid/gov-grid.js +1 -1
- package/dist/collection/components/gov-icon/constants.js +8 -7
- package/dist/collection/components/gov-icon/constants.js.map +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +38 -6
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-icon/list.js +37 -151
- package/dist/collection/components/gov-icon/list.js.map +1 -1
- package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
- package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
- package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
- package/dist/collection/components/gov-layout/gov-layout.js +1 -1
- package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +39 -0
- package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js.map +1 -0
- package/dist/collection/components/gov-link/constants.js +7 -0
- package/dist/collection/components/gov-link/constants.js.map +1 -0
- package/dist/collection/components/gov-link/gov-link.js +129 -0
- package/dist/collection/components/gov-link/gov-link.js.map +1 -0
- package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
- package/dist/collection/components/gov-loading/loading/gov-loading.js.map +1 -1
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
- package/dist/collection/components/gov-message/gov-message.js +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.js +2 -2
- package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
- package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
- package/dist/collection/components/gov-tag/gov-tag.js +9 -9
- package/dist/collection/components/gov-tag/gov-tag.js.map +1 -1
- package/dist/collection/components/gov-theme-switch/constants.js +9 -1
- package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
- package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +134 -10
- package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
- package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
- package/dist/collection/components/gov-tile/gov-tile.js +7 -7
- package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
- package/dist/collection/components/gov-toast/constants.js +1 -0
- package/dist/collection/components/gov-toast/constants.js.map +1 -1
- package/dist/collection/components/gov-toast/gov-toast.js +3 -4
- package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
- package/dist/collection/components/gov-wizard/gov-wizard-item.js +3 -3
- package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
- package/dist/collection/core/constants/colors.js +6 -8
- package/dist/collection/core/constants/colors.js.map +1 -1
- package/dist/collection/data/color-definitions.js +359 -172
- package/dist/collection/helpers/Dom/document.js +28 -0
- package/dist/collection/helpers/Dom/document.js.map +1 -0
- package/dist/collection/helpers/Dom/template.js +0 -18
- package/dist/collection/helpers/Dom/template.js.map +1 -1
- package/dist/collection/helpers/Dom/template.types.js.map +1 -1
- package/dist/collection/pages/Accordion.js +30 -30
- package/dist/collection/pages/Accordion.js.map +1 -1
- package/dist/collection/pages/Button.js +383 -383
- package/dist/collection/pages/Button.js.map +1 -1
- package/dist/collection/pages/Chip.js +53 -53
- package/dist/collection/pages/Chip.js.map +1 -1
- package/dist/collection/pages/ControlGroup.js +18 -18
- package/dist/collection/pages/ControlGroup.js.map +1 -1
- package/dist/collection/pages/Dialog.js +1 -1
- package/dist/collection/pages/Dialog.js.map +1 -1
- package/dist/collection/pages/Forms.js +206 -196
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Grid.js +1 -1
- package/dist/collection/pages/Grid.js.map +1 -1
- package/dist/collection/pages/Icon.js +10 -0
- package/dist/collection/pages/Icon.js.map +1 -1
- package/dist/collection/pages/Infobar.js +16 -16
- package/dist/collection/pages/Infobar.js.map +1 -1
- package/dist/collection/pages/Message.js +20 -20
- package/dist/collection/pages/Message.js.map +1 -1
- package/dist/collection/pages/Spacer.js +1 -1
- package/dist/collection/pages/Spacer.js.map +1 -1
- package/dist/collection/pages/Stepper.js +15 -15
- package/dist/collection/pages/Stepper.js.map +1 -1
- package/dist/collection/pages/Tag.js +135 -160
- package/dist/collection/pages/Tag.js.map +1 -1
- package/dist/collection/pages/ToastMessage.js +4 -4
- package/dist/collection/pages/ToastMessage.js.map +1 -1
- package/dist/collection/pages/ToastMessageCountdown.js +4 -4
- package/dist/collection/pages/ToastMessageCountdown.js.map +1 -1
- package/dist/collection/pages/Tooltip.js +2 -2
- package/dist/collection/pages/Tooltip.js.map +1 -1
- package/dist/collection/pages/Typography.js +20 -0
- package/dist/collection/pages/Typography.js.map +1 -1
- package/dist/collection/pages/Wizard.js +2 -2
- package/dist/collection/pages/Wizard.js.map +1 -1
- package/dist/collection/utils/string.utils.js +1 -1
- package/dist/collection/utils/string.utils.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion-item.js.map +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-card.js.map +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-container.js.map +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-dialog.js.map +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-dropdown.js.map +1 -1
- package/dist/components/gov-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/{gov-app.d.ts → gov-flex.d.ts} +4 -4
- package/dist/components/gov-flex.js +2 -0
- package/dist/components/gov-flex.js.map +1 -0
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox-group.js +1 -1
- package/dist/components/gov-form-checkbox-group.js.map +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-control.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-label.js +1 -1
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-message.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-password-power.js +1 -1
- package/dist/components/gov-form-radio-group.js +1 -1
- package/dist/components/gov-form-radio-group.js.map +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-form-switch.js.map +1 -1
- package/dist/components/gov-grid-item.js +1 -1
- package/dist/components/gov-grid.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-infobar.js.map +1 -1
- package/dist/components/gov-layout-column.js +1 -1
- package/dist/components/gov-layout.js +1 -1
- package/dist/components/gov-lifecycle.d.ts +11 -0
- package/dist/components/gov-lifecycle.js +2 -0
- package/dist/components/gov-lifecycle.js.map +1 -0
- package/dist/components/gov-link.d.ts +11 -0
- package/dist/components/gov-link.js +2 -0
- package/dist/components/gov-link.js.map +1 -0
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-loading.js.map +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-tag.js.map +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-theme-switch.js.map +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-tiles.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-toast.js.map +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-tooltip.js.map +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard-item.js.map +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-20c2203a.js +2 -0
- package/dist/components/p-20c2203a.js.map +1 -0
- package/dist/components/p-227eb30d.js +2 -0
- package/dist/components/{p-9a93146e.js.map → p-227eb30d.js.map} +1 -1
- package/dist/components/p-2b87c27b.js +2 -0
- package/dist/components/{p-7fd16831.js.map → p-2b87c27b.js.map} +1 -1
- package/dist/components/p-31a99bfc.js +2 -0
- package/dist/components/p-4149f195.js +2 -0
- package/dist/components/{p-ae3dada7.js → p-42200001.js} +3 -3
- package/dist/components/p-42200001.js.map +1 -0
- package/dist/components/p-44a8a668.js +2 -0
- package/dist/components/p-45097b4c.js +2 -0
- package/dist/components/p-45097b4c.js.map +1 -0
- package/dist/components/p-5952a5d0.js +2 -0
- package/dist/components/p-5aad3497.js +2 -0
- package/dist/components/p-5aad3497.js.map +1 -0
- package/dist/components/p-68a1aaec.js +2 -0
- package/dist/components/p-68a1aaec.js.map +1 -0
- package/dist/components/p-76d604c6.js +2 -0
- package/dist/components/p-7d4f2214.js +2 -0
- package/dist/components/{p-1366ed8d.js.map → p-7d4f2214.js.map} +1 -1
- package/dist/components/p-7f3becc5.js +2 -0
- package/dist/components/p-859a4f0d.js +2 -0
- package/dist/components/{p-dbae2385.js.map → p-859a4f0d.js.map} +1 -1
- package/dist/components/{p-7f8a24a7.js → p-860520b0.js} +2 -2
- package/dist/components/p-880743a5.js.map +1 -1
- package/dist/components/p-929ebfb5.js +2 -0
- package/dist/components/p-929ebfb5.js.map +1 -0
- package/dist/components/p-9908b9f0.js +2 -0
- package/dist/components/p-9908b9f0.js.map +1 -0
- package/dist/components/{p-19c681a3.js → p-a2435993.js} +2 -2
- package/dist/components/{p-59737af9.js → p-a521c59a.js} +2 -2
- package/dist/components/{p-0c93dd39.js → p-c61a5830.js} +2 -2
- package/dist/components/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
- package/dist/components/p-cd6c2938.js.map +1 -0
- package/dist/components/p-dc952cc2.js +2 -0
- package/dist/components/p-dc952cc2.js.map +1 -0
- package/dist/components/{p-6e19816b.js → p-dfb5794a.js} +2 -2
- package/dist/components/p-ea7fdd2e.js +2 -0
- package/dist/components/p-ea7fdd2e.js.map +1 -0
- package/dist/components/p-f44899e1.js +2 -0
- package/dist/components/p-f44899e1.js.map +1 -0
- package/dist/core/core.css +8256 -7340
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-00d153bf.entry.js +2 -0
- package/dist/core/p-019e967c.entry.js +2 -0
- package/dist/core/{p-eeb9cb73.entry.js.map → p-019e967c.entry.js.map} +1 -1
- package/dist/core/p-0be19b89.entry.js +2 -0
- package/dist/core/p-1abdcb62.entry.js +2 -0
- package/dist/core/p-1abdcb62.entry.js.map +1 -0
- package/dist/core/p-1ac9544f.entry.js +2 -0
- package/dist/core/{p-35e66bef.entry.js.map → p-1ac9544f.entry.js.map} +1 -1
- package/dist/core/p-1b3c808d.entry.js +2 -0
- package/dist/core/p-1b3c808d.entry.js.map +1 -0
- package/dist/core/p-20c2203a.js +2 -0
- package/dist/core/p-20c2203a.js.map +1 -0
- package/dist/core/p-22fa411d.entry.js +2 -0
- package/dist/core/p-2c290fe5.entry.js +2 -0
- package/dist/core/p-2c290fe5.entry.js.map +1 -0
- package/dist/core/p-2c59483f.entry.js +2 -0
- package/dist/core/p-2c59483f.entry.js.map +1 -0
- package/dist/core/p-30eaeeec.entry.js +2 -0
- package/dist/core/p-3bbb77a0.js +2 -0
- package/dist/core/p-3fc3c26b.entry.js +2 -0
- package/dist/core/{p-db940455.entry.js.map → p-3fc3c26b.entry.js.map} +1 -1
- package/dist/core/p-40d764ac.entry.js +2 -0
- package/dist/core/{p-9ff8f059.entry.js.map → p-40d764ac.entry.js.map} +1 -1
- package/dist/core/p-410ec0dd.entry.js +2 -0
- package/dist/core/{p-17015e36.entry.js.map → p-410ec0dd.entry.js.map} +1 -1
- package/dist/core/p-439b66a5.entry.js +2 -0
- package/dist/core/{p-a53a277a.entry.js.map → p-439b66a5.entry.js.map} +1 -1
- package/dist/core/p-443a813a.entry.js +2 -0
- package/dist/core/{p-2ed3afef.entry.js.map → p-443a813a.entry.js.map} +1 -1
- package/dist/core/p-48c93ac0.entry.js +2 -0
- package/dist/core/p-48c93ac0.entry.js.map +1 -0
- package/dist/core/p-52ca31be.entry.js +2 -0
- package/dist/core/{p-fa7caad6.entry.js.map → p-52ca31be.entry.js.map} +1 -1
- package/dist/core/p-535316b4.entry.js +2 -0
- package/dist/core/p-5396935e.entry.js +2 -0
- package/dist/core/{p-42d9924c.js → p-56efd4a2.js} +2 -2
- package/dist/core/p-5aad3497.js +2 -0
- package/dist/core/p-5aad3497.js.map +1 -0
- package/dist/core/p-5b2131c1.entry.js +2 -0
- package/dist/core/p-5ed63e9c.entry.js +2 -0
- package/dist/core/{p-5dcbfca3.entry.js.map → p-5ed63e9c.entry.js.map} +1 -1
- package/dist/core/{p-60658ae9.js → p-5f1000da.js} +2 -2
- package/dist/core/p-6454af62.entry.js +2 -0
- package/dist/core/{p-182189d2.entry.js.map → p-6454af62.entry.js.map} +1 -1
- package/dist/core/p-74458da3.entry.js +2 -0
- package/dist/core/p-74458da3.entry.js.map +1 -0
- package/dist/core/p-76d604c6.js +2 -0
- package/dist/core/{p-a21dc94f.js.map → p-76d604c6.js.map} +1 -1
- package/dist/core/p-773f71f6.entry.js +2 -0
- package/dist/core/{p-f1be099b.entry.js.map → p-773f71f6.entry.js.map} +1 -1
- package/dist/core/p-783a6b5b.entry.js +2 -0
- package/dist/core/{p-9d0f20ec.entry.js.map → p-783a6b5b.entry.js.map} +1 -1
- package/dist/core/p-7b7e502b.entry.js +2 -0
- package/dist/core/p-7ba4daf4.js +2 -0
- package/dist/core/p-7bf52eb9.entry.js +2 -0
- package/dist/core/p-7bf52eb9.entry.js.map +1 -0
- package/dist/core/p-7d6073aa.entry.js +2 -0
- package/dist/core/{p-7cf554e6.entry.js.map → p-7d6073aa.entry.js.map} +1 -1
- package/dist/core/p-7f3becc5.js +2 -0
- package/dist/core/{p-a1e95a5f.js → p-8506b611.js} +3 -3
- package/dist/core/p-8506b611.js.map +1 -0
- package/dist/core/{p-e9a6cd71.js → p-860520b0.js} +2 -2
- package/dist/core/p-8701c28e.entry.js +2 -0
- package/dist/core/p-8701c28e.entry.js.map +1 -0
- package/dist/core/p-880743a5.js.map +1 -1
- package/dist/core/p-951823cb.entry.js +2 -0
- package/dist/core/{p-963f9fcd.entry.js.map → p-951823cb.entry.js.map} +1 -1
- package/dist/core/p-9da91318.entry.js +2 -0
- package/dist/core/{p-9b41ac88.entry.js.map → p-9da91318.entry.js.map} +1 -1
- package/dist/core/p-a218e2eb.entry.js +2 -0
- package/dist/core/{p-d2351924.entry.js.map → p-a218e2eb.entry.js.map} +1 -1
- package/dist/core/{p-169b67af.js → p-a2435993.js} +2 -2
- package/dist/core/p-a521c59a.js +2 -0
- package/dist/core/p-b1efeb41.entry.js +2 -0
- package/dist/core/p-b1efeb41.entry.js.map +1 -0
- package/dist/core/p-b4af0bec.entry.js +2 -0
- package/dist/core/p-b4af0bec.entry.js.map +1 -0
- package/dist/core/p-bc966c46.entry.js +2 -0
- package/dist/core/{p-83039b10.entry.js.map → p-bc966c46.entry.js.map} +1 -1
- package/dist/core/p-bdc51179.entry.js +2 -0
- package/dist/core/p-bdc51179.entry.js.map +1 -0
- package/dist/core/p-c20fe3da.entry.js +2 -0
- package/dist/core/{p-f456bd71.entry.js.map → p-c20fe3da.entry.js.map} +1 -1
- package/dist/core/p-c4ffcc37.entry.js +2 -0
- package/dist/core/p-c4ffcc37.entry.js.map +1 -0
- package/dist/core/p-c52afdfc.js +2 -0
- package/dist/core/{p-28a7d3f7.js.map → p-c52afdfc.js.map} +1 -1
- package/dist/core/{p-c990d746.js → p-c61a5830.js} +2 -2
- package/dist/core/p-cb557873.entry.js +2 -0
- package/dist/core/{p-0ebc8365.entry.js.map → p-cb557873.entry.js.map} +1 -1
- package/dist/core/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
- package/dist/core/p-cd6c2938.js.map +1 -0
- package/dist/core/p-d24710ff.entry.js +2 -0
- package/dist/core/p-d24710ff.entry.js.map +1 -0
- package/dist/core/p-d65cef62.entry.js +2 -0
- package/dist/core/{p-aa8adc45.entry.js.map → p-d65cef62.entry.js.map} +1 -1
- package/dist/core/p-da1db6fd.js +2 -0
- package/dist/core/p-da1db6fd.js.map +1 -0
- package/dist/core/p-db22d51c.entry.js +2 -0
- package/dist/core/{p-dc3fab19.entry.js.map → p-db22d51c.entry.js.map} +1 -1
- package/dist/core/p-dec3f948.entry.js +2 -0
- package/dist/core/{p-ab9ae7ba.entry.js.map → p-dec3f948.entry.js.map} +1 -1
- package/dist/core/{p-45a30859.js → p-e0e2e9c1.js} +2 -2
- package/dist/core/p-e2517a72.entry.js +2 -0
- package/dist/core/{p-b55fc943.entry.js.map → p-e2517a72.entry.js.map} +1 -1
- package/dist/core/p-e44a0fee.js +2 -0
- package/dist/core/p-e834ee73.entry.js +2 -0
- package/dist/core/p-e834ee73.entry.js.map +1 -0
- package/dist/core/p-ea7fdd2e.js +2 -0
- package/dist/core/p-ea7fdd2e.js.map +1 -0
- package/dist/core/p-ed1131cb.entry.js +2 -0
- package/dist/core/{p-6d772ff9.entry.js.map → p-ed1131cb.entry.js.map} +1 -1
- package/dist/core/p-f1056a83.entry.js +2 -0
- package/dist/core/{p-b3acb156.entry.js.map → p-f1056a83.entry.js.map} +1 -1
- package/dist/core/p-f1fa5e1e.entry.js +2 -0
- package/dist/core/{p-e4978aab.entry.js.map → p-f1fa5e1e.entry.js.map} +1 -1
- package/dist/core/p-f4bcf817.entry.js +2 -0
- package/dist/core/p-f4bcf817.entry.js.map +1 -0
- package/dist/core/p-f6709826.entry.js +2 -0
- package/dist/core/p-f6709826.entry.js.map +1 -0
- package/dist/core/p-f7a4da9d.entry.js +2 -0
- package/dist/core/{p-a5489b0e.entry.js.map → p-f7a4da9d.entry.js.map} +1 -1
- package/dist/core/p-fca60e04.entry.js +2 -0
- package/dist/core/{p-663d3db2.entry.js.map → p-fca60e04.entry.js.map} +1 -1
- package/dist/core/p-fe6fed11.entry.js +2 -0
- package/dist/core/p-fe6fed11.entry.js.map +1 -0
- package/dist/esm/{colors-02c1ea96.js → colors-4cf64720.js} +7 -9
- package/dist/esm/colors-4cf64720.js.map +1 -0
- package/dist/esm/{constants-6d727976.js → constants-085f9943.js} +2 -2
- package/dist/esm/{constants-6d727976.js.map → constants-085f9943.js.map} +1 -1
- package/dist/esm/{constants-990365f1.js → constants-372455eb.js} +3 -3
- package/dist/esm/{constants-990365f1.js.map → constants-372455eb.js.map} +1 -1
- package/dist/esm/{constants-d6418889.js → constants-3ab65c42.js} +2 -2
- package/dist/esm/{constants-d6418889.js.map → constants-3ab65c42.js.map} +1 -1
- package/dist/esm/{constants-48177684.js → constants-3b914c35.js} +3 -3
- package/dist/esm/{constants-48177684.js.map → constants-3b914c35.js.map} +1 -1
- package/dist/esm/{constants-d42abf99.js → constants-43f10674.js} +2 -2
- package/dist/esm/{constants-d42abf99.js.map → constants-43f10674.js.map} +1 -1
- package/dist/esm/{constants-501eb756.js → constants-4da2b3c0.js} +2 -2
- package/dist/esm/{constants-501eb756.js.map → constants-4da2b3c0.js.map} +1 -1
- package/dist/esm/{constants-c716fa44.js → constants-51f51588.js} +3 -3
- package/dist/esm/{constants-c716fa44.js.map → constants-51f51588.js.map} +1 -1
- package/dist/esm/{constants-f4e4ede6.js → constants-8429b68f.js} +3 -3
- package/dist/esm/{constants-f4e4ede6.js.map → constants-8429b68f.js.map} +1 -1
- package/dist/esm/{constants-47e20524.js → constants-9177ea52.js} +3 -3
- package/dist/esm/{constants-47e20524.js.map → constants-9177ea52.js.map} +1 -1
- package/dist/esm/{constants-7307438d.js → constants-bc210662.js} +3 -3
- package/dist/esm/{constants-7307438d.js.map → constants-bc210662.js.map} +1 -1
- package/dist/esm/core.js +3 -3
- package/dist/esm/{form-472e078d.js → form-713f26fd.js} +7 -6
- package/dist/esm/form-713f26fd.js.map +1 -0
- package/dist/esm/gov-accordion-item.entry.js +13 -11
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-accordion.entry.js +6 -7
- package/dist/esm/gov-accordion.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +13 -14
- package/dist/esm/gov-attachments_3.entry.js.map +1 -1
- package/dist/esm/gov-backdrop.entry.js +7 -8
- package/dist/esm/gov-backdrop.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +7 -8
- package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +12 -13
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +7 -8
- package/dist/esm/gov-card.entry.js.map +1 -1
- package/dist/esm/gov-chip.entry.js +14 -15
- package/dist/esm/gov-chip.entry.js.map +1 -1
- package/dist/esm/gov-container.entry.js +3 -11
- package/dist/esm/gov-container.entry.js.map +1 -1
- package/dist/esm/gov-control-group.entry.js +7 -8
- package/dist/esm/gov-control-group.entry.js.map +1 -1
- package/dist/esm/gov-cookiebar.entry.js +3 -3
- package/dist/esm/gov-dialog.entry.js +7 -8
- package/dist/esm/gov-dialog.entry.js.map +1 -1
- package/dist/esm/gov-dropdown.entry.js +7 -7
- package/dist/esm/gov-empty.entry.js +7 -8
- package/dist/esm/gov-empty.entry.js.map +1 -1
- package/dist/esm/gov-error-code.entry.js +3 -3
- package/dist/esm/gov-flex_4.entry.js +315 -0
- package/dist/esm/gov-flex_4.entry.js.map +1 -0
- package/dist/esm/gov-form-autocomplete.entry.js +8 -10
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox-group.entry.js +8 -9
- package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +12 -13
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-control.entry.js +10 -10
- package/dist/esm/gov-form-file.entry.js +15 -11
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-group.entry.js +7 -8
- package/dist/esm/gov-form-group.entry.js.map +1 -1
- package/dist/esm/gov-form-input_2.entry.js +17 -16
- package/dist/esm/gov-form-input_2.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +16 -32
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-password-power.entry.js +2 -2
- package/dist/esm/gov-form-radio-group.entry.js +8 -9
- package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +11 -12
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js +4 -4
- package/dist/esm/gov-form-select.entry.js +13 -14
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +12 -13
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-grid-item.entry.js +3 -3
- package/dist/esm/gov-grid.entry.js +3 -3
- package/dist/esm/gov-infobar.entry.js +8 -9
- package/dist/esm/gov-infobar.entry.js.map +1 -1
- package/dist/esm/gov-layout-column.entry.js +3 -3
- package/dist/esm/gov-layout.entry.js +3 -3
- package/dist/esm/gov-lifecycle.entry.js +43 -0
- package/dist/esm/gov-lifecycle.entry.js.map +1 -0
- package/dist/esm/gov-link.entry.js +47 -0
- package/dist/esm/gov-link.entry.js.map +1 -0
- package/dist/esm/gov-loading.entry.js +6 -7
- package/dist/esm/gov-loading.entry.js.map +1 -1
- package/dist/esm/gov-message.entry.js +7 -8
- package/dist/esm/gov-message.entry.js.map +1 -1
- package/dist/esm/gov-pagination.entry.js +9 -10
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-spacer.entry.js +6 -7
- package/dist/esm/gov-spacer.entry.js.map +1 -1
- package/dist/esm/gov-stepper-item.entry.js +9 -10
- package/dist/esm/gov-stepper-item.entry.js.map +1 -1
- package/dist/esm/gov-stepper.entry.js +8 -9
- package/dist/esm/gov-stepper.entry.js.map +1 -1
- package/dist/esm/gov-tabs-item.entry.js +7 -7
- package/dist/esm/gov-tabs.entry.js +8 -9
- package/dist/esm/gov-tabs.entry.js.map +1 -1
- package/dist/esm/gov-tag.entry.js +12 -13
- package/dist/esm/gov-tag.entry.js.map +1 -1
- package/dist/esm/gov-tile.entry.js +4 -4
- package/dist/esm/gov-tile.entry.js.map +1 -1
- package/dist/esm/gov-tiles.entry.js +3 -3
- package/dist/esm/gov-toast.entry.js +11 -12
- package/dist/esm/gov-toast.entry.js.map +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +6 -6
- package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.entry.js +10 -11
- package/dist/esm/gov-tooltip.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +11 -12
- package/dist/esm/gov-wizard-item.entry.js.map +1 -1
- package/dist/esm/gov-wizard.entry.js +10 -11
- package/dist/esm/gov-wizard.entry.js.map +1 -1
- package/dist/esm/{win-cec370ad.js → gov.log-066c3139.js} +17 -3
- package/dist/esm/gov.log-066c3139.js.map +1 -0
- package/dist/esm/{index-d8b4eb6c.js → index-c263e031.js} +20 -12
- package/dist/esm/index-c263e031.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{props-c82e1abf.js → props-fb6587c3.js} +2 -2
- package/dist/esm/{props-c82e1abf.js.map → props-fb6587c3.js.map} +1 -1
- package/dist/esm/{string.utils-5ce3f551.js → string.utils-1da8f8fb.js} +2 -2
- package/dist/esm/string.utils-1da8f8fb.js.map +1 -0
- package/dist/esm/{template-3d84d705.js → template-7ecee4d1.js} +2 -20
- package/dist/esm/template-7ecee4d1.js.map +1 -0
- package/dist/esm/{utils-2b4ef320.js → utils-e10e994d.js} +2 -2
- package/dist/esm/{utils-2b4ef320.js.map → utils-e10e994d.js.map} +1 -1
- package/dist/esm/{wcag-fa5ce56c.js → wcag-de9a3dc6.js} +3 -4
- package/dist/esm/wcag-de9a3dc6.js.map +1 -0
- package/dist/hydrate/index.js +418 -10076
- package/dist/hydrate/index.mjs +418 -10076
- package/dist/stencil.config.js +9 -6
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +1 -0
- package/dist/types/components/gov-button/button/gov-button.d.ts +1 -1
- package/dist/types/components/gov-chip/gov-chip.d.ts +3 -3
- package/dist/types/components/gov-container/gov-container.d.ts +0 -6
- package/dist/types/components/gov-flex/constants.d.ts +3 -0
- package/dist/types/components/gov-flex/gov-flex.d.ts +33 -0
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +0 -4
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -4
- package/dist/types/components/gov-form/input/constants.d.ts +1 -0
- package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +0 -2
- package/dist/types/components/gov-form/switch/constants.d.ts +1 -1
- package/dist/types/components/gov-icon/constants.d.ts +4 -1
- package/dist/types/components/gov-icon/gov-icon.d.ts +8 -2
- package/dist/types/components/gov-icon/list.d.ts +1 -1
- package/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
- package/dist/types/components/gov-link/constants.d.ts +7 -0
- package/dist/types/components/gov-link/gov-link.d.ts +30 -0
- package/dist/types/components/gov-tag/gov-tag.d.ts +2 -2
- package/dist/types/components/gov-theme-switch/constants.d.ts +9 -0
- package/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +26 -2
- package/dist/types/components/gov-tile/gov-tile.d.ts +1 -1
- package/dist/types/components/gov-toast/constants.d.ts +1 -0
- package/dist/types/components.d.ts +191 -50
- package/dist/types/core/constants/colors.d.ts +6 -8
- package/dist/types/helpers/Dom/document.d.ts +3 -0
- package/dist/types/helpers/Dom/template.d.ts +0 -1
- package/dist/types/helpers/Dom/template.types.d.ts +0 -1
- package/dist/types/utils/string.utils.d.ts +1 -0
- package/package.json +3 -3
- package/dist/cjs/colors-976f6dff.js.map +0 -1
- package/dist/cjs/form-c1aec07a.js.map +0 -1
- package/dist/cjs/gov-app_2.cjs.entry.js +0 -9891
- package/dist/cjs/gov-app_2.cjs.entry.js.map +0 -1
- package/dist/cjs/gov-form-label.cjs.entry.js +0 -27
- package/dist/cjs/gov-form-label.cjs.entry.js.map +0 -1
- package/dist/cjs/gov-icon.cjs.entry.js +0 -161
- package/dist/cjs/gov-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/gov.log-1e8bab6e.js +0 -21
- package/dist/cjs/gov.log-1e8bab6e.js.map +0 -1
- package/dist/cjs/index-1af4880c.js.map +0 -1
- package/dist/cjs/string.utils-2335838f.js.map +0 -1
- package/dist/cjs/template-b070338f.js.map +0 -1
- package/dist/cjs/wcag-31089f70.js.map +0 -1
- package/dist/cjs/win-587f4614.js.map +0 -1
- package/dist/collection/components/gov-app/gov-app.css +0 -68
- package/dist/collection/components/gov-app/gov-app.js +0 -93
- package/dist/collection/components/gov-app/gov-app.js.map +0 -1
- package/dist/components/gov-app.js +0 -2
- package/dist/components/gov-app.js.map +0 -1
- package/dist/components/p-0075138f.js +0 -2
- package/dist/components/p-0075138f.js.map +0 -1
- package/dist/components/p-08621bdf.js +0 -2
- package/dist/components/p-1366ed8d.js +0 -2
- package/dist/components/p-1a0b3b4f.js +0 -2
- package/dist/components/p-1a0b3b4f.js.map +0 -1
- package/dist/components/p-255d0471.js +0 -2
- package/dist/components/p-255d0471.js.map +0 -1
- package/dist/components/p-565120d5.js +0 -2
- package/dist/components/p-736e4917.js +0 -2
- package/dist/components/p-7501abe8.js +0 -2
- package/dist/components/p-7501abe8.js.map +0 -1
- package/dist/components/p-778e3fff.js +0 -2
- package/dist/components/p-778e3fff.js.map +0 -1
- package/dist/components/p-7fd16831.js +0 -2
- package/dist/components/p-95d41a3b.js.map +0 -1
- package/dist/components/p-9a93146e.js +0 -2
- package/dist/components/p-ae3dada7.js.map +0 -1
- package/dist/components/p-ae7e6127.js +0 -2
- package/dist/components/p-cc90a508.js +0 -2
- package/dist/components/p-cc90a508.js.map +0 -1
- package/dist/components/p-d5f25595.js +0 -2
- package/dist/components/p-d5f25595.js.map +0 -1
- package/dist/components/p-dbae2385.js +0 -2
- package/dist/components/p-dcaf0383.js +0 -2
- package/dist/components/p-dcaf0383.js.map +0 -1
- package/dist/components/p-e183a7c7.js +0 -2
- package/dist/components/p-e3aeaca0.js +0 -2
- package/dist/components/p-e3aeaca0.js.map +0 -1
- package/dist/components/p-edd1417b.js +0 -2
- package/dist/core/p-006e52f1.entry.js +0 -2
- package/dist/core/p-006e52f1.entry.js.map +0 -1
- package/dist/core/p-0075138f.js +0 -2
- package/dist/core/p-0075138f.js.map +0 -1
- package/dist/core/p-023787b3.entry.js +0 -2
- package/dist/core/p-023787b3.entry.js.map +0 -1
- package/dist/core/p-052cc573.js +0 -2
- package/dist/core/p-0a952b3c.entry.js +0 -2
- package/dist/core/p-0a952b3c.entry.js.map +0 -1
- package/dist/core/p-0ebc8365.entry.js +0 -2
- package/dist/core/p-17015e36.entry.js +0 -2
- package/dist/core/p-182189d2.entry.js +0 -2
- package/dist/core/p-2614044c.js +0 -2
- package/dist/core/p-28a7d3f7.js +0 -2
- package/dist/core/p-2ed3afef.entry.js +0 -2
- package/dist/core/p-2effdd60.entry.js +0 -2
- package/dist/core/p-2effdd60.entry.js.map +0 -1
- package/dist/core/p-35e66bef.entry.js +0 -2
- package/dist/core/p-3f2b803c.entry.js +0 -2
- package/dist/core/p-477a5027.entry.js +0 -2
- package/dist/core/p-477a5027.entry.js.map +0 -1
- package/dist/core/p-47e364bb.entry.js +0 -2
- package/dist/core/p-47e364bb.entry.js.map +0 -1
- package/dist/core/p-4bce896c.js +0 -2
- package/dist/core/p-5c88f415.entry.js +0 -2
- package/dist/core/p-5c88f415.entry.js.map +0 -1
- package/dist/core/p-5dc0af54.entry.js +0 -2
- package/dist/core/p-5dc0af54.entry.js.map +0 -1
- package/dist/core/p-5dcbfca3.entry.js +0 -2
- package/dist/core/p-663d3db2.entry.js +0 -2
- package/dist/core/p-69d56f17.js +0 -2
- package/dist/core/p-6aa40794.js +0 -2
- package/dist/core/p-6b42a387.entry.js +0 -2
- package/dist/core/p-6d772ff9.entry.js +0 -2
- package/dist/core/p-6ed147a6.entry.js +0 -2
- package/dist/core/p-6ed147a6.entry.js.map +0 -1
- package/dist/core/p-7cf554e6.entry.js +0 -2
- package/dist/core/p-81b0848c.entry.js +0 -2
- package/dist/core/p-81b0848c.entry.js.map +0 -1
- package/dist/core/p-83039b10.entry.js +0 -2
- package/dist/core/p-904de5e6.entry.js +0 -2
- package/dist/core/p-904de5e6.entry.js.map +0 -1
- package/dist/core/p-91a9cd24.entry.js +0 -2
- package/dist/core/p-95d41a3b.js.map +0 -1
- package/dist/core/p-963f9fcd.entry.js +0 -2
- package/dist/core/p-9b41ac88.entry.js +0 -2
- package/dist/core/p-9d0f20ec.entry.js +0 -2
- package/dist/core/p-9dde00d8.entry.js +0 -2
- package/dist/core/p-9dde00d8.entry.js.map +0 -1
- package/dist/core/p-9ff8f059.entry.js +0 -2
- package/dist/core/p-a16229c6.entry.js +0 -2
- package/dist/core/p-a16229c6.entry.js.map +0 -1
- package/dist/core/p-a1e95a5f.js.map +0 -1
- package/dist/core/p-a1ebb4da.entry.js +0 -2
- package/dist/core/p-a1ebb4da.entry.js.map +0 -1
- package/dist/core/p-a21dc94f.js +0 -2
- package/dist/core/p-a53a277a.entry.js +0 -2
- package/dist/core/p-a5489b0e.entry.js +0 -2
- package/dist/core/p-a54f1db9.entry.js +0 -2
- package/dist/core/p-a693ffbf.js +0 -2
- package/dist/core/p-a693ffbf.js.map +0 -1
- package/dist/core/p-aa8adc45.entry.js +0 -2
- package/dist/core/p-ab9ae7ba.entry.js +0 -2
- package/dist/core/p-b3acb156.entry.js +0 -2
- package/dist/core/p-b48a4aa0.js +0 -2
- package/dist/core/p-b48a4aa0.js.map +0 -1
- package/dist/core/p-b55fc943.entry.js +0 -2
- package/dist/core/p-b838bb27.entry.js +0 -2
- package/dist/core/p-c214c202.entry.js +0 -2
- package/dist/core/p-c214c202.entry.js.map +0 -1
- package/dist/core/p-c4c7cb24.entry.js +0 -2
- package/dist/core/p-d2351924.entry.js +0 -2
- package/dist/core/p-db940455.entry.js +0 -2
- package/dist/core/p-dc3fab19.entry.js +0 -2
- package/dist/core/p-e0d428c9.js +0 -2
- package/dist/core/p-e0d428c9.js.map +0 -1
- package/dist/core/p-e134b123.entry.js +0 -2
- package/dist/core/p-e3aeaca0.js +0 -2
- package/dist/core/p-e3aeaca0.js.map +0 -1
- package/dist/core/p-e4978aab.entry.js +0 -2
- package/dist/core/p-edc05eff.entry.js +0 -2
- package/dist/core/p-edc05eff.entry.js.map +0 -1
- package/dist/core/p-eeb9cb73.entry.js +0 -2
- package/dist/core/p-f141ad5e.entry.js +0 -2
- package/dist/core/p-f1be099b.entry.js +0 -2
- package/dist/core/p-f456bd71.entry.js +0 -2
- package/dist/core/p-fa7caad6.entry.js +0 -2
- package/dist/core/p-fc90bf06.entry.js +0 -2
- package/dist/core/p-fc90bf06.entry.js.map +0 -1
- package/dist/esm/colors-02c1ea96.js.map +0 -1
- package/dist/esm/form-472e078d.js.map +0 -1
- package/dist/esm/gov-app_2.entry.js +0 -9886
- package/dist/esm/gov-app_2.entry.js.map +0 -1
- package/dist/esm/gov-form-label.entry.js +0 -23
- package/dist/esm/gov-form-label.entry.js.map +0 -1
- package/dist/esm/gov-icon.entry.js +0 -157
- package/dist/esm/gov-icon.entry.js.map +0 -1
- package/dist/esm/gov.log-6e9faad2.js +0 -19
- package/dist/esm/gov.log-6e9faad2.js.map +0 -1
- package/dist/esm/index-d8b4eb6c.js.map +0 -1
- package/dist/esm/string.utils-5ce3f551.js.map +0 -1
- package/dist/esm/template-3d84d705.js.map +0 -1
- package/dist/esm/wcag-fa5ce56c.js.map +0 -1
- package/dist/esm/win-cec370ad.js.map +0 -1
- package/dist/types/components/gov-app/gov-app.d.ts +0 -37
- /package/dist/components/{p-ae7e6127.js.map → p-31a99bfc.js.map} +0 -0
- /package/dist/components/{p-736e4917.js.map → p-4149f195.js.map} +0 -0
- /package/dist/components/{p-08621bdf.js.map → p-44a8a668.js.map} +0 -0
- /package/dist/components/{p-e183a7c7.js.map → p-5952a5d0.js.map} +0 -0
- /package/dist/components/{p-565120d5.js.map → p-76d604c6.js.map} +0 -0
- /package/dist/components/{p-edd1417b.js.map → p-7f3becc5.js.map} +0 -0
- /package/dist/components/{p-7f8a24a7.js.map → p-860520b0.js.map} +0 -0
- /package/dist/components/{p-19c681a3.js.map → p-a2435993.js.map} +0 -0
- /package/dist/components/{p-59737af9.js.map → p-a521c59a.js.map} +0 -0
- /package/dist/components/{p-0c93dd39.js.map → p-c61a5830.js.map} +0 -0
- /package/dist/components/{p-6e19816b.js.map → p-dfb5794a.js.map} +0 -0
- /package/dist/core/{p-a54f1db9.entry.js.map → p-00d153bf.entry.js.map} +0 -0
- /package/dist/core/{p-3f2b803c.entry.js.map → p-0be19b89.entry.js.map} +0 -0
- /package/dist/core/{p-f141ad5e.entry.js.map → p-22fa411d.entry.js.map} +0 -0
- /package/dist/core/{p-b838bb27.entry.js.map → p-30eaeeec.entry.js.map} +0 -0
- /package/dist/core/{p-69d56f17.js.map → p-3bbb77a0.js.map} +0 -0
- /package/dist/core/{p-6b42a387.entry.js.map → p-535316b4.entry.js.map} +0 -0
- /package/dist/core/{p-91a9cd24.entry.js.map → p-5396935e.entry.js.map} +0 -0
- /package/dist/core/{p-42d9924c.js.map → p-56efd4a2.js.map} +0 -0
- /package/dist/core/{p-e134b123.entry.js.map → p-5b2131c1.entry.js.map} +0 -0
- /package/dist/core/{p-60658ae9.js.map → p-5f1000da.js.map} +0 -0
- /package/dist/core/{p-c4c7cb24.entry.js.map → p-7b7e502b.entry.js.map} +0 -0
- /package/dist/core/{p-2614044c.js.map → p-7ba4daf4.js.map} +0 -0
- /package/dist/core/{p-6aa40794.js.map → p-7f3becc5.js.map} +0 -0
- /package/dist/core/{p-e9a6cd71.js.map → p-860520b0.js.map} +0 -0
- /package/dist/core/{p-169b67af.js.map → p-a2435993.js.map} +0 -0
- /package/dist/core/{p-4bce896c.js.map → p-a521c59a.js.map} +0 -0
- /package/dist/core/{p-c990d746.js.map → p-c61a5830.js.map} +0 -0
- /package/dist/core/{p-45a30859.js.map → p-e0e2e9c1.js.map} +0 -0
- /package/dist/core/{p-052cc573.js.map → p-e44a0fee.js.map} +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { v as validateProp } from './props-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
3
3
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
|
-
import {
|
|
5
|
-
import { g as govHost } from './template-
|
|
6
|
-
import './gov.log-
|
|
7
|
-
import './win-cec370ad.js';
|
|
4
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
5
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
6
|
+
import './gov.log-066c3139.js';
|
|
8
7
|
|
|
9
8
|
const SpacerSize = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL']);
|
|
10
9
|
var SpacerBreakpoints;
|
|
@@ -37,7 +36,7 @@ const GovSpacer = class {
|
|
|
37
36
|
this.validateBreakpoint(this.breakpoint);
|
|
38
37
|
}
|
|
39
38
|
render() {
|
|
40
|
-
return h(Host, { key: '
|
|
39
|
+
return h(Host, { key: '49415f0b2a4bfb25ececcd115bd1e8bfad250938', class: this.h.classes(SpacerClass.root), size: this.size, breakpoint: this.breakpoint });
|
|
41
40
|
}
|
|
42
41
|
get host() { return getElement(this); }
|
|
43
42
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-spacer.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-spacer.entry.js","mappings":";;;;;;;AAIO,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAGvG,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC5B,kCAAa,CAAA;IACb,8BAAS,CAAA;IACT,8BAAS,CAAA;IACT,8BAAS,CAAA;IACT,8BAAS,CAAA;AACV,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B;AAGM,MAAM,WAAW,GAAG;IAC1B,IAAI,EAAE,YAAY;CAClB;;MCTY,SAAS;IAErB;;;0BAWsD,SAAS;QAV9D,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAYD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KACpD;IAGD,kBAAkB,CAAC,QAAgB;QAClC,YAAY,CAAC,iBAAiB,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KAC3D;IAED,iBAAiB;QAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC5B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;KACxC;IAED,MAAM;QACL,OAAO,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,GAAS,CAAA;KAC3G;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-spacer/constants.tsx","../../../packages/core/src/components/gov-spacer/gov-spacer.tsx"],"sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const SpacerSize = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL'])\nexport type SpacerSizeType = `${ValueOf<typeof SpacerSize>}`\n\nexport enum SpacerBreakpoints {\n\tNONE = 'none',\n\tSM = 'sm',\n\tMD = 'md',\n\tLG = 'lg',\n\tXL = 'xl',\n}\nexport type SpacerBreakpointsType = `${ValueOf<typeof SpacerBreakpoints>}`\n\nexport const SpacerClass = {\n\troot: 'gov-spacer',\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { SpacerBreakpoints, SpacerBreakpointsType, SpacerClass, SpacerSize, SpacerSizeType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-spacer',\n})\nexport class GovSpacer {\n\tprivate h: GovHost\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovSpacerElement\n\t/**\n\t * Spacer’s size\n\t */\n\t@Prop() readonly size?: SpacerSizeType\n\t/**\n\t * Breakpoint\n\t */\n\t@Prop() readonly breakpoint?: SpacerBreakpointsType = undefined\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SpacerSize, newValue, SpacerClass.root)\n\t}\n\n\t@Watch('breakpoint')\n\tvalidateBreakpoint(newValue: string): void {\n\t\tvalidateProp(SpacerBreakpoints, newValue, SpacerClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateBreakpoint(this.breakpoint)\n\t}\n\n\trender() {\n\t\treturn <Host class={this.h.classes(SpacerClass.root)} size={this.size} breakpoint={this.breakpoint}></Host>\n\t}\n}\n"],"version":3}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { v as validateProp } from './props-
|
|
3
|
-
import { S as StepperItemClass, c as StepperColors } from './constants-
|
|
4
|
-
import { c as createID } from './string.utils-
|
|
5
|
-
import { g as govHost } from './template-
|
|
6
|
-
import './gov.log-
|
|
7
|
-
import './
|
|
8
|
-
import './
|
|
9
|
-
import './colors-02c1ea96.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
3
|
+
import { S as StepperItemClass, c as StepperColors } from './constants-372455eb.js';
|
|
4
|
+
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
5
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
6
|
+
import './gov.log-066c3139.js';
|
|
7
|
+
import './utils-e10e994d.js';
|
|
8
|
+
import './colors-4cf64720.js';
|
|
10
9
|
import './sizes-5b9e579f.js';
|
|
11
10
|
|
|
12
11
|
const GovStepperItem = class {
|
|
@@ -33,7 +32,7 @@ const GovStepperItem = class {
|
|
|
33
32
|
render() {
|
|
34
33
|
const triggerId = this.identifier || this.triggerId;
|
|
35
34
|
const contentId = this.contentId;
|
|
36
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'f722a022748d8fcb4ca0a27108a7e2e2980a1602', id: triggerId, class: this.h.classes(StepperItemClass.root), color: this.color, role: "listitem", hydrated: this.hydrated }, this.h.hasSlot('prefix') && (h("span", { key: 'eed745cace26ca1d31c6441dd7be76d3dfa6bd4c', class: StepperItemClass.prefix }, h("slot", { key: 'd5cab6411231cd082468bcc5c244ee75e0dba147', name: "prefix" }))), h("div", { key: 'c13c92aa7890f8406eb5870caa93d186801c0a75' }, h("span", { key: 'ad456eb4699a3d32dfa2d5d477bd346cb1814473', class: StepperItemClass.headline }, h("slot", { key: '0dfdb036dcc108943be0795269e7e0b5f8ac0a29', name: "headline" })), h("slot", { key: '24220b19c2f3c6af35407da423bb1900dc363db8', name: "annotation" }), this.h.hasSlot('content') && (h("div", { key: '2bdd3feeaeafdcf73534bfadb5ff29d90eb9e037', class: StepperItemClass.content, id: contentId, "aria-labelledby": triggerId, role: "tabpanel" }, h("slot", { key: 'f2f70633c3c2adcc7bd407a23863e0a6fba5ec89', name: "content" }))))));
|
|
37
36
|
}
|
|
38
37
|
get host() { return getElement(this); }
|
|
39
38
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-stepper-item.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-stepper-item.entry.js","mappings":";;;;;;;;;;MAWa,cAAc;IAM1B;;;Q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K,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,SAAS,qBAAmB,SAAS,EAAE,IAAI,EAAC,UAAU,IAC/F,6DAAM,IAAI,EAAC,SAAS,GAAG,CAClB,CACN,CACI,CACA,EACP;KACD;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-stepper/gov-stepper-item.tsx"],"sourcesContent":["import { Component, Element, h, Prop, Watch, Host, Event, EventEmitter } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperColorType, StepperColors } from './constants'\nimport { createID } from '../../utils/string.utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: StepperColorType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(StepperColors, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\n\t\treturn (\n\t\t\t<Host id={triggerId} class={this.h.classes(StepperItemClass.root)} color={this.color} role=\"listitem\" hydrated={this.hydrated}>\n\t\t\t\t{this.h.hasSlot('prefix') && (\n\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t<slot name=\"prefix\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div>\n\t\t\t\t\t<span class={StepperItemClass.headline}>\n\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<slot name=\"annotation\" />\n\n\t\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId} role=\"tabpanel\">\n\t\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { v as validateProp } from './props-
|
|
3
|
-
import { S as StepperItemClass, a as StepperClass, b as StepperSizes } from './constants-
|
|
4
|
-
import { g as govHost } from './template-
|
|
5
|
-
import './gov.log-
|
|
6
|
-
import './
|
|
7
|
-
import './
|
|
8
|
-
import './colors-02c1ea96.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
3
|
+
import { S as StepperItemClass, a as StepperClass, b as StepperSizes } from './constants-372455eb.js';
|
|
4
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
5
|
+
import './gov.log-066c3139.js';
|
|
6
|
+
import './utils-e10e994d.js';
|
|
7
|
+
import './colors-4cf64720.js';
|
|
9
8
|
import './sizes-5b9e579f.js';
|
|
10
9
|
|
|
11
10
|
const GovStepper = class {
|
|
@@ -35,7 +34,7 @@ const GovStepper = class {
|
|
|
35
34
|
this.hydrated = true;
|
|
36
35
|
}
|
|
37
36
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: '208bca5b06fce13b8f87f0cc4497860c01d2d56b', class: this.h.classes(StepperClass.root), role: "list", size: this.size, hydrated: this.hydrated }, h("slot", { key: 'a0ec9b8b5e03062e4b9547cb9fbfc73fddaa0519' })));
|
|
39
38
|
}
|
|
40
39
|
get host() { return getElement(this); }
|
|
41
40
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-stepper.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-stepper.entry.js","mappings":";;;;;;;;;MAWa,UAAU;IAItB;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;oBAUmB,GAAG;QAP7C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAaD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;KACvD;IAED,iBAAiB;QAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC5B;IAED,gBAAgB;QACf,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAgC;YAC1F,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YACrC,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAuD;gBAC5F,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;aAC7B,CAAC,CAAA;SACF,CAAC,CAAA;KACF;IAED,iBAAiB;QAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;KACpB;IAED,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IACnG,8DAAQ,CACF,EACP;KACD;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-stepper/gov-stepper.tsx"],"sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StepperClass, StepperItemClass, StepperSizes, StepperSizesType } from './constants'\nimport { GovStepperItemCustomEvent } from '../../components'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-stepper',\n})\nexport class GovStepper {\n\tprivate h: GovHost\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovStepperElement\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Called when the Stepper state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(StepperSizes, newValue, StepperClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(StepperItemClass.root).forEach((child: HTMLGovStepperItemElement) => {\n\t\t\tchild.setAttribute('size', this.size)\n\t\t\tchild.addEventListener('gov-change', (e: GovStepperItemCustomEvent<GovStepperItemChangeEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit(e.detail)\n\t\t\t})\n\t\t})\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(StepperClass.root)} role=\"list\" size={this.size} hydrated={this.hydrated}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { c as createID } from './string.utils-
|
|
3
|
-
import { g as govHost, t as toBoolAttrIfDefined } from './template-
|
|
4
|
-
import { a as TabsClass, T as TabsItemClass } from './constants-
|
|
5
|
-
import './utils-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
3
|
+
import { g as govHost, t as toBoolAttrIfDefined } from './template-7ecee4d1.js';
|
|
4
|
+
import { a as TabsClass, T as TabsItemClass } from './constants-9177ea52.js';
|
|
5
|
+
import './utils-e10e994d.js';
|
|
6
6
|
import './sizes-5b9e579f.js';
|
|
7
|
-
import './colors-
|
|
7
|
+
import './colors-4cf64720.js';
|
|
8
8
|
|
|
9
9
|
const GovTabsItem = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -28,7 +28,7 @@ const GovTabsItem = class {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '7cf18cf8a10a4c03dd51922e31e18dac86aa217d', class: this.h.classes(TabsItemClass.root), default: this.default }, h("div", { key: '3a707d9494c5055c3763f4cdf840522fae5e7a2a', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, h("slot", { key: '289b661851fc6d68a5d6dd376a6e31b691e25aea' }))));
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Returns a unique tab content identifier
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { v as validateProp } from './props-
|
|
3
|
-
import { T as TabsItemClass, a as TabsClass, b as TabTypes, c as TabColors, d as TabSizes } from './constants-
|
|
4
|
-
import { g as govHost, c as toBoolAttr, b as booleanString } from './template-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
3
|
+
import { T as TabsItemClass, a as TabsClass, b as TabTypes, c as TabColors, d as TabSizes } from './constants-9177ea52.js';
|
|
4
|
+
import { g as govHost, c as toBoolAttr, b as booleanString } from './template-7ecee4d1.js';
|
|
5
5
|
import { h as hasOwnProperty } from './helpers.types-43ddbdb8.js';
|
|
6
6
|
import { p as prepareIconFormat } from './helpers-5d179d4b.js';
|
|
7
7
|
import { A as AttributeObserver, a as ariaAttributes } from './attribute-5561aca4.js';
|
|
8
8
|
import { i as inheritAriaAttributes } from './accessibility-f83c991a.js';
|
|
9
|
-
import './gov.log-
|
|
10
|
-
import './
|
|
11
|
-
import './utils-2b4ef320.js';
|
|
9
|
+
import './gov.log-066c3139.js';
|
|
10
|
+
import './utils-e10e994d.js';
|
|
12
11
|
import './sizes-5b9e579f.js';
|
|
13
|
-
import './colors-
|
|
12
|
+
import './colors-4cf64720.js';
|
|
14
13
|
|
|
15
14
|
const GovTabs = class {
|
|
16
15
|
constructor(hostRef) {
|
|
@@ -119,7 +118,7 @@ const GovTabs = class {
|
|
|
119
118
|
});
|
|
120
119
|
}
|
|
121
120
|
render() {
|
|
122
|
-
return (h(Host, { key: '
|
|
121
|
+
return (h(Host, { key: '75a6dc2d1bb8afb13e3d63b44bdd00e230a49fe6', class: this.h.classes(TabsClass.root), size: this.size, color: this.color, type: this.type, direction: this.direction, onKeyDown: this.onKeydownHandler.bind(this) }, h("div", Object.assign({ key: '1fc7ff9eafaaab713727787a1bb0c7364ad3cf4e', class: TabsClass.tabs, role: "tablist" }, this.inheritedAttributes), h("ul", { key: '82a67f585c9a394175bb64be57e669d886b3d4f6', class: TabsClass.list }, this.controllers.map(control => (h("li", { class: TabsClass.item }, this.type == "text" ? (h("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": toBoolAttr(control.disabled), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.iconStart ? (h("gov-icon", { name: control.iconStart.name, type: control.iconStart.type })) : null, control.label, control.iconEnd ? (h("gov-icon", { name: control.iconEnd.name, type: control.iconEnd.type })) : null)) : (h("gov-chip", { role: "tab", tag: 'button', identifier: control.triggerIdentifier, "aria-selected": booleanString(control.active), "aria-controls": control.contentIdentifier, focusable: control.active, disabled: control.disabled, color: this.color, size: this.size === "xs" ? "xs" : (this.size === "s" ? "s" : "m"), type: control.active ? "solid" : "outlined", ref: el => (this.triggerRefs[control.triggerIdentifier] = el), "on-gov-click": () => this.onSelectHandler(control) }, control.iconStart ? (h("gov-icon", { name: control.iconStart.name, type: control.iconStart.type, slot: "icon-start" })) : null, control.label, control.iconEnd ? (h("gov-icon", { name: control.iconEnd.name, type: control.iconEnd.type, slot: "icon-end" })) : null))))))), h("slot", { key: '8af7e27c0410ba9a4c0f79a1c44275e5811e9463' })));
|
|
123
122
|
}
|
|
124
123
|
getCurrentTab() {
|
|
125
124
|
return this.controllers.find(control => control.active) || null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-tabs.entry.js","mappings":";;;;;;;;;;;;;;MA2Ba,OAAO;IAKnB;;;QAHQ,gBAAW,GAA2D,EAAE,CAAA;oBAW/C,MAAM;oBAID,GAAG;q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AAC,iBAAiB,CAAC,CAAA;gBAC3D,IAAI,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,UAAU,EAAE;oBACjD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAwB,CAAC,QAAQ,EAAE,CAAA;iBAC9E;qBAAM;oBACN,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,KAAK,EAAE,CAAA;iBACnD;gBAED,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAA;gBACxC,IAAI,CAAC,QAAQ,EAAE,CAAA;gBACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAA;aACjD;SACD;KACD;;;;IAMD,MAAM,OAAO;QACZ,IAAI,CAAC,kBAAkB,EAAE,CAAA;KACzB;;;;IAMD,MAAM,UAAU;QACf,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,IAAI,IAAI,CAAA;KAC3C;;;;IAMD,MAAM,YAAY,CAAC,UAAkB;QACpC,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;KACf;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KAC9B;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tColorType,\n\tTabColors,\n\tTabOrientationType,\n\tTabsClass,\n\tTabsItemClass,\n\tTabSizes,\n\tTabSizeType,\n\tTabType,\n\tTabTypes\n} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\nimport {booleanString, govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {hasOwnProperty} from \"../../utils/helpers.types\";\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: \"gov-tabs\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Tabs size.\n\t */\n\t@Prop() readonly size?: TabSizeType = 'm'\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly color?: ColorType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Icon and description display direction\n\t */\n\t@Prop({reflect: true}) readonly direction: 'row' | 'column' = 'row'\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TabColors, newValue, TabsClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TabSizes, newValue, TabsClass.root)\n\t}\n\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate prepareControllers(skipDefault = false): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\tconst iconStart = prepareIconFormat(tab.getAttribute('icon-start'))\n\t\t\t\tconst iconEnd = prepareIconFormat(tab.getAttribute('icon-end'))\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tdirection: tab.getAttribute(\"direction\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t\ticonStart,\n\t\t\t\t\ticonEnd\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tif (skipDefault === false) {\n\t\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\t} else if (this.focusIndex > -1 && hasOwnProperty(controllers, this.focusIndex)) {\n\t\t\t\tcontrollers[this.focusIndex].active = true\n\t\t\t}\n\t\t\tconst isWrongCombination = controllers.findIndex((controller) => controller.active && controller.disabled)\n\t\t\tif (isWrongCombination > -1) {\n\t\t\t\tcontrollers[isWrongCombination].active = false;\n\t\t\t\tconst firstGoodTab = controllers.findIndex((controller) => !controller.disabled)\n\t\t\t\tif (firstGoodTab > -1) {\n\t\t\t\t\tcontrollers[firstGoodTab].active = true\n\t\t\t\t\tthis.focusIndex = firstGoodTab;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tsize={this.size}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tdirection={this.direction}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs}\n\t\t\t\t\t role=\"tablist\"\n\t\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}/>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}/>) : null}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\taria-selected={booleanString(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tsize={this.size === \"xs\" ? \"xs\" : (this.size === \"s\" ? \"s\" : \"m\")}\n\t\t\t\t\t\t\t\t\t\ttype={control.active ? \"solid\" : \"outlined\"}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"left-icon\"/>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"right-icon\"/>) : null}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers(true);\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-tabs.entry.js","mappings":";;;;;;;;;;;;;MA2Ba,OAAO;IAKnB;;;QAHQ,gBAAW,GAA2D,EAAE,CAAA;oBAW/C,MAAM;oBAID,GAAG;qBAIJ,SAAS;2BAIK,YAAY;yBAID,KAAK;2BAqBpB,EAAE;0BAC3B,CAAC;mCACoB,EAAE;QA9C5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA6BD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;KAChD;IAGD,aAAa,CAAC,QAAgB;QAC7B,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;KACjD;IAGD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;KAChD;IAMD,gBAAgB;QACf,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,aAAa,EAAE,QAAQ;YACjF,IAAI,CAAC,qBAAqB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;SACpD,CAAC,CAAC;QAEH,IAAI,CA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C,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;KACf;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KAC9B;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tColorType,\n\tTabColors,\n\tTabOrientationType,\n\tTabsClass,\n\tTabsItemClass,\n\tTabSizes,\n\tTabSizeType,\n\tTabType,\n\tTabTypes\n} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\nimport {booleanString, govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {hasOwnProperty} from \"../../utils/helpers.types\";\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: \"gov-tabs\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Tabs size.\n\t */\n\t@Prop() readonly size?: TabSizeType = 'm'\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly color?: ColorType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Icon and description display direction\n\t */\n\t@Prop({reflect: true}) readonly direction: 'row' | 'column' = 'row'\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TabColors, newValue, TabsClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TabSizes, newValue, TabsClass.root)\n\t}\n\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate prepareControllers(skipDefault = false): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\tconst iconStart = prepareIconFormat(tab.getAttribute('icon-start'))\n\t\t\t\tconst iconEnd = prepareIconFormat(tab.getAttribute('icon-end'))\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tdirection: tab.getAttribute(\"direction\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t\ticonStart,\n\t\t\t\t\ticonEnd\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tif (skipDefault === false) {\n\t\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\t} else if (this.focusIndex > -1 && hasOwnProperty(controllers, this.focusIndex)) {\n\t\t\t\tcontrollers[this.focusIndex].active = true\n\t\t\t}\n\t\t\tconst isWrongCombination = controllers.findIndex((controller) => controller.active && controller.disabled)\n\t\t\tif (isWrongCombination > -1) {\n\t\t\t\tcontrollers[isWrongCombination].active = false;\n\t\t\t\tconst firstGoodTab = controllers.findIndex((controller) => !controller.disabled)\n\t\t\t\tif (firstGoodTab > -1) {\n\t\t\t\t\tcontrollers[firstGoodTab].active = true\n\t\t\t\t\tthis.focusIndex = firstGoodTab;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tsize={this.size}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tdirection={this.direction}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs}\n\t\t\t\t\t role=\"tablist\"\n\t\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\taria-selected={booleanString(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tsize={this.size === \"xs\" ? \"xs\" : (this.size === \"s\" ? \"s\" : \"m\")}\n\t\t\t\t\t\t\t\t\t\ttype={control.active ? \"solid\" : \"outlined\"}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-start\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-end\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers(true);\n\t}\n}\n"],"version":3}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { g as govHost } from './template-
|
|
3
|
-
import { v as validateProp } from './props-
|
|
4
|
-
import { a as ButtonColors, b as ButtonSizes } from './constants-
|
|
5
|
-
import {
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
3
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
4
|
+
import { a as ButtonColors, b as ButtonSizes } from './constants-51f51588.js';
|
|
5
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
6
6
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
7
7
|
import { p as prepareIconFormat } from './helpers-5d179d4b.js';
|
|
8
|
-
import './gov.log-
|
|
9
|
-
import './
|
|
10
|
-
import './colors-02c1ea96.js';
|
|
8
|
+
import './gov.log-066c3139.js';
|
|
9
|
+
import './colors-4cf64720.js';
|
|
11
10
|
|
|
12
11
|
const TagSizes = pick(Sizes, ['_XS', '_S', '_M']);
|
|
13
12
|
var TagType;
|
|
@@ -22,8 +21,8 @@ const TagClass = {
|
|
|
22
21
|
const GovTag = class {
|
|
23
22
|
constructor(hostRef) {
|
|
24
23
|
registerInstance(this, hostRef);
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
24
|
+
this.iconStart = undefined;
|
|
25
|
+
this.iconEnd = undefined;
|
|
27
26
|
this.size = TagSizes._S;
|
|
28
27
|
this.color = ButtonColors.PRIMARY;
|
|
29
28
|
this.type = undefined;
|
|
@@ -40,9 +39,9 @@ const GovTag = class {
|
|
|
40
39
|
this.validateSize(this.size);
|
|
41
40
|
}
|
|
42
41
|
render() {
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
return (h(Host, { key: '
|
|
42
|
+
const iconStart = prepareIconFormat(this.iconStart);
|
|
43
|
+
const iconEnd = prepareIconFormat(this.iconEnd);
|
|
44
|
+
return (h(Host, { key: 'c883cf9721b32aa8c06609bf09272ef196456e18', class: this.h.classes(TagClass.root), color: this.color, size: this.size, type: this.type }, h("span", { key: '614f39f6f1004d6c3ee1d0f13990a4e52dee66bc', class: "element" }, h("slot", { key: 'f7d4dc9576768e917a363bc7cafa86567213ea82', name: "icon-start" }, iconStart && h("gov-icon", { key: '8d57b52a0314e8d76461872116b4ce04e546c180', type: iconStart.type, name: iconStart.name })), h("slot", { key: '4cd134377c3ea7843aa899b0a2962aa19f5d569e' }), h("slot", { key: '4dc1cccaced24ef26bb15e648788590a4b7d1838', name: "icon-end" }, iconEnd && h("gov-icon", { key: '7946e18900c98bdff4c610813b2422bf75b30049', type: iconEnd.type, name: iconEnd.name })))));
|
|
46
45
|
}
|
|
47
46
|
get host() { return getElement(this); }
|
|
48
47
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-tag.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-tag.entry.js","mappings":";;;;;;;;;;AAIO,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGxD,IAAY,OAGX;AAHD,WAAY,OAAO;IAClB,wBAAa,CAAA;IACb,4BAAiB,CAAA;AAClB,CAAC,EAHW,OAAO,KAAP,OAAO,QAGlB;AAGM,MAAM,QAAQ,GAAG;IACvB,IAAI,EAAE,SAAS;CACf;;MCJY,MAAM;IAGlB;;;;oBAiBqD,QAAQ,CAAC,EAAE;qBAIP,YAAY,CAAC,OAAO;;QApB5E,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA0BD,aAAa,CAAC,QAAgB;QAC7B,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;KACnD;IAGD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;KAClD;IAED,iBAAiB;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC5B;IAED,MAAM;QACL,MAAM,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACnD,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/C,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EACzC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,IAEf,6DAAM,KAAK,EAAC,SAAS,IACpB,6DAAM,IAAI,EAAC,YAAY,IACrB,SAAS,IAAI,iEAAU,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,GAAa,CACzE,EACP,8DAAO,EACP,6DAAM,IAAI,EAAC,UAAU,IACnB,OAAO,IAAI,iEAAU,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,GAAa,CACnE,CACD,CACD,EACP;KACD;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-tag/constants.ts","../../../packages/core/src/components/gov-tag/gov-tag.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const TagSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type TagSizesType = `${ValueOf<typeof TagSizes>}`\n\nexport enum TagType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type TagTypesType = `${ValueOf<typeof TagType>}`\n\nexport const TagClass = {\n\troot: 'gov-tag',\n}\n","import {Component, Element, h, Host, Prop, Watch} from '@stencil/core'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {validateProp} from '../../helpers/Validate/props'\nimport {ButtonSizes, ButtonColors, ButtonColorType} from '../gov-button/button/constants'\nimport {TagClass, TagSizes, TagSizesType, TagTypesType} from './constants'\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\n\n@Component({\n\ttag: 'gov-tag',\n})\nexport class GovTag {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTagElement\n\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-start\"}) readonly iconStart?: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-end\"}) readonly iconEnd?: string\n\t/**\n\t * Tag’s size.\n\t */\n\t@Prop({reflect: true}) readonly size: TagSizesType = TagSizes._S\n\t/**\n\t * Style variation of the tag.\n\t */\n\t@Prop({reflect: true}) readonly color: ButtonColorType = ButtonColors.PRIMARY\n\t/**\n\t * Tag’s type\n\t */\n\t@Prop({reflect: true}) readonly type: TagTypesType\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, TagClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, TagClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\tconst iconStart = prepareIconFormat(this.iconStart)\n\t\tconst iconEnd = prepareIconFormat(this.iconEnd)\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TagClass.root)}\n\t\t\t\tcolor={this.color}\n\t\t\t\tsize={this.size}\n\t\t\t\ttype={this.type}\n\t\t\t>\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<slot name=\"icon-start\">\n\t\t\t\t\t\t{iconStart && <gov-icon type={iconStart.type} name={iconStart.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<slot name=\"icon-end\">\n\t\t\t\t\t\t{iconEnd && <gov-icon type={iconEnd.type} name={iconEnd.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, h, F as Fragment, a as Host, g as getElement } from './index-
|
|
2
|
-
import {
|
|
1
|
+
import { r as registerInstance, h, F as Fragment, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
3
3
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
|
-
import { g as govHost } from './template-
|
|
4
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
5
5
|
|
|
6
6
|
pick(Sizes, ['_S', '_M', '_L']);
|
|
7
7
|
const TileClass = {
|
|
@@ -25,7 +25,7 @@ const GovTile = class {
|
|
|
25
25
|
this.h = govHost(this.host);
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '3fd4f5bb8f7cdcdb5a6bbed610ed4ab6ec2837f5', class: this.h.classes(TileClass.root), size: this.size, orientation: this.orientation, clickable: this.href ? true : null }, h("slot", { key: '97179af17c8f8b16de49ca36a7c548d20e53cbdf', name: "icon" }), h("div", { key: 'a60a8e60effd1337cc11c5afb347ab395673d724', class: TileClass.content }, h("div", { key: 'b27682c73305417442d9ebfd27e02cc80d10034c', class: TileClass.text }, h("div", { key: '0c891f670607dde529d5ef6b1c86a843b7600a30', class: TileClass.title }, this.href ? (h(Fragment, null, h("a", { href: this.href, target: this.target, class: TileClass.link, ref: el => (this.triggerRef = el) }, h("slot", { name: "title" })), h("span", { class: TileClass.icon }, h("gov-icon", { name: "chevron-right", type: "components" })))) : (h("slot", { name: "title" }))), h("div", { key: 'dcb5f3be57fa6ebaa507c12c9394f1b12837856e', class: `${TileClass.annotation} ${this.href ? `${TileClass.annotation}--padding` : ''}` }, h("slot", { key: 'c3b7fe9ef111769219f1d915929112fe083927c8' }))), h("slot", { key: '98173ea276fed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OAAO,GAAE,CACjB,EACJ,YAAM,KAAK,EAAE,SAAS,CAAC,IAAI,IAC1B,gBAAU,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,YAAY,GAAY,CACtD,CACG,KAEX,YAAM,IAAI,EAAC,OAAO,GAAE,CACpB,CACI,EACN,4DAAK,KAAK,EAAE,GAAG,SAAS,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,GAAG,GAAG,SAAS,CAAC,UAAU,WAAW,GAAG,EAAE,EAAE,IAC3F,8DAAO,CACF,CACD,EACN,6DAAM,IAAI,EAAC,QAAQ,GAAE,CAChB,CACA,EACP;KACD;;;;IAMD,MAAM,aAAa;QAClB,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-tile/constants.ts","../../../packages/core/src/components/gov-tile/gov-tile.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const TileSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type TileSizesType = `${ValueOf<typeof TileSizes>}`\n\nexport const TileClass = {\n\troot: 'gov-tile',\n\tlink: 'gov-tile__link',\n\tcontent: 'gov-tile__content',\n\ttext: 'gov-tile__text',\n\ttitle: 'gov-tile__title',\n\ticon: 'gov-tile__icon',\n\tannotation: 'gov-tile__annotation',\n}\n","import {Component, Element, Fragment, h, Host, Method, Prop} from \"@stencil/core\"\nimport {TileClass, TileSizesType} from \"./constants\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {ButtonTargetType} from \"../gov-button/button/constants\"\n\n@Component({\n\ttag: \"gov-tile\",\n})\nexport class GovTile {\n\t@Element() host: HTMLGovTileElement\n\t/**\n\t * Tile’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: TileSizesType = \"m\"\n\t/**\n\t * Style variation of the tile.\n\t */\n\t@Prop() readonly orientation: \"vertical\" | \"horizontal\"\n\t/**\n\t * Tiles border\n\t */\n\t@Prop({ attribute: 'no-border' }) readonly noBorder: boolean = false\n\t/**\n\t * Link on whole tile\n\t */\n\t@Prop({reflect: true}) readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\tprivate triggerRef?: HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TileClass.root)}\n\t\t\t\t size={this.size}\n\t\t\t\t orientation={this.orientation}\n\t\t\t\t clickable={this.href ? true : null}\n\t\t\t>\n\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t<div class={TileClass.content}>\n\t\t\t\t\t<div class={TileClass.text}>\n\t\t\t\t\t\t<div class={TileClass.title}>\n\t\t\t\t\t\t\t{this.href ? (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\thref={this.href}\n\t\t\t\t\t\t\t\t\t\ttarget={this.target}\n\t\t\t\t\t\t\t\t\t\tclass={TileClass.link}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLSpanElement)}>\n\t\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t<span class={TileClass.icon}>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name=\"chevron-right\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={`${TileClass.annotation} ${this.href ? `${TileClass.annotation}--padding` : ''}`}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot name=\"button\"/>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getTriggerRef() {\n\t\treturn this.triggerRef\n\t}\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { g as govHost } from './template-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
3
3
|
|
|
4
4
|
const TilesClass = {
|
|
5
5
|
root: 'gov-tiles',
|
|
@@ -12,7 +12,7 @@ const GovTiles = class {
|
|
|
12
12
|
this.h = govHost(this.host);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'edb08ecaceb976d51978baf7ba3779d7e4e333cc', class: this.h.classes(TilesClass.root) }, h("slot", { key: 'a4aa065a8e108b9ceb692c264dec8c4fc559f80e' })));
|
|
16
16
|
}
|
|
17
17
|
get host() { return getElement(this); }
|
|
18
18
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { v as validateProp } from './props-
|
|
3
|
-
import { C as Colors } from './colors-
|
|
4
|
-
import {
|
|
5
|
-
import { g as govHost } from './template-
|
|
6
|
-
import { c as createID } from './string.utils-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
3
|
+
import { C as Colors } from './colors-4cf64720.js';
|
|
4
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
5
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
6
|
+
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
7
7
|
import { A as AttributeObserver, a as ariaAttributes } from './attribute-5561aca4.js';
|
|
8
8
|
import { i as inheritAriaAttributes } from './accessibility-f83c991a.js';
|
|
9
|
-
import './gov.log-
|
|
10
|
-
import './win-cec370ad.js';
|
|
9
|
+
import './gov.log-066c3139.js';
|
|
11
10
|
|
|
12
11
|
const ToastColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING']);
|
|
13
12
|
var ToastType;
|
|
@@ -19,6 +18,7 @@ const ToastClass = {
|
|
|
19
18
|
root: 'gov-toast',
|
|
20
19
|
hidden: 'gov-toast--hidden',
|
|
21
20
|
content: 'gov-toast__content',
|
|
21
|
+
icon: 'gov-toast__icon',
|
|
22
22
|
close: 'gov-toast__close',
|
|
23
23
|
timer: 'gov-toast__timer',
|
|
24
24
|
};
|
|
@@ -72,12 +72,11 @@ const GovToast = class {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '897da92a579e5854078657783d54c4fcca1f0311', class: this.h.classes(ToastClass.root), "data-toast-id": this.toastId, gravity: this.gravity, position: this.position, color: this.color, type: this.type, style: { "--toast-duration": this.time + "ms" } }, this.h.hasSlot("icon") && (h("span", { key: '50b2dde54f6e566f95c81bbd5dd6c27870338a70', class: ToastClass.icon }, h("slot", { key: 'f47d01268f3098f56b064fc41dc18bab64771073', name: "icon" }))), h("div", Object.assign({ key: '4e508603bd41bc5375ecf2d84e5a1df239fcc6c4', class: ToastClass.content }, this.inheritedAttributes, { "aria-live": "polite", role: "status" }), h("slot", { key: 'ff7e107c1486319621a1832bdcc0387f56dc56db' })), h("gov-button", { key: 'dfe2964f40d66df0335219b9bc66f5a316ecf8ca', size: "s", "aria-label": this.accessibleCloseLabel, color: this.isBold ? this.color : "neutral", type: "base", "on-gov-click": this.onCloseHandler.bind(this), class: ToastClass.close }, this.closeLabel ? this.closeLabel : h("gov-icon", { name: "x-lg", type: "components" })), h("div", { key: '5f0c872a74f8cac07431903519ecc191322d4397', class: ToastClass.timer })));
|
|
76
76
|
}
|
|
77
77
|
onCloseHandler() {
|
|
78
|
-
this.
|
|
79
|
-
|
|
80
|
-
.catch();
|
|
78
|
+
this.govClose.emit(this.toastId);
|
|
79
|
+
this.destroy().catch();
|
|
81
80
|
}
|
|
82
81
|
get isBold() {
|
|
83
82
|
return this.type === "bold";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-toast.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-toast.entry.js","mappings":";;;;;;;;;;AAIO,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAA;AAG9F,IAAY,SAGX;AAHD,WAAY,SAAS;IACpB,0BAAa,CAAA;IACb,8BAAiB,CAAA;AAClB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAGM,MAAM,UAAU,GAAG;IACzB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,mBAAmB;IAC3B,OAAO,EAAE,oBAAoB;IAC7B,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,kBAAkB;IACzB,KAAK,EAAE,kBAAkB;CACzB;;MCPY,QAAQ;IAMpB;;;qBAS0C,SAAS;uBAKN,KAAK;wBAIO,OAAO;oBAIvB,MAAM;oBAIf,CAAC;;;mCAmBU,EAAE;QA5C5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;KACnC;IAsCD,aAAa,CAAC,QAAgB;QAC7B,YAAY,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,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KAAK,MAAM,CAAA;KAC3B;IAED,IAAI,OAAO;QACV,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,CAAA;KACnD;;;;IAMD,MAAM,OAAO;QACZ,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC1B,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,IAAI,CAAC,OAAO,IAAI,CAAC,CAAA;QACzE,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;YACtC,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU,EAAE;gBACvC,KAAK,CAAC,MAAM,EAAE,CAAA;aACd;SACD;KACD;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-toast/constants.ts","../../../packages/core/src/components/gov-toast/gov-toast.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const ToastColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ToastColorType = `${ValueOf<typeof ToastColors>}`\n\nexport enum ToastType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type ToastTypesType = `${ValueOf<typeof ToastType>}`\n\nexport const ToastClass = {\n\troot: 'gov-toast',\n\thidden: 'gov-toast--hidden',\n\tcontent: 'gov-toast__content',\n\ticon: 'gov-toast__icon',\n\tclose: 'gov-toast__close',\n\ttimer: 'gov-toast__timer',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {ToastClass, ToastColors, ToastColorType, ToastTypesType} from \"./constants\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {createID} from \"../../utils/string.utils\"\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-toast\",\n})\nexport class GovToast {\n\tprivate h: GovHost\n\tprivate timeout\n\tprivate readonly toastId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.toastId = createID(\"GovToast\")\n\t}\n\n\t@Element() host: HTMLGovToastElement\n\t/**\n\t * Style variation of the toast message.\n\t */\n\t@Prop() readonly color?: ToastColorType = \"primary\"\n\n\t/**\n\t * Toast’s gravity\n\t */\n\t@Prop() readonly gravity: \"top\" | \"bottom\" = \"top\"\n\t/**\n\t * Toast’s position\n\t */\n\t@Prop() readonly position: \"left\" | \"center\" | \"right\" = \"right\"\n\t/**\n\t * Toast type\n\t */\n\t@Prop() readonly type?: ToastTypesType = \"bold\"\n\t/**\n\t * Number of milliseconds to wait before Toast disappear\n\t */\n\t@Prop() readonly time: number = 0\n\t/**\n\t * Closing button texting instead of icons\n\t */\n\t@Prop({attribute: \"close-label\"}) readonly closeLabel: string\n\t/**\n\t * Aria label for the closing button. It is mandatory if the alert is closable\n\t */\n\t@Prop({attribute: \"accessible-close-label\"}) readonly accessibleCloseLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({eventName: \"gov-close\"}) govClose: EventEmitter<string>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ToastColors, newValue, ToastClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.runTimer()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\n\tdisconnectedCallback() {\n\t\tclearTimeout(this.timeout)\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate runTimer() {\n\t\tif (this.isTimer) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.classList.add(ToastClass.hidden)\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.destroy().catch()\n\t\t\t\t\tthis.govClose.emit(this.toastId)\n\t\t\t\t}, 600)\n\t\t\t}, this.time)\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(ToastClass.root)}\n\t\t\t\tdata-toast-id={this.toastId}\n\t\t\t\tgravity={this.gravity}\n\t\t\t\tposition={this.position}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tstyle={{\"--toast-duration\": this.time + \"ms\"}}\n\t\t\t>\n\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t<span class={ToastClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t<div class={ToastClass.content} {...this.inheritedAttributes} aria-live=\"polite\" role=\"status\">\n\t\t\t\t\t<slot/>\n\t\t\t\t</div>\n\n\t\t\t\t<gov-button\n\t\t\t\t\tsize=\"s\"\n\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\tcolor={this.isBold ? this.color : \"neutral\"}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\tclass={ToastClass.close}\n\t\t\t\t>\n\t\t\t\t\t{this.closeLabel ? this.closeLabel : <gov-icon name=\"x-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t</gov-button>\n\n\t\t\t\t<div class={ToastClass.timer}></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(): void {\n\t\tthis.govClose.emit(this.toastId)\n\t\tthis.destroy().catch()\n\t}\n\n\tget isBold(): boolean {\n\t\treturn this.type === \"bold\"\n\t}\n\n\tget isTimer(): boolean {\n\t\treturn Number.isInteger(this.time) && this.time > 0\n\t}\n\n\t/**\n\t * Remove toast from dom\n\t */\n\t@Method()\n\tasync destroy(): Promise<void> {\n\t\tclearTimeout(this.timeout)\n\t\tconst toast = document.querySelector(`[data-toast-id=\"${this.toastId}\"]`)\n\t\tif (toast) {\n\t\t\ttoast.classList.add(ToastClass.hidden)\n\t\t\tif (typeof toast.remove === \"function\") {\n\t\t\t\ttoast.remove()\n\t\t\t}\n\t\t}\n\t}\n}\n"],"version":3}
|