@gov-design-system-ce/components 0.0.58 → 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-toast.cjs.entry.js +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 +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-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-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-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-da3b225f.js → p-30af8d08.js} +2 -2
- package/dist/components/p-3e8a9e92.js.map +1 -1
- package/dist/components/{p-a6915747.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-70d9d879.js → p-ae179d8a.js} +2 -2
- package/dist/components/p-ae179d8a.js.map +1 -0
- package/dist/components/{p-35f6490a.js → p-afb7fc88.js} +2 -2
- package/dist/components/{p-ee60cdd1.js → p-b430ee05.js} +2 -2
- package/dist/components/{p-9cba3cd3.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-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-fb99f144.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-dd39ede4.entry.js → p-ff97a688.entry.js} +2 -2
- 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-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 +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/globals.d.ts +2 -0
- package/dist/hydrate/index.js +287 -184
- 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-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 +116 -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-70d9d879.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-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-da3b225f.js.map → p-30af8d08.js.map} +0 -0
- /package/dist/components/{p-a6915747.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-35f6490a.js.map → p-afb7fc88.js.map} +0 -0
- /package/dist/components/{p-ee60cdd1.js.map → p-b430ee05.js.map} +0 -0
- /package/dist/components/{p-9cba3cd3.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-fb99f144.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
- /package/dist/core/{p-dd39ede4.entry.js.map → p-ff97a688.entry.js.map} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Variants } from "../../../core/constants/variants";
|
|
2
|
+
import { pick } from "../../../utils/utils";
|
|
3
|
+
export const InfobarVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS']);
|
|
4
|
+
export const InfobarClass = {
|
|
5
|
+
root: 'gov-infobar',
|
|
6
|
+
section: 'gov-infobar__section',
|
|
7
|
+
icon: 'gov-infobar__icon',
|
|
8
|
+
content: 'gov-infobar__content',
|
|
9
|
+
headline: 'gov-infobar__headline',
|
|
10
|
+
close: 'gov-infobar__close',
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-infobar/default/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAG3C,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAGtG,MAAM,CAAC,MAAM,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,sBAAsB;EAC/B,IAAI,EAAE,mBAAmB;EACzB,OAAO,EAAE,sBAAsB;EAC/B,QAAQ,EAAE,uBAAuB;EACjC,KAAK,EAAE,oBAAoB;CAC3B,CAAA","sourcesContent":["import { Variants } from '../../../core/constants/variants'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const InfobarVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof InfobarVariants>}`\n\nexport const InfobarClass = {\n\troot: 'gov-infobar',\n\tsection: 'gov-infobar__section',\n\ticon: 'gov-infobar__icon',\n\tcontent: 'gov-infobar__content',\n\theadline: 'gov-infobar__headline',\n\tclose: 'gov-infobar__close',\n}\n"]}
|
|
@@ -0,0 +1,384 @@
|
|
|
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 - Infobar
|
|
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
|
+
* Infobar
|
|
229
|
+
*/
|
|
230
|
+
.gov-infobar {
|
|
231
|
+
position: relative;
|
|
232
|
+
display: block;
|
|
233
|
+
width: 100%;
|
|
234
|
+
}
|
|
235
|
+
.gov-infobar__section {
|
|
236
|
+
display: flex;
|
|
237
|
+
gap: 1rem;
|
|
238
|
+
padding: 1rem;
|
|
239
|
+
}
|
|
240
|
+
.gov-infobar__icon {
|
|
241
|
+
flex: 0 0 auto;
|
|
242
|
+
}
|
|
243
|
+
.gov-infobar__icon > * {
|
|
244
|
+
width: 1.25rem;
|
|
245
|
+
height: 1.25rem;
|
|
246
|
+
}
|
|
247
|
+
.gov-infobar__headline {
|
|
248
|
+
display: flex;
|
|
249
|
+
gap: 1rem;
|
|
250
|
+
}
|
|
251
|
+
.gov-infobar__headline + div {
|
|
252
|
+
margin-top: 0.5rem;
|
|
253
|
+
}
|
|
254
|
+
.gov-infobar__headline p {
|
|
255
|
+
margin-bottom: 0;
|
|
256
|
+
}
|
|
257
|
+
.gov-infobar__headline gov-button {
|
|
258
|
+
margin-top: -0.25rem;
|
|
259
|
+
}
|
|
260
|
+
.gov-infobar__content {
|
|
261
|
+
padding-right: 3.5rem;
|
|
262
|
+
}
|
|
263
|
+
.gov-infobar__content > *:last-child {
|
|
264
|
+
margin-bottom: 0;
|
|
265
|
+
}
|
|
266
|
+
.gov-infobar__content p {
|
|
267
|
+
font-weight: var(--gov-text-m-font-weight);
|
|
268
|
+
font-size: var(--gov-text-m-font-size);
|
|
269
|
+
line-height: var(--gov-text-m-line-height);
|
|
270
|
+
letter-spacing: var(--gov-text-m-letter-spacing);
|
|
271
|
+
}
|
|
272
|
+
.gov-infobar__content a {
|
|
273
|
+
color: inherit;
|
|
274
|
+
}
|
|
275
|
+
@media not all and (pointer: coarse) {
|
|
276
|
+
.gov-infobar__content a:hover {
|
|
277
|
+
color: inherit;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
.gov-infobar__close {
|
|
281
|
+
position: absolute;
|
|
282
|
+
top: 0.625rem;
|
|
283
|
+
right: 1rem;
|
|
284
|
+
}
|
|
285
|
+
.gov-infobar[variant=warning] {
|
|
286
|
+
background-color: var(--gov-infobar-warning-bg-color, var(--gov-color-warning));
|
|
287
|
+
}
|
|
288
|
+
.gov-infobar[variant=warning] .gov-infobar__icon {
|
|
289
|
+
color: var(--gov-infobar-warning-icon-color, var(--gov-color-secondary));
|
|
290
|
+
}
|
|
291
|
+
.gov-infobar[variant=warning] .gov-infobar__content {
|
|
292
|
+
color: var(--gov-infobar-warning-text-color, var(--gov-color-secondary));
|
|
293
|
+
}
|
|
294
|
+
.gov-infobar[variant=warning][inverse=""], .gov-infobar[variant=warning][inverse=true i], .gov-infobar[variant=warning][inverse="1"] {
|
|
295
|
+
border-bottom: var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
296
|
+
background-color: var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white));
|
|
297
|
+
}
|
|
298
|
+
.gov-infobar[variant=warning][inverse=""] .gov-infobar__icon, .gov-infobar[variant=warning][inverse=true i] .gov-infobar__icon, .gov-infobar[variant=warning][inverse="1"] .gov-infobar__icon {
|
|
299
|
+
color: var(--gov-infobar-warning-bg-color, var(--gov-color-warning));
|
|
300
|
+
}
|
|
301
|
+
.gov-infobar[variant=warning][inverse=""] .gov-infobar__content, .gov-infobar[variant=warning][inverse=true i] .gov-infobar__content, .gov-infobar[variant=warning][inverse="1"] .gov-infobar__content {
|
|
302
|
+
color: var(--gov-infobar-inverse-color, var(--gov-color-secondary-800));
|
|
303
|
+
}
|
|
304
|
+
.gov-infobar[variant=error] {
|
|
305
|
+
background-color: var(--gov-infobar-error-bg-color, var(--gov-color-error));
|
|
306
|
+
}
|
|
307
|
+
.gov-infobar[variant=error] .gov-infobar__icon {
|
|
308
|
+
color: var(--gov-infobar-error-icon-color, var(--gov-color-neutral-white));
|
|
309
|
+
}
|
|
310
|
+
.gov-infobar[variant=error] .gov-infobar__content {
|
|
311
|
+
color: var(--gov-infobar-error-text-color, var(--gov-color-neutral-white));
|
|
312
|
+
}
|
|
313
|
+
.gov-infobar[variant=error][inverse=""], .gov-infobar[variant=error][inverse=true i], .gov-infobar[variant=error][inverse="1"] {
|
|
314
|
+
border-bottom: var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
315
|
+
background-color: var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white));
|
|
316
|
+
}
|
|
317
|
+
.gov-infobar[variant=error][inverse=""] .gov-infobar__icon, .gov-infobar[variant=error][inverse=true i] .gov-infobar__icon, .gov-infobar[variant=error][inverse="1"] .gov-infobar__icon {
|
|
318
|
+
color: var(--gov-infobar-error-bg-color, var(--gov-color-error));
|
|
319
|
+
}
|
|
320
|
+
.gov-infobar[variant=error][inverse=""] .gov-infobar__content, .gov-infobar[variant=error][inverse=true i] .gov-infobar__content, .gov-infobar[variant=error][inverse="1"] .gov-infobar__content {
|
|
321
|
+
color: var(--gov-infobar-inverse-color, var(--gov-color-secondary-800));
|
|
322
|
+
}
|
|
323
|
+
.gov-infobar[variant=secondary] {
|
|
324
|
+
background-color: var(--gov-infobar-secondary-bg-color, var(--gov-color-secondary));
|
|
325
|
+
}
|
|
326
|
+
.gov-infobar[variant=secondary] .gov-infobar__icon {
|
|
327
|
+
color: var(--gov-infobar-secondary-icon-color, var(--gov-color-neutral-white));
|
|
328
|
+
}
|
|
329
|
+
.gov-infobar[variant=secondary] .gov-infobar__content {
|
|
330
|
+
color: var(--gov-infobar-secondary-text-color, var(--gov-color-neutral-white));
|
|
331
|
+
}
|
|
332
|
+
.gov-infobar[variant=secondary][inverse=""], .gov-infobar[variant=secondary][inverse=true i], .gov-infobar[variant=secondary][inverse="1"] {
|
|
333
|
+
border-bottom: var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
334
|
+
background-color: var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white));
|
|
335
|
+
}
|
|
336
|
+
.gov-infobar[variant=secondary][inverse=""] .gov-infobar__icon, .gov-infobar[variant=secondary][inverse=true i] .gov-infobar__icon, .gov-infobar[variant=secondary][inverse="1"] .gov-infobar__icon {
|
|
337
|
+
color: var(--gov-infobar-secondary-bg-color, var(--gov-color-secondary));
|
|
338
|
+
}
|
|
339
|
+
.gov-infobar[variant=secondary][inverse=""] .gov-infobar__content, .gov-infobar[variant=secondary][inverse=true i] .gov-infobar__content, .gov-infobar[variant=secondary][inverse="1"] .gov-infobar__content {
|
|
340
|
+
color: var(--gov-infobar-inverse-color, var(--gov-color-secondary-800));
|
|
341
|
+
}
|
|
342
|
+
.gov-infobar[variant=success] {
|
|
343
|
+
background-color: var(--gov-infobar-success-bg-color, var(--gov-color-success-500));
|
|
344
|
+
}
|
|
345
|
+
.gov-infobar[variant=success] .gov-infobar__icon {
|
|
346
|
+
color: var(--gov-infobar-success-icon-color, var(--gov-color-neutral-white));
|
|
347
|
+
}
|
|
348
|
+
.gov-infobar[variant=success] .gov-infobar__content {
|
|
349
|
+
color: var(--gov-infobar-success-text-color, var(--gov-color-neutral-white));
|
|
350
|
+
}
|
|
351
|
+
.gov-infobar[variant=success][inverse=""], .gov-infobar[variant=success][inverse=true i], .gov-infobar[variant=success][inverse="1"] {
|
|
352
|
+
border-bottom: var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
353
|
+
background-color: var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white));
|
|
354
|
+
}
|
|
355
|
+
.gov-infobar[variant=success][inverse=""] .gov-infobar__icon, .gov-infobar[variant=success][inverse=true i] .gov-infobar__icon, .gov-infobar[variant=success][inverse="1"] .gov-infobar__icon {
|
|
356
|
+
color: var(--gov-infobar-success-bg-color, var(--gov-color-success-500));
|
|
357
|
+
}
|
|
358
|
+
.gov-infobar[variant=success][inverse=""] .gov-infobar__content, .gov-infobar[variant=success][inverse=true i] .gov-infobar__content, .gov-infobar[variant=success][inverse="1"] .gov-infobar__content {
|
|
359
|
+
color: var(--gov-infobar-inverse-color, var(--gov-color-secondary-800));
|
|
360
|
+
}
|
|
361
|
+
.gov-infobar[variant=primary] {
|
|
362
|
+
background-color: var(--gov-infobar-primary-bg-color, var(--gov-color-primary));
|
|
363
|
+
}
|
|
364
|
+
.gov-infobar[variant=primary] .gov-infobar__icon {
|
|
365
|
+
color: var(--gov-infobar-primary-icon-color, var(--gov-color-neutral-white));
|
|
366
|
+
}
|
|
367
|
+
.gov-infobar[variant=primary] .gov-infobar__content {
|
|
368
|
+
color: var(--gov-infobar-primary-text-color, var(--gov-color-neutral-white));
|
|
369
|
+
}
|
|
370
|
+
.gov-infobar[variant=primary][inverse=""], .gov-infobar[variant=primary][inverse=true i], .gov-infobar[variant=primary][inverse="1"] {
|
|
371
|
+
border-bottom: var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));
|
|
372
|
+
background-color: var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white));
|
|
373
|
+
}
|
|
374
|
+
.gov-infobar[variant=primary][inverse=""] .gov-infobar__icon, .gov-infobar[variant=primary][inverse=true i] .gov-infobar__icon, .gov-infobar[variant=primary][inverse="1"] .gov-infobar__icon {
|
|
375
|
+
color: var(--gov-infobar-primary-bg-color, var(--gov-color-primary));
|
|
376
|
+
}
|
|
377
|
+
.gov-infobar[variant=primary][inverse=""] .gov-infobar__content, .gov-infobar[variant=primary][inverse=true i] .gov-infobar__content, .gov-infobar[variant=primary][inverse="1"] .gov-infobar__content {
|
|
378
|
+
color: var(--gov-infobar-inverse-color, var(--gov-color-secondary-800));
|
|
379
|
+
}
|
|
380
|
+
@media (min-width: 75em) {
|
|
381
|
+
.gov-infobar__content {
|
|
382
|
+
padding-right: 2rem;
|
|
383
|
+
}
|
|
384
|
+
}
|
package/dist/collection/components/{gov-alert/gov-alert.js → gov-infobar/default/gov-infobar.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { validateProp } from "
|
|
3
|
-
import {
|
|
4
|
-
import { govHost, toBoolAttr } from "
|
|
5
|
-
import Fragment from "
|
|
6
|
-
import { validateWcagProp } from "
|
|
7
|
-
import { canValidateWcagOnRender } from "
|
|
8
|
-
import { delay } from "
|
|
9
|
-
export class
|
|
2
|
+
import { validateProp } from "../../../helpers/Validate/props";
|
|
3
|
+
import { InfobarClass, InfobarVariants } from "./constants";
|
|
4
|
+
import { govHost, toBoolAttr } from "../../../helpers/Dom/template";
|
|
5
|
+
import Fragment from "../../../helpers/Fragment";
|
|
6
|
+
import { validateWcagProp } from "../../../helpers/Validate/wcag";
|
|
7
|
+
import { canValidateWcagOnRender } from "../../../helpers/Dom/win";
|
|
8
|
+
import { delay } from "../../../utils/utils";
|
|
9
|
+
export class GovInfobar {
|
|
10
10
|
constructor() {
|
|
11
11
|
this.headline = undefined;
|
|
12
12
|
this.variant = "primary";
|
|
@@ -18,7 +18,7 @@ export class GovAlert {
|
|
|
18
18
|
this.h = govHost(this.host);
|
|
19
19
|
}
|
|
20
20
|
validateVariant(newValue) {
|
|
21
|
-
validateProp(
|
|
21
|
+
validateProp(InfobarVariants, newValue, InfobarClass.root);
|
|
22
22
|
}
|
|
23
23
|
componentWillLoad() {
|
|
24
24
|
this.validateVariant(this.variant);
|
|
@@ -36,12 +36,12 @@ export class GovAlert {
|
|
|
36
36
|
inverse = false;
|
|
37
37
|
variant = "secondary";
|
|
38
38
|
}
|
|
39
|
-
const closeButton = (h("div", { class:
|
|
40
|
-
return (h(Host, { class: this.h.classes(
|
|
39
|
+
const closeButton = (h("div", { class: InfobarClass.close }, h("gov-button", { size: "s", "aria-label": this.wcagCloseLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": this.onCloseHandler.bind(this) }, h("gov-icon", { name: "x-lg" }))));
|
|
40
|
+
return (h(Host, { class: this.h.classes(InfobarClass.root), variant: this.variant }, h("section", { class: InfobarClass.section, role: "infobar" }, this.h.hasSlot("icon") && (h("div", { class: InfobarClass.icon }, h("slot", { name: "icon" }))), h("div", { class: InfobarClass.content }, this.headline ? (h(Fragment, null, h("div", { class: InfobarClass.headline }, h("p", null, this.headline), h("gov-button", { size: "s", "aria-label": this.wcagToggleLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": () => this.toggleContent = !this.toggleContent }, h("gov-icon", { name: this.toggleContent ? 'chevron-up' : 'chevron-down' }))), h("div", { hidden: !this.toggleContent, "aria-hidden": toBoolAttr(this.toggleContent) }, h("slot", null)))) : (h("slot", null)))), this.closable && closeButton));
|
|
41
41
|
}
|
|
42
42
|
onCloseHandler(e) {
|
|
43
43
|
this.govClose.emit({
|
|
44
|
-
component:
|
|
44
|
+
component: InfobarClass.root,
|
|
45
45
|
ref: this.host,
|
|
46
46
|
originalEvent: e,
|
|
47
47
|
});
|
|
@@ -51,21 +51,21 @@ export class GovAlert {
|
|
|
51
51
|
*/
|
|
52
52
|
async validateWcag() {
|
|
53
53
|
if (this.closable) {
|
|
54
|
-
validateWcagProp(this.wcagCloseLabel, 'wcag-close-label',
|
|
54
|
+
validateWcagProp(this.wcagCloseLabel, 'wcag-close-label', InfobarClass.root);
|
|
55
55
|
}
|
|
56
56
|
if (this.headline) {
|
|
57
|
-
validateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label',
|
|
57
|
+
validateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', InfobarClass.root);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
static get is() { return "gov-
|
|
60
|
+
static get is() { return "gov-infobar"; }
|
|
61
61
|
static get originalStyleUrls() {
|
|
62
62
|
return {
|
|
63
|
-
"$": ["gov-
|
|
63
|
+
"$": ["gov-infobar.scss"]
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
static get styleUrls() {
|
|
67
67
|
return {
|
|
68
|
-
"$": ["gov-
|
|
68
|
+
"$": ["gov-infobar.css"]
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
static get properties() {
|
|
@@ -97,7 +97,7 @@ export class GovAlert {
|
|
|
97
97
|
"VariantType": {
|
|
98
98
|
"location": "import",
|
|
99
99
|
"path": "./constants",
|
|
100
|
-
"id": "../../../packages/core/src/components/gov-
|
|
100
|
+
"id": "../../../packages/core/src/components/gov-infobar/default/constants.ts::VariantType"
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
},
|
|
@@ -141,7 +141,7 @@ export class GovAlert {
|
|
|
141
141
|
"optional": false,
|
|
142
142
|
"docs": {
|
|
143
143
|
"tags": [],
|
|
144
|
-
"text": "Aria label for the closing button. It is mandatory if the
|
|
144
|
+
"text": "Aria label for the closing button. It is mandatory if the infobar is closable"
|
|
145
145
|
},
|
|
146
146
|
"attribute": "wcag-close-label",
|
|
147
147
|
"reflect": false
|
|
@@ -158,7 +158,7 @@ export class GovAlert {
|
|
|
158
158
|
"optional": false,
|
|
159
159
|
"docs": {
|
|
160
160
|
"tags": [],
|
|
161
|
-
"text": "Aria label for the toggle button. It is mandatory if the
|
|
161
|
+
"text": "Aria label for the toggle button. It is mandatory if the infobar has headline"
|
|
162
162
|
},
|
|
163
163
|
"attribute": "wcag-toggle-label",
|
|
164
164
|
"reflect": false
|
|
@@ -175,7 +175,7 @@ export class GovAlert {
|
|
|
175
175
|
"optional": true,
|
|
176
176
|
"docs": {
|
|
177
177
|
"tags": [],
|
|
178
|
-
"text": "Displays the option to close the
|
|
178
|
+
"text": "Displays the option to close the infobar"
|
|
179
179
|
},
|
|
180
180
|
"attribute": "closable",
|
|
181
181
|
"reflect": false,
|
|
@@ -200,13 +200,13 @@ export class GovAlert {
|
|
|
200
200
|
"text": "Called when the close button is clicked"
|
|
201
201
|
},
|
|
202
202
|
"complexType": {
|
|
203
|
-
"original": "
|
|
204
|
-
"resolved": "
|
|
203
|
+
"original": "InfobarEvent",
|
|
204
|
+
"resolved": "InfobarEvent",
|
|
205
205
|
"references": {
|
|
206
|
-
"
|
|
206
|
+
"InfobarEvent": {
|
|
207
207
|
"location": "import",
|
|
208
|
-
"path": "./gov-
|
|
209
|
-
"id": "../../../packages/core/src/components/gov-
|
|
208
|
+
"path": "./gov-infobar.types",
|
|
209
|
+
"id": "../../../packages/core/src/components/gov-infobar/default/gov-infobar.types.ts::InfobarEvent"
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -241,4 +241,4 @@ export class GovAlert {
|
|
|
241
241
|
}];
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
//# sourceMappingURL=gov-
|
|
244
|
+
//# sourceMappingURL=gov-infobar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-infobar.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-infobar/default/gov-infobar.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 { InfobarClass, InfobarVariants, VariantType } from \"./constants\"\nimport { govHost, toBoolAttr } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { InfobarEvent } from \"./gov-infobar.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-infobar\",\n\tstyleUrl: \"gov-infobar.scss\",\n})\nexport class GovInfobar {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovInfobarElement\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 infobar 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 infobar 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<InfobarEvent>\n\t/**\n\t * Displays the option to close the infobar\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(InfobarVariants, newValue, InfobarClass.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={InfobarClass.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(InfobarClass.root)} variant={this.variant}>\n\t\t\t\t<section class={InfobarClass.section} role=\"infobar\">\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<div class={InfobarClass.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={InfobarClass.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={InfobarClass.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: InfobarClass.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', InfobarClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', InfobarClass.root)\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-infobar.types.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-infobar/default/gov-infobar.types.ts"],"names":[],"mappings":"","sourcesContent":["import { GovBaseEvent } from \"../../../types/event.types\"\n\nexport interface InfobarEvent extends GovBaseEvent {\n\tref: HTMLGovInfobarElement\n}\n\n"]}
|