@gov-design-system-ce/components 0.0.49 → 0.0.51
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/core.cjs.js +6 -2
- package/dist/cjs/core.cjs.js.map +1 -1
- package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gov-alert.cjs.entry.js +1 -1
- package/dist/cjs/gov-app.cjs.entry.js +1 -1
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +1 -1
- package/dist/cjs/gov-container.cjs.entry.js +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gov-empty.cjs.entry.js +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-grid.cjs.entry.js +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +2 -2
- package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
- package/dist/cjs/gov-layout.cjs.entry.js +1 -1
- package/dist/cjs/gov-loading.cjs.entry.js +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js +1 -1
- package/dist/cjs/gov-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-nav.cjs.entry.js +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gov-prompt.cjs.entry.js +1 -1
- package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-side-nav.cjs.entry.js +1 -1
- package/dist/cjs/gov-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
- package/dist/cjs/gov-statsbar-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-statsbar.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js +1 -1
- package/dist/cjs/gov-tiles.cjs.entry.js +1 -1
- package/dist/cjs/gov-toast.cjs.entry.js +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/gov-wizzard-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-wizzard.cjs.entry.js +1 -1
- package/dist/cjs/{index-7ba43a19.js → index-83edd4fe.js} +305 -52
- package/dist/cjs/index-83edd4fe.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -11
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +62 -62
- package/dist/collection/components/gov-accordion/constants.js +3 -3
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +14 -7
- package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion.js +16 -12
- package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
- package/dist/collection/components/gov-alert/constants.js +2 -2
- package/dist/collection/components/gov-alert/gov-alert.js +6 -3
- package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
- package/dist/collection/components/gov-app/gov-app.js +37 -37
- package/dist/collection/components/gov-app/gov-app.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.js +10 -8
- package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments.js +8 -7
- package/dist/collection/components/gov-attachments/gov-attachments.js.map +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.js +10 -8
- package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
- package/dist/collection/components/gov-badge/gov-badge.js +18 -9
- package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +10 -8
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
- package/dist/collection/components/gov-button/default/constants.js +3 -3
- package/dist/collection/components/gov-button/default/gov-button.js +26 -13
- package/dist/collection/components/gov-button/default/gov-button.js.map +1 -1
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +8 -4
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js.map +1 -1
- package/dist/collection/components/gov-card/gov-card.js +16 -12
- package/dist/collection/components/gov-card/gov-card.js.map +1 -1
- package/dist/collection/components/gov-container/gov-container.js +7 -5
- package/dist/collection/components/gov-container/gov-container.js.map +1 -1
- package/dist/collection/components/gov-control-group/constants.js +2 -2
- package/dist/collection/components/gov-control-group/gov-control-group.js +2 -1
- package/dist/collection/components/gov-control-group/gov-control-group.js.map +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +3 -3
- package/dist/collection/components/gov-empty/gov-empty.js +3 -3
- package/dist/collection/components/gov-error-code/gov-error-code.js +3 -3
- package/dist/collection/components/gov-form/autocomplete/constants.js +3 -3
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +30 -15
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/checkbox/constants.js +2 -2
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +14 -7
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
- package/dist/collection/components/gov-form/control/constants.js +2 -2
- package/dist/collection/components/gov-form/control/gov-form-control.js +4 -2
- package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +20 -10
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.js +2 -1
- package/dist/collection/components/gov-form/group/gov-form-group.js.map +1 -1
- package/dist/collection/components/gov-form/input/constants.js +3 -3
- package/dist/collection/components/gov-form/input/gov-form-input.js +40 -24
- 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 +6 -4
- package/dist/collection/components/gov-form/label/gov-form-label.js.map +1 -1
- package/dist/collection/components/gov-form/message/constants.js +2 -2
- package/dist/collection/components/gov-form/message/gov-form-message.js +9 -7
- package/dist/collection/components/gov-form/message/gov-form-message.js.map +1 -1
- package/dist/collection/components/gov-form/multiselect/constants.js +3 -3
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +22 -11
- 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 +2 -2
- package/dist/collection/components/gov-form/radio/constants.js +2 -2
- package/dist/collection/components/gov-form/radio/gov-form-radio.js +14 -7
- package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
- package/dist/collection/components/gov-form/search/constants.js +2 -2
- package/dist/collection/components/gov-form/search/gov-form-search.js +4 -3
- package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
- package/dist/collection/components/gov-form/select/constants.js +3 -3
- package/dist/collection/components/gov-form/select/gov-form-select.js +22 -11
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/constants.js +2 -2
- package/dist/collection/components/gov-form/switch/gov-form-switch.js +14 -7
- package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
- package/dist/collection/components/gov-grid/gov-grid-item.css +0 -44
- package/dist/collection/components/gov-grid/gov-grid-item.js +3 -3
- package/dist/collection/components/gov-grid/gov-grid.js +3 -3
- package/dist/collection/components/gov-icon/gov-icon.js +6 -5
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-layout/gov-layout-column.js +3 -3
- package/dist/collection/components/gov-layout/gov-layout.js +7 -5
- package/dist/collection/components/gov-layout/gov-layout.js.map +1 -1
- package/dist/collection/components/gov-loading/loading/gov-loading.js +3 -3
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +8 -4
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js.map +1 -1
- package/dist/collection/components/gov-message/constants.js +2 -2
- package/dist/collection/components/gov-message/gov-message.js +7 -6
- package/dist/collection/components/gov-message/gov-message.js.map +1 -1
- package/dist/collection/components/gov-modal/gov-modal.js +8 -4
- package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
- package/dist/collection/components/gov-nav/gov-nav-item.js +3 -3
- package/dist/collection/components/gov-nav/gov-nav.js +7 -6
- package/dist/collection/components/gov-nav/gov-nav.js.map +1 -1
- package/dist/collection/components/gov-pagination/constants.js +3 -3
- package/dist/collection/components/gov-pagination/gov-pagination.js +10 -5
- package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
- package/dist/collection/components/gov-promp/gov-prompt.js +8 -4
- package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +15 -10
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.js.map +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav.js +10 -8
- package/dist/collection/components/gov-side-nav/gov-side-nav.js.map +1 -1
- package/dist/collection/components/gov-spacer/constants.js +2 -2
- package/dist/collection/components/gov-spacer/gov-spacer.js +8 -6
- package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
- package/dist/collection/components/gov-statsbar/constants.js +2 -2
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.js +6 -5
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.js.map +1 -1
- package/dist/collection/components/gov-statsbar/gov-statsbar.js +8 -6
- package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
- package/dist/collection/components/gov-stepper/constants.js +3 -3
- package/dist/collection/components/gov-stepper/gov-stepper-item.js +14 -10
- package/dist/collection/components/gov-stepper/gov-stepper-item.js.map +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper.js +8 -6
- package/dist/collection/components/gov-stepper/gov-stepper.js.map +1 -1
- package/dist/collection/components/gov-tabs/constants.js +2 -2
- package/dist/collection/components/gov-tabs/gov-tabs-item.js +10 -7
- package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js +29 -19
- package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
- package/dist/collection/components/gov-tile/container/gov-tiles.js +4 -4
- package/dist/collection/components/gov-tile/gov-tile.js +6 -3
- package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
- package/dist/collection/components/gov-toast/constants.js +2 -2
- package/dist/collection/components/gov-toast/gov-toast.js +11 -8
- package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
- package/dist/collection/components/gov-tooltip/constants.js +3 -3
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +3 -3
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +15 -10
- package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
- package/dist/collection/components/gov-wizzard/constants.js +3 -3
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +14 -7
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
- package/dist/collection/components/gov-wizzard/gov-wizzard.js +6 -3
- package/dist/collection/components/gov-wizzard/gov-wizzard.js.map +1 -1
- package/dist/collection/helpers/Dom/form.js +9 -9
- package/dist/collection/helpers/Dom/win.js +1 -1
- package/dist/collection/helpers/StorybookDocsTemplate.js +3 -3
- package/dist/collection/helpers/Validate/props.js +1 -1
- package/dist/collection/helpers/Validate/wcag.js +3 -3
- package/dist/collection/utils/ds.utils.js +1 -1
- package/dist/collection/utils/icon.utils.js +3 -3
- package/dist/components/gov-accordion-item.js +1 -156
- package/dist/components/gov-accordion-item.js.map +1 -1
- package/dist/components/gov-accordion.js +1 -94
- package/dist/components/gov-accordion.js.map +1 -1
- package/dist/components/gov-alert.js +1 -122
- package/dist/components/gov-alert.js.map +1 -1
- package/dist/components/gov-app.js +1 -8924
- package/dist/components/gov-app.js.map +1 -1
- package/dist/components/gov-attachments-item.js +1 -7
- package/dist/components/gov-attachments-item.js.map +1 -1
- package/dist/components/gov-attachments.js +1 -7
- package/dist/components/gov-attachments.js.map +1 -1
- package/dist/components/gov-backdrop.js +1 -7
- package/dist/components/gov-backdrop.js.map +1 -1
- package/dist/components/gov-badge.js +1 -7
- package/dist/components/gov-badge.js.map +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -67
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -7
- package/dist/components/gov-button.js.map +1 -1
- package/dist/components/gov-card.js +1 -143
- package/dist/components/gov-card.js.map +1 -1
- package/dist/components/gov-container.js +1 -51
- package/dist/components/gov-container.js.map +1 -1
- package/dist/components/gov-control-group.js +1 -57
- package/dist/components/gov-control-group.js.map +1 -1
- package/dist/components/gov-cookiebar.js +1 -46
- package/dist/components/gov-cookiebar.js.map +1 -1
- package/dist/components/gov-dropdown.js +1 -150
- package/dist/components/gov-dropdown.js.map +1 -1
- package/dist/components/gov-empty.js +1 -44
- package/dist/components/gov-empty.js.map +1 -1
- package/dist/components/gov-error-code.js +1 -44
- package/dist/components/gov-error-code.js.map +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -7
- package/dist/components/gov-form-autocomplete.js.map +1 -1
- package/dist/components/gov-form-checkbox.js +1 -159
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-control.js +1 -139
- package/dist/components/gov-form-control.js.map +1 -1
- package/dist/components/gov-form-file.js +1 -288
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -57
- package/dist/components/gov-form-group.js.map +1 -1
- package/dist/components/gov-form-input.js +1 -7
- package/dist/components/gov-form-input.js.map +1 -1
- package/dist/components/gov-form-label.js +1 -46
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-message.js +1 -7
- package/dist/components/gov-form-message.js.map +1 -1
- package/dist/components/gov-form-multi-select.js +1 -270
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-password-power.js +1 -43
- package/dist/components/gov-form-password-power.js.map +1 -1
- package/dist/components/gov-form-radio.js +1 -153
- package/dist/components/gov-form-radio.js.map +1 -1
- package/dist/components/gov-form-search.js +1 -47
- package/dist/components/gov-form-search.js.map +1 -1
- package/dist/components/gov-form-select.js +1 -7
- package/dist/components/gov-form-select.js.map +1 -1
- package/dist/components/gov-form-switch.js +1 -153
- package/dist/components/gov-form-switch.js.map +1 -1
- package/dist/components/gov-grid-item.js +1 -49
- package/dist/components/gov-grid-item.js.map +1 -1
- package/dist/components/gov-grid.js +1 -44
- package/dist/components/gov-grid.js.map +1 -1
- package/dist/components/gov-icon.js +1 -7
- package/dist/components/gov-icon.js.map +1 -1
- package/dist/components/gov-layout-column.js +1 -38
- package/dist/components/gov-layout-column.js.map +1 -1
- package/dist/components/gov-layout.js +1 -51
- package/dist/components/gov-layout.js.map +1 -1
- package/dist/components/gov-loading.js +1 -58
- package/dist/components/gov-loading.js.map +1 -1
- package/dist/components/gov-message.js +1 -57
- package/dist/components/gov-message.js.map +1 -1
- package/dist/components/gov-modal.js +1 -146
- package/dist/components/gov-modal.js.map +1 -1
- package/dist/components/gov-nav-item.js +1 -53
- package/dist/components/gov-nav-item.js.map +1 -1
- package/dist/components/gov-nav.js +1 -57
- package/dist/components/gov-nav.js.map +1 -1
- package/dist/components/gov-pagination.js +1 -270
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-prompt.js +1 -146
- package/dist/components/gov-prompt.js.map +1 -1
- package/dist/components/gov-side-nav-item.js +1 -124
- package/dist/components/gov-side-nav-item.js.map +1 -1
- package/dist/components/gov-side-nav.js +1 -73
- package/dist/components/gov-side-nav.js.map +1 -1
- package/dist/components/gov-skeleton.js +1 -137
- package/dist/components/gov-skeleton.js.map +1 -1
- package/dist/components/gov-spacer.js +1 -72
- package/dist/components/gov-spacer.js.map +1 -1
- package/dist/components/gov-statsbar-item.js +1 -51
- package/dist/components/gov-statsbar-item.js.map +1 -1
- package/dist/components/gov-statsbar.js +1 -65
- package/dist/components/gov-statsbar.js.map +1 -1
- package/dist/components/gov-stepper-item.js +1 -96
- package/dist/components/gov-stepper-item.js.map +1 -1
- package/dist/components/gov-stepper.js +1 -61
- package/dist/components/gov-stepper.js.map +1 -1
- package/dist/components/gov-tabs-item.js +1 -73
- package/dist/components/gov-tabs-item.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -232
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tile.js +1 -80
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-tiles.js +1 -49
- package/dist/components/gov-tiles.js.map +1 -1
- package/dist/components/gov-toast.js +1 -136
- package/dist/components/gov-toast.js.map +1 -1
- package/dist/components/gov-tooltip-content.js +1 -54
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +1 -176
- package/dist/components/gov-tooltip.js.map +1 -1
- package/dist/components/gov-wizzard-item.js +1 -144
- package/dist/components/gov-wizzard-item.js.map +1 -1
- package/dist/components/gov-wizzard.js +1 -83
- package/dist/components/gov-wizzard.js.map +1 -1
- package/dist/components/index.d.ts +14 -62
- package/dist/components/index.js +1 -62
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-03990da5.js +2 -0
- package/dist/components/p-03990da5.js.map +1 -0
- package/dist/components/p-0f5e2b0a.js +2 -0
- package/dist/components/p-0f5e2b0a.js.map +1 -0
- package/dist/components/p-1020a160.js +2 -0
- package/dist/components/p-1020a160.js.map +1 -0
- package/dist/components/p-1026d931.js +2 -0
- package/dist/components/p-1026d931.js.map +1 -0
- package/dist/components/p-17c1ffc1.js +2 -0
- package/dist/components/p-17c1ffc1.js.map +1 -0
- package/dist/components/p-1b4f2520.js +2 -0
- package/dist/components/p-1b4f2520.js.map +1 -0
- package/dist/components/p-1c1d0bbe.js +2 -0
- package/dist/components/p-1c1d0bbe.js.map +1 -0
- package/dist/components/p-24636c53.js +2 -0
- package/dist/components/p-24636c53.js.map +1 -0
- package/dist/components/p-26acf964.js +2 -0
- package/dist/components/p-26acf964.js.map +1 -0
- package/dist/components/p-34152b51.js +2 -0
- package/dist/components/p-34152b51.js.map +1 -0
- package/dist/components/p-3464136c.js +2 -0
- package/dist/components/p-3464136c.js.map +1 -0
- package/dist/components/p-36be8f6e.js +2 -0
- package/dist/components/p-36be8f6e.js.map +1 -0
- package/dist/components/p-386409dc.js +2 -0
- package/dist/components/p-386409dc.js.map +1 -0
- package/dist/components/p-3dbf7f49.js +2 -0
- package/dist/components/p-3dbf7f49.js.map +1 -0
- package/dist/components/p-3f37ddb6.js +2 -0
- package/dist/components/p-3f37ddb6.js.map +1 -0
- package/dist/components/p-404f469e.js +2 -0
- package/dist/components/p-404f469e.js.map +1 -0
- package/dist/components/p-55500e5a.js +2 -0
- package/dist/components/p-55500e5a.js.map +1 -0
- package/dist/components/p-561fa17b.js +2 -0
- package/dist/components/p-561fa17b.js.map +1 -0
- package/dist/components/p-5bf5a42e.js +2 -0
- package/dist/components/p-5bf5a42e.js.map +1 -0
- package/dist/components/p-5defdc5e.js +2 -0
- package/dist/components/p-5defdc5e.js.map +1 -0
- package/dist/components/p-6278531b.js +2 -0
- package/dist/components/p-6278531b.js.map +1 -0
- package/dist/components/p-64ced668.js +2 -0
- package/dist/components/p-64ced668.js.map +1 -0
- package/dist/components/p-80b2c231.js +2 -0
- package/dist/components/{gov-form-select2.js.map → p-80b2c231.js.map} +1 -1
- package/dist/components/p-80c0109d.js +2 -0
- package/dist/components/p-80c0109d.js.map +1 -0
- package/dist/components/p-80e30702.js +2 -0
- package/dist/components/{constants13.js.map → p-80e30702.js.map} +1 -1
- package/dist/components/p-9144dde1.js +2 -0
- package/dist/components/p-9144dde1.js.map +1 -0
- package/dist/components/p-9da782bf.js +2 -0
- package/dist/components/p-9da782bf.js.map +1 -0
- package/dist/components/p-a5d69694.js +2 -0
- package/dist/components/p-a5d69694.js.map +1 -0
- package/dist/components/p-a6d14a47.js +2 -0
- package/dist/components/p-a6d14a47.js.map +1 -0
- package/dist/components/p-b72a7bed.js +2 -0
- package/dist/components/p-b72a7bed.js.map +1 -0
- package/dist/components/p-be4aab0e.js +2 -0
- package/dist/components/p-be4aab0e.js.map +1 -0
- package/dist/components/p-ccc44ac1.js +2 -0
- package/dist/components/p-ccc44ac1.js.map +1 -0
- package/dist/components/p-cd440c95.js +2 -0
- package/dist/components/p-cd440c95.js.map +1 -0
- package/dist/components/p-d305407a.js +2 -0
- package/dist/components/p-d305407a.js.map +1 -0
- package/dist/components/p-ec26407a.js +2 -0
- package/dist/components/p-ec26407a.js.map +1 -0
- package/dist/components/p-ff7365ae.js +2 -0
- package/dist/components/p-ff7365ae.js.map +1 -0
- package/dist/components/p-ffb7495c.js +2 -0
- package/dist/components/p-ffb7495c.js.map +1 -0
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/index.esm.js.map +1 -1
- package/dist/core/{p-f2d22b62.entry.js → p-02c3a3fd.entry.js} +2 -2
- package/dist/core/p-02c3a3fd.entry.js.map +1 -0
- package/dist/core/p-03990da5.js.map +1 -1
- package/dist/core/{p-24ba5c7b.entry.js → p-041d30b1.entry.js} +2 -2
- package/dist/core/p-041d30b1.entry.js.map +1 -0
- package/dist/core/{p-818bb0f5.entry.js → p-0eadfb3e.entry.js} +2 -2
- package/dist/core/p-0eadfb3e.entry.js.map +1 -0
- package/dist/core/{p-88c10472.entry.js → p-0eb11cfc.entry.js} +2 -2
- package/dist/core/p-0eb11cfc.entry.js.map +1 -0
- package/dist/core/p-0f5e2b0a.js.map +1 -1
- package/dist/core/p-1020a160.js.map +1 -1
- package/dist/core/p-10cbc3fe.js +3 -0
- package/dist/core/p-10cbc3fe.js.map +1 -0
- package/dist/core/{p-c0c9b349.entry.js → p-11be550d.entry.js} +2 -2
- package/dist/core/p-11be550d.entry.js.map +1 -0
- package/dist/core/{p-024fa230.entry.js → p-1ae47d62.entry.js} +2 -2
- package/dist/core/p-1ae47d62.entry.js.map +1 -0
- package/dist/core/p-1c1d0bbe.js.map +1 -1
- package/dist/core/{p-2713b83e.entry.js → p-1c62f175.entry.js} +2 -2
- package/dist/core/p-1c62f175.entry.js.map +1 -0
- package/dist/core/{p-7d7dab2e.entry.js → p-1da9f871.entry.js} +2 -2
- package/dist/core/p-1da9f871.entry.js.map +1 -0
- package/dist/core/{p-21375e02.entry.js → p-1e3cad4b.entry.js} +2 -2
- package/dist/core/p-1e3cad4b.entry.js.map +1 -0
- package/dist/core/{p-34508063.entry.js → p-228da18e.entry.js} +2 -2
- package/dist/core/p-228da18e.entry.js.map +1 -0
- package/dist/core/p-24636c53.js.map +1 -1
- package/dist/core/p-26acf964.js.map +1 -1
- package/dist/core/{p-439340f9.entry.js → p-2790d89e.entry.js} +2 -2
- package/dist/core/p-2790d89e.entry.js.map +1 -0
- package/dist/core/{p-a008979f.entry.js → p-2fe9d3ea.entry.js} +2 -2
- package/dist/core/p-2fe9d3ea.entry.js.map +1 -0
- package/dist/core/{p-1f883c31.entry.js → p-33895061.entry.js} +2 -2
- package/dist/core/p-33895061.entry.js.map +1 -0
- package/dist/core/p-34152b51.js.map +1 -1
- package/dist/core/p-3464136c.js.map +1 -1
- package/dist/core/p-34ed07f6.js.map +1 -1
- package/dist/core/p-36be8f6e.js.map +1 -1
- package/dist/core/{p-fd62778e.entry.js → p-3858e2c8.entry.js} +2 -2
- package/dist/core/p-3858e2c8.entry.js.map +1 -0
- package/dist/core/p-3b9df792.entry.js +2 -0
- package/dist/core/p-3b9df792.entry.js.map +1 -0
- package/dist/core/{p-b1ca32cc.entry.js → p-3d720d54.entry.js} +2 -2
- package/dist/core/p-3d720d54.entry.js.map +1 -0
- package/dist/core/p-3dbf7f49.js.map +1 -1
- package/dist/core/{p-40df0e89.entry.js → p-3e5432d7.entry.js} +2 -2
- package/dist/core/p-3e5432d7.entry.js.map +1 -0
- package/dist/core/p-3f37ddb6.js.map +1 -1
- package/dist/core/p-404f469e.js.map +1 -1
- package/dist/core/{p-00e21d46.entry.js → p-42cd2cc4.entry.js} +2 -2
- package/dist/core/p-42cd2cc4.entry.js.map +1 -0
- package/dist/core/{p-3b6d6f6f.entry.js → p-48349167.entry.js} +2 -2
- package/dist/core/p-48349167.entry.js.map +1 -0
- package/dist/core/{p-d9747cca.entry.js → p-49926f53.entry.js} +2 -2
- package/dist/core/p-49926f53.entry.js.map +1 -0
- package/dist/core/{p-2b0af68c.entry.js → p-5150efee.entry.js} +2 -2
- package/dist/core/p-5150efee.entry.js.map +1 -0
- package/dist/core/{p-1c20657a.entry.js → p-5316e768.entry.js} +2 -2
- package/dist/core/p-5316e768.entry.js.map +1 -0
- package/dist/core/p-55500e5a.js.map +1 -1
- package/dist/core/p-561fa17b.js.map +1 -1
- package/dist/core/{p-c134863d.entry.js → p-5a855a15.entry.js} +2 -2
- package/dist/core/p-5a855a15.entry.js.map +1 -0
- package/dist/core/p-5defdc5e.js.map +1 -1
- package/dist/core/{p-424fdf22.entry.js → p-5e23a6ba.entry.js} +2 -2
- package/dist/core/p-5e23a6ba.entry.js.map +1 -0
- package/dist/core/p-6278531b.js.map +1 -1
- package/dist/core/p-64ced668.js.map +1 -1
- package/dist/core/{p-1e1bd302.entry.js → p-6dacb8d3.entry.js} +2 -2
- package/dist/core/p-6dacb8d3.entry.js.map +1 -0
- package/dist/core/{p-174d3df0.entry.js → p-6f43bd00.entry.js} +2 -2
- package/dist/core/p-6f43bd00.entry.js.map +1 -0
- package/dist/core/{p-034c5c8f.entry.js → p-722218fd.entry.js} +2 -2
- package/dist/core/p-722218fd.entry.js.map +1 -0
- package/dist/core/{p-9a1d5c77.entry.js → p-739dd451.entry.js} +2 -2
- package/dist/core/p-739dd451.entry.js.map +1 -0
- package/dist/core/{p-51582b94.entry.js → p-7ab82a55.entry.js} +2 -2
- package/dist/core/p-7ab82a55.entry.js.map +1 -0
- package/dist/core/p-80e30702.js.map +1 -1
- package/dist/core/{p-ddffa85e.entry.js → p-88a78167.entry.js} +2 -2
- package/dist/core/p-88a78167.entry.js.map +1 -0
- package/dist/core/{p-ec8e7f8f.entry.js → p-89921159.entry.js} +2 -2
- package/dist/core/p-89921159.entry.js.map +1 -0
- package/dist/core/p-9144dde1.js.map +1 -1
- package/dist/core/{p-1bfe6f33.entry.js → p-93042b25.entry.js} +2 -2
- package/dist/core/p-93042b25.entry.js.map +1 -0
- package/dist/core/{p-b2c6a185.entry.js → p-9633e7b5.entry.js} +2 -2
- package/dist/core/p-9633e7b5.entry.js.map +1 -0
- package/dist/core/{p-82af6719.entry.js → p-9751af2e.entry.js} +2 -2
- package/dist/core/p-9751af2e.entry.js.map +1 -0
- package/dist/core/{p-6e6a44f0.entry.js → p-9a3e3ace.entry.js} +2 -2
- package/dist/core/p-9a3e3ace.entry.js.map +1 -0
- package/dist/core/{p-5f23b01d.entry.js → p-9ad54c30.entry.js} +2 -2
- package/dist/core/p-9ad54c30.entry.js.map +1 -0
- package/dist/core/p-9dab01be.js.map +1 -1
- package/dist/core/{p-b9bfca0a.entry.js → p-9e208f40.entry.js} +2 -2
- package/dist/core/p-9e208f40.entry.js.map +1 -0
- package/dist/core/p-9f541022.entry.js +2 -0
- package/dist/core/p-9f541022.entry.js.map +1 -0
- package/dist/core/p-a5d69694.js.map +1 -1
- package/dist/core/{p-8ee11310.entry.js → p-a68547b1.entry.js} +2 -2
- package/dist/core/p-a68547b1.entry.js.map +1 -0
- package/dist/core/p-a6d14a47.js.map +1 -1
- package/dist/core/{p-d7ee8f40.entry.js → p-a857915f.entry.js} +2 -2
- package/dist/core/{p-d7ee8f40.entry.js.map → p-a857915f.entry.js.map} +1 -1
- package/dist/core/{p-cbfe47ee.entry.js → p-aa4e716e.entry.js} +2 -2
- package/dist/core/p-aa4e716e.entry.js.map +1 -0
- package/dist/core/{p-dbd6c9b5.entry.js → p-abfa0beb.entry.js} +2 -2
- package/dist/core/p-abfa0beb.entry.js.map +1 -0
- package/dist/core/p-ac94d242.entry.js +2 -0
- package/dist/core/p-ac94d242.entry.js.map +1 -0
- package/dist/core/{p-32c8b7a4.entry.js → p-ae04e58f.entry.js} +2 -2
- package/dist/core/p-ae04e58f.entry.js.map +1 -0
- package/dist/core/{p-dae9dc31.entry.js → p-af7a89bc.entry.js} +2 -2
- package/dist/core/p-af7a89bc.entry.js.map +1 -0
- package/dist/core/{p-0b9eed8b.entry.js → p-b5a560d2.entry.js} +2 -2
- package/dist/core/p-b5a560d2.entry.js.map +1 -0
- package/dist/core/{p-b547d31a.entry.js → p-bbcbe1cc.entry.js} +2 -2
- package/dist/core/p-bbcbe1cc.entry.js.map +1 -0
- package/dist/core/p-be4aab0e.js.map +1 -1
- package/dist/core/{p-902ff1a5.entry.js → p-d2729599.entry.js} +2 -2
- package/dist/core/p-d2729599.entry.js.map +1 -0
- package/dist/core/{p-52373a5b.entry.js → p-d921bd4b.entry.js} +2 -2
- package/dist/core/p-d921bd4b.entry.js.map +1 -0
- package/dist/core/{p-8694e397.entry.js → p-da762184.entry.js} +2 -2
- package/dist/core/p-da762184.entry.js.map +1 -0
- package/dist/core/p-de3dc437.entry.js +2 -0
- package/dist/core/p-de3dc437.entry.js.map +1 -0
- package/dist/core/p-e0c04c5f.entry.js +2 -0
- package/dist/core/p-e0c04c5f.entry.js.map +1 -0
- package/dist/core/{p-c862ac0d.entry.js → p-e1b3c361.entry.js} +2 -2
- package/dist/core/p-e1b3c361.entry.js.map +1 -0
- package/dist/core/{p-2c821d36.entry.js → p-e86db39c.entry.js} +2 -2
- package/dist/core/p-e86db39c.entry.js.map +1 -0
- package/dist/core/{p-dfe0cb6d.entry.js → p-eda868dc.entry.js} +2 -2
- package/dist/core/p-eda868dc.entry.js.map +1 -0
- package/dist/core/{p-37599a2d.entry.js → p-f95bca5f.entry.js} +2 -2
- package/dist/core/p-f95bca5f.entry.js.map +1 -0
- package/dist/core/{p-1a4cb97e.entry.js → p-f969eec7.entry.js} +2 -2
- package/dist/core/p-f969eec7.entry.js.map +1 -0
- package/dist/core/{p-4b8bf83d.entry.js → p-fa71fb92.entry.js} +2 -2
- package/dist/core/p-fa71fb92.entry.js.map +1 -0
- package/dist/core/p-ff7365ae.js.map +1 -1
- package/dist/core/p-ffb7495c.js.map +1 -1
- package/dist/esm/core.js +3 -2
- package/dist/esm/core.js.map +1 -1
- package/dist/esm/gov-accordion-item.entry.js +1 -1
- package/dist/esm/gov-accordion.entry.js +1 -1
- package/dist/esm/gov-alert.entry.js +1 -1
- package/dist/esm/gov-app.entry.js +1 -1
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +1 -1
- package/dist/esm/gov-backdrop.entry.js +1 -1
- package/dist/esm/gov-badge.entry.js +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +1 -1
- package/dist/esm/gov-button.entry.js +1 -1
- package/dist/esm/gov-card.entry.js +1 -1
- package/dist/esm/gov-container.entry.js +1 -1
- package/dist/esm/gov-control-group.entry.js +1 -1
- package/dist/esm/gov-cookiebar.entry.js +1 -1
- package/dist/esm/gov-dropdown.entry.js +1 -1
- package/dist/esm/gov-empty.entry.js +1 -1
- package/dist/esm/gov-error-code.entry.js +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +1 -1
- package/dist/esm/gov-form-control.entry.js +1 -1
- package/dist/esm/gov-form-file.entry.js +1 -1
- package/dist/esm/gov-form-group.entry.js +1 -1
- package/dist/esm/gov-form-input.entry.js +1 -1
- package/dist/esm/gov-form-label.entry.js +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +1 -1
- package/dist/esm/gov-form-password-power.entry.js +1 -1
- package/dist/esm/gov-form-radio.entry.js +1 -1
- package/dist/esm/gov-form-search.entry.js +1 -1
- package/dist/esm/gov-form-select.entry.js +1 -1
- package/dist/esm/gov-form-switch.entry.js +1 -1
- package/dist/esm/gov-grid-item.entry.js +1 -1
- package/dist/esm/gov-grid.entry.js +1 -1
- package/dist/esm/gov-icon.entry.js +2 -2
- package/dist/esm/gov-layout-column.entry.js +1 -1
- package/dist/esm/gov-layout.entry.js +1 -1
- package/dist/esm/gov-loading.entry.js +1 -1
- package/dist/esm/gov-message.entry.js +1 -1
- package/dist/esm/gov-modal.entry.js +1 -1
- package/dist/esm/gov-nav-item.entry.js +1 -1
- package/dist/esm/gov-nav.entry.js +1 -1
- package/dist/esm/gov-pagination.entry.js +1 -1
- package/dist/esm/gov-prompt.entry.js +1 -1
- package/dist/esm/gov-side-nav-item.entry.js +1 -1
- package/dist/esm/gov-side-nav.entry.js +1 -1
- package/dist/esm/gov-skeleton.entry.js +1 -1
- package/dist/esm/gov-spacer.entry.js +1 -1
- package/dist/esm/gov-statsbar-item.entry.js +1 -1
- package/dist/esm/gov-statsbar.entry.js +1 -1
- package/dist/esm/gov-stepper-item.entry.js +1 -1
- package/dist/esm/gov-stepper.entry.js +1 -1
- package/dist/esm/gov-tabs-item.entry.js +1 -1
- package/dist/esm/gov-tabs.entry.js +1 -1
- package/dist/esm/gov-tabs.entry.js.map +1 -1
- package/dist/esm/gov-tile.entry.js +1 -1
- package/dist/esm/gov-tiles.entry.js +1 -1
- package/dist/esm/gov-toast.entry.js +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +1 -1
- package/dist/esm/gov-tooltip.entry.js +1 -1
- package/dist/esm/gov-wizzard-item.entry.js +1 -1
- package/dist/esm/gov-wizzard.entry.js +1 -1
- package/dist/esm/{index-12c94daf.js → index-ae3c50f1.js} +305 -53
- package/dist/esm/index-ae3c50f1.js.map +1 -0
- package/dist/esm/loader.js +3 -11
- package/dist/esm/loader.js.map +1 -1
- package/dist/hydrate/index.d.ts +17 -16
- package/dist/hydrate/index.js +199 -166
- package/dist/stencil.config.js +14 -11
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/gov-accordion/constants.d.ts +2 -2
- package/dist/types/components/gov-alert/constants.d.ts +1 -1
- package/dist/types/components/gov-app/gov-app.d.ts +34 -34
- package/dist/types/components/gov-badge/constants.d.ts +1 -1
- package/dist/types/components/gov-button/default/constants.d.ts +5 -5
- package/dist/types/components/gov-button/dropdown/constants.d.ts +1 -1
- package/dist/types/components/gov-control-group/constants.d.ts +1 -1
- package/dist/types/components/gov-form/autocomplete/constants.d.ts +2 -2
- package/dist/types/components/gov-form/checkbox/constants.d.ts +1 -1
- package/dist/types/components/gov-form/control/constants.d.ts +1 -1
- package/dist/types/components/gov-form/group/constants.d.ts +1 -1
- package/dist/types/components/gov-form/input/constants.d.ts +4 -4
- package/dist/types/components/gov-form/label/constants.d.ts +1 -1
- package/dist/types/components/gov-form/message/constants.d.ts +1 -1
- package/dist/types/components/gov-form/multiselect/constants.d.ts +2 -2
- package/dist/types/components/gov-form/radio/constants.d.ts +1 -1
- package/dist/types/components/gov-form/search/constants.d.ts +1 -1
- package/dist/types/components/gov-form/select/constants.d.ts +2 -2
- package/dist/types/components/gov-form/switch/constants.d.ts +1 -1
- package/dist/types/components/gov-icon/constants.d.ts +1 -1
- package/dist/types/components/gov-layout/constants.d.ts +2 -2
- package/dist/types/components/gov-loading/skeleton/constants.d.ts +3 -3
- package/dist/types/components/gov-message/constants.d.ts +1 -1
- package/dist/types/components/gov-pagination/constants.d.ts +3 -3
- package/dist/types/components/gov-spacer/constants.d.ts +2 -2
- package/dist/types/components/gov-statsbar/constants.d.ts +2 -2
- package/dist/types/components/gov-stepper/constants.d.ts +2 -2
- package/dist/types/components/gov-tabs/constants.d.ts +3 -3
- package/dist/types/components/gov-toast/constants.d.ts +2 -2
- package/dist/types/components/gov-tooltip/constants.d.ts +3 -3
- package/dist/types/components/gov-wizzard/constants.d.ts +2 -2
- package/dist/types/components.d.ts +50 -0
- package/dist/types/stencil-public-runtime.d.ts +88 -17
- package/dist/types/types/interfaces.d.ts +2 -2
- package/dist/types/utils/utils.d.ts +1 -1
- package/loader/index.d.ts +10 -1
- package/package.json +26 -21
- package/dist/cjs/index-7ba43a19.js.map +0 -1
- package/dist/components/Fragment.js +0 -5
- package/dist/components/Fragment.js.map +0 -1
- package/dist/components/constants.js +0 -25
- package/dist/components/constants.js.map +0 -1
- package/dist/components/constants10.js +0 -19
- package/dist/components/constants10.js.map +0 -1
- package/dist/components/constants11.js +0 -22
- package/dist/components/constants11.js.map +0 -1
- package/dist/components/constants12.js +0 -25
- package/dist/components/constants12.js.map +0 -1
- package/dist/components/constants13.js +0 -29
- package/dist/components/constants14.js +0 -23
- package/dist/components/constants14.js.map +0 -1
- package/dist/components/constants15.js +0 -24
- package/dist/components/constants15.js.map +0 -1
- package/dist/components/constants2.js +0 -15
- package/dist/components/constants2.js.map +0 -1
- package/dist/components/constants3.js +0 -33
- package/dist/components/constants3.js.map +0 -1
- package/dist/components/constants4.js +0 -12
- package/dist/components/constants4.js.map +0 -1
- package/dist/components/constants5.js +0 -13
- package/dist/components/constants5.js.map +0 -1
- package/dist/components/constants6.js +0 -10
- package/dist/components/constants6.js.map +0 -1
- package/dist/components/constants7.js +0 -22
- package/dist/components/constants7.js.map +0 -1
- package/dist/components/constants8.js +0 -18
- package/dist/components/constants8.js.map +0 -1
- package/dist/components/constants9.js +0 -12
- package/dist/components/constants9.js.map +0 -1
- package/dist/components/form.js +0 -152
- package/dist/components/form.js.map +0 -1
- package/dist/components/gov-attachments-item2.js +0 -70
- package/dist/components/gov-attachments-item2.js.map +0 -1
- package/dist/components/gov-attachments2.js +0 -57
- package/dist/components/gov-attachments2.js.map +0 -1
- package/dist/components/gov-backdrop2.js +0 -64
- package/dist/components/gov-backdrop2.js.map +0 -1
- package/dist/components/gov-badge2.js +0 -108
- package/dist/components/gov-badge2.js.map +0 -1
- package/dist/components/gov-button2.js +0 -223
- package/dist/components/gov-button2.js.map +0 -1
- package/dist/components/gov-form-autocomplete2.js +0 -294
- package/dist/components/gov-form-autocomplete2.js.map +0 -1
- package/dist/components/gov-form-input2.js +0 -235
- package/dist/components/gov-form-input2.js.map +0 -1
- package/dist/components/gov-form-message2.js +0 -58
- package/dist/components/gov-form-message2.js.map +0 -1
- package/dist/components/gov-form-select2.js +0 -186
- package/dist/components/gov-icon2.js +0 -142
- package/dist/components/gov-icon2.js.map +0 -1
- package/dist/components/gov.log.js +0 -17
- package/dist/components/gov.log.js.map +0 -1
- package/dist/components/props.js +0 -14
- package/dist/components/props.js.map +0 -1
- package/dist/components/sizes.js +0 -18
- package/dist/components/sizes.js.map +0 -1
- package/dist/components/string.utils.js +0 -20
- package/dist/components/string.utils.js.map +0 -1
- package/dist/components/template.js +0 -113
- package/dist/components/template.js.map +0 -1
- package/dist/components/utils.js +0 -35
- package/dist/components/utils.js.map +0 -1
- package/dist/components/variants.js +0 -18
- package/dist/components/variants.js.map +0 -1
- package/dist/components/wcag.js +0 -62
- package/dist/components/wcag.js.map +0 -1
- package/dist/components/win.js +0 -23
- package/dist/components/win.js.map +0 -1
- package/dist/core/critical.css +0 -1
- package/dist/core/p-00e21d46.entry.js.map +0 -1
- package/dist/core/p-024fa230.entry.js.map +0 -1
- package/dist/core/p-034c5c8f.entry.js.map +0 -1
- package/dist/core/p-0b9eed8b.entry.js.map +0 -1
- package/dist/core/p-174d3df0.entry.js.map +0 -1
- package/dist/core/p-1a4cb97e.entry.js.map +0 -1
- package/dist/core/p-1bfe6f33.entry.js.map +0 -1
- package/dist/core/p-1c20657a.entry.js.map +0 -1
- package/dist/core/p-1d20b5af.entry.js +0 -2
- package/dist/core/p-1d20b5af.entry.js.map +0 -1
- package/dist/core/p-1e1bd302.entry.js.map +0 -1
- package/dist/core/p-1ea41454.entry.js +0 -2
- package/dist/core/p-1ea41454.entry.js.map +0 -1
- package/dist/core/p-1f883c31.entry.js.map +0 -1
- package/dist/core/p-21375e02.entry.js.map +0 -1
- package/dist/core/p-24ba5c7b.entry.js.map +0 -1
- package/dist/core/p-2713b83e.entry.js.map +0 -1
- package/dist/core/p-2b0af68c.entry.js.map +0 -1
- package/dist/core/p-2c0e96dd.entry.js +0 -2
- package/dist/core/p-2c0e96dd.entry.js.map +0 -1
- package/dist/core/p-2c821d36.entry.js.map +0 -1
- package/dist/core/p-32c8b7a4.entry.js.map +0 -1
- package/dist/core/p-34508063.entry.js.map +0 -1
- package/dist/core/p-37599a2d.entry.js.map +0 -1
- package/dist/core/p-397b0e73.entry.js +0 -2
- package/dist/core/p-397b0e73.entry.js.map +0 -1
- package/dist/core/p-3b6d6f6f.entry.js.map +0 -1
- package/dist/core/p-40df0e89.entry.js.map +0 -1
- package/dist/core/p-424fdf22.entry.js.map +0 -1
- package/dist/core/p-439340f9.entry.js.map +0 -1
- package/dist/core/p-4b8bf83d.entry.js.map +0 -1
- package/dist/core/p-51582b94.entry.js.map +0 -1
- package/dist/core/p-52373a5b.entry.js.map +0 -1
- package/dist/core/p-5f23b01d.entry.js.map +0 -1
- package/dist/core/p-6e6a44f0.entry.js.map +0 -1
- package/dist/core/p-7d7dab2e.entry.js.map +0 -1
- package/dist/core/p-818bb0f5.entry.js.map +0 -1
- package/dist/core/p-82af6719.entry.js.map +0 -1
- package/dist/core/p-8694e397.entry.js.map +0 -1
- package/dist/core/p-88c10472.entry.js.map +0 -1
- package/dist/core/p-8ee11310.entry.js.map +0 -1
- package/dist/core/p-902ff1a5.entry.js.map +0 -1
- package/dist/core/p-9a1d5c77.entry.js.map +0 -1
- package/dist/core/p-a008979f.entry.js.map +0 -1
- package/dist/core/p-b1ca32cc.entry.js.map +0 -1
- package/dist/core/p-b2c6a185.entry.js.map +0 -1
- package/dist/core/p-b547d31a.entry.js.map +0 -1
- package/dist/core/p-b9bfca0a.entry.js.map +0 -1
- package/dist/core/p-c0c9b349.entry.js.map +0 -1
- package/dist/core/p-c134863d.entry.js.map +0 -1
- package/dist/core/p-c862ac0d.entry.js.map +0 -1
- package/dist/core/p-cbfe47ee.entry.js.map +0 -1
- package/dist/core/p-d9747cca.entry.js.map +0 -1
- package/dist/core/p-dae9dc31.entry.js.map +0 -1
- package/dist/core/p-dbd6c9b5.entry.js.map +0 -1
- package/dist/core/p-dd6d9f6d.js +0 -3
- package/dist/core/p-dd6d9f6d.js.map +0 -1
- package/dist/core/p-ddffa85e.entry.js.map +0 -1
- package/dist/core/p-dfe0cb6d.entry.js.map +0 -1
- package/dist/core/p-e866befd.entry.js +0 -2
- package/dist/core/p-e866befd.entry.js.map +0 -1
- package/dist/core/p-ec8e7f8f.entry.js.map +0 -1
- package/dist/core/p-f2d22b62.entry.js.map +0 -1
- package/dist/core/p-fd62778e.entry.js.map +0 -1
- package/dist/custom-elements/index.d.ts +0 -399
- package/dist/custom-elements/index.js +0 -2
- package/dist/custom-elements/index.js.map +0 -1
- package/dist/esm/index-12c94daf.js.map +0 -1
- package/dist/esm/polyfills/css-shim.js +0 -1
|
@@ -1,50 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { g as govHost, p as prepareClasses } from './template.js';
|
|
3
|
-
|
|
4
|
-
const TilesClass = {
|
|
5
|
-
root: 'gov-tiles',
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const govTilesCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tiles{overflow:hidden}.gov-tiles>*{margin:0 -0.0625rem -0.0625rem 0;border:0.0625rem solid var(--gov-tiles-border-color, var(--gov-color-secondary-500));border-width:0 0 0.0625rem}.gov-tiles>*:last-child{border-bottom-width:0}.gov-tiles[no-border]>*{border:none}@media (min-width: 48em){.gov-tiles{display:grid}.gov-tiles--x2{grid-template-columns:repeat(2, 1fr)}.gov-tiles--x2>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x2>*:nth-child(-n+3){border-top-width:0}.gov-tiles--x2>*:nth-child(2n+2){border-right-width:0}}@media (min-width: 48em) and (max-width: 63.99em){.gov-tiles--x3,.gov-tiles--x4{grid-template-columns:repeat(2, 1fr)}.gov-tiles--x3>*,.gov-tiles--x4>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x3>*:nth-child(-n+3),.gov-tiles--x4>*:nth-child(-n+3){border-top-width:0}.gov-tiles--x3>*:nth-child(2n+2),.gov-tiles--x4>*:nth-child(2n+2){border-right-width:0}}@media (min-width: 64em){.gov-tiles--x3{grid-template-columns:repeat(3, 1fr)}.gov-tiles--x3>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x3>*:nth-child(-n+4){border-top-width:0}.gov-tiles--x3>*:nth-child(3n+3){border-right-width:0}}@media (min-width: 64em) and (max-width: 74.99em){.gov-tiles--x4{grid-template-columns:repeat(3, 1fr)}.gov-tiles--x4>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x4>*:nth-child(-n+4){border-top-width:0}.gov-tiles--x4>*:nth-child(3n+3){border-right-width:0}}@media (min-width: 75em){.gov-tiles--x4{grid-template-columns:repeat(4, 1fr)}.gov-tiles--x4>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x4>*:nth-child(-n+5){border-top-width:0}.gov-tiles--x4>*:nth-child(4n+4){border-right-width:0}}";
|
|
9
|
-
|
|
10
|
-
const GovTiles$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
this.__registerHost();
|
|
14
|
-
this.columns = 3;
|
|
15
|
-
this.noBorder = false;
|
|
16
|
-
this.h = govHost(this.host);
|
|
17
|
-
}
|
|
18
|
-
get classNames() {
|
|
19
|
-
return prepareClasses([TilesClass.root, this.columns && TilesClass.root + '--x' + this.columns]);
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
return (h(Host, { class: this.h.classes(this.classNames) }, h("slot", null)));
|
|
23
|
-
}
|
|
24
|
-
get host() { return this; }
|
|
25
|
-
static get style() { return govTilesCss; }
|
|
26
|
-
}, [4, "gov-tiles", {
|
|
27
|
-
"columns": [2],
|
|
28
|
-
"noBorder": [4, "no-border"]
|
|
29
|
-
}]);
|
|
30
|
-
function defineCustomElement$1() {
|
|
31
|
-
if (typeof customElements === "undefined") {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const components = ["gov-tiles"];
|
|
35
|
-
components.forEach(tagName => { switch (tagName) {
|
|
36
|
-
case "gov-tiles":
|
|
37
|
-
if (!customElements.get(tagName)) {
|
|
38
|
-
customElements.define(tagName, GovTiles$1);
|
|
39
|
-
}
|
|
40
|
-
break;
|
|
41
|
-
} });
|
|
42
|
-
}
|
|
43
|
-
defineCustomElement$1();
|
|
44
|
-
|
|
45
|
-
const GovTiles = GovTiles$1;
|
|
46
|
-
const defineCustomElement = defineCustomElement$1;
|
|
47
|
-
|
|
48
|
-
export { GovTiles, defineCustomElement };
|
|
49
|
-
|
|
1
|
+
import{p as e,H as t,h as i,d as r}from"./p-80c0109d.js";import{g as o,p as s}from"./p-3f37ddb6.js";const d={root:"gov-tiles"};const n=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tiles{overflow:hidden}.gov-tiles>*{margin:0 -0.0625rem -0.0625rem 0;border:0.0625rem solid var(--gov-tiles-border-color, var(--gov-color-secondary-500));border-width:0 0 0.0625rem}.gov-tiles>*:last-child{border-bottom-width:0}.gov-tiles[no-border]>*{border:none}@media (min-width: 48em){.gov-tiles{display:grid}.gov-tiles--x2{grid-template-columns:repeat(2, 1fr)}.gov-tiles--x2>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x2>*:nth-child(-n+3){border-top-width:0}.gov-tiles--x2>*:nth-child(2n+2){border-right-width:0}}@media (min-width: 48em) and (max-width: 63.99em){.gov-tiles--x3,.gov-tiles--x4{grid-template-columns:repeat(2, 1fr)}.gov-tiles--x3>*,.gov-tiles--x4>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x3>*:nth-child(-n+3),.gov-tiles--x4>*:nth-child(-n+3){border-top-width:0}.gov-tiles--x3>*:nth-child(2n+2),.gov-tiles--x4>*:nth-child(2n+2){border-right-width:0}}@media (min-width: 64em){.gov-tiles--x3{grid-template-columns:repeat(3, 1fr)}.gov-tiles--x3>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x3>*:nth-child(-n+4){border-top-width:0}.gov-tiles--x3>*:nth-child(3n+3){border-right-width:0}}@media (min-width: 64em) and (max-width: 74.99em){.gov-tiles--x4{grid-template-columns:repeat(3, 1fr)}.gov-tiles--x4>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x4>*:nth-child(-n+4){border-top-width:0}.gov-tiles--x4>*:nth-child(3n+3){border-right-width:0}}@media (min-width: 75em){.gov-tiles--x4{grid-template-columns:repeat(4, 1fr)}.gov-tiles--x4>*{border-width:0.0625rem 0.0625rem 0.0625rem 0}.gov-tiles--x4>*:nth-child(-n+5){border-top-width:0}.gov-tiles--x4>*:nth-child(4n+4){border-right-width:0}}";const l=e(class e extends t{constructor(){super();this.__registerHost();this.columns=3;this.noBorder=false;this.h=o(this.host)}get classNames(){return s([d.root,this.columns&&d.root+"--x"+this.columns])}render(){return i(r,{class:this.h.classes(this.classNames)},i("slot",null))}get host(){return this}static get style(){return n}},[4,"gov-tiles",{columns:[2],noBorder:[4,"no-border"]}]);function m(){if(typeof customElements==="undefined"){return}const e=["gov-tiles"];e.forEach((e=>{switch(e){case"gov-tiles":if(!customElements.get(e)){customElements.define(e,l)}break}}))}m();const h=l;const a=m;export{h as GovTiles,a as defineCustomElement};
|
|
50
2
|
//# sourceMappingURL=gov-tiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"version":3,"names":["TilesClass","root","govTilesCss","GovTiles","proxyCustomElement","H","constructor","this","h","govHost","host","classNames","prepareClasses","columns","render","Host","class","classes"],"sources":["../../../packages/core/src/components/gov-tile/container/constants.ts","../../../packages/core/src/components/gov-tile/container/gov-tiles.scss?tag=gov-tiles","../../../packages/core/src/components/gov-tile/container/gov-tiles.tsx"],"sourcesContent":["export const TilesClass = {\n\troot: 'gov-tiles',\n}\n","/*\n * Tiles\n */\n\n$class: \".gov-tiles\";\n$line-width: rem-calc(1);\n\n@mixin grid-lines($i) {\n\tgrid-template-columns: repeat(#{$i}, 1fr);\n\t& > * {\n\t\tborder-width: $line-width $line-width $line-width 0;\n\t\t&:nth-child(-n + #{$i + 1}) {\n\t\t\tborder-top-width: 0;\n\t\t}\n\t\t&:nth-child(#{$i}n + #{$i}) {\n\t\t\tborder-right-width: 0;\n\t\t}\n\t}\n}\n\n#{$class} {\n\toverflow: hidden;\n\t& > * {\n\t\tmargin: 0 calc($line-width * -1) calc($line-width * -1) 0;\n\t\tborder: $line-width solid $tiles-border-color;\n\t\tborder-width: 0 0 $line-width;\n\t\t&:last-child {\n\t\t\tborder-bottom-width: 0;\n\t\t}\n\t}\n\t&[no-border] {\n\t\t& > * {\n\t\t\tborder: none;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@include mq($from: md) {\n\t\tdisplay: grid;\n\t\t&--x2 {\n\t\t\t@include grid-lines(2);\n\t\t}\n\t\t@include mq($until: lg) {\n\t\t\t&--x3,\n\t\t\t&--x4 {\n\t\t\t\t@include grid-lines(2);\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: lg) {\n\t\t&--x3 {\n\t\t\t@include grid-lines(3);\n\t\t}\n\t\t@include mq($until: xl) {\n\t\t\t&--x4 {\n\t\t\t\t@include grid-lines(3);\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: xl) {\n\t\t&--x4 {\n\t\t\t@include grid-lines(4);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { TilesClass } from './constants'\nimport { prepareClasses } from '../../../helpers/Dom/template'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tiles',\n\tstyleUrl: 'gov-tiles.scss',\n})\nexport class GovTiles {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t/**\n\t * Number of columns between 1-4\n\t */\n\t@Prop() readonly columns: number = 3\n\t/**\n\t * Tiles border\n\t */\n\t@Prop({ attribute: 'no-border' }) readonly noBorder: boolean = false\n\n\t@Element() host: HTMLGovTilesElement\n\n\tget classNames(): string {\n\t\treturn prepareClasses([TilesClass.root, this.columns && TilesClass.root + '--x' + this.columns])\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(this.classNames)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"oGAAO,MAAMA,EAAa,CACzBC,KAAM,aCDP,MAAMC,EAAc,89D,MCUPC,EAAQC,EAAA,MAAAD,UAAAE,EAGpB,WAAAC,G,2CAMmC,E,cAI4B,MAT9DC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAavB,cAAIC,GACH,OAAOC,EAAe,CAACZ,EAAWC,KAAMM,KAAKM,SAAWb,EAAWC,KAAO,MAAQM,KAAKM,S,CAGxF,MAAAC,GACC,OACCN,EAACO,EAAI,CAACC,MAAOT,KAAKC,EAAES,QAAQV,KAAKI,aAChCH,EAAA,a"}
|
|
@@ -1,137 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as validateProp } from './props.js';
|
|
3
|
-
import { V as Variants, T as Types } from './variants.js';
|
|
4
|
-
import { p as pick } from './utils.js';
|
|
5
|
-
import { g as govHost } from './template.js';
|
|
6
|
-
import { c as createID } from './string.utils.js';
|
|
7
|
-
import { d as defineCustomElement$3 } from './gov-button2.js';
|
|
8
|
-
import { d as defineCustomElement$2 } from './gov-icon2.js';
|
|
9
|
-
|
|
10
|
-
const ToastVariants = pick(Variants, ['SUCCESS', 'WARNING', 'ERROR', 'SECONDARY', 'PRIMARY']);
|
|
11
|
-
pick(Types, ['CLASSIC', 'SOLID']);
|
|
12
|
-
const ToastClass = {
|
|
13
|
-
root: 'gov-toast',
|
|
14
|
-
hidden: 'gov-toast--hidden',
|
|
15
|
-
icon: 'gov-toast__icon',
|
|
16
|
-
content: 'gov-toast__content',
|
|
17
|
-
close: 'gov-toast__close',
|
|
18
|
-
timer: 'gov-toast__timer',
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const govToastCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-toast{position:relative;display:flex;gap:1rem;flex-direction:column;padding:0.75rem 1rem;border-left:0.25rem solid transparent;background:var(--gov-toast-message-bg, var(--gov-color-neutral-white));z-index:201;position:relative;position:fixed;max-width:23.4375rem;padding-right:3.125rem;opacity:1;transition:opacity 300ms ease-in-out}.gov-toast__icon{flex:0 0 1.25rem;width:1.25rem;height:1.25rem}.gov-toast__content{flex:1 1 auto}.gov-toast__content>*:last-child{margin-bottom:0}.gov-toast__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}@media (min-width: 30em){.gov-toast{flex-direction:row}}.gov-toast__content{padding-right:0}.gov-toast__close{position:absolute;top:0.5rem;right:0.75rem}.gov-toast__timer{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.gov-toast--hidden{opacity:0}.gov-toast[gravity=top i]{top:1rem}.gov-toast[gravity=bottom i]{bottom:1rem}.gov-toast[position=left i]{left:1rem}.gov-toast[position=center i]{left:50%;transform:translateX(-50%)}.gov-toast[position=right i]{right:1rem}.gov-toast[type=solid i]{border:none;border-radius:0.25rem;overflow:hidden;box-shadow:none}.gov-toast[type=solid i].is-initialized .gov-toast__timer{transform-origin:left;animation:countdown linear forwards var(--toast-duration, 0)}.gov-toast[variant=warning]{border-left-color:var(--gov-toast-warning-codecor-lor, var(--gov-color-warning))}.gov-toast[variant=warning] .gov-toast__icon{color:var(--gov-toast-warning-codecor-lor, var(--gov-color-warning))}.gov-toast[variant=warning][type=solid i]{background-color:var(--gov-toast-warning-background, var(--gov-color-warning));color:var(--gov-toast-warning-color, var(--gov-color-secondary))}.gov-toast[variant=warning][type=solid i] .gov-toast__icon{color:var(--gov-toast-warning-color, var(--gov-color-secondary))}.gov-toast[variant=warning][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-warning-timer-background, rgba(var(--gov-color-warning-500-rgb), 0.3))}.gov-toast[variant=error]{border-left-color:var(--gov-toast-error-colodecor-r, var(--gov-color-error))}.gov-toast[variant=error] .gov-toast__icon{color:var(--gov-toast-error-colodecor-r, var(--gov-color-error))}.gov-toast[variant=error][type=solid i]{background-color:var(--gov-toast-error-background, var(--gov-color-error));color:var(--gov-toast-error-color, var(--gov-color-neutral-white))}.gov-toast[variant=error][type=solid i] .gov-toast__icon{color:var(--gov-toast-error-color, var(--gov-color-neutral-white))}.gov-toast[variant=error][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-error-timer-background, rgba(var(--gov-color-error-500-rgb), 0.5))}.gov-toast[variant=success]{border-left-color:var(--gov-toast-success-codecor-lor, var(--gov-color-success))}.gov-toast[variant=success] .gov-toast__icon{color:var(--gov-toast-success-codecor-lor, var(--gov-color-success))}.gov-toast[variant=success][type=solid i]{background-color:var(--gov-toast-success-background, var(--gov-color-success-500));color:var(--gov-toast-success-color, var(--gov-color-neutral-white))}.gov-toast[variant=success][type=solid i] .gov-toast__icon{color:var(--gov-toast-success-color, var(--gov-color-neutral-white))}.gov-toast[variant=success][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-success-timer-background, rgba(var(--gov-color-success-600-rgb), 0.5))}.gov-toast[variant=primary]{border-left-color:var(--gov-toast-primary-codecor-lor, var(--gov-color-primary))}.gov-toast[variant=primary] .gov-toast__icon{color:var(--gov-toast-primary-codecor-lor, var(--gov-color-primary))}.gov-toast[variant=primary][type=solid i]{background-color:var(--gov-toast-primary-background, var(--gov-color-primary));color:var(--gov-toast-primary-color, var(--gov-color-neutral-white))}.gov-toast[variant=primary][type=solid i] .gov-toast__icon{color:var(--gov-toast-primary-color, var(--gov-color-neutral-white))}.gov-toast[variant=primary][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-primary-timer-background, rgba(var(--gov-color-primary-700-rgb), 0.5))}.gov-toast[variant=secondary]{border-left-color:var(--gov-toast-secondary-decor-color, var(--gov-color-secondary))}.gov-toast[variant=secondary] .gov-toast__icon{color:var(--gov-toast-secondary-decor-color, var(--gov-color-secondary))}.gov-toast[variant=secondary][type=solid i]{background-color:var(--gov-toast-secondary-background, var(--gov-color-secondary));color:var(--gov-toast-secondary-color, var(--gov-color-neutral-white))}.gov-toast[variant=secondary][type=solid i] .gov-toast__icon{color:var(--gov-toast-secondary-color, var(--gov-color-neutral-white))}.gov-toast[variant=secondary][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-secondary-timer-background, rgba(var(--gov-color-secondary-900-rgb), 0.5))}@media (min-width: 30em){.gov-toast__content{padding-right:2rem}}";
|
|
22
|
-
|
|
23
|
-
const GovToast$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
this.__registerHost();
|
|
27
|
-
this.govClose = createEvent(this, "gov-close", 7);
|
|
28
|
-
this.variant = 'primary';
|
|
29
|
-
this.gravity = 'top';
|
|
30
|
-
this.position = 'right';
|
|
31
|
-
this.type = 'classic';
|
|
32
|
-
this.time = 0;
|
|
33
|
-
this.closeLabel = undefined;
|
|
34
|
-
this.wcagCloseLabel = undefined;
|
|
35
|
-
this.h = govHost(this.host);
|
|
36
|
-
this.toastId = createID('GovToast');
|
|
37
|
-
}
|
|
38
|
-
validateVariant(newValue) {
|
|
39
|
-
validateProp(ToastVariants, newValue, ToastClass.root);
|
|
40
|
-
}
|
|
41
|
-
componentWillLoad() {
|
|
42
|
-
this.validateVariant(this.variant);
|
|
43
|
-
this.runTimer();
|
|
44
|
-
}
|
|
45
|
-
componentDidLoad() {
|
|
46
|
-
const existedToasts = document.querySelectorAll(`gov-toast[gravity="${this.gravity}"][position="${this.position}"]:not([data-toast-id="${this.toastId}"])`);
|
|
47
|
-
if (existedToasts.length > 0) {
|
|
48
|
-
Array.from(existedToasts).map((toast) => toast.destroy().then());
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
disconnectedCallback() {
|
|
52
|
-
clearTimeout(this.timeout);
|
|
53
|
-
}
|
|
54
|
-
runTimer() {
|
|
55
|
-
if (this.isSolid) {
|
|
56
|
-
this.host.classList.add('is-initialized');
|
|
57
|
-
}
|
|
58
|
-
if (this.isTimer) {
|
|
59
|
-
this.timeout = setTimeout(() => {
|
|
60
|
-
this.host.classList.add(ToastClass.hidden);
|
|
61
|
-
setTimeout(this.destroy.bind(this), 600);
|
|
62
|
-
}, this.time);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
render() {
|
|
66
|
-
return (h(Host, { class: this.h.classes([ToastClass.root, 'gov-box-shadow--m']), "data-toast-id": this.toastId, gravity: this.gravity, position: this.position, variant: this.variant, type: this.type, style: { '--toast-duration': this.time + 'ms' } }, this.h.hasSlot('icon') && (h("span", { class: ToastClass.icon }, h("slot", { name: "icon" }))), h("div", { class: ToastClass.content, "aria-live": "polite", role: "status" }, h("slot", null)), h("div", { class: ToastClass.close }, h("gov-button", { size: "s", "wcag-label": this.wcagCloseLabel, variant: this.isSolid ? this.variant : 'secondary', inverse: this.isSolid, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, this.closeLabel ? this.closeLabel : h("gov-icon", { name: "x-lg" }))), h("div", { class: ToastClass.timer })));
|
|
67
|
-
}
|
|
68
|
-
onCloseHandler() {
|
|
69
|
-
this.destroy()
|
|
70
|
-
.then(() => this.govClose.emit(this.toastId))
|
|
71
|
-
.catch();
|
|
72
|
-
}
|
|
73
|
-
get isSolid() {
|
|
74
|
-
return this.type === 'solid';
|
|
75
|
-
}
|
|
76
|
-
get isTimer() {
|
|
77
|
-
return Number.isInteger(this.time) && this.time > 0;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Remove toast from dom
|
|
81
|
-
*/
|
|
82
|
-
async destroy() {
|
|
83
|
-
clearTimeout(this.timeout);
|
|
84
|
-
const toast = document.querySelector(`[data-toast-id="${this.toastId}"]`);
|
|
85
|
-
if (toast) {
|
|
86
|
-
toast.classList.add(ToastClass.hidden);
|
|
87
|
-
if (typeof toast.remove === 'function') {
|
|
88
|
-
toast.remove();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
get host() { return this; }
|
|
93
|
-
static get watchers() { return {
|
|
94
|
-
"variant": ["validateVariant"]
|
|
95
|
-
}; }
|
|
96
|
-
static get style() { return govToastCss; }
|
|
97
|
-
}, [4, "gov-toast", {
|
|
98
|
-
"variant": [1],
|
|
99
|
-
"gravity": [1],
|
|
100
|
-
"position": [1],
|
|
101
|
-
"type": [1],
|
|
102
|
-
"time": [2],
|
|
103
|
-
"closeLabel": [1, "close-label"],
|
|
104
|
-
"wcagCloseLabel": [1, "wcag-close-label"],
|
|
105
|
-
"destroy": [64]
|
|
106
|
-
}]);
|
|
107
|
-
function defineCustomElement$1() {
|
|
108
|
-
if (typeof customElements === "undefined") {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const components = ["gov-toast", "gov-button", "gov-icon"];
|
|
112
|
-
components.forEach(tagName => { switch (tagName) {
|
|
113
|
-
case "gov-toast":
|
|
114
|
-
if (!customElements.get(tagName)) {
|
|
115
|
-
customElements.define(tagName, GovToast$1);
|
|
116
|
-
}
|
|
117
|
-
break;
|
|
118
|
-
case "gov-button":
|
|
119
|
-
if (!customElements.get(tagName)) {
|
|
120
|
-
defineCustomElement$3();
|
|
121
|
-
}
|
|
122
|
-
break;
|
|
123
|
-
case "gov-icon":
|
|
124
|
-
if (!customElements.get(tagName)) {
|
|
125
|
-
defineCustomElement$2();
|
|
126
|
-
}
|
|
127
|
-
break;
|
|
128
|
-
} });
|
|
129
|
-
}
|
|
130
|
-
defineCustomElement$1();
|
|
131
|
-
|
|
132
|
-
const GovToast = GovToast$1;
|
|
133
|
-
const defineCustomElement = defineCustomElement$1;
|
|
134
|
-
|
|
135
|
-
export { GovToast, defineCustomElement };
|
|
136
|
-
|
|
1
|
+
import{p as o,H as t,c as r,h as a,d as s}from"./p-80c0109d.js";import{v as i}from"./p-26acf964.js";import{V as e,T as n}from"./p-ff7365ae.js";import{p as c}from"./p-03990da5.js";import{g as v}from"./p-3f37ddb6.js";import{c as g}from"./p-24636c53.js";import{d as l}from"./p-1026d931.js";import{d}from"./p-9da782bf.js";const m=c(e,["SUCCESS","WARNING","ERROR","SECONDARY","PRIMARY"]);c(n,["CLASSIC","SOLID"]);const p={root:"gov-toast",hidden:"gov-toast--hidden",icon:"gov-toast__icon",content:"gov-toast__content",close:"gov-toast__close",timer:"gov-toast__timer"};const h=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-toast{position:relative;display:flex;gap:1rem;flex-direction:column;padding:0.75rem 1rem;border-left:0.25rem solid transparent;background:var(--gov-toast-message-bg, var(--gov-color-neutral-white));z-index:201;position:relative;position:fixed;max-width:23.4375rem;padding-right:3.125rem;opacity:1;transition:opacity 300ms ease-in-out}.gov-toast__icon{flex:0 0 1.25rem;width:1.25rem;height:1.25rem}.gov-toast__content{flex:1 1 auto}.gov-toast__content>*:last-child{margin-bottom:0}.gov-toast__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}@media (min-width: 30em){.gov-toast{flex-direction:row}}.gov-toast__content{padding-right:0}.gov-toast__close{position:absolute;top:0.5rem;right:0.75rem}.gov-toast__timer{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.gov-toast--hidden{opacity:0}.gov-toast[gravity=top i]{top:1rem}.gov-toast[gravity=bottom i]{bottom:1rem}.gov-toast[position=left i]{left:1rem}.gov-toast[position=center i]{left:50%;transform:translateX(-50%)}.gov-toast[position=right i]{right:1rem}.gov-toast[type=solid i]{border:none;border-radius:0.25rem;overflow:hidden;box-shadow:none}.gov-toast[type=solid i].is-initialized .gov-toast__timer{transform-origin:left;animation:countdown linear forwards var(--toast-duration, 0)}.gov-toast[variant=warning]{border-left-color:var(--gov-toast-warning-codecor-lor, var(--gov-color-warning))}.gov-toast[variant=warning] .gov-toast__icon{color:var(--gov-toast-warning-codecor-lor, var(--gov-color-warning))}.gov-toast[variant=warning][type=solid i]{background-color:var(--gov-toast-warning-background, var(--gov-color-warning));color:var(--gov-toast-warning-color, var(--gov-color-secondary))}.gov-toast[variant=warning][type=solid i] .gov-toast__icon{color:var(--gov-toast-warning-color, var(--gov-color-secondary))}.gov-toast[variant=warning][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-warning-timer-background, rgba(var(--gov-color-warning-500-rgb), 0.3))}.gov-toast[variant=error]{border-left-color:var(--gov-toast-error-colodecor-r, var(--gov-color-error))}.gov-toast[variant=error] .gov-toast__icon{color:var(--gov-toast-error-colodecor-r, var(--gov-color-error))}.gov-toast[variant=error][type=solid i]{background-color:var(--gov-toast-error-background, var(--gov-color-error));color:var(--gov-toast-error-color, var(--gov-color-neutral-white))}.gov-toast[variant=error][type=solid i] .gov-toast__icon{color:var(--gov-toast-error-color, var(--gov-color-neutral-white))}.gov-toast[variant=error][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-error-timer-background, rgba(var(--gov-color-error-500-rgb), 0.5))}.gov-toast[variant=success]{border-left-color:var(--gov-toast-success-codecor-lor, var(--gov-color-success))}.gov-toast[variant=success] .gov-toast__icon{color:var(--gov-toast-success-codecor-lor, var(--gov-color-success))}.gov-toast[variant=success][type=solid i]{background-color:var(--gov-toast-success-background, var(--gov-color-success-500));color:var(--gov-toast-success-color, var(--gov-color-neutral-white))}.gov-toast[variant=success][type=solid i] .gov-toast__icon{color:var(--gov-toast-success-color, var(--gov-color-neutral-white))}.gov-toast[variant=success][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-success-timer-background, rgba(var(--gov-color-success-600-rgb), 0.5))}.gov-toast[variant=primary]{border-left-color:var(--gov-toast-primary-codecor-lor, var(--gov-color-primary))}.gov-toast[variant=primary] .gov-toast__icon{color:var(--gov-toast-primary-codecor-lor, var(--gov-color-primary))}.gov-toast[variant=primary][type=solid i]{background-color:var(--gov-toast-primary-background, var(--gov-color-primary));color:var(--gov-toast-primary-color, var(--gov-color-neutral-white))}.gov-toast[variant=primary][type=solid i] .gov-toast__icon{color:var(--gov-toast-primary-color, var(--gov-color-neutral-white))}.gov-toast[variant=primary][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-primary-timer-background, rgba(var(--gov-color-primary-700-rgb), 0.5))}.gov-toast[variant=secondary]{border-left-color:var(--gov-toast-secondary-decor-color, var(--gov-color-secondary))}.gov-toast[variant=secondary] .gov-toast__icon{color:var(--gov-toast-secondary-decor-color, var(--gov-color-secondary))}.gov-toast[variant=secondary][type=solid i]{background-color:var(--gov-toast-secondary-background, var(--gov-color-secondary));color:var(--gov-toast-secondary-color, var(--gov-color-neutral-white))}.gov-toast[variant=secondary][type=solid i] .gov-toast__icon{color:var(--gov-toast-secondary-color, var(--gov-color-neutral-white))}.gov-toast[variant=secondary][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-secondary-timer-background, rgba(var(--gov-color-secondary-900-rgb), 0.5))}@media (min-width: 30em){.gov-toast__content{padding-right:2rem}}";const u=o(class o extends t{constructor(){super();this.__registerHost();this.govClose=r(this,"gov-close",7);this.variant="primary";this.gravity="top";this.position="right";this.type="classic";this.time=0;this.closeLabel=undefined;this.wcagCloseLabel=undefined;this.h=v(this.host);this.toastId=g("GovToast")}validateVariant(o){i(m,o,p.root)}componentWillLoad(){this.validateVariant(this.variant);this.runTimer()}componentDidLoad(){const o=document.querySelectorAll(`gov-toast[gravity="${this.gravity}"][position="${this.position}"]:not([data-toast-id="${this.toastId}"])`);if(o.length>0){Array.from(o).map((o=>o.destroy().then()))}}disconnectedCallback(){clearTimeout(this.timeout)}runTimer(){if(this.isSolid){this.host.classList.add("is-initialized")}if(this.isTimer){this.timeout=setTimeout((()=>{this.host.classList.add(p.hidden);setTimeout(this.destroy.bind(this),600)}),this.time)}}render(){return a(s,{class:this.h.classes([p.root,"gov-box-shadow--m"]),"data-toast-id":this.toastId,gravity:this.gravity,position:this.position,variant:this.variant,type:this.type,style:{"--toast-duration":this.time+"ms"}},this.h.hasSlot("icon")&&a("span",{class:p.icon},a("slot",{name:"icon"})),a("div",{class:p.content,"aria-live":"polite",role:"status"},a("slot",null)),a("div",{class:p.close},a("gov-button",{size:"s","wcag-label":this.wcagCloseLabel,variant:this.isSolid?this.variant:"secondary",inverse:this.isSolid,type:"base","on-gov-click":this.onCloseHandler.bind(this)},this.closeLabel?this.closeLabel:a("gov-icon",{name:"x-lg"}))),a("div",{class:p.timer}))}onCloseHandler(){this.destroy().then((()=>this.govClose.emit(this.toastId))).catch()}get isSolid(){return this.type==="solid"}get isTimer(){return Number.isInteger(this.time)&&this.time>0}async destroy(){clearTimeout(this.timeout);const o=document.querySelector(`[data-toast-id="${this.toastId}"]`);if(o){o.classList.add(p.hidden);if(typeof o.remove==="function"){o.remove()}}}get host(){return this}static get watchers(){return{variant:["validateVariant"]}}static get style(){return h}},[4,"gov-toast",{variant:[1],gravity:[1],position:[1],type:[1],time:[2],closeLabel:[1,"close-label"],wcagCloseLabel:[1,"wcag-close-label"],destroy:[64]}]);function y(){if(typeof customElements==="undefined"){return}const o=["gov-toast","gov-button","gov-icon"];o.forEach((o=>{switch(o){case"gov-toast":if(!customElements.get(o)){customElements.define(o,u)}break;case"gov-button":if(!customElements.get(o)){l()}break;case"gov-icon":if(!customElements.get(o)){d()}break}}))}y();const b=u;const f=y;export{b as GovToast,f as defineCustomElement};
|
|
137
2
|
//# sourceMappingURL=gov-toast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-toast.js","mappings":";;;;;;;;;AAIO,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC,CAAA;AAG1E,IAAI,CAAC,KAAK,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,EAAC;AAGpD,MAAM,UAAU,GAAG;EACzB,IAAI,EAAE,WAAW;EACjB,MAAM,EAAE,mBAAmB;EAC3B,IAAI,EAAE,iBAAiB;EACvB,OAAO,EAAE,oBAAoB;EAC7B,KAAK,EAAE,kBAAkB;EACzB,KAAK,EAAE,kBAAkB;CACzB;;ACjBD,MAAM,WAAW,GAAG,ssKAAssK;;MCY7sKA,UAAQ;EAKpB;;;;mBAS8C,SAAS;mBAKV,KAAK;oBAIO,OAAO;gBAIvB,SAAS;gBAIlB,CAAC;;;IAzBhC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;GACnC;EAsCD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;GACtD;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAClC,IAAI,CAAC,QAAQ,EAAE,CAAA;GACf;EAED,gBAAgB;IACf,MAAM,aAAa,GAAG,QAAQ,CAAC,gBAAgB,CAAC,sBAAsB,IAAI,CAAC,OAAO,gBAAgB,IAAI,CAAC,QAAQ,0BAA0B,IAAI,CAAC,OAAO,KAAK,CAAC,CAAA;IAC3J,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;MAC7B,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,KAA0B,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;KACrF;GACD;EAED,oBAAoB;IACnB,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;GAC1B;EAEO,QAAQ;IACf,IAAI,IAAI,CAAC,OAAO,EAAE;MACjB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;KACzC;IACD,IAAI,IAAI,CAAC,OAAO,EAAE;MACjB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;QAC1C,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAA;OACxC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;KACb;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,mBAC9C,IAAI,CAAC,OAAO,EAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,IAE9C,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,YAAM,KAAK,EAAE,UAAU,CAAC,IAAI,IAC3B,YAAM,IAAI,EAAC,MAAM,GAAG,CACd,CACP,EAED,WAAK,KAAK,EAAE,UAAU,CAAC,OAAO,eAAY,QAAQ,EAAC,IAAI,EAAC,QAAQ,IAC/D,eAAQ,CACH,EAEN,WAAK,KAAK,EAAE,UAAU,CAAC,KAAK,IAC3B,kBACC,IAAI,EAAC,GAAG,gBACI,IAAI,CAAC,cAAc,EAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,WAAW,EAClD,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAC,MAAM,kBACG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAE3C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,gBAAU,IAAI,EAAC,MAAM,GAAY,CAC1D,CACR,EAEN,WAAK,KAAK,EAAE,UAAU,CAAC,KAAK,GAAQ,CAC9B,EACP;GACD;EAEO,cAAc;IACrB,IAAI,CAAC,OAAO,EAAE;OACZ,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;OAC5C,KAAK,EAAE,CAAA;GACT;EAED,IAAI,OAAO;IACV,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,CAAA;GAC5B;EAED,IAAI,OAAO;IACV,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,CAAA;GACnD;;;;EAMD,MAAM,OAAO;IACZ,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC1B,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,IAAI,CAAC,OAAO,IAAI,CAAC,CAAA;IACzE,IAAI,KAAK,EAAE;MACV,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;MACtC,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU,EAAE;QACvC,KAAK,CAAC,MAAM,EAAE,CAAA;OACd;KACD;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovToast"],"sources":["../../../packages/core/src/components/gov-toast/constants.ts","../../../packages/core/src/components/gov-toast/gov-toast.scss?tag=gov-toast","../../../packages/core/src/components/gov-toast/gov-toast.tsx"],"sourcesContent":["import { Variants, Types } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const ToastVariants = pick(Variants, ['SUCCESS', 'WARNING', 'ERROR', 'SECONDARY', 'PRIMARY'])\nexport type ToastVariantType = `${ValueOf<typeof ToastVariants>}`\n\nexport const ToastTypes = pick(Types, ['CLASSIC', 'SOLID'])\nexport type ToastTypesType = `${ValueOf<typeof ToastTypes>}`\n\nexport const ToastClass = {\n\troot: 'gov-toast',\n\thidden: 'gov-toast--hidden',\n\ticon: 'gov-toast__icon',\n\tcontent: 'gov-toast__content',\n\tclose: 'gov-toast__close',\n\ttimer: 'gov-toast__timer',\n}\n","/*\n * Alert\n */\n\n@import \"./gov-toast-message-core.scss\";\n$class: \".gov-toast\";\n\n#{$class} {\n\t@include toast-message-core;\n\t@include z-index(\"toast\", 1);\n\tposition: relative;\n\tposition: fixed;\n\tmax-width: rem-calc(375);\n\tpadding-right: rem-calc(50);\n\topacity: 1;\n\ttransition: opacity 300ms ease-in-out;\n\t&__content {\n\t\tpadding-right: 0;\n\t}\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(8);\n\t\tright: rem-calc(12);\n\t}\n\t&__timer {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tz-index: -1;\n\t}\n\n\t// VARIANTS\n\t&--hidden {\n\t\topacity: 0;\n\t}\n\t&[gravity=\"top\" i] {\n\t\ttop: rem-calc(16);\n\t}\n\t&[gravity=\"bottom\" i] {\n\t\tbottom: rem-calc(16);\n\t}\n\t&[position=\"left\" i] {\n\t\tleft: rem-calc(16);\n\t}\n\t&[position=\"center\" i] {\n\t\tleft: 50%;\n\t\ttransform: translateX(-50%);\n\t}\n\t&[position=\"right\" i] {\n\t\tright: rem-calc(16);\n\t}\n\t&[type=\"solid\" i] {\n\t\tborder: none;\n\t\tborder-radius: rem-calc(4);\n\t\toverflow: hidden;\n\t\tbox-shadow: none;\n\t\t&.is-initialized #{$class}__timer {\n\t\t\ttransform-origin: left;\n\t\t\tanimation: countdown linear forwards var(--toast-duration, 0);\n\t\t}\n\t}\n\n\t@each $variant, $definitions in $toast-message-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tborder-left-color: get(\"decor-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"decor-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[type=\"solid\" i] {\n\t\t\t\tbackground-color: get(\"background\", $definitions);\n\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t\t&__timer {\n\t\t\t\t\t\tbackground-color: get(\"timer-background\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__content {\n\t\t\tpadding-right: rem-calc(32);\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Prop, Watch, Method } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { ToastClass, ToastTypesType, ToastVariants } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ToastVariantType } from './constants'\nimport { createID } from '../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-toast',\n\tstyleUrl: 'gov-toast.scss',\n})\nexport class GovToast {\n\tprivate h: GovHost\n\tprivate timeout\n\tprivate readonly toastId: string\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 variant?: ToastVariantType = '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 = 'classic'\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: 'wcag-close-label' }) readonly wcagCloseLabel: 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('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ToastVariants, newValue, ToastClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.runTimer()\n\t}\n\n\tcomponentDidLoad() {\n\t\tconst existedToasts = document.querySelectorAll(`gov-toast[gravity=\"${this.gravity}\"][position=\"${this.position}\"]:not([data-toast-id=\"${this.toastId}\"])`)\n\t\tif (existedToasts.length > 0) {\n\t\t\tArray.from(existedToasts).map((toast: HTMLGovToastElement) => toast.destroy().then())\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tclearTimeout(this.timeout)\n\t}\n\n\tprivate runTimer() {\n\t\tif (this.isSolid) {\n\t\t\tthis.host.classList.add('is-initialized')\n\t\t}\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(this.destroy.bind(this), 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, 'gov-box-shadow--m'])}\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\tvariant={this.variant}\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} aria-live=\"polite\" role=\"status\">\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\n\t\t\t\t<div class={ToastClass.close}>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\t\tvariant={this.isSolid ? this.variant : 'secondary'}\n\t\t\t\t\t\tinverse={this.isSolid}\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.closeLabel ? this.closeLabel : <gov-icon name=\"x-lg\"></gov-icon>}\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\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.destroy()\n\t\t\t.then(() => this.govClose.emit(this.toastId))\n\t\t\t.catch()\n\t}\n\n\tget isSolid(): boolean {\n\t\treturn this.type === 'solid'\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}
|
|
1
|
+
{"version":3,"names":["ToastVariants","pick","Variants","Types","ToastClass","root","hidden","icon","content","close","timer","govToastCss","GovToast","proxyCustomElement","H","constructor","this","h","govHost","host","toastId","createID","validateVariant","newValue","validateProp","componentWillLoad","variant","runTimer","componentDidLoad","existedToasts","document","querySelectorAll","gravity","position","length","Array","from","map","toast","destroy","then","disconnectedCallback","clearTimeout","timeout","isSolid","classList","add","isTimer","setTimeout","bind","time","render","Host","class","classes","type","style","hasSlot","name","role","size","wcagCloseLabel","inverse","onCloseHandler","closeLabel","govClose","emit","catch","Number","isInteger","querySelector","remove"],"sources":["../../../packages/core/src/components/gov-toast/constants.ts","../../../packages/core/src/components/gov-toast/gov-toast.scss?tag=gov-toast","../../../packages/core/src/components/gov-toast/gov-toast.tsx"],"sourcesContent":["import { Variants, Types } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const ToastVariants = pick(Variants, ['SUCCESS', 'WARNING', 'ERROR', 'SECONDARY', 'PRIMARY'])\nexport type ToastVariantType = `${ValueOf<typeof ToastVariants>}`\n\nexport const ToastTypes = pick(Types, ['CLASSIC', 'SOLID'])\nexport type ToastTypesType = `${ValueOf<typeof ToastTypes>}`\n\nexport const ToastClass = {\n\troot: 'gov-toast',\n\thidden: 'gov-toast--hidden',\n\ticon: 'gov-toast__icon',\n\tcontent: 'gov-toast__content',\n\tclose: 'gov-toast__close',\n\ttimer: 'gov-toast__timer',\n}\n","/*\n * Alert\n */\n\n@import \"./gov-toast-message-core.scss\";\n$class: \".gov-toast\";\n\n#{$class} {\n\t@include toast-message-core;\n\t@include z-index(\"toast\", 1);\n\tposition: relative;\n\tposition: fixed;\n\tmax-width: rem-calc(375);\n\tpadding-right: rem-calc(50);\n\topacity: 1;\n\ttransition: opacity 300ms ease-in-out;\n\t&__content {\n\t\tpadding-right: 0;\n\t}\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(8);\n\t\tright: rem-calc(12);\n\t}\n\t&__timer {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tz-index: -1;\n\t}\n\n\t// VARIANTS\n\t&--hidden {\n\t\topacity: 0;\n\t}\n\t&[gravity=\"top\" i] {\n\t\ttop: rem-calc(16);\n\t}\n\t&[gravity=\"bottom\" i] {\n\t\tbottom: rem-calc(16);\n\t}\n\t&[position=\"left\" i] {\n\t\tleft: rem-calc(16);\n\t}\n\t&[position=\"center\" i] {\n\t\tleft: 50%;\n\t\ttransform: translateX(-50%);\n\t}\n\t&[position=\"right\" i] {\n\t\tright: rem-calc(16);\n\t}\n\t&[type=\"solid\" i] {\n\t\tborder: none;\n\t\tborder-radius: rem-calc(4);\n\t\toverflow: hidden;\n\t\tbox-shadow: none;\n\t\t&.is-initialized #{$class}__timer {\n\t\t\ttransform-origin: left;\n\t\t\tanimation: countdown linear forwards var(--toast-duration, 0);\n\t\t}\n\t}\n\n\t@each $variant, $definitions in $toast-message-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tborder-left-color: get(\"decor-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"decor-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[type=\"solid\" i] {\n\t\t\t\tbackground-color: get(\"background\", $definitions);\n\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t\t&__timer {\n\t\t\t\t\t\tbackground-color: get(\"timer-background\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__content {\n\t\t\tpadding-right: rem-calc(32);\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Prop, Watch, Method } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { ToastClass, ToastTypesType, ToastVariants } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ToastVariantType } from './constants'\nimport { createID } from '../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-toast',\n\tstyleUrl: 'gov-toast.scss',\n})\nexport class GovToast {\n\tprivate h: GovHost\n\tprivate timeout\n\tprivate readonly toastId: string\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 variant?: ToastVariantType = '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 = 'classic'\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: 'wcag-close-label' }) readonly wcagCloseLabel: 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('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ToastVariants, newValue, ToastClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.runTimer()\n\t}\n\n\tcomponentDidLoad() {\n\t\tconst existedToasts = document.querySelectorAll(`gov-toast[gravity=\"${this.gravity}\"][position=\"${this.position}\"]:not([data-toast-id=\"${this.toastId}\"])`)\n\t\tif (existedToasts.length > 0) {\n\t\t\tArray.from(existedToasts).map((toast: HTMLGovToastElement) => toast.destroy().then())\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tclearTimeout(this.timeout)\n\t}\n\n\tprivate runTimer() {\n\t\tif (this.isSolid) {\n\t\t\tthis.host.classList.add('is-initialized')\n\t\t}\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(this.destroy.bind(this), 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, 'gov-box-shadow--m'])}\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\tvariant={this.variant}\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} aria-live=\"polite\" role=\"status\">\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\n\t\t\t\t<div class={ToastClass.close}>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\t\tvariant={this.isSolid ? this.variant : 'secondary'}\n\t\t\t\t\t\tinverse={this.isSolid}\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.closeLabel ? this.closeLabel : <gov-icon name=\"x-lg\"></gov-icon>}\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\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.destroy()\n\t\t\t.then(() => this.govClose.emit(this.toastId))\n\t\t\t.catch()\n\t}\n\n\tget isSolid(): boolean {\n\t\treturn this.type === 'solid'\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"],"mappings":"8TAIO,MAAMA,EAAgBC,EAAKC,EAAU,CAAC,UAAW,UAAW,QAAS,YAAa,YAG/DD,EAAKE,EAAO,CAAC,UAAW,UAG3C,MAAMC,EAAa,CACzBC,KAAM,YACNC,OAAQ,oBACRC,KAAM,kBACNC,QAAS,qBACTC,MAAO,mBACPC,MAAO,oBChBR,MAAMC,EAAc,usK,MCYPC,EAAQC,EAAA,MAAAD,UAAAE,EAKpB,WAAAC,G,+EAS8C,U,aAKD,M,cAIY,Q,UAIhB,U,UAIT,E,wDAzB/BC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,W,CAuCzB,eAAAC,CAAgBC,GACfC,EAAaxB,EAAeuB,EAAUnB,EAAWC,K,CAGlD,iBAAAoB,GACCT,KAAKM,gBAAgBN,KAAKU,SAC1BV,KAAKW,U,CAGN,gBAAAC,GACC,MAAMC,EAAgBC,SAASC,iBAAiB,sBAAsBf,KAAKgB,uBAAuBhB,KAAKiB,kCAAkCjB,KAAKI,cAC9I,GAAIS,EAAcK,OAAS,EAAG,CAC7BC,MAAMC,KAAKP,GAAeQ,KAAKC,GAA+BA,EAAMC,UAAUC,Q,EAIhF,oBAAAC,GACCC,aAAa1B,KAAK2B,Q,CAGX,QAAAhB,GACP,GAAIX,KAAK4B,QAAS,CACjB5B,KAAKG,KAAK0B,UAAUC,IAAI,iB,CAEzB,GAAI9B,KAAK+B,QAAS,CACjB/B,KAAK2B,QAAUK,YAAW,KACzBhC,KAAKG,KAAK0B,UAAUC,IAAI1C,EAAWE,QACnC0C,WAAWhC,KAAKuB,QAAQU,KAAKjC,MAAO,IAAI,GACtCA,KAAKkC,K,EAIV,MAAAC,GACC,OACClC,EAACmC,EAAI,CACJC,MAAOrC,KAAKC,EAAEqC,QAAQ,CAAClD,EAAWC,KAAM,sBAAqB,gBAC9CW,KAAKI,QACpBY,QAAShB,KAAKgB,QACdC,SAAUjB,KAAKiB,SACfP,QAASV,KAAKU,QACd6B,KAAMvC,KAAKuC,KACXC,MAAO,CAAE,mBAAoBxC,KAAKkC,KAAO,OAExClC,KAAKC,EAAEwC,QAAQ,SACfxC,EAAA,QAAMoC,MAAOjD,EAAWG,MACvBU,EAAA,QAAMyC,KAAK,UAIbzC,EAAA,OAAKoC,MAAOjD,EAAWI,QAAO,YAAY,SAASmD,KAAK,UACvD1C,EAAA,cAGDA,EAAA,OAAKoC,MAAOjD,EAAWK,OACtBQ,EAAA,cACC2C,KAAK,IAAG,aACI5C,KAAK6C,eACjBnC,QAASV,KAAK4B,QAAU5B,KAAKU,QAAU,YACvCoC,QAAS9C,KAAK4B,QACdW,KAAK,OAAM,eACGvC,KAAK+C,eAAed,KAAKjC,OAEtCA,KAAKgD,WAAahD,KAAKgD,WAAa/C,EAAA,YAAUyC,KAAK,WAItDzC,EAAA,OAAKoC,MAAOjD,EAAWM,Q,CAKlB,cAAAqD,GACP/C,KAAKuB,UACHC,MAAK,IAAMxB,KAAKiD,SAASC,KAAKlD,KAAKI,WACnC+C,O,CAGH,WAAIvB,GACH,OAAO5B,KAAKuC,OAAS,O,CAGtB,WAAIR,GACH,OAAOqB,OAAOC,UAAUrD,KAAKkC,OAASlC,KAAKkC,KAAO,C,CAOnD,aAAMX,GACLG,aAAa1B,KAAK2B,SAClB,MAAML,EAAQR,SAASwC,cAAc,mBAAmBtD,KAAKI,aAC7D,GAAIkB,EAAO,CACVA,EAAMO,UAAUC,IAAI1C,EAAWE,QAC/B,UAAWgC,EAAMiC,SAAW,WAAY,CACvCjC,EAAMiC,Q"}
|
|
@@ -1,55 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { T as TooltipContentClass } from './constants14.js';
|
|
3
|
-
import { a as toBoolAttr } from './template.js';
|
|
4
|
-
|
|
5
|
-
const govTooltipContentCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tooltip-content{z-index:51;font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);position:absolute;display:block;width:-moz-max-content;width:max-content;max-width:var(--gov-tooltip-content-max-width, 21rem);padding:1rem;border-radius:0.1875rem;background-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300));color:var(--gov-tooltip-content-text-color, var(--gov-color-secondary));letter-spacing:0.0125rem;visibility:hidden;opacity:0;transition:opacity 0.2s ease-in}.gov-tooltip-content::before{content:\"\";position:absolute;display:block;width:0;height:0;border:0.625rem solid transparent}.gov-tooltip-content[is-visible=\"\"],.gov-tooltip-content[is-visible=true i],.gov-tooltip-content[is-visible=\"1\"]{opacity:1}.gov-tooltip[size=s] .gov-tooltip-content{--gov-tooltip-content-padding:var(--gov-tooltip-s-padding, 0.5rem);--gov-tooltip-content-arrow-size:var(--gov-tooltip-s-arrow-size, 0.4375rem);--gov-tooltip-content-letter-spacing:var(--gov-tooltip-s-letter-spacing, 0.0125rem);font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing)}.gov-tooltip[size=l] .gov-tooltip-content{--gov-tooltip-content-padding:var(--gov-tooltip-l-padding, 1rem);--gov-tooltip-content-arrow-size:var(--gov-tooltip-l-arrow-size, 0.875rem);--gov-tooltip-content-letter-spacing:var(--gov-tooltip-l-letter-spacing, 0.002rem);font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing)}.gov-tooltip[position=top] .gov-tooltip-content{bottom:100%;margin-bottom:0.625rem}.gov-tooltip[position=top] .gov-tooltip-content,.gov-tooltip[position=top] .gov-tooltip-content::before{left:50%;transform:translateX(-50%)}.gov-tooltip[position=top] .gov-tooltip-content::before{top:100%;border-bottom-width:0;border-top-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=bottom] .gov-tooltip-content{top:100%;margin-top:0.625rem}.gov-tooltip[position=bottom] .gov-tooltip-content,.gov-tooltip[position=bottom] .gov-tooltip-content::before{left:50%;transform:translateX(-50%)}.gov-tooltip[position=bottom] .gov-tooltip-content::before{bottom:100%;border-top-width:0;border-bottom-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=left] .gov-tooltip-content{right:100%;margin-right:0.625rem}.gov-tooltip[position=left] .gov-tooltip-content,.gov-tooltip[position=left] .gov-tooltip-content::before{top:50%;transform:translateY(-50%)}.gov-tooltip[position=left] .gov-tooltip-content::before{left:100%;border-right-width:0;border-left-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=right] .gov-tooltip-content{left:100%;margin-left:0.625rem}.gov-tooltip[position=right] .gov-tooltip-content,.gov-tooltip[position=right] .gov-tooltip-content::before{top:50%;transform:translateY(-50%)}.gov-tooltip[position=right] .gov-tooltip-content::before{right:100%;border-left-width:0;border-right-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}";
|
|
6
|
-
|
|
7
|
-
const GovTooltipContent$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.isVisible = false;
|
|
12
|
-
}
|
|
13
|
-
visibleContent(newValue) {
|
|
14
|
-
clearTimeout(this.timeout);
|
|
15
|
-
if (newValue === false) {
|
|
16
|
-
this.timeout = setTimeout(() => {
|
|
17
|
-
this.host.style.visibility = 'hidden';
|
|
18
|
-
}, 250);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
this.host.style.visibility = 'visible';
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return (h(Host, { class: TooltipContentClass.root, role: 'tooltip', hidden: !this.isVisible, "aria-hidden": !toBoolAttr(this.isVisible), "is-visible": this.isVisible }, h("slot", null)));
|
|
26
|
-
}
|
|
27
|
-
get host() { return this; }
|
|
28
|
-
static get watchers() { return {
|
|
29
|
-
"isVisible": ["visibleContent"]
|
|
30
|
-
}; }
|
|
31
|
-
static get style() { return govTooltipContentCss; }
|
|
32
|
-
}, [4, "gov-tooltip-content", {
|
|
33
|
-
"isVisible": [4, "is-visible"]
|
|
34
|
-
}]);
|
|
35
|
-
function defineCustomElement$1() {
|
|
36
|
-
if (typeof customElements === "undefined") {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const components = ["gov-tooltip-content"];
|
|
40
|
-
components.forEach(tagName => { switch (tagName) {
|
|
41
|
-
case "gov-tooltip-content":
|
|
42
|
-
if (!customElements.get(tagName)) {
|
|
43
|
-
customElements.define(tagName, GovTooltipContent$1);
|
|
44
|
-
}
|
|
45
|
-
break;
|
|
46
|
-
} });
|
|
47
|
-
}
|
|
48
|
-
defineCustomElement$1();
|
|
49
|
-
|
|
50
|
-
const GovTooltipContent = GovTooltipContent$1;
|
|
51
|
-
const defineCustomElement = defineCustomElement$1;
|
|
52
|
-
|
|
53
|
-
export { GovTooltipContent, defineCustomElement };
|
|
54
|
-
|
|
1
|
+
import{p as t,H as o,h as i,d as e}from"./p-80c0109d.js";import{T as n}from"./p-404f469e.js";import{a as r}from"./p-3f37ddb6.js";const l='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tooltip-content{z-index:51;font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);position:absolute;display:block;width:-moz-max-content;width:max-content;max-width:var(--gov-tooltip-content-max-width, 21rem);padding:1rem;border-radius:0.1875rem;background-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300));color:var(--gov-tooltip-content-text-color, var(--gov-color-secondary));letter-spacing:0.0125rem;visibility:hidden;opacity:0;transition:opacity 0.2s ease-in}.gov-tooltip-content::before{content:"";position:absolute;display:block;width:0;height:0;border:0.625rem solid transparent}.gov-tooltip-content[is-visible=""],.gov-tooltip-content[is-visible=true i],.gov-tooltip-content[is-visible="1"]{opacity:1}.gov-tooltip[size=s] .gov-tooltip-content{--gov-tooltip-content-padding:var(--gov-tooltip-s-padding, 0.5rem);--gov-tooltip-content-arrow-size:var(--gov-tooltip-s-arrow-size, 0.4375rem);--gov-tooltip-content-letter-spacing:var(--gov-tooltip-s-letter-spacing, 0.0125rem);font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing)}.gov-tooltip[size=l] .gov-tooltip-content{--gov-tooltip-content-padding:var(--gov-tooltip-l-padding, 1rem);--gov-tooltip-content-arrow-size:var(--gov-tooltip-l-arrow-size, 0.875rem);--gov-tooltip-content-letter-spacing:var(--gov-tooltip-l-letter-spacing, 0.002rem);font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing)}.gov-tooltip[position=top] .gov-tooltip-content{bottom:100%;margin-bottom:0.625rem}.gov-tooltip[position=top] .gov-tooltip-content,.gov-tooltip[position=top] .gov-tooltip-content::before{left:50%;transform:translateX(-50%)}.gov-tooltip[position=top] .gov-tooltip-content::before{top:100%;border-bottom-width:0;border-top-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=bottom] .gov-tooltip-content{top:100%;margin-top:0.625rem}.gov-tooltip[position=bottom] .gov-tooltip-content,.gov-tooltip[position=bottom] .gov-tooltip-content::before{left:50%;transform:translateX(-50%)}.gov-tooltip[position=bottom] .gov-tooltip-content::before{bottom:100%;border-top-width:0;border-bottom-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=left] .gov-tooltip-content{right:100%;margin-right:0.625rem}.gov-tooltip[position=left] .gov-tooltip-content,.gov-tooltip[position=left] .gov-tooltip-content::before{top:50%;transform:translateY(-50%)}.gov-tooltip[position=left] .gov-tooltip-content::before{left:100%;border-right-width:0;border-left-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=right] .gov-tooltip-content{left:100%;margin-left:0.625rem}.gov-tooltip[position=right] .gov-tooltip-content,.gov-tooltip[position=right] .gov-tooltip-content::before{top:50%;transform:translateY(-50%)}.gov-tooltip[position=right] .gov-tooltip-content::before{right:100%;border-left-width:0;border-right-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}';const s=t(class t extends o{constructor(){super();this.__registerHost();this.isVisible=false}visibleContent(t){clearTimeout(this.timeout);if(t===false){this.timeout=setTimeout((()=>{this.host.style.visibility="hidden"}),250)}else{this.host.style.visibility="visible"}}render(){return i(e,{class:n.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!r(this.isVisible),"is-visible":this.isVisible},i("slot",null))}get host(){return this}static get watchers(){return{isVisible:["visibleContent"]}}static get style(){return l}},[4,"gov-tooltip-content",{isVisible:[4,"is-visible"]}]);function p(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip-content"];t.forEach((t=>{switch(t){case"gov-tooltip-content":if(!customElements.get(t)){customElements.define(t,s)}break}}))}p();const g=s;const a=p;export{g as GovTooltipContent,a as defineCustomElement};
|
|
55
2
|
//# sourceMappingURL=gov-tooltip-content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"version":3,"names":["govTooltipContentCss","GovTooltipContent","proxyCustomElement","H","visibleContent","newValue","clearTimeout","this","timeout","setTimeout","host","style","visibility","render","h","Host","class","TooltipContentClass","root","role","hidden","isVisible","toBoolAttr"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.scss?tag=gov-tooltip-content","../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["/*\n * Tooltip - Content\n */\n\n$class: \".gov-tooltip-content\";\n\n#{$class} {\n\t@include z-index(\"bar\", 1);\n\t@include typography($font-size-m);\n\tposition: absolute;\n\tdisplay: block;\n\twidth: max-content;\n\tmax-width: $tooltip-content-max-width;\n\tpadding: rem-calc(16);\n\tborder-radius: rem-calc(3);\n\tbackground-color: $tooltip-content-bg-color;\n\tcolor: $tooltip-content-text-color;\n\tletter-spacing: rem-calc(0.2);\n\tvisibility: hidden;\n\topacity: 0;\n\ttransition: opacity 0.2s ease-in;\n\t&::before {\n\t\t@include pseudo();\n\t\twidth: 0;\n\t\theight: 0;\n\t\tborder: rem-calc(10) solid transparent;\n\t}\n\n\t// STATES\n\t@include parameter(\"is-visible\") {\n\t\topacity: 1;\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $tooltip-content-sizes {\n\t\t.gov-tooltip[size=\"#{$size}\"] & {\n\t\t\t--#{$prefix}tooltip-content-padding: #{get(\"padding\", $definitions)};\n\t\t\t--#{$prefix}tooltip-content-arrow-size: #{get(\"arrow-size\", $definitions)};\n\t\t\t--#{$prefix}tooltip-content-letter-spacing: #{get(\"letter-spacing\", $definitions)};\n\t\t\t@include typography(get(\"typography\", $definitions));\n\t\t}\n\t}\n\t@each $position, $definitions in $tooltip-content-positions {\n\t\t$oppositeProperty: get(\"oppositeProperty\", $definitions);\n\n\t\t.gov-tooltip[position=\"#{$position}\"] & {\n\t\t\t#{$oppositeProperty}: 100%;\n\t\t\tmargin-#{$oppositeProperty}: rem-calc(10);\n\t\t\t&,\n\t\t\t&::before {\n\t\t\t\t#{get(\"directionProperty\", $definitions)}: 50%;\n\t\t\t\ttransform: #{get(\"transformFn\", $definitions) }(-50%);\n\t\t\t}\n\t\t\t&::before {\n\t\t\t\t#{$position}: 100%;\n\t\t\t\tborder-#{$oppositeProperty}-width: 0;\n\t\t\t\tborder-#{$position}-color: $tooltip-content-bg-color;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { TooltipContentClass } from './constants'\nimport { toBoolAttr } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-tooltip-content',\n\tstyleUrl: 'gov-tooltip-content.scss',\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: 'is-visible' }) readonly isVisible: boolean = false\n\n\t@Watch('isVisible')\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = 'hidden'\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = 'visible'\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={TooltipContentClass.root} role={'tooltip'} hidden={!this.isVisible} aria-hidden={!toBoolAttr(this.isVisible)} is-visible={this.isVisible}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"iIAAA,MAAMA,EAAuB,+kH,MCQhBC,EAAiBC,EAAA,MAAAD,UAAAE,E,2DAOoC,K,CAGjE,cAAAC,CAAeC,GACdC,aAAaC,KAAKC,SAClB,GAAIH,IAAa,MAAO,CACvBE,KAAKC,QAAUC,YAAW,KACzBF,KAAKG,KAAKC,MAAMC,WAAa,QAAQ,GACnC,I,KACG,CACNL,KAAKG,KAAKC,MAAMC,WAAa,S,EAI/B,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAOC,EAAoBC,KAAMC,KAAM,UAAWC,QAASb,KAAKc,UAAS,eAAgBC,EAAWf,KAAKc,WAAU,aAAcd,KAAKc,WAC3IP,EAAA,a"}
|
|
@@ -1,177 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as validateProp } from './props.js';
|
|
3
|
-
import { T as TooltipContentClass, a as TooltipPosition, b as TooltipClass, c as TooltipVariant, d as TooltipSize } from './constants14.js';
|
|
4
|
-
import { c as createID } from './string.utils.js';
|
|
5
|
-
import { g as govHost } from './template.js';
|
|
6
|
-
|
|
7
|
-
const govTooltipCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tooltip{position:relative;display:inline;border-bottom:1px dashed currentcolor;color:var(--gov-color-primary);cursor:help}.gov-tooltip[icon=\"\"],.gov-tooltip[icon=true i],.gov-tooltip[icon=\"1\"]{display:inline-flex;border-bottom:0}.gov-tooltip[variant=secondary]{--gov-tooltip-content-bg-color:var(--gov-tooltip-secondary-bg-color, var(--gov-color-secondary));--gov-tooltip-content-text-color:var(--gov-tooltip-secondary-text-color, var(--gov-color-neutral-white))}.gov-tooltip[variant=secondary][inverse=\"\"],.gov-tooltip[variant=secondary][inverse=true i],.gov-tooltip[variant=secondary][inverse=\"1\"]{--gov-tooltip-content-bg-color:var(--gov-color-neutral-white);--gov-tooltip-content-text-color:var(--gov-tooltip-secondary-text-color-inverse, var(--gov-color-secondary))}.gov-tooltip[variant=primary]{--gov-tooltip-content-bg-color:var(--gov-tooltip-primary-bg-color, var(--gov-color-primary-300));--gov-tooltip-content-text-color:var(--gov-tooltip-primary-text-color, var(--gov-color-secondary))}.gov-tooltip[variant=primary][inverse=\"\"],.gov-tooltip[variant=primary][inverse=true i],.gov-tooltip[variant=primary][inverse=\"1\"]{--gov-tooltip-content-bg-color:var(--gov-color-neutral-white);--gov-tooltip-content-text-color:var(--gov-tooltip-primary-text-color-inverse, var(--gov-color-primary))}";
|
|
8
|
-
|
|
9
|
-
const GovTooltip$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.__registerHost();
|
|
13
|
-
this.variant = 'primary';
|
|
14
|
-
this.size = 'm';
|
|
15
|
-
this.position = 'right';
|
|
16
|
-
this.message = undefined;
|
|
17
|
-
this.identifier = undefined;
|
|
18
|
-
this.icon = undefined;
|
|
19
|
-
this.h = govHost(this.host);
|
|
20
|
-
this.tooltipId = createID('GovTooltip');
|
|
21
|
-
}
|
|
22
|
-
validateVariant(newValue) {
|
|
23
|
-
validateProp(TooltipVariant, newValue, TooltipClass.root);
|
|
24
|
-
}
|
|
25
|
-
validateSize(newValue) {
|
|
26
|
-
validateProp(TooltipSize, newValue, TooltipClass.root);
|
|
27
|
-
}
|
|
28
|
-
validatePosition(newValue) {
|
|
29
|
-
validateProp(TooltipPosition, newValue, TooltipClass.root);
|
|
30
|
-
}
|
|
31
|
-
componentWillLoad() {
|
|
32
|
-
this.validateVariant(this.variant);
|
|
33
|
-
this.validateSize(this.size);
|
|
34
|
-
this.validatePosition(this.position);
|
|
35
|
-
this.createContentWrapper();
|
|
36
|
-
this.registerListeners();
|
|
37
|
-
}
|
|
38
|
-
createContentWrapper() {
|
|
39
|
-
var _a;
|
|
40
|
-
const hasContentInside = this.host.querySelector(TooltipContentClass.root);
|
|
41
|
-
if (hasContentInside) {
|
|
42
|
-
this.content = hasContentInside;
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this.content = document.createElement(TooltipContentClass.root);
|
|
46
|
-
this.content.innerHTML = this.message;
|
|
47
|
-
this.host.appendChild(this.content);
|
|
48
|
-
}
|
|
49
|
-
this.content.setAttribute('id', (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipId);
|
|
50
|
-
}
|
|
51
|
-
registerListeners() {
|
|
52
|
-
this.host.addEventListener('focus', e => {
|
|
53
|
-
e.preventDefault();
|
|
54
|
-
this.showTooltip();
|
|
55
|
-
});
|
|
56
|
-
this.host.addEventListener('blur', e => {
|
|
57
|
-
e.preventDefault();
|
|
58
|
-
this.hideTooltip();
|
|
59
|
-
});
|
|
60
|
-
this.host.addEventListener('mouseenter', e => {
|
|
61
|
-
e.preventDefault();
|
|
62
|
-
this.showTooltip();
|
|
63
|
-
});
|
|
64
|
-
this.host.addEventListener('mouseleave', e => {
|
|
65
|
-
e.preventDefault();
|
|
66
|
-
this.hideTooltip();
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
verifyPositionSpace() {
|
|
70
|
-
// @TODO Improve positioning of broken lines
|
|
71
|
-
const offset = 12;
|
|
72
|
-
const windowWidth = window.innerWidth;
|
|
73
|
-
const trigger = this.host.getBoundingClientRect();
|
|
74
|
-
const trgWidth = this.host.offsetWidth;
|
|
75
|
-
const triggerPos = {
|
|
76
|
-
left: trigger.left + document.documentElement.scrollLeft,
|
|
77
|
-
top: trigger.top + document.documentElement.scrollTop,
|
|
78
|
-
};
|
|
79
|
-
const tltWidth = this.content.offsetWidth;
|
|
80
|
-
if (this.position === TooltipPosition.LEFT) {
|
|
81
|
-
if (offset + triggerPos.left < tltWidth) {
|
|
82
|
-
this.position = TooltipPosition.TOP;
|
|
83
|
-
this.content.style.left = '0px';
|
|
84
|
-
this.content.style.width = window.innerWidth - triggerPos.left - offset + 'px';
|
|
85
|
-
this.content.style.transform = 'none';
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
else if (this.position === TooltipPosition.RIGHT) {
|
|
89
|
-
if (windowWidth - (triggerPos.left + trgWidth) < tltWidth) {
|
|
90
|
-
this.position = TooltipPosition.TOP;
|
|
91
|
-
this.content.style.right = '0px';
|
|
92
|
-
this.content.style.left = 'auto';
|
|
93
|
-
this.content.style.width = trgWidth + triggerPos.left + offset + 'px';
|
|
94
|
-
this.content.style.transform = 'none';
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
// doesn't fit from the left
|
|
99
|
-
if (tltWidth / 2 > triggerPos.left) {
|
|
100
|
-
this.content.style.left = '0px';
|
|
101
|
-
this.content.style.width = window.innerWidth - triggerPos.left - offset + 'px';
|
|
102
|
-
this.content.style.transform = 'none';
|
|
103
|
-
}
|
|
104
|
-
// doesn't fit from the right
|
|
105
|
-
else if (tltWidth / 2 > windowWidth - (triggerPos.left + tltWidth)) {
|
|
106
|
-
this.content.style.right = '0px';
|
|
107
|
-
this.content.style.left = 'auto';
|
|
108
|
-
this.content.style.width = trgWidth + triggerPos.left + offset + 'px';
|
|
109
|
-
this.content.style.transform = 'none';
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
showTooltip() {
|
|
114
|
-
if (this.content) {
|
|
115
|
-
this.verifyPositionSpace();
|
|
116
|
-
this.content.setAttribute('is-visible', 'true');
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
hideTooltip() {
|
|
120
|
-
if (this.content) {
|
|
121
|
-
this.content.setAttribute('is-visible', 'false');
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
render() {
|
|
125
|
-
var _a;
|
|
126
|
-
return (h(Host, { class: this.h.classes(TooltipClass.root), position: this.position, size: this.size, tabindex: 0, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipId, variant: this.variant }, h("slot", null)));
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Showing the modal
|
|
130
|
-
*/
|
|
131
|
-
async show() {
|
|
132
|
-
this.showTooltip();
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Hidding the modal
|
|
136
|
-
*/
|
|
137
|
-
async hide() {
|
|
138
|
-
this.hideTooltip();
|
|
139
|
-
}
|
|
140
|
-
get host() { return this; }
|
|
141
|
-
static get watchers() { return {
|
|
142
|
-
"variant": ["validateVariant"],
|
|
143
|
-
"size": ["validateSize"],
|
|
144
|
-
"position": ["validatePosition"]
|
|
145
|
-
}; }
|
|
146
|
-
static get style() { return govTooltipCss; }
|
|
147
|
-
}, [4, "gov-tooltip", {
|
|
148
|
-
"variant": [1],
|
|
149
|
-
"size": [1],
|
|
150
|
-
"position": [1],
|
|
151
|
-
"message": [1],
|
|
152
|
-
"identifier": [1],
|
|
153
|
-
"icon": [4],
|
|
154
|
-
"show": [64],
|
|
155
|
-
"hide": [64]
|
|
156
|
-
}]);
|
|
157
|
-
function defineCustomElement$1() {
|
|
158
|
-
if (typeof customElements === "undefined") {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
const components = ["gov-tooltip"];
|
|
162
|
-
components.forEach(tagName => { switch (tagName) {
|
|
163
|
-
case "gov-tooltip":
|
|
164
|
-
if (!customElements.get(tagName)) {
|
|
165
|
-
customElements.define(tagName, GovTooltip$1);
|
|
166
|
-
}
|
|
167
|
-
break;
|
|
168
|
-
} });
|
|
169
|
-
}
|
|
170
|
-
defineCustomElement$1();
|
|
171
|
-
|
|
172
|
-
const GovTooltip = GovTooltip$1;
|
|
173
|
-
const defineCustomElement = defineCustomElement$1;
|
|
174
|
-
|
|
175
|
-
export { GovTooltip, defineCustomElement };
|
|
176
|
-
|
|
1
|
+
import{p as t,H as o,h as i,d as s}from"./p-80c0109d.js";import{v as e}from"./p-26acf964.js";import{T as r,a as n,b as a,c as l,d as c}from"./p-404f469e.js";import{c as p}from"./p-24636c53.js";import{g as v}from"./p-3f37ddb6.js";const h='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tooltip{position:relative;display:inline;border-bottom:1px dashed currentcolor;color:var(--gov-color-primary);cursor:help}.gov-tooltip[icon=""],.gov-tooltip[icon=true i],.gov-tooltip[icon="1"]{display:inline-flex;border-bottom:0}.gov-tooltip[variant=secondary]{--gov-tooltip-content-bg-color:var(--gov-tooltip-secondary-bg-color, var(--gov-color-secondary));--gov-tooltip-content-text-color:var(--gov-tooltip-secondary-text-color, var(--gov-color-neutral-white))}.gov-tooltip[variant=secondary][inverse=""],.gov-tooltip[variant=secondary][inverse=true i],.gov-tooltip[variant=secondary][inverse="1"]{--gov-tooltip-content-bg-color:var(--gov-color-neutral-white);--gov-tooltip-content-text-color:var(--gov-tooltip-secondary-text-color-inverse, var(--gov-color-secondary))}.gov-tooltip[variant=primary]{--gov-tooltip-content-bg-color:var(--gov-tooltip-primary-bg-color, var(--gov-color-primary-300));--gov-tooltip-content-text-color:var(--gov-tooltip-primary-text-color, var(--gov-color-secondary))}.gov-tooltip[variant=primary][inverse=""],.gov-tooltip[variant=primary][inverse=true i],.gov-tooltip[variant=primary][inverse="1"]{--gov-tooltip-content-bg-color:var(--gov-color-neutral-white);--gov-tooltip-content-text-color:var(--gov-tooltip-primary-text-color-inverse, var(--gov-color-primary))}';const d=t(class t extends o{constructor(){super();this.__registerHost();this.variant="primary";this.size="m";this.position="right";this.message=undefined;this.identifier=undefined;this.icon=undefined;this.h=v(this.host);this.tooltipId=p("GovTooltip")}validateVariant(t){e(l,t,a.root)}validateSize(t){e(c,t,a.root)}validatePosition(t){e(n,t,a.root)}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.validatePosition(this.position);this.createContentWrapper();this.registerListeners()}createContentWrapper(){var t;const o=this.host.querySelector(r.root);if(o){this.content=o}else{this.content=document.createElement(r.root);this.content.innerHTML=this.message;this.host.appendChild(this.content)}this.content.setAttribute("id",(t=this.identifier)!==null&&t!==void 0?t:this.tooltipId)}registerListeners(){this.host.addEventListener("focus",(t=>{t.preventDefault();this.showTooltip()}));this.host.addEventListener("blur",(t=>{t.preventDefault();this.hideTooltip()}));this.host.addEventListener("mouseenter",(t=>{t.preventDefault();this.showTooltip()}));this.host.addEventListener("mouseleave",(t=>{t.preventDefault();this.hideTooltip()}))}verifyPositionSpace(){const t=12;const o=window.innerWidth;const i=this.host.getBoundingClientRect();const s=this.host.offsetWidth;const e={left:i.left+document.documentElement.scrollLeft,top:i.top+document.documentElement.scrollTop};const r=this.content.offsetWidth;if(this.position===n.LEFT){if(t+e.left<r){this.position=n.TOP;this.content.style.left="0px";this.content.style.width=window.innerWidth-e.left-t+"px";this.content.style.transform="none"}}else if(this.position===n.RIGHT){if(o-(e.left+s)<r){this.position=n.TOP;this.content.style.right="0px";this.content.style.left="auto";this.content.style.width=s+e.left+t+"px";this.content.style.transform="none"}}else{if(r/2>e.left){this.content.style.left="0px";this.content.style.width=window.innerWidth-e.left-t+"px";this.content.style.transform="none"}else if(r/2>o-(e.left+r)){this.content.style.right="0px";this.content.style.left="auto";this.content.style.width=s+e.left+t+"px";this.content.style.transform="none"}}}showTooltip(){if(this.content){this.verifyPositionSpace();this.content.setAttribute("is-visible","true")}}hideTooltip(){if(this.content){this.content.setAttribute("is-visible","false")}}render(){var t;return i(s,{class:this.h.classes(a.root),position:this.position,size:this.size,tabindex:0,"aria-describedby":(t=this.identifier)!==null&&t!==void 0?t:this.tooltipId,variant:this.variant},i("slot",null))}async show(){this.showTooltip()}async hide(){this.hideTooltip()}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize"],position:["validatePosition"]}}static get style(){return h}},[4,"gov-tooltip",{variant:[1],size:[1],position:[1],message:[1],identifier:[1],icon:[4],show:[64],hide:[64]}]);function g(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip"];t.forEach((t=>{switch(t){case"gov-tooltip":if(!customElements.get(t)){customElements.define(t,d)}break}}))}g();const m=d;const u=g;export{m as GovTooltip,u as defineCustomElement};
|
|
177
2
|
//# sourceMappingURL=gov-tooltip.js.map
|