@gov-design-system-ce/components 0.0.57 → 0.0.59
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 +96 -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-form-label.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-label.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +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-loading.cjs.entry.js +2 -3
- package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-toast.cjs.entry.js +10 -16
- 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/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 -1
- 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/checkbox/gov-form-checkbox.css +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/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/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 +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/search/gov-form-search.css +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.css +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.css +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 +1 -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 +5 -4
- package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -24
- package/dist/collection/components/gov-loading/loading/gov-loading.js.map +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 +1 -1
- 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 +1 -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 +15 -21
- 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 +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard.css +1 -1
- package/dist/collection/pages/Card.js +11 -9
- package/dist/collection/pages/Card.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/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-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-label.js +1 -1
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-select.js +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-loading.js.map +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-side-nav-item.js +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/{p-8d9c2f0a.js → p-30af8d08.js} +2 -2
- package/dist/components/p-3e8a9e92.js.map +1 -1
- package/dist/components/{p-1a0f8d13.js → p-5d8154f9.js} +2 -2
- package/dist/components/{p-0378da4d.js → p-8d44ca3c.js} +2 -2
- package/dist/components/p-8d44ca3c.js.map +1 -0
- package/dist/components/{p-404f469e.js → p-9a4c910d.js} +2 -2
- package/dist/components/{p-8449a4cf.js → p-ae179d8a.js} +2 -2
- package/dist/components/p-ae179d8a.js.map +1 -0
- package/dist/components/{p-80f0ed50.js → p-afb7fc88.js} +2 -2
- package/dist/components/{p-839e8965.js → p-b430ee05.js} +2 -2
- package/dist/components/{p-d4f30d9b.js → p-e24896b9.js} +2 -2
- 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-3d0ab343.entry.js → p-0c57e410.entry.js} +2 -2
- package/dist/core/{p-42c1935f.entry.js → p-243a61bf.entry.js} +2 -2
- package/dist/core/p-2bb9f781.entry.js +2 -0
- package/dist/core/p-2bb9f781.entry.js.map +1 -0
- package/dist/core/{p-18ef9623.entry.js → p-2bf0c1c5.entry.js} +2 -2
- package/dist/core/p-2c0ac7ab.entry.js +2 -0
- package/dist/core/{p-85258200.entry.js.map → p-2c0ac7ab.entry.js.map} +1 -1
- package/dist/core/p-307d4c56.entry.js +2 -0
- package/dist/core/p-307d4c56.entry.js.map +1 -0
- 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-bd1cb5bd.entry.js → p-4452c278.entry.js} +2 -2
- package/dist/core/{p-a85f4a62.entry.js → p-49729bd4.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-69f944d1.entry.js → p-73fb7ac7.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-62e9bbf3.entry.js → p-8033916b.entry.js} +2 -2
- package/dist/core/p-82b4b522.entry.js +2 -0
- package/dist/core/p-82b4b522.entry.js.map +1 -0
- package/dist/core/{p-8fce08d1.entry.js → p-8667d5df.entry.js} +2 -2
- 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-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-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-af646ce2.entry.js → p-c61444f7.entry.js} +2 -2
- package/dist/core/p-c61444f7.entry.js.map +1 -0
- package/dist/core/{p-d4cfa93a.entry.js → p-cb37644f.entry.js} +2 -2
- package/dist/core/{p-9bfab069.entry.js → p-ce262a72.entry.js} +2 -2
- package/dist/core/p-f9dfaff1.entry.js +2 -0
- package/dist/core/p-f9dfaff1.entry.js.map +1 -0
- package/dist/core/{p-13624a77.entry.js → p-fea58abc.entry.js} +2 -2
- package/dist/core/{p-3858e2c8.entry.js → p-ff97a688.entry.js} +2 -2
- package/dist/core/p-ff97a688.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 +96 -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-form-checkbox.entry.js +1 -1
- package/dist/esm/gov-form-file.entry.js +1 -1
- package/dist/esm/gov-form-input.entry.js +1 -1
- package/dist/esm/gov-form-label.entry.js +1 -1
- package/dist/esm/gov-form-label.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +1 -1
- package/dist/esm/gov-form-radio.entry.js +1 -1
- package/dist/esm/gov-form-select.entry.js +1 -1
- package/dist/esm/gov-form-switch.entry.js +1 -1
- package/dist/esm/gov-icon.entry.js +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-loading.entry.js +2 -3
- package/dist/esm/gov-loading.entry.js.map +1 -1
- 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 +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-tabs.entry.js +1 -1
- package/dist/esm/gov-toast.entry.js +10 -16
- 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.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/hydrate/index.js +299 -205
- 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-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-loading/loading/gov-loading.d.ts +0 -4
- package/dist/types/components/gov-toast/gov-toast.d.ts +4 -6
- 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 +120 -96
- package/dist/types/pages/Infobar.d.ts +3 -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-8449a4cf.js.map +0 -1
- package/dist/core/p-3858e2c8.entry.js.map +0 -1
- 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-4c79a97a.entry.js +0 -2
- package/dist/core/p-4c79a97a.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-aa4e716e.entry.js +0 -2
- package/dist/core/p-aa4e716e.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-dfc080f2.entry.js +0 -2
- package/dist/core/p-dfc080f2.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-8d9c2f0a.js.map → p-30af8d08.js.map} +0 -0
- /package/dist/components/{p-1a0f8d13.js.map → p-5d8154f9.js.map} +0 -0
- /package/dist/components/{p-404f469e.js.map → p-9a4c910d.js.map} +0 -0
- /package/dist/components/{p-80f0ed50.js.map → p-afb7fc88.js.map} +0 -0
- /package/dist/components/{p-839e8965.js.map → p-b430ee05.js.map} +0 -0
- /package/dist/components/{p-d4f30d9b.js.map → p-e24896b9.js.map} +0 -0
- /package/dist/core/{p-3d0ab343.entry.js.map → p-0c57e410.entry.js.map} +0 -0
- /package/dist/core/{p-42c1935f.entry.js.map → p-243a61bf.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-a85f4a62.entry.js.map → p-49729bd4.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-69f944d1.entry.js.map → p-73fb7ac7.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-62e9bbf3.entry.js.map → p-8033916b.entry.js.map} +0 -0
- /package/dist/core/{p-8fce08d1.entry.js.map → p-8667d5df.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
- /package/dist/core/{p-d4cfa93a.entry.js.map → p-cb37644f.entry.js.map} +0 -0
- /package/dist/core/{p-9bfab069.entry.js.map → p-ce262a72.entry.js.map} +0 -0
- /package/dist/core/{p-13624a77.entry.js.map → p-fea58abc.entry.js.map} +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-83edd4fe.js');
|
|
6
|
-
const props = require('./props-5f82e4c0.js');
|
|
7
|
-
const variants = require('./variants-f5ffeef3.js');
|
|
8
|
-
const utils = require('./utils-c9b1bba3.js');
|
|
9
|
-
const template = require('./template-e1c4ff78.js');
|
|
10
|
-
const Fragment = require('./Fragment-52846f79.js');
|
|
11
|
-
const wcag = require('./wcag-d7912060.js');
|
|
12
|
-
const win = require('./win-0427c131.js');
|
|
13
|
-
require('./gov.log-0c9dca27.js');
|
|
14
|
-
require('./string.utils-0f08c48c.js');
|
|
15
|
-
|
|
16
|
-
const AlertVariants = utils.pick(variants.Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS']);
|
|
17
|
-
const AlertClass = {
|
|
18
|
-
root: 'gov-alert',
|
|
19
|
-
section: 'gov-alert__section',
|
|
20
|
-
icon: 'gov-alert__icon',
|
|
21
|
-
content: 'gov-alert__content',
|
|
22
|
-
headline: 'gov-alert__headline',
|
|
23
|
-
close: 'gov-alert__close',
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const govAlertCss = ".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-alert{position:relative;display:block;width:100%}.gov-alert__section{display:block;width:100%;max-width:calc(var(--gov-container-width, 73.75rem) + 2 * var(--gov-container-padding, 2.5rem));margin-right:auto;margin-left:auto;padding-right:var(--gov-container-padding-mobile, 1.25rem);padding-left:var(--gov-container-padding-mobile, 1.25rem);display:flex;gap:1rem;padding-top:1rem;padding-bottom:1rem}@media (min-width: 48em){.gov-alert__section{padding-right:var(--gov-container-padding, 2.5rem);padding-left:var(--gov-container-padding, 2.5rem)}}.gov-alert__icon{flex:0 0 auto}.gov-alert__icon>*{width:1.25rem;height:1.25rem}.gov-alert__headline{display:flex;gap:1rem}.gov-alert__headline+div{margin-top:0.5rem}.gov-alert__headline p{margin-bottom:0}.gov-alert__headline gov-button{margin-top:-0.25rem}.gov-alert__content{padding-right:3.25rem}.gov-alert__content>*:last-child{margin-bottom:0}.gov-alert__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)}.gov-alert__content a{color:inherit}@media not all and (pointer: coarse){.gov-alert__content a:hover{color:inherit}}.gov-alert__close{position:absolute;top:0.625rem;right:1rem}.gov-alert[variant=warning]{background-color:var(--gov-alert-warning-bg-color, var(--gov-color-warning))}.gov-alert[variant=warning] .gov-alert__icon{color:var(--gov-alert-warning-icon-color, var(--gov-color-secondary))}.gov-alert[variant=warning] .gov-alert__content{color:var(--gov-alert-warning-text-color, var(--gov-color-secondary))}.gov-alert[variant=warning][inverse=\"\"],.gov-alert[variant=warning][inverse=true i],.gov-alert[variant=warning][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=warning][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=warning][inverse=true i] .gov-alert__icon,.gov-alert[variant=warning][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-warning-bg-color, var(--gov-color-warning))}.gov-alert[variant=warning][inverse=\"\"] .gov-alert__content,.gov-alert[variant=warning][inverse=true i] .gov-alert__content,.gov-alert[variant=warning][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=error]{background-color:var(--gov-alert-error-bg-color, var(--gov-color-error))}.gov-alert[variant=error] .gov-alert__icon{color:var(--gov-alert-error-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=error] .gov-alert__content{color:var(--gov-alert-error-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=error][inverse=\"\"],.gov-alert[variant=error][inverse=true i],.gov-alert[variant=error][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=error][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=error][inverse=true i] .gov-alert__icon,.gov-alert[variant=error][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-error-bg-color, var(--gov-color-error))}.gov-alert[variant=error][inverse=\"\"] .gov-alert__content,.gov-alert[variant=error][inverse=true i] .gov-alert__content,.gov-alert[variant=error][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=secondary]{background-color:var(--gov-alert-secondary-bg-color, var(--gov-color-secondary))}.gov-alert[variant=secondary] .gov-alert__icon{color:var(--gov-alert-secondary-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=secondary] .gov-alert__content{color:var(--gov-alert-secondary-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=secondary][inverse=\"\"],.gov-alert[variant=secondary][inverse=true i],.gov-alert[variant=secondary][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=secondary][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=secondary][inverse=true i] .gov-alert__icon,.gov-alert[variant=secondary][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-secondary-bg-color, var(--gov-color-secondary))}.gov-alert[variant=secondary][inverse=\"\"] .gov-alert__content,.gov-alert[variant=secondary][inverse=true i] .gov-alert__content,.gov-alert[variant=secondary][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=success]{background-color:var(--gov-alert-success-bg-color, var(--gov-color-success-500))}.gov-alert[variant=success] .gov-alert__icon{color:var(--gov-alert-success-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=success] .gov-alert__content{color:var(--gov-alert-success-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=success][inverse=\"\"],.gov-alert[variant=success][inverse=true i],.gov-alert[variant=success][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=success][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=success][inverse=true i] .gov-alert__icon,.gov-alert[variant=success][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-success-bg-color, var(--gov-color-success-500))}.gov-alert[variant=success][inverse=\"\"] .gov-alert__content,.gov-alert[variant=success][inverse=true i] .gov-alert__content,.gov-alert[variant=success][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=primary]{background-color:var(--gov-alert-primary-bg-color, var(--gov-color-primary))}.gov-alert[variant=primary] .gov-alert__icon{color:var(--gov-alert-primary-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=primary] .gov-alert__content{color:var(--gov-alert-primary-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=primary][inverse=\"\"],.gov-alert[variant=primary][inverse=true i],.gov-alert[variant=primary][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=primary][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=primary][inverse=true i] .gov-alert__icon,.gov-alert[variant=primary][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-primary-bg-color, var(--gov-color-primary))}.gov-alert[variant=primary][inverse=\"\"] .gov-alert__content,.gov-alert[variant=primary][inverse=true i] .gov-alert__content,.gov-alert[variant=primary][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}@media (min-width: 75em){.gov-alert__content{padding-right:2rem}}";
|
|
27
|
-
|
|
28
|
-
const GovAlert = class {
|
|
29
|
-
constructor(hostRef) {
|
|
30
|
-
index.registerInstance(this, hostRef);
|
|
31
|
-
this.govClose = index.createEvent(this, "gov-close", 7);
|
|
32
|
-
this.headline = undefined;
|
|
33
|
-
this.variant = "primary";
|
|
34
|
-
this.inverse = false;
|
|
35
|
-
this.wcagCloseLabel = undefined;
|
|
36
|
-
this.wcagToggleLabel = undefined;
|
|
37
|
-
this.closable = false;
|
|
38
|
-
this.toggleContent = false;
|
|
39
|
-
this.h = template.govHost(this.host);
|
|
40
|
-
}
|
|
41
|
-
validateVariant(newValue) {
|
|
42
|
-
props.validateProp(AlertVariants, newValue, AlertClass.root);
|
|
43
|
-
}
|
|
44
|
-
componentWillLoad() {
|
|
45
|
-
this.validateVariant(this.variant);
|
|
46
|
-
}
|
|
47
|
-
async componentDidRender() {
|
|
48
|
-
if (win.canValidateWcagOnRender()) {
|
|
49
|
-
await utils.delay(500);
|
|
50
|
-
await this.validateWcag();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
render() {
|
|
54
|
-
let inverse = !this.inverse;
|
|
55
|
-
let variant = this.inverse ? "secondary" : this.variant;
|
|
56
|
-
if (this.variant == "warning") {
|
|
57
|
-
inverse = false;
|
|
58
|
-
variant = "secondary";
|
|
59
|
-
}
|
|
60
|
-
const closeButton = (index.h("div", { class: AlertClass.close }, index.h("gov-button", { size: "s", "aria-label": this.wcagCloseLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": this.onCloseHandler.bind(this) }, index.h("gov-icon", { name: "x-lg" }))));
|
|
61
|
-
return (index.h(index.Host, { class: this.h.classes(AlertClass.root), variant: this.variant }, index.h("section", { class: AlertClass.section, role: "alert" }, this.h.hasSlot("icon") && (index.h("div", { class: AlertClass.icon }, index.h("slot", { name: "icon" }))), index.h("div", { class: AlertClass.content }, this.headline ? (index.h(Fragment.Fragment, null, index.h("div", { class: AlertClass.headline }, index.h("p", null, this.headline), index.h("gov-button", { size: "s", "aria-label": this.wcagToggleLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": () => this.toggleContent = !this.toggleContent }, index.h("gov-icon", { name: this.toggleContent ? 'chevron-up' : 'chevron-down' }))), index.h("div", { hidden: !this.toggleContent, "aria-hidden": template.toBoolAttr(this.toggleContent) }, index.h("slot", null)))) : (index.h("slot", null)))), this.closable && closeButton));
|
|
62
|
-
}
|
|
63
|
-
onCloseHandler(e) {
|
|
64
|
-
this.govClose.emit({
|
|
65
|
-
component: AlertClass.root,
|
|
66
|
-
ref: this.host,
|
|
67
|
-
originalEvent: e,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Validate the WCAG attributes of the component
|
|
72
|
-
*/
|
|
73
|
-
async validateWcag() {
|
|
74
|
-
if (this.closable) {
|
|
75
|
-
wcag.validateWcagProp(this.wcagCloseLabel, 'wcag-close-label', AlertClass.root);
|
|
76
|
-
}
|
|
77
|
-
if (this.headline) {
|
|
78
|
-
wcag.validateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', AlertClass.root);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
get host() { return index.getElement(this); }
|
|
82
|
-
static get watchers() { return {
|
|
83
|
-
"variant": ["validateVariant"]
|
|
84
|
-
}; }
|
|
85
|
-
};
|
|
86
|
-
GovAlert.style = govAlertCss;
|
|
87
|
-
|
|
88
|
-
exports.gov_alert = GovAlert;
|
|
89
|
-
|
|
90
|
-
//# sourceMappingURL=gov-alert.cjs.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"gov-alert.entry.cjs.js","mappings":"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","names":["pick","Variants","govHost","validateProp","canValidateWcagOnRender","delay","h","Host","Fragment","toBoolAttr","validateWcagProp"],"sources":["../../../packages/core/src/components/gov-alert/constants.ts","../../../packages/core/src/components/gov-alert/gov-alert.scss?tag=gov-alert","../../../packages/core/src/components/gov-alert/gov-alert.tsx"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const AlertVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof AlertVariants>}`\n\nexport const AlertClass = {\n\troot: 'gov-alert',\n\tsection: 'gov-alert__section',\n\ticon: 'gov-alert__icon',\n\tcontent: 'gov-alert__content',\n\theadline: 'gov-alert__headline',\n\tclose: 'gov-alert__close',\n}\n","/*\n * Alert\n */\n\n$class: \".gov-alert\";\n\n#{$class} {\n\t@include base();\n\t&__section {\n\t\t@include container();\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tpadding-top: rem-calc(16);\n\t\tpadding-bottom: rem-calc(16);\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\t& > * {\n\t\t\twidth: rem-calc(20);\n\t\t\theight: rem-calc(20);\n\t\t}\n\t}\n\t&__headline {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\n\t\t+ div {\n\t\t\tmargin-top: rem-calc(8);\n\t\t}\n\n\t\tp {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tgov-button {\n\t\t\tmargin-top: rem-calc(-4);\n\t\t}\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\tpadding-right: rem-calc(52);\n\t\tp {\n\t\t\t@include typography($font-size-m);\n\t\t}\n\t\ta {\n\t\t\tcolor: inherit;\n\t\t\t@include hover() {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(10);\n\t\tright: rem-calc(16);\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $alert-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: get(\"bg-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"icon-color\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tcolor: get(\"text-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\tborder-bottom: $alert-border;\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tborder-bottom: $alert-border;\n\t\t\t\tbackground-color: $alert-inverse-bg;\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"bg-color\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tcolor: $alert-inverse-color;\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: xl) {\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, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { AlertClass, AlertVariants, VariantType } from \"./constants\"\nimport { govHost, toBoolAttr } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { AlertEvent } from \"./gov-alert.types\"\nimport { ButtonEvent } from \"../gov-button/default/gov-button.types\"\nimport Fragment from \"../../helpers/Fragment\"\nimport { validateWcagProp } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\n\n@Component({\n\ttag: \"gov-alert\",\n\tstyleUrl: \"gov-alert.scss\",\n})\nexport class GovAlert {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly headline: string\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant: VariantType = \"primary\"\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\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 * Aria label for the toggle button. It is mandatory if the alert has headline\n\t */\n\t@Prop({ attribute: \"wcag-toggle-label\" }) readonly wcagToggleLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<AlertEvent>\n\t/**\n\t * Displays the option to close the alert\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(AlertVariants, newValue, AlertClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tlet inverse = !this.inverse\n\t\tlet variant = this.inverse ? \"secondary\" : this.variant\n\n\t\tif (this.variant == \"warning\") {\n\t\t\tinverse = false\n\t\t\tvariant = \"secondary\"\n\t\t}\n\n\t\tconst closeButton = (\n\t\t\t<div class={AlertClass.close}>\n\t\t\t\t<gov-button\n\t\t\t\t\tsize=\"s\"\n\t\t\t\t\taria-label={this.wcagCloseLabel}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tinverse={inverse}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t>\n\t\t\t\t\t<gov-icon name=\"x-lg\"></gov-icon>\n\t\t\t\t</gov-button>\n\t\t\t</div>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AlertClass.root)} variant={this.variant}>\n\t\t\t\t<section class={AlertClass.section} role=\"alert\">\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<div class={AlertClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={AlertClass.content}>\n\t\t\t\t\t\t{this.headline ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={AlertClass.headline}>\n\t\t\t\t\t\t\t\t\t<p>{this.headline}</p>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\taria-label={this.wcagToggleLabel}\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\t\t\t\tinverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.toggleContent = !this.toggleContent}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t{this.closable && closeButton}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: AlertClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.closable) {\n\t\t\tvalidateWcagProp(this.wcagCloseLabel, 'wcag-close-label', AlertClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', AlertClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Variants } from "../../core/constants/variants";
|
|
2
|
-
import { pick } from "../../utils/utils";
|
|
3
|
-
export const AlertVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS']);
|
|
4
|
-
export const AlertClass = {
|
|
5
|
-
root: 'gov-alert',
|
|
6
|
-
section: 'gov-alert__section',
|
|
7
|
-
icon: 'gov-alert__icon',
|
|
8
|
-
content: 'gov-alert__content',
|
|
9
|
-
headline: 'gov-alert__headline',
|
|
10
|
-
close: 'gov-alert__close',
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/components/gov-alert/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAGxC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAGpG,MAAM,CAAC,MAAM,UAAU,GAAG;EACzB,IAAI,EAAE,WAAW;EACjB,OAAO,EAAE,oBAAoB;EAC7B,IAAI,EAAE,iBAAiB;EACvB,OAAO,EAAE,oBAAoB;EAC7B,QAAQ,EAAE,qBAAqB;EAC/B,KAAK,EAAE,kBAAkB;CACzB,CAAA","sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const AlertVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof AlertVariants>}`\n\nexport const AlertClass = {\n\troot: 'gov-alert',\n\tsection: 'gov-alert__section',\n\ticon: 'gov-alert__icon',\n\tcontent: 'gov-alert__content',\n\theadline: 'gov-alert__headline',\n\tclose: 'gov-alert__close',\n}\n"]}
|
|
@@ -1,398 +0,0 @@
|
|
|
1
|
-
/* stylelint-disable */
|
|
2
|
-
/* stylelint-enable */
|
|
3
|
-
/* stylelint-disable */
|
|
4
|
-
/* stylelint-enable */
|
|
5
|
-
/* stylelint-disable */
|
|
6
|
-
/* stylelint-enable */
|
|
7
|
-
/* stylelint-disable */
|
|
8
|
-
/* stylelint-enable */
|
|
9
|
-
/* [Core] - Buttons
|
|
10
|
-
------------------------------------------------------------------ */
|
|
11
|
-
/*
|
|
12
|
-
* Gets color from theme-colors or from palette-colors
|
|
13
|
-
*/
|
|
14
|
-
/*
|
|
15
|
-
* Converts hex value to rgb colors value
|
|
16
|
-
*/
|
|
17
|
-
/* stylelint-disable order/order */
|
|
18
|
-
/* stylelint-enable order/order */
|
|
19
|
-
/*
|
|
20
|
-
* Generates list of utility classes for margin, padding
|
|
21
|
-
*
|
|
22
|
-
* Make sure $list of definitions is sorted so that last item is defined last
|
|
23
|
-
* So largest views are mentioned last.
|
|
24
|
-
*/
|
|
25
|
-
/*
|
|
26
|
-
- Variables - Sizes
|
|
27
|
-
*/
|
|
28
|
-
/* "Constants" for general usage */
|
|
29
|
-
/*
|
|
30
|
-
- Variables - Layout
|
|
31
|
-
*/
|
|
32
|
-
/**
|
|
33
|
-
* Utilities - Offset
|
|
34
|
-
*/
|
|
35
|
-
/* stylelint-disable order/order */
|
|
36
|
-
/* stylelint-enable order/order */
|
|
37
|
-
/* stylelint-disable order/order */
|
|
38
|
-
/* stylelint-enable order/order */
|
|
39
|
-
/* stylelint-disable order/order */
|
|
40
|
-
/* stylelint-enable order/order */
|
|
41
|
-
/**
|
|
42
|
-
* Generates CSS3 var with default value
|
|
43
|
-
*/
|
|
44
|
-
/*
|
|
45
|
-
- Variables - General
|
|
46
|
-
*/
|
|
47
|
-
/*
|
|
48
|
-
- Variables - Typography
|
|
49
|
-
*/
|
|
50
|
-
/*
|
|
51
|
-
- Variables - Variants
|
|
52
|
-
*/
|
|
53
|
-
/*
|
|
54
|
-
- Variables - Container
|
|
55
|
-
*/
|
|
56
|
-
/*
|
|
57
|
-
- Variables - Sizes
|
|
58
|
-
*/
|
|
59
|
-
/* "Constants" for general usage */
|
|
60
|
-
/*
|
|
61
|
-
- Variables - Accordion
|
|
62
|
-
*/
|
|
63
|
-
/*
|
|
64
|
-
- Variables - Attachments
|
|
65
|
-
*/
|
|
66
|
-
/*
|
|
67
|
-
- Variables - Alert
|
|
68
|
-
*/
|
|
69
|
-
/*
|
|
70
|
-
- Variables - Backdrop
|
|
71
|
-
*/
|
|
72
|
-
/*
|
|
73
|
-
- Variables - Buttons (&& Badges)
|
|
74
|
-
*/
|
|
75
|
-
/*
|
|
76
|
-
- Variables - Breadcrumbs
|
|
77
|
-
*/
|
|
78
|
-
/*
|
|
79
|
-
- Variables - Classes
|
|
80
|
-
*/
|
|
81
|
-
/*
|
|
82
|
-
- Variables - Colors
|
|
83
|
-
*/
|
|
84
|
-
/*
|
|
85
|
-
- Variables - Control Group
|
|
86
|
-
*/
|
|
87
|
-
/*
|
|
88
|
-
- Variables - Cookiebar
|
|
89
|
-
*/
|
|
90
|
-
/*
|
|
91
|
-
- Variables - Dropdown
|
|
92
|
-
*/
|
|
93
|
-
/*
|
|
94
|
-
- Variables - Card
|
|
95
|
-
*/
|
|
96
|
-
/*
|
|
97
|
-
- Variables - Message
|
|
98
|
-
*/
|
|
99
|
-
/*
|
|
100
|
-
- Variables - Empty
|
|
101
|
-
*/
|
|
102
|
-
/*
|
|
103
|
-
- Variables - Error code
|
|
104
|
-
*/
|
|
105
|
-
/*
|
|
106
|
-
- Variables - Grid
|
|
107
|
-
*/
|
|
108
|
-
/*
|
|
109
|
-
- Variables - Tiles
|
|
110
|
-
*/
|
|
111
|
-
/*
|
|
112
|
-
- Variables - Modal & Prompt
|
|
113
|
-
*/
|
|
114
|
-
/**
|
|
115
|
-
* Utilities - Offset
|
|
116
|
-
*/
|
|
117
|
-
/*
|
|
118
|
-
- Variables - shadows
|
|
119
|
-
*/
|
|
120
|
-
/* "Constants" for general usage */
|
|
121
|
-
/*
|
|
122
|
-
- Variables - Statsbar
|
|
123
|
-
*/
|
|
124
|
-
/*
|
|
125
|
-
- Variables - Tabs
|
|
126
|
-
*/
|
|
127
|
-
/*
|
|
128
|
-
- Variables - Tooltip
|
|
129
|
-
*/
|
|
130
|
-
/*
|
|
131
|
-
- Variables - Loading
|
|
132
|
-
*/
|
|
133
|
-
/*
|
|
134
|
-
- Variables - Forms
|
|
135
|
-
*/
|
|
136
|
-
/*
|
|
137
|
-
- Variables - Form Autocomplete
|
|
138
|
-
*/
|
|
139
|
-
/*
|
|
140
|
-
- Variables - Form Message
|
|
141
|
-
*/
|
|
142
|
-
/*
|
|
143
|
-
- Variables - Form label
|
|
144
|
-
*/
|
|
145
|
-
/*
|
|
146
|
-
- Variables - Form switch
|
|
147
|
-
*/
|
|
148
|
-
/*
|
|
149
|
-
- Variables - Form select
|
|
150
|
-
*/
|
|
151
|
-
/*
|
|
152
|
-
- Variables - Form input
|
|
153
|
-
*/
|
|
154
|
-
/*
|
|
155
|
-
- Variables - Form multiselect
|
|
156
|
-
*/
|
|
157
|
-
/*
|
|
158
|
-
- Variables - Form password power
|
|
159
|
-
*/
|
|
160
|
-
/*
|
|
161
|
-
- Variables - Form checkbox & radio
|
|
162
|
-
*/
|
|
163
|
-
/*
|
|
164
|
-
- Variables - Form group
|
|
165
|
-
*/
|
|
166
|
-
/*
|
|
167
|
-
- Variables - Form file
|
|
168
|
-
*/
|
|
169
|
-
/*
|
|
170
|
-
- Variables - Toast Message
|
|
171
|
-
*/
|
|
172
|
-
/*
|
|
173
|
-
- Variables - Wizard
|
|
174
|
-
*/
|
|
175
|
-
/*
|
|
176
|
-
- Variables - Stepper
|
|
177
|
-
*/
|
|
178
|
-
/*
|
|
179
|
-
- Variables - Side nav
|
|
180
|
-
*/
|
|
181
|
-
/*
|
|
182
|
-
- Variables - Grid & Tile
|
|
183
|
-
*/
|
|
184
|
-
/*
|
|
185
|
-
- Variables - Pagination
|
|
186
|
-
*/
|
|
187
|
-
/*
|
|
188
|
-
- Variables - Nav
|
|
189
|
-
*/
|
|
190
|
-
/*
|
|
191
|
-
- Variables - Layout
|
|
192
|
-
*/
|
|
193
|
-
.gov-spin-animation,
|
|
194
|
-
.gov-pseudo-spin-animation::before {
|
|
195
|
-
animation: spin 4s linear infinite;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@keyframes spin {
|
|
199
|
-
100% {
|
|
200
|
-
transform: rotate(360deg);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
@keyframes countdown {
|
|
204
|
-
to {
|
|
205
|
-
transform: scaleX(0);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
@keyframes progress {
|
|
209
|
-
0% {
|
|
210
|
-
background-position: -200px 0;
|
|
211
|
-
}
|
|
212
|
-
100% {
|
|
213
|
-
background-position: calc(200px + 100%) 0;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
@keyframes pulse {
|
|
217
|
-
0% {
|
|
218
|
-
opacity: 1;
|
|
219
|
-
}
|
|
220
|
-
50% {
|
|
221
|
-
opacity: 0.4;
|
|
222
|
-
}
|
|
223
|
-
100% {
|
|
224
|
-
opacity: 1;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
/*
|
|
228
|
-
* Alert
|
|
229
|
-
*/
|
|
230
|
-
.gov-alert {
|
|
231
|
-
position: relative;
|
|
232
|
-
display: block;
|
|
233
|
-
width: 100%;
|
|
234
|
-
}
|
|
235
|
-
.gov-alert__section {
|
|
236
|
-
display: block;
|
|
237
|
-
width: 100%;
|
|
238
|
-
max-width: calc(var(--gov-container-width, 73.75rem) + 2 * var(--gov-container-padding, 2.5rem));
|
|
239
|
-
margin-right: auto;
|
|
240
|
-
margin-left: auto;
|
|
241
|
-
padding-right: var(--gov-container-padding-mobile, 1.25rem);
|
|
242
|
-
padding-left: var(--gov-container-padding-mobile, 1.25rem);
|
|
243
|
-
display: flex;
|
|
244
|
-
gap: 1rem;
|
|
245
|
-
padding-top: 1rem;
|
|
246
|
-
padding-bottom: 1rem;
|
|
247
|
-
}
|
|
248
|
-
@media (min-width: 48em) {
|
|
249
|
-
.gov-alert__section {
|
|
250
|
-
padding-right: var(--gov-container-padding, 2.5rem);
|
|
251
|
-
padding-left: var(--gov-container-padding, 2.5rem);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
.gov-alert__icon {
|
|
255
|
-
flex: 0 0 auto;
|
|
256
|
-
}
|
|
257
|
-
.gov-alert__icon > * {
|
|
258
|
-
width: 1.25rem;
|
|
259
|
-
height: 1.25rem;
|
|
260
|
-
}
|
|
261
|
-
.gov-alert__headline {
|
|
262
|
-
display: flex;
|
|
263
|
-
gap: 1rem;
|
|
264
|
-
}
|
|
265
|
-
.gov-alert__headline + div {
|
|
266
|
-
margin-top: 0.5rem;
|
|
267
|
-
}
|
|
268
|
-
.gov-alert__headline p {
|
|
269
|
-
margin-bottom: 0;
|
|
270
|
-
}
|
|
271
|
-
.gov-alert__headline gov-button {
|
|
272
|
-
margin-top: -0.25rem;
|
|
273
|
-
}
|
|
274
|
-
.gov-alert__content {
|
|
275
|
-
padding-right: 3.25rem;
|
|
276
|
-
}
|
|
277
|
-
.gov-alert__content > *:last-child {
|
|
278
|
-
margin-bottom: 0;
|
|
279
|
-
}
|
|
280
|
-
.gov-alert__content p {
|
|
281
|
-
font-weight: var(--gov-text-m-font-weight);
|
|
282
|
-
font-size: var(--gov-text-m-font-size);
|
|
283
|
-
line-height: var(--gov-text-m-line-height);
|
|
284
|
-
letter-spacing: var(--gov-text-m-letter-spacing);
|
|
285
|
-
}
|
|
286
|
-
.gov-alert__content a {
|
|
287
|
-
color: inherit;
|
|
288
|
-
}
|
|
289
|
-
@media not all and (pointer: coarse) {
|
|
290
|
-
.gov-alert__content a:hover {
|
|
291
|
-
color: inherit;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
.gov-alert__close {
|
|
295
|
-
position: absolute;
|
|
296
|
-
top: 0.625rem;
|
|
297
|
-
right: 1rem;
|
|
298
|
-
}
|
|
299
|
-
.gov-alert[variant=warning] {
|
|
300
|
-
background-color: var(--gov-alert-warning-bg-color, var(--gov-color-warning));
|
|
301
|
-
}
|
|
302
|
-
.gov-alert[variant=warning] .gov-alert__icon {
|
|
303
|
-
color: var(--gov-alert-warning-icon-color, var(--gov-color-secondary));
|
|
304
|
-
}
|
|
305
|
-
.gov-alert[variant=warning] .gov-alert__content {
|
|
306
|
-
color: var(--gov-alert-warning-text-color, var(--gov-color-secondary));
|
|
307
|
-
}
|
|
308
|
-
.gov-alert[variant=warning][inverse=""], .gov-alert[variant=warning][inverse=true i], .gov-alert[variant=warning][inverse="1"] {
|
|
309
|
-
border-bottom: var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
310
|
-
background-color: var(--gov-alert-inverse-bg, var(--gov-color-neutral-white));
|
|
311
|
-
}
|
|
312
|
-
.gov-alert[variant=warning][inverse=""] .gov-alert__icon, .gov-alert[variant=warning][inverse=true i] .gov-alert__icon, .gov-alert[variant=warning][inverse="1"] .gov-alert__icon {
|
|
313
|
-
color: var(--gov-alert-warning-bg-color, var(--gov-color-warning));
|
|
314
|
-
}
|
|
315
|
-
.gov-alert[variant=warning][inverse=""] .gov-alert__content, .gov-alert[variant=warning][inverse=true i] .gov-alert__content, .gov-alert[variant=warning][inverse="1"] .gov-alert__content {
|
|
316
|
-
color: var(--gov-alert-inverse-color, var(--gov-color-secondary-800));
|
|
317
|
-
}
|
|
318
|
-
.gov-alert[variant=error] {
|
|
319
|
-
background-color: var(--gov-alert-error-bg-color, var(--gov-color-error));
|
|
320
|
-
}
|
|
321
|
-
.gov-alert[variant=error] .gov-alert__icon {
|
|
322
|
-
color: var(--gov-alert-error-icon-color, var(--gov-color-neutral-white));
|
|
323
|
-
}
|
|
324
|
-
.gov-alert[variant=error] .gov-alert__content {
|
|
325
|
-
color: var(--gov-alert-error-text-color, var(--gov-color-neutral-white));
|
|
326
|
-
}
|
|
327
|
-
.gov-alert[variant=error][inverse=""], .gov-alert[variant=error][inverse=true i], .gov-alert[variant=error][inverse="1"] {
|
|
328
|
-
border-bottom: var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
329
|
-
background-color: var(--gov-alert-inverse-bg, var(--gov-color-neutral-white));
|
|
330
|
-
}
|
|
331
|
-
.gov-alert[variant=error][inverse=""] .gov-alert__icon, .gov-alert[variant=error][inverse=true i] .gov-alert__icon, .gov-alert[variant=error][inverse="1"] .gov-alert__icon {
|
|
332
|
-
color: var(--gov-alert-error-bg-color, var(--gov-color-error));
|
|
333
|
-
}
|
|
334
|
-
.gov-alert[variant=error][inverse=""] .gov-alert__content, .gov-alert[variant=error][inverse=true i] .gov-alert__content, .gov-alert[variant=error][inverse="1"] .gov-alert__content {
|
|
335
|
-
color: var(--gov-alert-inverse-color, var(--gov-color-secondary-800));
|
|
336
|
-
}
|
|
337
|
-
.gov-alert[variant=secondary] {
|
|
338
|
-
background-color: var(--gov-alert-secondary-bg-color, var(--gov-color-secondary));
|
|
339
|
-
}
|
|
340
|
-
.gov-alert[variant=secondary] .gov-alert__icon {
|
|
341
|
-
color: var(--gov-alert-secondary-icon-color, var(--gov-color-neutral-white));
|
|
342
|
-
}
|
|
343
|
-
.gov-alert[variant=secondary] .gov-alert__content {
|
|
344
|
-
color: var(--gov-alert-secondary-text-color, var(--gov-color-neutral-white));
|
|
345
|
-
}
|
|
346
|
-
.gov-alert[variant=secondary][inverse=""], .gov-alert[variant=secondary][inverse=true i], .gov-alert[variant=secondary][inverse="1"] {
|
|
347
|
-
border-bottom: var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
348
|
-
background-color: var(--gov-alert-inverse-bg, var(--gov-color-neutral-white));
|
|
349
|
-
}
|
|
350
|
-
.gov-alert[variant=secondary][inverse=""] .gov-alert__icon, .gov-alert[variant=secondary][inverse=true i] .gov-alert__icon, .gov-alert[variant=secondary][inverse="1"] .gov-alert__icon {
|
|
351
|
-
color: var(--gov-alert-secondary-bg-color, var(--gov-color-secondary));
|
|
352
|
-
}
|
|
353
|
-
.gov-alert[variant=secondary][inverse=""] .gov-alert__content, .gov-alert[variant=secondary][inverse=true i] .gov-alert__content, .gov-alert[variant=secondary][inverse="1"] .gov-alert__content {
|
|
354
|
-
color: var(--gov-alert-inverse-color, var(--gov-color-secondary-800));
|
|
355
|
-
}
|
|
356
|
-
.gov-alert[variant=success] {
|
|
357
|
-
background-color: var(--gov-alert-success-bg-color, var(--gov-color-success-500));
|
|
358
|
-
}
|
|
359
|
-
.gov-alert[variant=success] .gov-alert__icon {
|
|
360
|
-
color: var(--gov-alert-success-icon-color, var(--gov-color-neutral-white));
|
|
361
|
-
}
|
|
362
|
-
.gov-alert[variant=success] .gov-alert__content {
|
|
363
|
-
color: var(--gov-alert-success-text-color, var(--gov-color-neutral-white));
|
|
364
|
-
}
|
|
365
|
-
.gov-alert[variant=success][inverse=""], .gov-alert[variant=success][inverse=true i], .gov-alert[variant=success][inverse="1"] {
|
|
366
|
-
border-bottom: var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
367
|
-
background-color: var(--gov-alert-inverse-bg, var(--gov-color-neutral-white));
|
|
368
|
-
}
|
|
369
|
-
.gov-alert[variant=success][inverse=""] .gov-alert__icon, .gov-alert[variant=success][inverse=true i] .gov-alert__icon, .gov-alert[variant=success][inverse="1"] .gov-alert__icon {
|
|
370
|
-
color: var(--gov-alert-success-bg-color, var(--gov-color-success-500));
|
|
371
|
-
}
|
|
372
|
-
.gov-alert[variant=success][inverse=""] .gov-alert__content, .gov-alert[variant=success][inverse=true i] .gov-alert__content, .gov-alert[variant=success][inverse="1"] .gov-alert__content {
|
|
373
|
-
color: var(--gov-alert-inverse-color, var(--gov-color-secondary-800));
|
|
374
|
-
}
|
|
375
|
-
.gov-alert[variant=primary] {
|
|
376
|
-
background-color: var(--gov-alert-primary-bg-color, var(--gov-color-primary));
|
|
377
|
-
}
|
|
378
|
-
.gov-alert[variant=primary] .gov-alert__icon {
|
|
379
|
-
color: var(--gov-alert-primary-icon-color, var(--gov-color-neutral-white));
|
|
380
|
-
}
|
|
381
|
-
.gov-alert[variant=primary] .gov-alert__content {
|
|
382
|
-
color: var(--gov-alert-primary-text-color, var(--gov-color-neutral-white));
|
|
383
|
-
}
|
|
384
|
-
.gov-alert[variant=primary][inverse=""], .gov-alert[variant=primary][inverse=true i], .gov-alert[variant=primary][inverse="1"] {
|
|
385
|
-
border-bottom: var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
386
|
-
background-color: var(--gov-alert-inverse-bg, var(--gov-color-neutral-white));
|
|
387
|
-
}
|
|
388
|
-
.gov-alert[variant=primary][inverse=""] .gov-alert__icon, .gov-alert[variant=primary][inverse=true i] .gov-alert__icon, .gov-alert[variant=primary][inverse="1"] .gov-alert__icon {
|
|
389
|
-
color: var(--gov-alert-primary-bg-color, var(--gov-color-primary));
|
|
390
|
-
}
|
|
391
|
-
.gov-alert[variant=primary][inverse=""] .gov-alert__content, .gov-alert[variant=primary][inverse=true i] .gov-alert__content, .gov-alert[variant=primary][inverse="1"] .gov-alert__content {
|
|
392
|
-
color: var(--gov-alert-inverse-color, var(--gov-color-secondary-800));
|
|
393
|
-
}
|
|
394
|
-
@media (min-width: 75em) {
|
|
395
|
-
.gov-alert__content {
|
|
396
|
-
padding-right: 2rem;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gov-alert.js","sourceRoot":"","sources":["../../../../../../src/components/gov-alert/gov-alert.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { AlertClass, AlertVariants, VariantType } from \"./constants\"\nimport { govHost, toBoolAttr } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { AlertEvent } from \"./gov-alert.types\"\nimport { ButtonEvent } from \"../gov-button/default/gov-button.types\"\nimport Fragment from \"../../helpers/Fragment\"\nimport { validateWcagProp } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\n\n@Component({\n\ttag: \"gov-alert\",\n\tstyleUrl: \"gov-alert.scss\",\n})\nexport class GovAlert {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly headline: string\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant: VariantType = \"primary\"\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\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 * Aria label for the toggle button. It is mandatory if the alert has headline\n\t */\n\t@Prop({ attribute: \"wcag-toggle-label\" }) readonly wcagToggleLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<AlertEvent>\n\t/**\n\t * Displays the option to close the alert\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(AlertVariants, newValue, AlertClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tlet inverse = !this.inverse\n\t\tlet variant = this.inverse ? \"secondary\" : this.variant\n\n\t\tif (this.variant == \"warning\") {\n\t\t\tinverse = false\n\t\t\tvariant = \"secondary\"\n\t\t}\n\n\t\tconst closeButton = (\n\t\t\t<div class={AlertClass.close}>\n\t\t\t\t<gov-button\n\t\t\t\t\tsize=\"s\"\n\t\t\t\t\taria-label={this.wcagCloseLabel}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tinverse={inverse}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t>\n\t\t\t\t\t<gov-icon name=\"x-lg\"></gov-icon>\n\t\t\t\t</gov-button>\n\t\t\t</div>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AlertClass.root)} variant={this.variant}>\n\t\t\t\t<section class={AlertClass.section} role=\"alert\">\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<div class={AlertClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={AlertClass.content}>\n\t\t\t\t\t\t{this.headline ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={AlertClass.headline}>\n\t\t\t\t\t\t\t\t\t<p>{this.headline}</p>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\taria-label={this.wcagToggleLabel}\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\t\t\t\tinverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.toggleContent = !this.toggleContent}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t{this.closable && closeButton}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: AlertClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.closable) {\n\t\t\tvalidateWcagProp(this.wcagCloseLabel, 'wcag-close-label', AlertClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', AlertClass.root)\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gov-alert.types.js","sourceRoot":"","sources":["../../../../../../src/components/gov-alert/gov-alert.types.ts"],"names":[],"mappings":"","sourcesContent":["import { GovBaseEvent } from \"../../types/event.types\"\n\nexport interface AlertEvent extends GovBaseEvent {\n\tref: HTMLGovAlertElement\n}\n\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../../../src/pages/Alert.ts"],"names":[],"mappings":"AAAA,MAAM,SAAU,SAAQ,WAAW;EAClC,iBAAiB;IAChB,IAAI,CAAC,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFhB,CAAA;EACF,CAAC;CACD;AAED,IAAI,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE;EACnD,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;CAC9C","sourcesContent":["class AlertPage extends HTMLElement {\n\tconnectedCallback() {\n\t\tthis.innerHTML = `\n\t\t<h2>Alert</h2>\n\n\t\t<gov-alert variant=\"secondary\" headline=\"Tohle bude super nadpis pro všechno\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tSecondary - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert variant=\"secondary\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tSecondary - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert variant=\"warning\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tWarning - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert variant=\"error\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tError - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert variant=\"success\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tError - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert variant=\"primary\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tError - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\n\t\t<h3>Inverse</h3>\n\t\t<br>\n\t\t<gov-alert inverse=\"TRUE\" variant=\"secondary\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tSecondary - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert inverse=\"True\" variant=\"warning\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tWarning - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert inverse=\"1\" variant=\"error\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tError - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert inverse=\"true\" variant=\"success\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tError - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t<br>\n\t\t<gov-alert inverse=\"true\" variant=\"primary\" closable>\n\t\t\t<gov-icon name=\"info\" slot=\"icon\"></gov-icon>\n\t\t\t<p>\n\t\t\t\tError - Od 20. 12. 2020 do 14:00 h do 20. 12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V uvedeném termínu bude nedostupné přihlášení k Portálu občana prostřednictvím datové schránky. Více informací <a href=\"#\">zde</a>.\n\t\t\t</p>\n\t\t</gov-alert>\n\t\t`\n\t}\n}\n\nif (customElements.get('alert-page') === undefined) {\n\tcustomElements.define('alert-page', AlertPage)\n}\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as r,H as o,c as a,h as e,d as t}from"./p-80c0109d.js";import{v as n}from"./p-26acf964.js";import{V as v}from"./p-ff7365ae.js";import{p as i,d as l}from"./p-03990da5.js";import{g as c,a as g}from"./p-3f37ddb6.js";import{F as s}from"./p-1c1d0bbe.js";import{a as d}from"./p-ae894a40.js";import{c as _}from"./p-cac3881f.js";import{d as m}from"./p-8449a4cf.js";import{d as p}from"./p-80f0ed50.js";const h=i(v,["PRIMARY","SECONDARY","WARNING","ERROR","SUCCESS"]);const u={root:"gov-alert",section:"gov-alert__section",icon:"gov-alert__icon",content:"gov-alert__content",headline:"gov-alert__headline",close:"gov-alert__close"};const b='.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-alert{position:relative;display:block;width:100%}.gov-alert__section{display:block;width:100%;max-width:calc(var(--gov-container-width, 73.75rem) + 2 * var(--gov-container-padding, 2.5rem));margin-right:auto;margin-left:auto;padding-right:var(--gov-container-padding-mobile, 1.25rem);padding-left:var(--gov-container-padding-mobile, 1.25rem);display:flex;gap:1rem;padding-top:1rem;padding-bottom:1rem}@media (min-width: 48em){.gov-alert__section{padding-right:var(--gov-container-padding, 2.5rem);padding-left:var(--gov-container-padding, 2.5rem)}}.gov-alert__icon{flex:0 0 auto}.gov-alert__icon>*{width:1.25rem;height:1.25rem}.gov-alert__headline{display:flex;gap:1rem}.gov-alert__headline+div{margin-top:0.5rem}.gov-alert__headline p{margin-bottom:0}.gov-alert__headline gov-button{margin-top:-0.25rem}.gov-alert__content{padding-right:3.25rem}.gov-alert__content>*:last-child{margin-bottom:0}.gov-alert__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)}.gov-alert__content a{color:inherit}@media not all and (pointer: coarse){.gov-alert__content a:hover{color:inherit}}.gov-alert__close{position:absolute;top:0.625rem;right:1rem}.gov-alert[variant=warning]{background-color:var(--gov-alert-warning-bg-color, var(--gov-color-warning))}.gov-alert[variant=warning] .gov-alert__icon{color:var(--gov-alert-warning-icon-color, var(--gov-color-secondary))}.gov-alert[variant=warning] .gov-alert__content{color:var(--gov-alert-warning-text-color, var(--gov-color-secondary))}.gov-alert[variant=warning][inverse=""],.gov-alert[variant=warning][inverse=true i],.gov-alert[variant=warning][inverse="1"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=warning][inverse=""] .gov-alert__icon,.gov-alert[variant=warning][inverse=true i] .gov-alert__icon,.gov-alert[variant=warning][inverse="1"] .gov-alert__icon{color:var(--gov-alert-warning-bg-color, var(--gov-color-warning))}.gov-alert[variant=warning][inverse=""] .gov-alert__content,.gov-alert[variant=warning][inverse=true i] .gov-alert__content,.gov-alert[variant=warning][inverse="1"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=error]{background-color:var(--gov-alert-error-bg-color, var(--gov-color-error))}.gov-alert[variant=error] .gov-alert__icon{color:var(--gov-alert-error-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=error] .gov-alert__content{color:var(--gov-alert-error-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=error][inverse=""],.gov-alert[variant=error][inverse=true i],.gov-alert[variant=error][inverse="1"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=error][inverse=""] .gov-alert__icon,.gov-alert[variant=error][inverse=true i] .gov-alert__icon,.gov-alert[variant=error][inverse="1"] .gov-alert__icon{color:var(--gov-alert-error-bg-color, var(--gov-color-error))}.gov-alert[variant=error][inverse=""] .gov-alert__content,.gov-alert[variant=error][inverse=true i] .gov-alert__content,.gov-alert[variant=error][inverse="1"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=secondary]{background-color:var(--gov-alert-secondary-bg-color, var(--gov-color-secondary))}.gov-alert[variant=secondary] .gov-alert__icon{color:var(--gov-alert-secondary-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=secondary] .gov-alert__content{color:var(--gov-alert-secondary-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=secondary][inverse=""],.gov-alert[variant=secondary][inverse=true i],.gov-alert[variant=secondary][inverse="1"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=secondary][inverse=""] .gov-alert__icon,.gov-alert[variant=secondary][inverse=true i] .gov-alert__icon,.gov-alert[variant=secondary][inverse="1"] .gov-alert__icon{color:var(--gov-alert-secondary-bg-color, var(--gov-color-secondary))}.gov-alert[variant=secondary][inverse=""] .gov-alert__content,.gov-alert[variant=secondary][inverse=true i] .gov-alert__content,.gov-alert[variant=secondary][inverse="1"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=success]{background-color:var(--gov-alert-success-bg-color, var(--gov-color-success-500))}.gov-alert[variant=success] .gov-alert__icon{color:var(--gov-alert-success-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=success] .gov-alert__content{color:var(--gov-alert-success-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=success][inverse=""],.gov-alert[variant=success][inverse=true i],.gov-alert[variant=success][inverse="1"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=success][inverse=""] .gov-alert__icon,.gov-alert[variant=success][inverse=true i] .gov-alert__icon,.gov-alert[variant=success][inverse="1"] .gov-alert__icon{color:var(--gov-alert-success-bg-color, var(--gov-color-success-500))}.gov-alert[variant=success][inverse=""] .gov-alert__content,.gov-alert[variant=success][inverse=true i] .gov-alert__content,.gov-alert[variant=success][inverse="1"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=primary]{background-color:var(--gov-alert-primary-bg-color, var(--gov-color-primary))}.gov-alert[variant=primary] .gov-alert__icon{color:var(--gov-alert-primary-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=primary] .gov-alert__content{color:var(--gov-alert-primary-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=primary][inverse=""],.gov-alert[variant=primary][inverse=true i],.gov-alert[variant=primary][inverse="1"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=primary][inverse=""] .gov-alert__icon,.gov-alert[variant=primary][inverse=true i] .gov-alert__icon,.gov-alert[variant=primary][inverse="1"] .gov-alert__icon{color:var(--gov-alert-primary-bg-color, var(--gov-color-primary))}.gov-alert[variant=primary][inverse=""] .gov-alert__content,.gov-alert[variant=primary][inverse=true i] .gov-alert__content,.gov-alert[variant=primary][inverse="1"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}@media (min-width: 75em){.gov-alert__content{padding-right:2rem}}';const y=r(class r extends o{constructor(){super();this.__registerHost();this.govClose=a(this,"gov-close",7);this.headline=undefined;this.variant="primary";this.inverse=false;this.wcagCloseLabel=undefined;this.wcagToggleLabel=undefined;this.closable=false;this.toggleContent=false;this.h=c(this.host)}validateVariant(r){n(h,r,u.root)}componentWillLoad(){this.validateVariant(this.variant)}async componentDidRender(){if(_()){await l(500);await this.validateWcag()}}render(){let r=!this.inverse;let o=this.inverse?"secondary":this.variant;if(this.variant=="warning"){r=false;o="secondary"}const a=e("div",{class:u.close},e("gov-button",{size:"s","aria-label":this.wcagCloseLabel,type:"base",variant:o,inverse:r,"on-gov-click":this.onCloseHandler.bind(this)},e("gov-icon",{name:"x-lg"})));return e(t,{class:this.h.classes(u.root),variant:this.variant},e("section",{class:u.section,role:"alert"},this.h.hasSlot("icon")&&e("div",{class:u.icon},e("slot",{name:"icon"})),e("div",{class:u.content},this.headline?e(s,null,e("div",{class:u.headline},e("p",null,this.headline),e("gov-button",{size:"s","aria-label":this.wcagToggleLabel,type:"base",variant:o,inverse:r,"on-gov-click":()=>this.toggleContent=!this.toggleContent},e("gov-icon",{name:this.toggleContent?"chevron-up":"chevron-down"}))),e("div",{hidden:!this.toggleContent,"aria-hidden":g(this.toggleContent)},e("slot",null))):e("slot",null))),this.closable&&a)}onCloseHandler(r){this.govClose.emit({component:u.root,ref:this.host,originalEvent:r})}async validateWcag(){if(this.closable){d(this.wcagCloseLabel,"wcag-close-label",u.root)}if(this.headline){d(this.wcagToggleLabel,"wcag-toggle-label",u.root)}}get host(){return this}static get watchers(){return{variant:["validateVariant"]}}static get style(){return b}},[4,"gov-alert",{headline:[1],variant:[1],inverse:[4],wcagCloseLabel:[1,"wcag-close-label"],wcagToggleLabel:[1,"wcag-toggle-label"],closable:[4],toggleContent:[32],validateWcag:[64]}]);function f(){if(typeof customElements==="undefined"){return}const r=["gov-alert","gov-button","gov-icon"];r.forEach((r=>{switch(r){case"gov-alert":if(!customElements.get(r)){customElements.define(r,y)}break;case"gov-button":if(!customElements.get(r)){m()}break;case"gov-icon":if(!customElements.get(r)){p()}break}}))}f();const w=y;const k=f;export{w as GovAlert,k as defineCustomElement};
|
|
2
|
-
//# sourceMappingURL=gov-alert.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["AlertVariants","pick","Variants","AlertClass","root","section","icon","content","headline","close","govAlertCss","GovAlert","proxyCustomElement","H","constructor","this","h","govHost","host","validateVariant","newValue","validateProp","componentWillLoad","variant","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","inverse","closeButton","class","size","wcagCloseLabel","type","onCloseHandler","bind","name","Host","classes","role","hasSlot","Fragment","wcagToggleLabel","toggleContent","hidden","toBoolAttr","closable","e","govClose","emit","component","ref","originalEvent","validateWcagProp"],"sources":["../../../packages/core/src/components/gov-alert/constants.ts","../../../packages/core/src/components/gov-alert/gov-alert.scss?tag=gov-alert","../../../packages/core/src/components/gov-alert/gov-alert.tsx"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const AlertVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof AlertVariants>}`\n\nexport const AlertClass = {\n\troot: 'gov-alert',\n\tsection: 'gov-alert__section',\n\ticon: 'gov-alert__icon',\n\tcontent: 'gov-alert__content',\n\theadline: 'gov-alert__headline',\n\tclose: 'gov-alert__close',\n}\n","/*\n * Alert\n */\n\n$class: \".gov-alert\";\n\n#{$class} {\n\t@include base();\n\t&__section {\n\t\t@include container();\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tpadding-top: rem-calc(16);\n\t\tpadding-bottom: rem-calc(16);\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\t& > * {\n\t\t\twidth: rem-calc(20);\n\t\t\theight: rem-calc(20);\n\t\t}\n\t}\n\t&__headline {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\n\t\t+ div {\n\t\t\tmargin-top: rem-calc(8);\n\t\t}\n\n\t\tp {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tgov-button {\n\t\t\tmargin-top: rem-calc(-4);\n\t\t}\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\tpadding-right: rem-calc(52);\n\t\tp {\n\t\t\t@include typography($font-size-m);\n\t\t}\n\t\ta {\n\t\t\tcolor: inherit;\n\t\t\t@include hover() {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(10);\n\t\tright: rem-calc(16);\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $alert-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: get(\"bg-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"icon-color\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tcolor: get(\"text-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\tborder-bottom: $alert-border;\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tborder-bottom: $alert-border;\n\t\t\t\tbackground-color: $alert-inverse-bg;\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"bg-color\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tcolor: $alert-inverse-color;\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: xl) {\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, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { AlertClass, AlertVariants, VariantType } from \"./constants\"\nimport { govHost, toBoolAttr } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { AlertEvent } from \"./gov-alert.types\"\nimport { ButtonEvent } from \"../gov-button/default/gov-button.types\"\nimport Fragment from \"../../helpers/Fragment\"\nimport { validateWcagProp } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\n\n@Component({\n\ttag: \"gov-alert\",\n\tstyleUrl: \"gov-alert.scss\",\n})\nexport class GovAlert {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly headline: string\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant: VariantType = \"primary\"\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\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 * Aria label for the toggle button. It is mandatory if the alert has headline\n\t */\n\t@Prop({ attribute: \"wcag-toggle-label\" }) readonly wcagToggleLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<AlertEvent>\n\t/**\n\t * Displays the option to close the alert\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(AlertVariants, newValue, AlertClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tlet inverse = !this.inverse\n\t\tlet variant = this.inverse ? \"secondary\" : this.variant\n\n\t\tif (this.variant == \"warning\") {\n\t\t\tinverse = false\n\t\t\tvariant = \"secondary\"\n\t\t}\n\n\t\tconst closeButton = (\n\t\t\t<div class={AlertClass.close}>\n\t\t\t\t<gov-button\n\t\t\t\t\tsize=\"s\"\n\t\t\t\t\taria-label={this.wcagCloseLabel}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tinverse={inverse}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t>\n\t\t\t\t\t<gov-icon name=\"x-lg\"></gov-icon>\n\t\t\t\t</gov-button>\n\t\t\t</div>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AlertClass.root)} variant={this.variant}>\n\t\t\t\t<section class={AlertClass.section} role=\"alert\">\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<div class={AlertClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={AlertClass.content}>\n\t\t\t\t\t\t{this.headline ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={AlertClass.headline}>\n\t\t\t\t\t\t\t\t\t<p>{this.headline}</p>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\taria-label={this.wcagToggleLabel}\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\t\t\t\tinverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.toggleContent = !this.toggleContent}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t{this.closable && closeButton}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: AlertClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.closable) {\n\t\t\tvalidateWcagProp(this.wcagCloseLabel, 'wcag-close-label', AlertClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', AlertClass.root)\n\t\t}\n\t}\n}\n"],"mappings":"kZAIO,MAAMA,EAAgBC,EAAKC,EAAU,CAAC,UAAW,YAAa,UAAW,QAAS,YAGlF,MAAMC,EAAa,CACzBC,KAAM,YACNC,QAAS,qBACTC,KAAM,kBACNC,QAAS,qBACTC,SAAU,sBACVC,MAAO,oBCbR,MAAMC,EAAc,gqO,MCgBPC,EAAQC,EAAA,MAAAD,UAAAE,EAGpB,WAAAC,G,uGAawC,U,aAIJ,M,2EAgBE,M,mBAEb,MAlCxBC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAqCvB,eAAAC,CAAgBC,GACfC,EAAarB,EAAeoB,EAAUjB,EAAWC,K,CAGlD,iBAAAkB,GACCP,KAAKI,gBAAgBJ,KAAKQ,Q,CAG3B,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNX,KAAKY,c,EAIb,MAAAC,GACC,IAAIC,GAAWd,KAAKc,QACpB,IAAIN,EAAUR,KAAKc,QAAU,YAAcd,KAAKQ,QAEhD,GAAIR,KAAKQ,SAAW,UAAW,CAC9BM,EAAU,MACVN,EAAU,W,CAGX,MAAMO,EACLd,EAAA,OAAKe,MAAO5B,EAAWM,OACtBO,EAAA,cACCgB,KAAK,IAAG,aACIjB,KAAKkB,eACjBC,KAAK,OACLX,QAASA,EACTM,QAASA,EAAO,eACFd,KAAKoB,eAAeC,KAAKrB,OAEvCC,EAAA,YAAUqB,KAAK,WAKlB,OACCrB,EAACsB,EAAI,CAACP,MAAOhB,KAAKC,EAAEuB,QAAQpC,EAAWC,MAAOmB,QAASR,KAAKQ,SAC3DP,EAAA,WAASe,MAAO5B,EAAWE,QAASmC,KAAK,SACvCzB,KAAKC,EAAEyB,QAAQ,SACfzB,EAAA,OAAKe,MAAO5B,EAAWG,MACtBU,EAAA,QAAMqB,KAAK,UAGbrB,EAAA,OAAKe,MAAO5B,EAAWI,SACrBQ,KAAKP,SACLQ,EAAC0B,EAAQ,KACR1B,EAAA,OAAKe,MAAO5B,EAAWK,UACtBQ,EAAA,SAAID,KAAKP,UACTQ,EAAA,cACCgB,KAAK,IAAG,aACIjB,KAAK4B,gBACjBT,KAAK,OACLX,QAASA,EACTM,QAASA,EAAO,eACF,IAAMd,KAAK6B,eAAiB7B,KAAK6B,eAE/C5B,EAAA,YAAUqB,KAAMtB,KAAK6B,cAAgB,aAAe,mBAGtD5B,EAAA,OAAK6B,QAAS9B,KAAK6B,cAAa,cAAeE,EAAW/B,KAAK6B,gBAC9D5B,EAAA,eAIFA,EAAA,eAIFD,KAAKgC,UAAYjB,E,CAKrB,cAAAK,CAAea,GACdjC,KAAKkC,SAASC,KAAK,CAClBC,UAAWhD,EAAWC,KACtBgD,IAAKrC,KAAKG,KACVmC,cAAeL,G,CAQjB,kBAAMrB,GACL,GAAIZ,KAAKgC,SAAU,CAClBO,EAAiBvC,KAAKkB,eAAgB,mBAAoB9B,EAAWC,K,CAEtE,GAAIW,KAAKP,SAAU,CAClB8C,EAAiBvC,KAAK4B,gBAAiB,oBAAqBxC,EAAWC,K"}
|