@gov-design-system-ce/components 0.0.58 → 0.0.60
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 +1 -1
- package/dist/cjs/gov-app.cjs.entry.js +174 -37
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +1 -1
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +15 -15
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-label.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +29 -24
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +18 -17
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +2 -2
- package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-infobar.cjs.entry.js +90 -0
- package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-toast.cjs.entry.js +5 -2
- package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +16 -4
- package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +73 -46
- package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/index-83edd4fe.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.css +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion.css +1 -1
- package/dist/collection/components/gov-app/gov-app.css +1 -1
- package/dist/collection/components/gov-app/gov-app.js +2 -2
- package/dist/collection/components/gov-app/gov-app.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments.css +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.css +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
- package/dist/collection/components/gov-badge/gov-badge.css +41 -11
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +1 -1
- package/dist/collection/components/gov-button/default/gov-button.css +10 -1
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.css +1 -3
- package/dist/collection/components/gov-card/gov-card.css +1 -1
- package/dist/collection/components/gov-container/gov-container.css +1 -1
- package/dist/collection/components/gov-control-group/gov-control-group.css +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +1 -1
- package/dist/collection/components/gov-empty/gov-empty.css +1 -1
- package/dist/collection/components/gov-error-code/gov-error-code.css +1 -1
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +1 -1
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +24 -23
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +5 -4
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.css +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.css +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +4 -3
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.css +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.css +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +4 -3
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-form/label/gov-form-label.css +5 -1
- package/dist/collection/components/gov-form/message/gov-form-message.css +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +49 -4
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +87 -26
- 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.css +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.css +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.js +4 -3
- package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.css +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.css +49 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +39 -20
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.css +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.js +5 -4
- package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
- package/dist/collection/components/gov-grid/gov-grid-item.css +1 -1
- package/dist/collection/components/gov-grid/gov-grid.css +1 -1
- package/dist/collection/components/gov-icon/gov-icon.css +3 -1
- package/dist/collection/components/gov-infobar/default/constants.js +12 -0
- package/dist/collection/components/gov-infobar/default/constants.js.map +1 -0
- package/dist/collection/components/gov-infobar/default/gov-infobar.css +384 -0
- package/dist/collection/components/{gov-alert/gov-alert.js → gov-infobar/default/gov-infobar.js} +27 -27
- package/dist/collection/components/gov-infobar/default/gov-infobar.js.map +1 -0
- package/dist/collection/components/gov-infobar/default/gov-infobar.types.js +2 -0
- package/dist/collection/components/gov-infobar/default/gov-infobar.types.js.map +1 -0
- package/dist/collection/components/gov-layout/gov-layout-column.css +1 -1
- package/dist/collection/components/gov-layout/gov-layout.css +1 -1
- package/dist/collection/components/gov-loading/loading/gov-loading.css +1 -1
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +1 -1
- package/dist/collection/components/gov-message/gov-message.css +1 -1
- package/dist/collection/components/gov-modal/gov-modal.css +1 -1
- package/dist/collection/components/gov-nav/gov-nav-item.css +1 -1
- package/dist/collection/components/gov-nav/gov-nav.css +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.css +2 -2
- package/dist/collection/components/gov-promp/gov-prompt.css +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav.css +1 -1
- package/dist/collection/components/gov-spacer/gov-spacer.css +1 -1
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +1 -1
- package/dist/collection/components/gov-statsbar/gov-statsbar.css +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper-item.css +2 -1
- package/dist/collection/components/gov-stepper/gov-stepper.css +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.css +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.css +1 -1
- package/dist/collection/components/gov-tile/container/gov-tiles.css +1 -1
- package/dist/collection/components/gov-tile/gov-tile.css +1 -1
- package/dist/collection/components/gov-toast/gov-toast.css +2 -2
- package/dist/collection/components/gov-toast/gov-toast.js +4 -1
- package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +32 -27
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +101 -5
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.css +1 -17
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +83 -51
- package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard-item.css +2 -4
- package/dist/collection/components/gov-wizard/gov-wizard.css +1 -1
- package/dist/collection/data/color-definitions.js +307 -0
- package/dist/collection/data/font-definitions.js +94 -0
- package/dist/collection/pages/Card.js +11 -9
- package/dist/collection/pages/Card.js.map +1 -1
- package/dist/collection/pages/Forms.js +75 -0
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Home.js +43 -1
- package/dist/collection/pages/Home.js.map +1 -1
- package/dist/collection/pages/{Alert.js → Infobar.js} +42 -27
- package/dist/collection/pages/Infobar.js.map +1 -0
- package/dist/collection/pages/Stepper.js +3 -0
- package/dist/collection/pages/Stepper.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-app.js +1 -1
- package/dist/components/gov-app.js.map +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-badge.js +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-dropdown.js.map +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-label.js +1 -1
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-radio.js.map +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-form-switch.js.map +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/{gov-alert.d.ts → gov-infobar.d.ts} +4 -4
- package/dist/components/gov-infobar.js +2 -0
- package/dist/components/gov-infobar.js.map +1 -0
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper-item.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-toast.js.map +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-tooltip.js.map +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard-item.js.map +1 -1
- package/dist/components/p-010f8351.js +2 -0
- package/dist/components/{p-35f6490a.js.map → p-010f8351.js.map} +1 -1
- package/dist/components/p-3e8a9e92.js.map +1 -1
- package/dist/components/p-4981dc67.js +2 -0
- package/dist/components/p-4981dc67.js.map +1 -0
- package/dist/components/{p-0378da4d.js → p-8d44ca3c.js} +2 -2
- package/dist/components/p-8d44ca3c.js.map +1 -0
- package/dist/components/{p-da3b225f.js → p-9231ec61.js} +2 -2
- package/dist/components/p-9231ec61.js.map +1 -0
- package/dist/components/{p-404f469e.js → p-9a4c910d.js} +2 -2
- package/dist/components/{p-70d9d879.js → p-a3d3943d.js} +2 -2
- package/dist/components/p-a3d3943d.js.map +1 -0
- package/dist/components/{p-9cba3cd3.js → p-b00d2836.js} +2 -2
- package/dist/components/{p-a6915747.js → p-b9447c86.js} +2 -2
- package/dist/components/p-b9447c86.js.map +1 -0
- package/dist/core/core.css +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-0553eb92.entry.js +2 -0
- package/dist/core/p-0553eb92.entry.js.map +1 -0
- package/dist/core/{p-3d0ab343.entry.js → p-0c57e410.entry.js} +2 -2
- package/dist/core/{p-d4cfa93a.entry.js → p-19a54ee9.entry.js} +2 -2
- package/dist/core/p-19a54ee9.entry.js.map +1 -0
- package/dist/core/p-19b897c0.entry.js +2 -0
- package/dist/core/p-19b897c0.entry.js.map +1 -0
- package/dist/core/{p-69f944d1.entry.js → p-1c40fdd5.entry.js} +2 -2
- package/dist/core/p-1c40fdd5.entry.js.map +1 -0
- package/dist/core/{p-13624a77.entry.js → p-28f39f69.entry.js} +2 -2
- package/dist/core/p-28f39f69.entry.js.map +1 -0
- package/dist/core/{p-18ef9623.entry.js → p-2bf0c1c5.entry.js} +2 -2
- package/dist/core/{p-6a65af35.entry.js → p-32a4b7e3.entry.js} +2 -2
- package/dist/core/p-32a4b7e3.entry.js.map +1 -0
- package/dist/core/p-35c1c12c.entry.js +2 -0
- package/dist/core/p-35c1c12c.entry.js.map +1 -0
- package/dist/core/{p-bd1cb5bd.entry.js → p-4452c278.entry.js} +2 -2
- package/dist/core/{p-ae894a40.js → p-570ef4e5.js} +2 -2
- package/dist/core/p-5cc3e768.entry.js +2 -0
- package/dist/core/p-5cc3e768.entry.js.map +1 -0
- package/dist/core/{p-33bf5974.entry.js → p-7372b066.entry.js} +2 -2
- package/dist/core/{p-87aca157.entry.js → p-7702c8c2.entry.js} +2 -2
- package/dist/core/{p-9d72d80b.entry.js → p-7e8d2066.entry.js} +2 -2
- package/dist/core/{p-a5d00433.entry.js → p-7fa1290e.entry.js} +2 -2
- package/dist/core/p-80f5140b.entry.js +2 -0
- package/dist/core/{p-2944bf77.entry.js.map → p-80f5140b.entry.js.map} +1 -1
- package/dist/core/p-82b4b522.entry.js +2 -0
- package/dist/core/p-82b4b522.entry.js.map +1 -0
- package/dist/core/p-84f6b11a.entry.js +2 -0
- package/dist/core/{p-0c769f1a.entry.js.map → p-84f6b11a.entry.js.map} +1 -1
- package/dist/core/{p-41e88980.entry.js → p-93897e60.entry.js} +2 -2
- package/dist/core/{p-41e88980.entry.js.map → p-93897e60.entry.js.map} +1 -1
- package/dist/core/{p-cacd0fed.entry.js → p-998c3336.entry.js} +2 -2
- package/dist/core/{p-404f469e.js → p-9a4c910d.js} +2 -2
- package/dist/core/p-a7719b55.entry.js +2 -0
- package/dist/core/p-a7719b55.entry.js.map +1 -0
- package/dist/core/{p-9bfab069.entry.js → p-acd6a9f4.entry.js} +2 -2
- package/dist/core/p-acd6a9f4.entry.js.map +1 -0
- package/dist/core/{p-667dc3de.entry.js → p-afa12399.entry.js} +2 -2
- package/dist/core/{p-70140f70.entry.js → p-b0c97376.entry.js} +2 -2
- package/dist/core/p-b8c35c57.entry.js +2 -0
- package/dist/core/p-b8c35c57.entry.js.map +1 -0
- package/dist/core/p-bcf71ab5.entry.js +2 -0
- package/dist/core/p-bcf71ab5.entry.js.map +1 -0
- package/dist/core/{p-0c1697ce.entry.js → p-c4c9ff83.entry.js} +2 -2
- package/dist/core/p-c5d3efc2.entry.js +2 -0
- package/dist/core/{p-f8252fea.entry.js.map → p-c5d3efc2.entry.js.map} +1 -1
- package/dist/core/{p-af646ce2.entry.js → p-c61444f7.entry.js} +2 -2
- package/dist/core/p-c61444f7.entry.js.map +1 -0
- package/dist/core/p-d84b290e.entry.js +2 -0
- package/dist/core/p-d84b290e.entry.js.map +1 -0
- package/dist/core/{p-a85f4a62.entry.js → p-e2d6efaf.entry.js} +2 -2
- package/dist/core/p-e2d6efaf.entry.js.map +1 -0
- package/dist/core/{p-dd39ede4.entry.js → p-e5227e40.entry.js} +2 -2
- package/dist/core/{p-dd39ede4.entry.js.map → p-e5227e40.entry.js.map} +1 -1
- package/dist/core/{p-8fce08d1.entry.js → p-fab698a7.entry.js} +2 -2
- package/dist/core/p-fab698a7.entry.js.map +1 -0
- package/dist/esm/{constants-f7b618c2.js → constants-887c5391.js} +2 -2
- package/dist/esm/{constants-f7b618c2.js.map → constants-887c5391.js.map} +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-accordion.entry.js +1 -1
- package/dist/esm/gov-app.entry.js +174 -37
- 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-backdrop.entry.js.map +1 -1
- package/dist/esm/gov-badge.entry.js +1 -1
- package/dist/esm/gov-badge.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +1 -1
- package/dist/esm/gov-button.entry.js +2 -2
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +1 -1
- package/dist/esm/gov-dropdown.entry.js +1 -1
- package/dist/esm/gov-dropdown.entry.js.map +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +15 -15
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +3 -3
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-file.entry.js +2 -2
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-input.entry.js +2 -2
- package/dist/esm/gov-form-input.entry.js.map +1 -1
- package/dist/esm/gov-form-label.entry.js +1 -1
- package/dist/esm/gov-form-label.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +30 -25
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +2 -2
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +19 -18
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +3 -3
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-icon.entry.js +2 -2
- package/dist/esm/gov-icon.entry.js.map +1 -1
- package/dist/esm/gov-infobar.entry.js +86 -0
- package/dist/esm/gov-infobar.entry.js.map +1 -0
- package/dist/esm/gov-modal.entry.js +1 -1
- package/dist/esm/gov-nav.entry.js +1 -1
- package/dist/esm/gov-pagination.entry.js +2 -2
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-prompt.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-stepper-item.entry.js +1 -1
- package/dist/esm/gov-stepper-item.entry.js.map +1 -1
- package/dist/esm/gov-tabs.entry.js +1 -1
- package/dist/esm/gov-toast.entry.js +5 -2
- package/dist/esm/gov-toast.entry.js.map +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +17 -5
- package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.entry.js +74 -47
- package/dist/esm/gov-tooltip.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +1 -1
- package/dist/esm/gov-wizard-item.entry.js.map +1 -1
- package/dist/esm/gov-wizard.entry.js +1 -1
- package/dist/esm/index-ae3c50f1.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{wcag-062e7ca9.js → wcag-06bd4d01.js} +2 -2
- package/dist/esm/{wcag-062e7ca9.js.map → wcag-06bd4d01.js.map} +1 -1
- package/dist/globals.d.ts +2 -0
- package/dist/hydrate/index.js +461 -267
- package/dist/types/components/gov-app/gov-app.d.ts +1 -1
- package/dist/types/components/gov-backdrop/gov-backdrop.d.ts +1 -1
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +3 -3
- package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +15 -3
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +7 -3
- package/dist/types/components/gov-infobar/default/constants.d.ts +12 -0
- package/dist/types/components/{gov-alert/gov-alert.d.ts → gov-infobar/default/gov-infobar.d.ts} +9 -9
- package/dist/types/components/gov-infobar/default/gov-infobar.types.d.ts +4 -0
- package/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +19 -1
- package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +7 -3
- package/dist/types/components.d.ts +148 -84
- package/dist/types/pages/Infobar.d.ts +3 -0
- package/dist/types/types/typings.d.ts +6 -0
- package/package.json +2 -2
- package/dist/cjs/gov-alert.cjs.entry.js +0 -90
- package/dist/cjs/gov-alert.cjs.entry.js.map +0 -1
- package/dist/collection/components/gov-alert/constants.js +0 -12
- package/dist/collection/components/gov-alert/constants.js.map +0 -1
- package/dist/collection/components/gov-alert/gov-alert.css +0 -398
- package/dist/collection/components/gov-alert/gov-alert.js.map +0 -1
- package/dist/collection/components/gov-alert/gov-alert.types.js +0 -2
- package/dist/collection/components/gov-alert/gov-alert.types.js.map +0 -1
- package/dist/collection/pages/Alert.js.map +0 -1
- package/dist/components/gov-alert.js +0 -2
- package/dist/components/gov-alert.js.map +0 -1
- package/dist/components/p-0378da4d.js.map +0 -1
- package/dist/components/p-35f6490a.js +0 -2
- package/dist/components/p-70d9d879.js.map +0 -1
- package/dist/components/p-a6915747.js.map +0 -1
- package/dist/components/p-da3b225f.js.map +0 -1
- package/dist/components/p-ee60cdd1.js +0 -2
- package/dist/components/p-ee60cdd1.js.map +0 -1
- package/dist/core/p-0c769f1a.entry.js +0 -2
- package/dist/core/p-13624a77.entry.js.map +0 -1
- package/dist/core/p-2944bf77.entry.js +0 -2
- package/dist/core/p-3b9df792.entry.js +0 -2
- package/dist/core/p-3b9df792.entry.js.map +0 -1
- package/dist/core/p-3e5432d7.entry.js +0 -2
- package/dist/core/p-3e5432d7.entry.js.map +0 -1
- package/dist/core/p-42c1935f.entry.js +0 -2
- package/dist/core/p-42c1935f.entry.js.map +0 -1
- package/dist/core/p-4c79a97a.entry.js +0 -2
- package/dist/core/p-4c79a97a.entry.js.map +0 -1
- package/dist/core/p-69f944d1.entry.js.map +0 -1
- package/dist/core/p-6a65af35.entry.js.map +0 -1
- package/dist/core/p-85258200.entry.js +0 -2
- package/dist/core/p-85258200.entry.js.map +0 -1
- package/dist/core/p-8fce08d1.entry.js.map +0 -1
- package/dist/core/p-9bfab069.entry.js.map +0 -1
- package/dist/core/p-a85f4a62.entry.js.map +0 -1
- package/dist/core/p-ae04e58f.entry.js +0 -2
- package/dist/core/p-ae04e58f.entry.js.map +0 -1
- package/dist/core/p-af646ce2.entry.js.map +0 -1
- package/dist/core/p-bbcbe1cc.entry.js +0 -2
- package/dist/core/p-bbcbe1cc.entry.js.map +0 -1
- package/dist/core/p-d4cfa93a.entry.js.map +0 -1
- package/dist/core/p-dfc080f2.entry.js +0 -2
- package/dist/core/p-dfc080f2.entry.js.map +0 -1
- package/dist/core/p-f8252fea.entry.js +0 -2
- package/dist/core/p-fb99f144.entry.js +0 -2
- package/dist/core/p-fb99f144.entry.js.map +0 -1
- package/dist/esm/gov-alert.entry.js +0 -86
- package/dist/esm/gov-alert.entry.js.map +0 -1
- package/dist/types/components/gov-alert/constants.d.ts +0 -12
- package/dist/types/components/gov-alert/gov-alert.types.d.ts +0 -4
- package/dist/types/pages/Alert.d.ts +0 -3
- /package/dist/components/{p-404f469e.js.map → p-9a4c910d.js.map} +0 -0
- /package/dist/components/{p-9cba3cd3.js.map → p-b00d2836.js.map} +0 -0
- /package/dist/core/{p-3d0ab343.entry.js.map → p-0c57e410.entry.js.map} +0 -0
- /package/dist/core/{p-18ef9623.entry.js.map → p-2bf0c1c5.entry.js.map} +0 -0
- /package/dist/core/{p-bd1cb5bd.entry.js.map → p-4452c278.entry.js.map} +0 -0
- /package/dist/core/{p-ae894a40.js.map → p-570ef4e5.js.map} +0 -0
- /package/dist/core/{p-33bf5974.entry.js.map → p-7372b066.entry.js.map} +0 -0
- /package/dist/core/{p-87aca157.entry.js.map → p-7702c8c2.entry.js.map} +0 -0
- /package/dist/core/{p-9d72d80b.entry.js.map → p-7e8d2066.entry.js.map} +0 -0
- /package/dist/core/{p-a5d00433.entry.js.map → p-7fa1290e.entry.js.map} +0 -0
- /package/dist/core/{p-cacd0fed.entry.js.map → p-998c3336.entry.js.map} +0 -0
- /package/dist/core/{p-404f469e.js.map → p-9a4c910d.js.map} +0 -0
- /package/dist/core/{p-667dc3de.entry.js.map → p-afa12399.entry.js.map} +0 -0
- /package/dist/core/{p-70140f70.entry.js.map → p-b0c97376.entry.js.map} +0 -0
- /package/dist/core/{p-0c1697ce.entry.js.map → p-c4c9ff83.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-stepper-item.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"file":"gov-stepper-item.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,kxQAAkxQ;;MCa/xQ,cAAc;EAK1B;;;;mBAYgD,SAAS;gBAId,GAAG;;;;sBAgBoB,IAAI;IA/BrE,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAGC,qBAAQ,CAAC,gBAAgB,CAAC,CAAA;IAC3C,IAAI,CAAC,SAAS,GAAGA,qBAAQ,CAAC,mBAAmB,CAAC,CAAA;GAC9C;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EAAE,KAAK,EAAEH,0BAAgB,CAAC,MAAM,EAAE,IAAI,EAAC,UAAU,IAClEG,QAAC,UAAU,IAAC,KAAK,EAAEH,0BAAgB,CAAC,KAAK,IACvC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KACxBG,kBAAM,KAAK,EAAEH,0BAAgB,CAAC,MAAM,IACnCG,kBAAM,IAAI,EAAC,QAAQ,GAAG,CAChB,CACP,EACDA,kBAAM,KAAK,EAAEH,0BAAgB,CAAC,IAAI,IACjCG,kBAAM,KAAK,EAAEH,0BAAgB,CAAC,KAAK,IAAG,KAAK,CAAQ,EAClD,IAAI,CAAC,UAAU,IAAIG,kBAAM,KAAK,EAAEH,0BAAgB,CAAC,KAAK,IAAG,IAAI,CAAC,UAAU,CAAQ,CAC3E,CACK,CACR,EAEL,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,KACzBG,iBAAK,KAAK,EAAEH,0BAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,SAAS,qBAAmB,SAAS,EAAE,IAAI,EAAC,UAAU,IAC/FG,kBAAM,IAAI,EAAC,SAAS,GAAG,CAClB,CACN,CACK,EACP;GACD;;;;EAMD,MAAM,YAAY;IACjB,OAAO,IAAI,CAAC,eAAe,CAAA;GAC3B;;;;;;;;;;;;","names":["govHost","createID","govErrorLog","StepperItemClass","validateProp","StepperVariants","h","Host","prepareClasses"],"sources":["../../../packages/core/src/components/gov-stepper/gov-stepper-item.scss?tag=gov-stepper-item","../../../packages/core/src/components/gov-stepper/gov-stepper-item.tsx"],"sourcesContent":["/*\n * Stepper - Item\n */\n\n@import \"../gov-wizard/gov-wizard-item-core.scss\";\n$class: \".gov-stepper-item\";\n\n#{$class} {\n\t@include wizard-item-core;\n\t&::before {\n\t\t@include pseudo();\n\t\twidth: rem-calc(2);\n\t}\n\t&:last-child::before {\n\t\tcontent: none;\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $wizard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t&::before {\n\t\t\t\tbackground: get(\"indicator-bg\", $definitions);\n\t\t\t}\n\t\t}\n\t}\n\t@each $size, $definitions in $stepper-sizes {\n\t\t$connect-gap: get(\"connect-gap\", $definitions);\n\t\t&[size=\"#{$size}\"] {\n\t\t\tmin-height: calc(get(\"indicator-size\", $definitions) + 3 * $connect-gap);\n\t\t\t&::before {\n\t\t\t\ttop: calc(get(\"indicator-size\", $definitions) + $connect-gap);\n\t\t\t\tbottom: $connect-gap;\n\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - rem-calc(2)) / 2);\n\t\t\t}\n\t\t\t&:last-child {\n\t\t\t\tmin-height: 0;\n\t\t\t}\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(get(\"font-size\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__annot {\n\t\t\t\t\t@include typography(get(\"font-size-annot\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(get(\"font-size-indicator\", $definitions));\n\t\t\t\t\twidth: get(\"indicator-size\", $definitions);\n\t\t\t\t\theight: get(\"indicator-size\", $definitions);\n\t\t\t\t\tbox-shadow: 0 0 0 $connect-gap color(\"neutral.white\");\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t&--w-annot[size=\"#{$size}\"] {\n\t\t\tmin-height: calc(get(\"indicator-size\", $definitions) * 1.5 + 3 * $connect-gap);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Prop, State, Watch, Host, Method, Event, EventEmitter } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperVariantType, StepperVariants } from './constants'\nimport { createID } from '../../utils/string.utils'\nimport { govHost, prepareClasses } from '../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n\tstyleUrl: 'gov-stepper-item.scss',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: StepperVariantType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Item name of the stepper\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Item annotation of the stepper\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Used to change the HMTL tag in the stepper trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: 'trigger-tag' }) readonly triggerTag: string = 'h3'\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('label')\n\tvalidateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${StepperItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch('triggerTag')\n\tvalidateTriggerTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${StepperItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(StepperVariants, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.triggerTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\t\tconst { label } = this\n\t\tconst TriggerTag = this.triggerTag\n\n\t\treturn (\n\t\t\t<Host class={prepareClasses([StepperItemClass.root, this.annotation && StepperItemClass.rootWithAnnot])} variant={this.variant}>\n\t\t\t\t<div id={triggerId} class={StepperItemClass.header} role=\"listitem\">\n\t\t\t\t\t<TriggerTag class={StepperItemClass.title}>\n\t\t\t\t\t\t{this.h.hasSlot('prefix') && (\n\t\t\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t\t\t<slot name=\"prefix\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<span class={StepperItemClass.name}>\n\t\t\t\t\t\t\t<span class={StepperItemClass.label}>{label}</span>\n\t\t\t\t\t\t\t{this.annotation && <span class={StepperItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</TriggerTag>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId} role=\"tabpanel\">\n\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync currentState(): Promise<boolean> {\n\t\treturn this.isExpandedState\n\t}\n}\n"],"version":3}
|
|
@@ -21,7 +21,7 @@ const ToastClass = {
|
|
|
21
21
|
timer: 'gov-toast__timer',
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
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:
|
|
24
|
+
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:301;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}}";
|
|
25
25
|
|
|
26
26
|
const GovToast = class {
|
|
27
27
|
constructor(hostRef) {
|
|
@@ -54,7 +54,10 @@ const GovToast = class {
|
|
|
54
54
|
if (this.isTimer) {
|
|
55
55
|
this.timeout = setTimeout(() => {
|
|
56
56
|
this.host.classList.add(ToastClass.hidden);
|
|
57
|
-
setTimeout(
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
this.destroy.bind(this);
|
|
59
|
+
this.govClose.emit(this.toastId);
|
|
60
|
+
}, 600);
|
|
58
61
|
}, this.time);
|
|
59
62
|
}
|
|
60
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-toast.entry.c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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":["pick","Variants","Types","govHost","createID","validateProp","h","Host"],"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, Method, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { ToastClass, ToastTypesType, ToastVariants, ToastVariantType } from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\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\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
|
+
{"file":"gov-toast.entry.cjs.js","mappings":";;;;;;;;;;;;AAIO,MAAM,aAAa,GAAGA,UAAI,CAACC,iBAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC,CAAA;AAG1ED,UAAI,CAACE,cAAK,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,kB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AO,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":["pick","Variants","Types","govHost","createID","validateProp","h","Host"],"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, Method, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { ToastClass, ToastTypesType, ToastVariants, ToastVariantType } from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\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\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(() => {\n\t\t\t\t\tthis.destroy.bind(this)\n\t\t\t\t\tthis.govClose.emit(this.toastId)\n\t\t\t\t}, 600)\n\t\t\t}, this.time)\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([ToastClass.root, \"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}
|
|
@@ -9,26 +9,38 @@ require('./variants-f5ffeef3.js');
|
|
|
9
9
|
require('./sizes-79872c2a.js');
|
|
10
10
|
require('./utils-c9b1bba3.js');
|
|
11
11
|
|
|
12
|
-
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[
|
|
12
|
+
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 gov-button{position:absolute;right:0;top:0}.gov-tooltip-content[is-visible=\"\"],.gov-tooltip-content[is-visible=true i],.gov-tooltip-content[is-visible=\"1\"]{opacity:1}.gov-tooltip-content[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-content[variant=secondary][inverse=\"\"],.gov-tooltip-content[variant=secondary][inverse=true i],.gov-tooltip-content[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-content[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-content[variant=primary][inverse=\"\"],.gov-tooltip-content[variant=primary][inverse=true i],.gov-tooltip-content[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))}.gov-tooltip-content[size=s]{--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-content[size=l]{--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-content[position=top]::before{left:50%;transform:translateX(-50%)}.gov-tooltip-content[position=top]::before{top:100%;border-bottom-width:0;border-top-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip-content[position=bottom]::before{left:50%;transform:translateX(-50%)}.gov-tooltip-content[position=bottom]::before{bottom:100%;border-top-width:0;border-bottom-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip-content[position=left]::before{top:50%;transform:translateY(-50%)}.gov-tooltip-content[position=left]::before{left:100%;border-right-width:0;border-left-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip-content[position=right]::before{top:50%;transform:translateY(-50%)}.gov-tooltip-content[position=right]::before{right:100%;border-left-width:0;border-right-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}";
|
|
13
13
|
|
|
14
14
|
const GovTooltipContent = class {
|
|
15
15
|
constructor(hostRef) {
|
|
16
16
|
index.registerInstance(this, hostRef);
|
|
17
|
+
this.variant = constants.TooltipVariant.PRIMARY;
|
|
18
|
+
this.size = constants.TooltipSize._M;
|
|
19
|
+
this.persist = false;
|
|
17
20
|
this.isVisible = false;
|
|
21
|
+
this.parentId = null;
|
|
18
22
|
}
|
|
19
23
|
visibleContent(newValue) {
|
|
20
24
|
clearTimeout(this.timeout);
|
|
21
25
|
if (newValue === false) {
|
|
22
26
|
this.timeout = setTimeout(() => {
|
|
23
|
-
this.host.style.visibility =
|
|
27
|
+
this.host.style.visibility = "hidden";
|
|
24
28
|
}, 250);
|
|
25
29
|
}
|
|
26
30
|
else {
|
|
27
|
-
this.host.style.visibility =
|
|
31
|
+
this.host.style.visibility = "visible";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
hideContent() {
|
|
35
|
+
this.isVisible = false;
|
|
36
|
+
this.persist = false;
|
|
37
|
+
const parentEl = document.getElementById(this.parentId);
|
|
38
|
+
if (parentEl) {
|
|
39
|
+
parentEl.hide().catch();
|
|
28
40
|
}
|
|
29
41
|
}
|
|
30
42
|
render() {
|
|
31
|
-
return (index.h(index.Host, { class: constants.TooltipContentClass.root, role:
|
|
43
|
+
return (index.h(index.Host, { class: constants.TooltipContentClass.root, role: "tooltip", hidden: !this.isVisible, "aria-hidden": !template.toBoolAttr(this.isVisible), "is-visible": this.isVisible }, index.h("slot", null), this.persist ? (index.h("gov-button", { "on-gov-click": this.hideContent.bind(this), variant: this.variant, size: this.size, type: "base", inverse: this.variant === constants.TooltipVariant.SECONDARY }, index.h("gov-icon", { slot: "left-icon", name: "x-lg", type: "basic" }))) : null));
|
|
32
44
|
}
|
|
33
45
|
get host() { return index.getElement(this); }
|
|
34
46
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-tooltip-content.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,
|
|
1
|
+
{"file":"gov-tooltip-content.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,wnIAAwnI;;MCQxoI,iBAAiB;;;mBAOmBA,wBAAc,CAAC,OAAO;gBAI5BC,qBAAW,CAAC,EAAE;mBAI5B,KAAK;qBAI6B,KAAK;oBAId,IAAI;;EAGzD,cAAc,CAAC,QAAiB;IAC/B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC1B,IAAI,QAAQ,KAAK,KAAK,EAAE;MACvB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAA;OACrC,EAAE,GAAG,CAAC,CAAA;KACP;SAAM;MACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,SAAS,CAAA;KACtC;GACD;EAED,WAAW;IACV,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;IACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;IACpB,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAA0B,CAAA;IAChF,IAAI,QAAQ,EAAE;MACb,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAA;KACvB;GACD;EAED,MAAM;IACL,QACCC,QAACC,UAAI,IACJ,KAAK,EAAEC,6BAAmB,CAAC,IAAI,EAC/B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,iBACV,CAACC,mBAAU,CAAC,IAAI,CAAC,SAAS,CAAC,gBAC5B,IAAI,CAAC,SAAS,IAC1BH,qBAAa,EACZ,IAAI,CAAC,OAAO,IACZA,wCACe,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EACzC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,IAAI,CAAC,OAAO,KAAKF,wBAAc,CAAC,SAAS,IAClDE,sBAAU,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAa,CACzD,IACV,IAAI,CACF,EACP;GACD;;;;;;;;;;","names":["TooltipVariant","TooltipSize","h","Host","TooltipContentClass","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& gov-button {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\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 $variant, $definitions in $tooltip-content-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t--#{$prefix}tooltip-content-bg-color: #{get(\"bg-color\", $definitions)};\n\t\t\t--#{$prefix}tooltip-content-text-color: #{get(\"text-color\", $definitions)};\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\t--#{$prefix}tooltip-content-bg-color: #{color(\"neutral.white\")};\n\t\t\t\t--#{$prefix}tooltip-content-text-color: #{get(\"text-color-inverse\", $definitions)};\n\t\t\t}\n\t\t}\n\t}\n\t@each $size, $definitions in $tooltip-content-sizes {\n\t\t&[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&[position=\"#{$position}\"] {\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, TooltipSize, TooltipSizeType, TooltipVariant, TooltipVariantType } 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 * Style variation of the tooltip\n\t */\n\t@Prop() readonly variant?: TooltipVariantType = TooltipVariant.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\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\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t<slot></slot>\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}\n\t\t\t\t\t\tinverse={this.variant === TooltipVariant.SECONDARY}>\n\t\t\t\t\t\t<gov-icon slot={\"left-icon\"} name={\"x-lg\"} type={\"basic\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -12,19 +12,23 @@ require('./variants-f5ffeef3.js');
|
|
|
12
12
|
require('./sizes-79872c2a.js');
|
|
13
13
|
require('./utils-c9b1bba3.js');
|
|
14
14
|
|
|
15
|
-
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}
|
|
15
|
+
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}";
|
|
16
16
|
|
|
17
17
|
const GovTooltip = class {
|
|
18
18
|
constructor(hostRef) {
|
|
19
19
|
index.registerInstance(this, hostRef);
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
20
|
+
this.tooltipContentId = undefined;
|
|
21
|
+
this.tooltipId = undefined;
|
|
22
|
+
this.variant = constants.TooltipVariant.PRIMARY;
|
|
23
|
+
this.size = constants.TooltipSize._M;
|
|
24
|
+
this.position = "right";
|
|
23
25
|
this.message = undefined;
|
|
24
26
|
this.identifier = undefined;
|
|
25
27
|
this.icon = undefined;
|
|
28
|
+
this.persist = false;
|
|
26
29
|
this.h = template.govHost(this.host);
|
|
27
|
-
this.tooltipId = string_utils.createID(
|
|
30
|
+
this.tooltipId = string_utils.createID("GovTooltip");
|
|
31
|
+
this.tooltipContentId = string_utils.createID("GovContentTooltip");
|
|
28
32
|
}
|
|
29
33
|
validateVariant(newValue) {
|
|
30
34
|
props.validateProp(constants.TooltipVariant, newValue, constants.TooltipClass.root);
|
|
@@ -42,6 +46,9 @@ const GovTooltip = class {
|
|
|
42
46
|
this.createContentWrapper();
|
|
43
47
|
this.registerListeners();
|
|
44
48
|
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
this.removeContent();
|
|
51
|
+
}
|
|
45
52
|
createContentWrapper() {
|
|
46
53
|
var _a;
|
|
47
54
|
const hasContentInside = this.host.querySelector(constants.TooltipContentClass.root);
|
|
@@ -53,84 +60,103 @@ const GovTooltip = class {
|
|
|
53
60
|
this.content.innerHTML = this.message;
|
|
54
61
|
this.host.appendChild(this.content);
|
|
55
62
|
}
|
|
56
|
-
this.content.setAttribute(
|
|
63
|
+
this.content.setAttribute("id", (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId);
|
|
64
|
+
this.content.setAttribute("parent-id", this.tooltipId);
|
|
65
|
+
this.content.setAttribute("variant", this.variant);
|
|
66
|
+
this.content.setAttribute("size", this.size);
|
|
67
|
+
document.body.appendChild(this.content);
|
|
57
68
|
}
|
|
58
69
|
registerListeners() {
|
|
59
|
-
this.host.addEventListener(
|
|
70
|
+
this.host.addEventListener("click", e => {
|
|
60
71
|
e.preventDefault();
|
|
72
|
+
this.persist = true;
|
|
61
73
|
this.showTooltip();
|
|
62
74
|
});
|
|
63
|
-
this.host.addEventListener(
|
|
75
|
+
this.host.addEventListener("focus", e => {
|
|
64
76
|
e.preventDefault();
|
|
65
|
-
this.
|
|
77
|
+
this.showTooltip();
|
|
78
|
+
});
|
|
79
|
+
this.host.addEventListener("blur", e => {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
if (this.persist === false) {
|
|
82
|
+
this.hideTooltip();
|
|
83
|
+
}
|
|
66
84
|
});
|
|
67
|
-
this.host.addEventListener(
|
|
85
|
+
this.host.addEventListener("mouseenter", e => {
|
|
68
86
|
e.preventDefault();
|
|
69
87
|
this.showTooltip();
|
|
70
88
|
});
|
|
71
|
-
this.host.addEventListener(
|
|
89
|
+
this.host.addEventListener("mouseleave", e => {
|
|
72
90
|
e.preventDefault();
|
|
73
|
-
this.
|
|
91
|
+
if (this.persist === false) {
|
|
92
|
+
this.hideTooltip();
|
|
93
|
+
}
|
|
74
94
|
});
|
|
75
95
|
}
|
|
76
96
|
verifyPositionSpace() {
|
|
77
|
-
// @TODO Improve positioning of broken lines
|
|
78
97
|
const offset = 12;
|
|
79
|
-
const windowWidth = window.innerWidth;
|
|
80
98
|
const trigger = this.host.getBoundingClientRect();
|
|
81
99
|
const trgWidth = this.host.offsetWidth;
|
|
100
|
+
const trgHeight = this.host.offsetHeight;
|
|
101
|
+
const contentWidth = this.content.offsetWidth;
|
|
102
|
+
const contentHeight = this.content.offsetHeight;
|
|
82
103
|
const triggerPos = {
|
|
83
104
|
left: trigger.left + document.documentElement.scrollLeft,
|
|
84
105
|
top: trigger.top + document.documentElement.scrollTop,
|
|
85
106
|
};
|
|
86
|
-
|
|
87
|
-
if (this.position === constants.TooltipPosition.LEFT) {
|
|
88
|
-
|
|
89
|
-
this.position = constants.TooltipPosition.TOP;
|
|
90
|
-
this.content.style.left = '0px';
|
|
91
|
-
this.content.style.width = window.innerWidth - triggerPos.left - offset + 'px';
|
|
92
|
-
this.content.style.transform = 'none';
|
|
93
|
-
}
|
|
107
|
+
// @TODO check space for displaying tooltip
|
|
108
|
+
if (this.position === constants.TooltipPosition.LEFT || this.position === constants.TooltipPosition.RIGHT) {
|
|
109
|
+
this.content.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + "px";
|
|
94
110
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
this.content.style.right = '0px';
|
|
99
|
-
this.content.style.left = 'auto';
|
|
100
|
-
this.content.style.width = trgWidth + triggerPos.left + offset + 'px';
|
|
101
|
-
this.content.style.transform = 'none';
|
|
102
|
-
}
|
|
111
|
+
if (this.position === constants.TooltipPosition.RIGHT) {
|
|
112
|
+
this.content.setAttribute("position", constants.TooltipPosition.RIGHT);
|
|
113
|
+
this.content.style.left = (triggerPos.left + offset + trigger.width) + "px";
|
|
103
114
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
if (this.position === constants.TooltipPosition.LEFT) {
|
|
116
|
+
this.content.setAttribute("position", constants.TooltipPosition.LEFT);
|
|
117
|
+
this.content.style.left = (triggerPos.left - (contentWidth + offset)) + "px";
|
|
118
|
+
}
|
|
119
|
+
if (this.position === constants.TooltipPosition.TOP || this.position === constants.TooltipPosition.BOTTOM) {
|
|
120
|
+
if (contentWidth > trgWidth) {
|
|
121
|
+
this.content.style.left = (triggerPos.left - ((contentWidth - trgWidth) / 2)) + "px";
|
|
110
122
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
this.content.style.right = '0px';
|
|
114
|
-
this.content.style.left = 'auto';
|
|
115
|
-
this.content.style.width = trgWidth + triggerPos.left + offset + 'px';
|
|
116
|
-
this.content.style.transform = 'none';
|
|
123
|
+
else {
|
|
124
|
+
this.content.style.left = (triggerPos.left + ((trgWidth - contentWidth) / 2)) + "px";
|
|
117
125
|
}
|
|
118
126
|
}
|
|
127
|
+
if (this.position === constants.TooltipPosition.TOP) {
|
|
128
|
+
this.content.setAttribute("position", constants.TooltipPosition.TOP);
|
|
129
|
+
this.content.style.top = (triggerPos.top - (contentHeight + offset)) + "px";
|
|
130
|
+
}
|
|
131
|
+
if (this.position === constants.TooltipPosition.BOTTOM) {
|
|
132
|
+
this.content.setAttribute("position", constants.TooltipPosition.BOTTOM);
|
|
133
|
+
this.content.style.top = (triggerPos.top + (trgHeight + offset)) + "px";
|
|
134
|
+
}
|
|
119
135
|
}
|
|
120
136
|
showTooltip() {
|
|
121
137
|
if (this.content) {
|
|
122
138
|
this.verifyPositionSpace();
|
|
123
|
-
this.content.setAttribute(
|
|
139
|
+
this.content.setAttribute("is-visible", "true");
|
|
140
|
+
if (this.persist) {
|
|
141
|
+
this.content.setAttribute("persist", "true");
|
|
142
|
+
}
|
|
124
143
|
}
|
|
125
144
|
}
|
|
126
145
|
hideTooltip() {
|
|
127
146
|
if (this.content) {
|
|
128
|
-
this.content.setAttribute(
|
|
147
|
+
this.content.setAttribute("is-visible", "false");
|
|
148
|
+
this.content.setAttribute("persist", "false");
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
removeContent() {
|
|
152
|
+
const contentEl = document.getElementById(this.tooltipContentId);
|
|
153
|
+
if (contentEl) {
|
|
154
|
+
contentEl.remove();
|
|
129
155
|
}
|
|
130
156
|
}
|
|
131
157
|
render() {
|
|
132
158
|
var _a;
|
|
133
|
-
return (index.h(index.Host, { class: this.h.classes(constants.TooltipClass.root), position: this.position,
|
|
159
|
+
return (index.h(index.Host, { id: this.tooltipId, class: this.h.classes(constants.TooltipClass.root), position: this.position, tabindex: 0, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, index.h("slot", null)));
|
|
134
160
|
}
|
|
135
161
|
/**
|
|
136
162
|
* Showing the modal
|
|
@@ -139,9 +165,10 @@ const GovTooltip = class {
|
|
|
139
165
|
this.showTooltip();
|
|
140
166
|
}
|
|
141
167
|
/**
|
|
142
|
-
*
|
|
168
|
+
* Hiding the modal
|
|
143
169
|
*/
|
|
144
170
|
async hide() {
|
|
171
|
+
this.persist = false;
|
|
145
172
|
this.hideTooltip();
|
|
146
173
|
}
|
|
147
174
|
get host() { return index.getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-tooltip.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,wnDAAwnD;;MCoBjoD,UAAU;EAKtB;;mBASgD,SAAS;gBAIf,GA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IAAI;IACT,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;;;;;;;;;","names":["govHost","createID","validateProp","TooltipVariant","TooltipClass","TooltipSize","TooltipPosition","TooltipContentClass","h","Host"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.scss?tag=gov-tooltip","../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["/*\n * Tooltip\n */\n\n$class: \".gov-tooltip\";\n\n#{$class} {\n\tposition: relative;\n\tdisplay: inline;\n\tborder-bottom: 1px dashed currentcolor;\n\tcolor: color(\"primary\");\n\tcursor: help;\n\n\t// VARIANTS\n\t@include parameter(\"icon\") {\n\t\tdisplay: inline-flex;\n\t\tborder-bottom: 0;\n\t}\n\t@each $variant, $definitions in $tooltip-content-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t--#{$prefix}tooltip-content-bg-color: #{get(\"bg-color\", $definitions)};\n\t\t\t--#{$prefix}tooltip-content-text-color: #{get(\"text-color\", $definitions)};\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\t--#{$prefix}tooltip-content-bg-color: #{color(\"neutral.white\")};\n\t\t\t\t--#{$prefix}tooltip-content-text-color: #{get(\"text-color-inverse\", $definitions)};\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport {\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipVariant,\n\tTooltipVariantType,\n} from './constants'\nimport { createID } from '../../utils/string.utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tooltip',\n\tstyleUrl: 'gov-tooltip.scss',\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate content: HTMLGovTooltipContentElement\n\tprivate readonly tooltipId\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID('GovTooltip')\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly variant?: TooltipVariantType = 'primary'\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = 'm'\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop() position: TooltipPositionType = 'right'\n\t/**\n\t * Information contained in the tolltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({ attribute: 'icon' }) readonly icon: boolean = undefined\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TooltipVariant, newValue, TooltipClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch('position')\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tconst hasContentInside = this.host.querySelector(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\tif (hasContentInside) {\n\t\t\tthis.content = hasContentInside\n\t\t} else {\n\t\t\tthis.content = document.createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tthis.content.innerHTML = this.message\n\t\t\tthis.host.appendChild(this.content)\n\t\t}\n\n\t\tthis.content.setAttribute('id', this.identifier ?? this.tooltipId)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener('focus', e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener('blur', e => {\n\t\t\te.preventDefault()\n\t\t\tthis.hideTooltip()\n\t\t})\n\t\tthis.host.addEventListener('mouseenter', e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener('mouseleave', e => {\n\t\t\te.preventDefault()\n\t\t\tthis.hideTooltip()\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\t// @TODO Improve positioning of broken lines\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\t\tconst tltWidth = this.content.offsetWidth\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tif (offset + triggerPos.left < tltWidth) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.content.style.left = '0px'\n\t\t\t\tthis.content.style.width = window.innerWidth - triggerPos.left - offset + 'px'\n\t\t\t\tthis.content.style.transform = 'none'\n\t\t\t}\n\t\t} else if (this.position === TooltipPosition.RIGHT) {\n\t\t\tif (windowWidth - (triggerPos.left + trgWidth) < tltWidth) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.content.style.right = '0px'\n\t\t\t\tthis.content.style.left = 'auto'\n\t\t\t\tthis.content.style.width = trgWidth + triggerPos.left + offset + 'px'\n\t\t\t\tthis.content.style.transform = 'none'\n\t\t\t}\n\t\t} else {\n\t\t\t// doesn't fit from the left\n\t\t\tif (tltWidth / 2 > triggerPos.left) {\n\t\t\t\tthis.content.style.left = '0px'\n\t\t\t\tthis.content.style.width = window.innerWidth - triggerPos.left - offset + 'px'\n\t\t\t\tthis.content.style.transform = 'none'\n\t\t\t}\n\t\t\t// doesn't fit from the right\n\t\t\telse if (tltWidth / 2 > windowWidth - (triggerPos.left + tltWidth)) {\n\t\t\t\tthis.content.style.right = '0px'\n\t\t\t\tthis.content.style.left = 'auto'\n\t\t\t\tthis.content.style.width = trgWidth + triggerPos.left + offset + 'px'\n\t\t\t\tthis.content.style.transform = 'none'\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.content) {\n\t\t\tthis.verifyPositionSpace()\n\t\t\tthis.content.setAttribute('is-visible', 'true')\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.content) {\n\t\t\tthis.content.setAttribute('is-visible', 'false')\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}\n\t\t\t\tsize={this.size}\n\t\t\t\ttabindex={0}\n\t\t\t\taria-describedby={this.identifier ?? this.tooltipId}\n\t\t\t\tvariant={this.variant}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hidding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideTooltip()\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-tooltip.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,skBAAskB;;MCoB/kB,UAAU;EAMtB;;IAHiB,qBAAgB,GAAG,SAAS,CAAA;IAC5B,cAAS,GAAG,SAAS,CAAA;mBAYUA,wBAAc,CAAC,OAAO;gBAI5BC,qBAAW,CAAC,EAAE;oBAIhB,OAAO;mBAIZ,SAAS;;gBAQU,SAAS;mBAE5C,KAAK;IA/BvB,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B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EAAE,CAAA;GAClB;;;;;;;;;;;;","names":["TooltipVariant","TooltipSize","govHost","createID","validateProp","TooltipClass","TooltipPosition","TooltipContentClass","h","Host"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.scss?tag=gov-tooltip","../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["/*\n * Tooltip\n */\n\n$class: \".gov-tooltip\";\n\n#{$class} {\n\tposition: relative;\n\tdisplay: inline;\n\tborder-bottom: 1px dashed currentcolor;\n\tcolor: color(\"primary\");\n\tcursor: help;\n\n\t@include parameter(\"icon\") {\n\t\tdisplay: inline-flex;\n\t\tborder-bottom: 0;\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipVariant,\n\tTooltipVariantType,\n} from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\n\n@Component({\n\ttag: \"gov-tooltip\",\n\tstyleUrl: \"gov-tooltip.scss\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate content: HTMLGovTooltipContentElement\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly variant?: TooltipVariantType = TooltipVariant.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop() position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({ attribute: \"icon\" }) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TooltipVariant, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tconst hasContentInside = this.host.querySelector(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\tif (hasContentInside) {\n\t\t\tthis.content = hasContentInside\n\t\t} else {\n\t\t\tthis.content = document.createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tthis.content.innerHTML = this.message\n\t\t\tthis.host.appendChild(this.content)\n\t\t}\n\n\t\tthis.content.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tthis.content.setAttribute(\"parent-id\", this.tooltipId)\n\t\tthis.content.setAttribute(\"variant\", this.variant)\n\t\tthis.content.setAttribute(\"size\", this.size)\n\t\tdocument.body.appendChild(this.content)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"focus\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"blur\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.content.offsetWidth\n\t\tconst contentHeight = this.content.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\t\t// @TODO check space for displaying tooltip\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.content.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.content.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.content.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.content.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.content.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tthis.content.style.left = (triggerPos.left - ((contentWidth - trgWidth) / 2)) + \"px\"\n\t\t\t} else {\n\t\t\t\tthis.content.style.left = (triggerPos.left + ((trgWidth - contentWidth) / 2)) + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.content.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.content.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.content.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.content.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.content) {\n\t\t\tthis.verifyPositionSpace()\n\t\t\tthis.content.setAttribute(\"is-visible\", \"true\")\n\t\t\tif (this.persist) {\n\t\t\t\tthis.content.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.content) {\n\t\t\tthis.content.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.content.setAttribute(\"persist\", \"false\")\n\t\t}\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}\n\t\t\t\ttabindex={0}\n\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n"],"version":3}
|
|
@@ -13,7 +13,7 @@ require('./variants-f5ffeef3.js');
|
|
|
13
13
|
require('./sizes-79872c2a.js');
|
|
14
14
|
require('./utils-c9b1bba3.js');
|
|
15
15
|
|
|
16
|
-
const govWizardItemCss = ".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-wizard-item{position:relative;display:block;width:100%;margin-bottom:1rem;background:var(--gov-wizard-bg-color, var(--gov-color-neutral-white))}.gov-wizard-item__header{position:relative;width:100%}.gov-wizard-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-wizard-item__title{margin:0;padding:0;font-family:var(--gov-font-family, \"Roboto\", sans-serif);font-weight:400;box-sizing:border-box;display:flex;gap:1rem;align-items:baseline}.gov-wizard-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-wizard-item__prefix .gov-icon{width:45%;height:45%}.gov-wizard-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-wizard-item__name{display:flex;flex-direction:column}.gov-wizard-item__label{display:flex;gap:0.5rem;align-items:center}.gov-wizard-item__annot{color:var(--gov-color-secondary)}.gov-wizard-item__content>*:last-child{margin-bottom:0}.gov-wizard-item[variant=primary] .gov-wizard-item__header{color:var(--gov-wizard-primary-color, var(--gov-color-primary-800))}.gov-wizard-item[variant=primary] .gov-wizard-item__prefix{background:var(--gov-wizard-primary-indicator-bg, var(--gov-color-primary-300));color:var(--gov-wizard-primary-indicator-color, var(--gov-color-primary-800))}.gov-wizard-item[variant=secondary] .gov-wizard-item__header{color:var(--gov-wizard-secondary-color, var(--gov-color-secondary-700))}.gov-wizard-item[variant=secondary] .gov-wizard-item__prefix{background:var(--gov-wizard-secondary-indicator-bg, var(--gov-color-secondary-400));color:var(--gov-wizard-secondary-indicator-color, var(--gov-color-secondary-700))}.gov-wizard-item[variant=success] .gov-wizard-item__header{color:var(--gov-wizard-success-color, var(--gov-color-success-500))}.gov-wizard-item[variant=success] .gov-wizard-item__prefix{background:var(--gov-wizard-success-indicator-bg, var(--gov-color-success));color:var(--gov-wizard-success-indicator-color, var(--gov-color-neutral-white))}.gov-wizard-item[variant=error] .gov-wizard-item__header{color:var(--gov-wizard-error-color, var(--gov-color-error-500))}.gov-wizard-item[variant=error] .gov-wizard-item__prefix{background:var(--gov-wizard-error-indicator-bg, var(--gov-color-error));color:var(--gov-wizard-error-indicator-color, var(--gov-color-neutral-white))}.gov-wizard-item[variant=warning] .gov-wizard-item__header{color:var(--gov-wizard-warning-color, var(--gov-color-warning-500))}.gov-wizard-item[variant=warning] .gov-wizard-item__prefix{background:var(--gov-wizard-warning-indicator-bg, var(--gov-color-warning));color:var(--gov-wizard-warning-indicator-color, var(--gov-color-neutral-white))}.gov-wizard-item__header{gap:1rem;padding:1rem;border-radius:0;text-align:left;transition:150ms linear color}.gov-wizard-item__header:focus{outline:none}.gov-wizard-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-wizard-item__prefix{position:absolute;left:1rem}.gov-wizard-
|
|
16
|
+
const govWizardItemCss = ".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-wizard-item{position:relative;display:block;width:100%;margin-bottom:1rem;background:var(--gov-wizard-bg-color, var(--gov-color-neutral-white))}.gov-wizard-item__header{position:relative;width:100%}.gov-wizard-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-wizard-item__title{margin:0;padding:0;font-family:var(--gov-font-family, \"Roboto\", sans-serif);font-weight:400;box-sizing:border-box;display:flex;gap:1rem;align-items:baseline}.gov-wizard-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-wizard-item__prefix .gov-icon{width:45%;height:45%}.gov-wizard-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-wizard-item__name{display:flex;flex-direction:column}.gov-wizard-item__label{display:flex;gap:0.5rem;align-items:center;font-weight:var(--gov-wizard-title-font-weight, 700)}.gov-wizard-item__annot{color:var(--gov-color-secondary)}.gov-wizard-item__content>*:last-child{margin-bottom:0}.gov-wizard-item[variant=primary] .gov-wizard-item__header{color:var(--gov-wizard-primary-color, var(--gov-color-primary-800))}.gov-wizard-item[variant=primary] .gov-wizard-item__prefix{background:var(--gov-wizard-primary-indicator-bg, var(--gov-color-primary-300));color:var(--gov-wizard-primary-indicator-color, var(--gov-color-primary-800))}.gov-wizard-item[variant=secondary] .gov-wizard-item__header{color:var(--gov-wizard-secondary-color, var(--gov-color-secondary-700))}.gov-wizard-item[variant=secondary] .gov-wizard-item__prefix{background:var(--gov-wizard-secondary-indicator-bg, var(--gov-color-secondary-400));color:var(--gov-wizard-secondary-indicator-color, var(--gov-color-secondary-700))}.gov-wizard-item[variant=success] .gov-wizard-item__header{color:var(--gov-wizard-success-color, var(--gov-color-success-500))}.gov-wizard-item[variant=success] .gov-wizard-item__prefix{background:var(--gov-wizard-success-indicator-bg, var(--gov-color-success));color:var(--gov-wizard-success-indicator-color, var(--gov-color-neutral-white))}.gov-wizard-item[variant=error] .gov-wizard-item__header{color:var(--gov-wizard-error-color, var(--gov-color-error-500))}.gov-wizard-item[variant=error] .gov-wizard-item__prefix{background:var(--gov-wizard-error-indicator-bg, var(--gov-color-error));color:var(--gov-wizard-error-indicator-color, var(--gov-color-neutral-white))}.gov-wizard-item[variant=warning] .gov-wizard-item__header{color:var(--gov-wizard-warning-color, var(--gov-color-warning-500))}.gov-wizard-item[variant=warning] .gov-wizard-item__prefix{background:var(--gov-wizard-warning-indicator-bg, var(--gov-color-warning));color:var(--gov-wizard-warning-indicator-color, var(--gov-color-neutral-white))}.gov-wizard-item__header{gap:1rem;padding:1rem;border-radius:0;text-align:left;transition:150ms linear color}.gov-wizard-item__header:focus{outline:none}.gov-wizard-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-wizard-item__prefix{position:absolute;left:1rem}.gov-wizard-item__header[aria-expanded=true] .gov-wizard-item__label .gov-icon{transform:scale(-1)}.gov-wizard-item[size=xs] .gov-wizard-item__title,.gov-wizard-item[size=s] .gov-wizard-item__title,.gov-wizard-item[size=m] .gov-wizard-item__title{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)}.gov-wizard-item[size=xs] .gov-wizard-item__annot,.gov-wizard-item[size=s] .gov-wizard-item__annot,.gov-wizard-item[size=m] .gov-wizard-item__annot{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-wizard-item[size=xs] .gov-wizard-item__prefix,.gov-wizard-item[size=s] .gov-wizard-item__prefix,.gov-wizard-item[size=m] .gov-wizard-item__prefix{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);width:var(--gov-wizard-xs-indicator-size, 1.5rem);height:var(--gov-wizard-xs-indicator-size, 1.5rem);top:var(--gov-wizard-xs-top, 1rem)}.gov-wizard-item[size=xs] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=s] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-xs-header-padding, 1rem 1rem 1rem 3.5rem)}.gov-wizard-item[size=xs] .gov-wizard-item__content,.gov-wizard-item[size=s] .gov-wizard-item__content,.gov-wizard-item[size=m] .gov-wizard-item__content{padding:var(--gov-wizard-content-padding, 0rem 1rem 1rem 1rem)}@media not all and (pointer: coarse){.gov-wizard-item[variant=primary][collapsible=\"\"] .gov-wizard-item__header:hover,.gov-wizard-item[variant=primary][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=primary][collapsible=\"1\"] .gov-wizard-item__header:hover{color:var(--gov-wizard-primary-hover-color, var(--gov-color-primary-900))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=secondary][collapsible=\"\"] .gov-wizard-item__header:hover,.gov-wizard-item[variant=secondary][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=secondary][collapsible=\"1\"] .gov-wizard-item__header:hover{color:var(--gov-wizard-secondary-hover-color, var(--gov-color-secondary-800))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=success][collapsible=\"\"] .gov-wizard-item__header:hover,.gov-wizard-item[variant=success][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=success][collapsible=\"1\"] .gov-wizard-item__header:hover{color:var(--gov-wizard-success-hover-color, var(--gov-color-success-600))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=error][collapsible=\"\"] .gov-wizard-item__header:hover,.gov-wizard-item[variant=error][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=error][collapsible=\"1\"] .gov-wizard-item__header:hover{color:var(--gov-wizard-error-hover-color, var(--gov-color-error-600))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=warning][collapsible=\"\"] .gov-wizard-item__header:hover,.gov-wizard-item[variant=warning][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=warning][collapsible=\"1\"] .gov-wizard-item__header:hover{color:var(--gov-wizard-warning-hover-color, var(--gov-color-warning-600))}}button.gov-wizard-item__header{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;justify-content:flex-start;text-align:left}button.gov-wizard-item__header:focus{outline:none}@media (min-width: 30em){.gov-wizard-item[size=s] .gov-wizard-item__title,.gov-wizard-item[size=m] .gov-wizard-item__title{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing)}.gov-wizard-item[size=s] .gov-wizard-item__prefix,.gov-wizard-item[size=m] .gov-wizard-item__prefix{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);width:var(--gov-wizard-s-indicator-size, 2rem);height:var(--gov-wizard-s-indicator-size, 2rem);top:var(--gov-wizard-s-top, 0.8125rem)}.gov-wizard-item[size=s] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-s-header-padding, 1rem 1rem 1rem 4rem)}}@media (min-width: 48em){.gov-wizard-item[size=m] .gov-wizard-item__title{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing)}.gov-wizard-item[size=m] .gov-wizard-item__prefix{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);width:var(--gov-wizard-m-indicator-size, 2.5rem);height:var(--gov-wizard-m-indicator-size, 2.5rem);top:var(--gov-wizard-m-top, 0.5625rem)}.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-m-header-padding, 1rem 1rem 1rem 4.5rem)}.gov-wizard-item[size=xs] .gov-wizard-item__content{padding:var(--gov-wizard-xs-content-padding, 0rem 1rem 1rem 3.5rem)}.gov-wizard-item[size=s] .gov-wizard-item__content{padding:var(--gov-wizard-s-content-padding, 0rem 1rem 1rem 4rem)}.gov-wizard-item[size=m] .gov-wizard-item__content{padding:var(--gov-wizard-m-content-padding, 0rem 1rem 1rem 4.5rem)}}";
|
|
17
17
|
|
|
18
18
|
var Tags;
|
|
19
19
|
(function (Tags) {
|