@gov-design-system-ce/components 4.1.2 → 4.1.3-BETA-2
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-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +1 -1
- package/dist/cjs/gov-chip.cjs.entry.js +1 -1
- package/dist/cjs/gov-container.cjs.entry.js +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/gov-dialog.cjs.entry.js +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gov-empty.cjs.entry.js +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
- package/dist/cjs/gov-flex_3.cjs.entry.js +16 -3
- package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-input_2.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-grid.cjs.entry.js +1 -1
- package/dist/cjs/gov-infobar.cjs.entry.js +1 -1
- package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
- package/dist/cjs/gov-layout.cjs.entry.js +1 -1
- package/dist/cjs/gov-lifecycle.cjs.entry.js +1 -1
- package/dist/cjs/gov-link.cjs.entry.js +1 -1
- package/dist/cjs/gov-loading.cjs.entry.js +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
- package/dist/cjs/gov-tag.cjs.entry.js +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js +1 -1
- package/dist/cjs/gov-tiles.cjs.entry.js +1 -1
- package/dist/cjs/gov-toast.cjs.entry.js +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
- package/dist/cjs/{index-7ff4447c.js → index-67e87c27.js} +8 -1
- package/dist/cjs/index-67e87c27.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +10 -1
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/utils/icon.utils.js +4 -0
- package/dist/collection/utils/icon.utils.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/gov-flex.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox-group.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-control.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-label.js +1 -1
- package/dist/components/gov-form-message.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-password-power.js +1 -1
- package/dist/components/gov-form-radio-group.js +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-grid-item.js +1 -1
- package/dist/components/gov-grid.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-layout-column.js +1 -1
- package/dist/components/gov-layout.js +1 -1
- package/dist/components/gov-lifecycle.js +1 -1
- package/dist/components/gov-link.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-tiles.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-73938936.js → p-03ad4e0f.js} +2 -2
- package/dist/components/{p-40c2fb42.js → p-045fbfaf.js} +2 -2
- package/dist/components/{p-d962bf44.js → p-094043d1.js} +2 -2
- package/dist/components/p-115b9cf3.js +3 -0
- package/dist/components/p-115b9cf3.js.map +1 -0
- package/dist/components/{p-b97d8edd.js → p-350e060c.js} +2 -2
- package/dist/components/{p-7be2301a.js → p-384c7f2a.js} +2 -2
- package/dist/components/{p-48c4d5c8.js → p-41a9e287.js} +2 -2
- package/dist/components/{p-28776006.js → p-5b2d5fb5.js} +2 -2
- package/dist/components/{p-ce90ff14.js → p-89ed55fa.js} +2 -2
- package/dist/components/{p-c438a723.js → p-8ee6f2f3.js} +2 -2
- package/dist/components/{p-b25af2cf.js → p-a129712c.js} +2 -2
- package/dist/components/p-ed4d755e.js +2 -0
- package/dist/components/p-ed4d755e.js.map +1 -0
- package/dist/core/core.esm.js +1 -1
- package/dist/core/{p-ee7af1ab.entry.js → p-017ff5a5.entry.js} +2 -2
- package/dist/core/{p-0dac0792.entry.js → p-032accfb.entry.js} +2 -2
- package/dist/core/{p-b2abc2fc.entry.js → p-058e6fe2.entry.js} +2 -2
- package/dist/core/{p-b4cf97ab.entry.js → p-063b70a2.entry.js} +2 -2
- package/dist/core/{p-bf8529f8.entry.js → p-0724cb6a.entry.js} +2 -2
- package/dist/core/{p-4d81039c.entry.js → p-09c9eba6.entry.js} +2 -2
- package/dist/core/p-0c076b21.entry.js +2 -0
- package/dist/core/{p-97c65665.entry.js → p-0f0f7302.entry.js} +2 -2
- package/dist/core/{p-eaa83b2f.entry.js → p-10f773c2.entry.js} +2 -2
- package/dist/core/{p-520ac994.entry.js → p-14d66f26.entry.js} +2 -2
- package/dist/core/{p-87562d9e.entry.js → p-1aa7450e.entry.js} +2 -2
- package/dist/core/p-23081383.entry.js +2 -0
- package/dist/core/p-23081383.entry.js.map +1 -0
- package/dist/core/{p-2496f2a5.entry.js → p-237a5b91.entry.js} +2 -2
- package/dist/core/{p-979b03eb.entry.js → p-269071f5.entry.js} +2 -2
- package/dist/core/p-2ee042d4.js +3 -0
- package/dist/core/p-2ee042d4.js.map +1 -0
- package/dist/core/{p-2e21a994.entry.js → p-33310735.entry.js} +2 -2
- package/dist/core/{p-29d16111.entry.js → p-347d15d5.entry.js} +2 -2
- package/dist/core/p-37473c34.entry.js +2 -0
- package/dist/core/{p-ee0f3bd9.entry.js → p-3849ca02.entry.js} +2 -2
- package/dist/core/{p-2bde147f.entry.js → p-3a7381e7.entry.js} +2 -2
- package/dist/core/{p-182d03c1.entry.js → p-43d3dbc0.entry.js} +2 -2
- package/dist/core/p-45b759f4.entry.js +2 -0
- package/dist/core/{p-d3f7d3d5.entry.js.map → p-45b759f4.entry.js.map} +1 -1
- package/dist/core/p-4c60e125.entry.js +2 -0
- package/dist/core/{p-d2b11492.entry.js → p-4e29744a.entry.js} +2 -2
- package/dist/core/{p-436e7690.entry.js → p-4fa0320d.entry.js} +2 -2
- package/dist/core/p-50af9ae8.entry.js +2 -0
- package/dist/core/{p-af9fe91a.entry.js → p-5c3f4cfe.entry.js} +2 -2
- package/dist/core/{p-f83b9da5.entry.js → p-6b7c3a96.entry.js} +2 -2
- package/dist/core/{p-97e8b4b3.entry.js → p-71f5d4ff.entry.js} +2 -2
- package/dist/core/{p-605e72b1.entry.js → p-77daba72.entry.js} +2 -2
- package/dist/core/{p-b245d627.entry.js → p-7a21fb90.entry.js} +2 -2
- package/dist/core/{p-abefa59b.entry.js → p-7baee44f.entry.js} +2 -2
- package/dist/core/{p-6603e3df.entry.js → p-7dfb7e36.entry.js} +2 -2
- package/dist/core/{p-88b69d30.entry.js → p-8bb6c816.entry.js} +2 -2
- package/dist/core/{p-fb8c019a.entry.js → p-8cc5ad01.entry.js} +2 -2
- package/dist/core/{p-6f260a90.entry.js → p-906865d0.entry.js} +2 -2
- package/dist/core/{p-12d1e5bc.entry.js → p-927c31dd.entry.js} +2 -2
- package/dist/core/{p-ebeb1a03.entry.js → p-967a1094.entry.js} +2 -2
- package/dist/core/{p-64dc1cdb.entry.js → p-9846fd13.entry.js} +2 -2
- package/dist/core/{p-cd988543.entry.js → p-994385ca.entry.js} +2 -2
- package/dist/core/{p-5a92b9d9.entry.js → p-9f8d69a9.entry.js} +2 -2
- package/dist/core/{p-fa5b72de.entry.js → p-a6a9de9a.entry.js} +2 -2
- package/dist/core/{p-ebc318d7.entry.js → p-b62e49ee.entry.js} +2 -2
- package/dist/core/{p-71dc8171.entry.js → p-c0800e6d.entry.js} +2 -2
- package/dist/core/{p-53fa7648.entry.js → p-cecbe73f.entry.js} +2 -2
- package/dist/core/{p-d6e972c0.entry.js → p-d795a421.entry.js} +2 -2
- package/dist/core/{p-581c8075.entry.js → p-d9b42773.entry.js} +2 -2
- package/dist/core/{p-913331e8.entry.js → p-e0a199ff.entry.js} +2 -2
- package/dist/core/{p-fa161f10.entry.js → p-e215f3ee.entry.js} +2 -2
- package/dist/core/{p-d952e56f.entry.js → p-ed02945f.entry.js} +2 -2
- package/dist/core/{p-ff609d0e.entry.js → p-ee55932a.entry.js} +2 -2
- package/dist/core/{p-eeee2325.entry.js → p-f2bb8c29.entry.js} +2 -2
- package/dist/core/{p-aeab9c1a.entry.js → p-f54edd6c.entry.js} +2 -2
- package/dist/core/{p-b0d1073c.entry.js → p-f7f60f91.entry.js} +2 -2
- package/dist/core/{p-8ece244d.entry.js → p-fcac8531.entry.js} +2 -2
- package/dist/esm/core.js +2 -2
- package/dist/esm/gov-accordion-item.entry.js +1 -1
- package/dist/esm/gov-accordion.entry.js +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-breadcrumbs.entry.js +1 -1
- package/dist/esm/gov-button.entry.js +1 -1
- package/dist/esm/gov-card.entry.js +1 -1
- package/dist/esm/gov-chip.entry.js +1 -1
- package/dist/esm/gov-container.entry.js +1 -1
- package/dist/esm/gov-control-group.entry.js +1 -1
- package/dist/esm/gov-cookiebar.entry.js +1 -1
- package/dist/esm/gov-dialog.entry.js +1 -1
- package/dist/esm/gov-dropdown.entry.js +1 -1
- package/dist/esm/gov-empty.entry.js +1 -1
- package/dist/esm/gov-error-code.entry.js +1 -1
- package/dist/esm/gov-flex_3.entry.js +16 -3
- package/dist/esm/gov-flex_3.entry.js.map +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +1 -1
- package/dist/esm/gov-form-checkbox-group.entry.js +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +1 -1
- package/dist/esm/gov-form-control.entry.js +1 -1
- package/dist/esm/gov-form-file.entry.js +1 -1
- package/dist/esm/gov-form-group.entry.js +1 -1
- package/dist/esm/gov-form-input_2.entry.js +1 -1
- package/dist/esm/gov-form-label.entry.js +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +1 -1
- package/dist/esm/gov-form-password-power.entry.js +1 -1
- package/dist/esm/gov-form-radio-group.entry.js +1 -1
- package/dist/esm/gov-form-radio.entry.js +1 -1
- package/dist/esm/gov-form-search.entry.js +1 -1
- package/dist/esm/gov-form-select.entry.js +1 -1
- package/dist/esm/gov-form-switch.entry.js +1 -1
- package/dist/esm/gov-grid-item.entry.js +1 -1
- package/dist/esm/gov-grid.entry.js +1 -1
- package/dist/esm/gov-infobar.entry.js +1 -1
- package/dist/esm/gov-layout-column.entry.js +1 -1
- package/dist/esm/gov-layout.entry.js +1 -1
- package/dist/esm/gov-lifecycle.entry.js +1 -1
- package/dist/esm/gov-link.entry.js +1 -1
- package/dist/esm/gov-loading.entry.js +1 -1
- package/dist/esm/gov-message.entry.js +1 -1
- package/dist/esm/gov-pagination.entry.js +1 -1
- package/dist/esm/gov-spacer.entry.js +1 -1
- package/dist/esm/gov-stepper-item.entry.js +1 -1
- package/dist/esm/gov-stepper.entry.js +1 -1
- package/dist/esm/gov-tabs-item.entry.js +1 -1
- package/dist/esm/gov-tabs.entry.js +1 -1
- package/dist/esm/gov-tag.entry.js +1 -1
- package/dist/esm/gov-tile.entry.js +1 -1
- package/dist/esm/gov-tiles.entry.js +1 -1
- package/dist/esm/gov-toast.entry.js +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +1 -1
- package/dist/esm/gov-tooltip.entry.js +1 -1
- package/dist/esm/gov-wizard-item.entry.js +1 -1
- package/dist/esm/gov-wizard.entry.js +1 -1
- package/dist/esm/{index-8dc58a1a.js → index-087b155c.js} +8 -2
- package/dist/esm/index-087b155c.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/hydrate/index.js +22 -2
- package/dist/hydrate/index.mjs +22 -2
- package/package.json +1 -1
- package/dist/cjs/index-7ff4447c.js.map +0 -1
- package/dist/components/p-18ab0d24.js +0 -2
- package/dist/components/p-18ab0d24.js.map +0 -1
- package/dist/components/p-42200001.js +0 -3
- package/dist/components/p-42200001.js.map +0 -1
- package/dist/core/p-2b51b8e8.entry.js +0 -2
- package/dist/core/p-3df6c6cd.entry.js +0 -2
- package/dist/core/p-467f778b.entry.js +0 -2
- package/dist/core/p-5fbde4f9.js +0 -3
- package/dist/core/p-5fbde4f9.js.map +0 -1
- package/dist/core/p-b766810e.entry.js +0 -2
- package/dist/core/p-b766810e.entry.js.map +0 -1
- package/dist/core/p-bc0ed2c1.entry.js +0 -2
- package/dist/core/p-d3f7d3d5.entry.js +0 -2
- package/dist/esm/index-8dc58a1a.js.map +0 -1
- /package/dist/components/{p-73938936.js.map → p-03ad4e0f.js.map} +0 -0
- /package/dist/components/{p-40c2fb42.js.map → p-045fbfaf.js.map} +0 -0
- /package/dist/components/{p-d962bf44.js.map → p-094043d1.js.map} +0 -0
- /package/dist/components/{p-b97d8edd.js.map → p-350e060c.js.map} +0 -0
- /package/dist/components/{p-7be2301a.js.map → p-384c7f2a.js.map} +0 -0
- /package/dist/components/{p-48c4d5c8.js.map → p-41a9e287.js.map} +0 -0
- /package/dist/components/{p-28776006.js.map → p-5b2d5fb5.js.map} +0 -0
- /package/dist/components/{p-ce90ff14.js.map → p-89ed55fa.js.map} +0 -0
- /package/dist/components/{p-c438a723.js.map → p-8ee6f2f3.js.map} +0 -0
- /package/dist/components/{p-b25af2cf.js.map → p-a129712c.js.map} +0 -0
- /package/dist/core/{p-ee7af1ab.entry.js.map → p-017ff5a5.entry.js.map} +0 -0
- /package/dist/core/{p-0dac0792.entry.js.map → p-032accfb.entry.js.map} +0 -0
- /package/dist/core/{p-b2abc2fc.entry.js.map → p-058e6fe2.entry.js.map} +0 -0
- /package/dist/core/{p-b4cf97ab.entry.js.map → p-063b70a2.entry.js.map} +0 -0
- /package/dist/core/{p-bf8529f8.entry.js.map → p-0724cb6a.entry.js.map} +0 -0
- /package/dist/core/{p-4d81039c.entry.js.map → p-09c9eba6.entry.js.map} +0 -0
- /package/dist/core/{p-bc0ed2c1.entry.js.map → p-0c076b21.entry.js.map} +0 -0
- /package/dist/core/{p-97c65665.entry.js.map → p-0f0f7302.entry.js.map} +0 -0
- /package/dist/core/{p-eaa83b2f.entry.js.map → p-10f773c2.entry.js.map} +0 -0
- /package/dist/core/{p-520ac994.entry.js.map → p-14d66f26.entry.js.map} +0 -0
- /package/dist/core/{p-87562d9e.entry.js.map → p-1aa7450e.entry.js.map} +0 -0
- /package/dist/core/{p-2496f2a5.entry.js.map → p-237a5b91.entry.js.map} +0 -0
- /package/dist/core/{p-979b03eb.entry.js.map → p-269071f5.entry.js.map} +0 -0
- /package/dist/core/{p-2e21a994.entry.js.map → p-33310735.entry.js.map} +0 -0
- /package/dist/core/{p-29d16111.entry.js.map → p-347d15d5.entry.js.map} +0 -0
- /package/dist/core/{p-2b51b8e8.entry.js.map → p-37473c34.entry.js.map} +0 -0
- /package/dist/core/{p-ee0f3bd9.entry.js.map → p-3849ca02.entry.js.map} +0 -0
- /package/dist/core/{p-2bde147f.entry.js.map → p-3a7381e7.entry.js.map} +0 -0
- /package/dist/core/{p-182d03c1.entry.js.map → p-43d3dbc0.entry.js.map} +0 -0
- /package/dist/core/{p-3df6c6cd.entry.js.map → p-4c60e125.entry.js.map} +0 -0
- /package/dist/core/{p-d2b11492.entry.js.map → p-4e29744a.entry.js.map} +0 -0
- /package/dist/core/{p-436e7690.entry.js.map → p-4fa0320d.entry.js.map} +0 -0
- /package/dist/core/{p-467f778b.entry.js.map → p-50af9ae8.entry.js.map} +0 -0
- /package/dist/core/{p-af9fe91a.entry.js.map → p-5c3f4cfe.entry.js.map} +0 -0
- /package/dist/core/{p-f83b9da5.entry.js.map → p-6b7c3a96.entry.js.map} +0 -0
- /package/dist/core/{p-97e8b4b3.entry.js.map → p-71f5d4ff.entry.js.map} +0 -0
- /package/dist/core/{p-605e72b1.entry.js.map → p-77daba72.entry.js.map} +0 -0
- /package/dist/core/{p-b245d627.entry.js.map → p-7a21fb90.entry.js.map} +0 -0
- /package/dist/core/{p-abefa59b.entry.js.map → p-7baee44f.entry.js.map} +0 -0
- /package/dist/core/{p-6603e3df.entry.js.map → p-7dfb7e36.entry.js.map} +0 -0
- /package/dist/core/{p-88b69d30.entry.js.map → p-8bb6c816.entry.js.map} +0 -0
- /package/dist/core/{p-fb8c019a.entry.js.map → p-8cc5ad01.entry.js.map} +0 -0
- /package/dist/core/{p-6f260a90.entry.js.map → p-906865d0.entry.js.map} +0 -0
- /package/dist/core/{p-12d1e5bc.entry.js.map → p-927c31dd.entry.js.map} +0 -0
- /package/dist/core/{p-ebeb1a03.entry.js.map → p-967a1094.entry.js.map} +0 -0
- /package/dist/core/{p-64dc1cdb.entry.js.map → p-9846fd13.entry.js.map} +0 -0
- /package/dist/core/{p-cd988543.entry.js.map → p-994385ca.entry.js.map} +0 -0
- /package/dist/core/{p-5a92b9d9.entry.js.map → p-9f8d69a9.entry.js.map} +0 -0
- /package/dist/core/{p-fa5b72de.entry.js.map → p-a6a9de9a.entry.js.map} +0 -0
- /package/dist/core/{p-ebc318d7.entry.js.map → p-b62e49ee.entry.js.map} +0 -0
- /package/dist/core/{p-71dc8171.entry.js.map → p-c0800e6d.entry.js.map} +0 -0
- /package/dist/core/{p-53fa7648.entry.js.map → p-cecbe73f.entry.js.map} +0 -0
- /package/dist/core/{p-d6e972c0.entry.js.map → p-d795a421.entry.js.map} +0 -0
- /package/dist/core/{p-581c8075.entry.js.map → p-d9b42773.entry.js.map} +0 -0
- /package/dist/core/{p-913331e8.entry.js.map → p-e0a199ff.entry.js.map} +0 -0
- /package/dist/core/{p-fa161f10.entry.js.map → p-e215f3ee.entry.js.map} +0 -0
- /package/dist/core/{p-d952e56f.entry.js.map → p-ed02945f.entry.js.map} +0 -0
- /package/dist/core/{p-ff609d0e.entry.js.map → p-ee55932a.entry.js.map} +0 -0
- /package/dist/core/{p-eeee2325.entry.js.map → p-f2bb8c29.entry.js.map} +0 -0
- /package/dist/core/{p-aeab9c1a.entry.js.map → p-f54edd6c.entry.js.map} +0 -0
- /package/dist/core/{p-b0d1073c.entry.js.map → p-f7f60f91.entry.js.map} +0 -0
- /package/dist/core/{p-8ece244d.entry.js.map → p-fcac8531.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as s,d as t,h as i,a as e,g as h}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as s,d as t,h as i,a as e,g as h}from"./p-2ee042d4.js";import{c as a,b as n}from"./p-ea7fdd2e.js";import{v as o}from"./p-0b3574c2.js";import{c as l}from"./p-cd6c2938.js";import{d as r,t as c,h as d}from"./p-e0e2e9c1.js";import{F as f,a as u}from"./p-56efd4a2.js";import{p}from"./p-ded281e6.js";import{A as m,a as v}from"./p-9ac55bd1.js";import{i as b}from"./p-d9a299a4.js";import"./p-e8ec030e.js";import"./p-92f420cb.js";import"./p-2aedc81e.js";const g=class{constructor(i){s(this,i);this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govInput=t(this,"gov-input",7);this.govSelect=t(this,"gov-select",7);this.templateResolver=s=>s[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=l("GovListBox")}validateSize(s){o(u,s,f.root)}watchOptions(s){this.setOptions(p(s)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await r(200);const s=this.listRef.offsetHeight;const t=this.listRef.querySelector('li[aria-selected="true"]');if(t&&s){const s=t.offsetTop;this.listRef.scrollTo({top:s,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((s=>this.list=s)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const s=p(this.options);if(s.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new m(this.host,((s,t)=>{this.onAriaAttributeChange(s,t)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=b(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(s,t){this.host.removeAttribute(s);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[s]:t})}render(){return i(e,{key:"a8bf269f28c969a01b9d6fd884b5e6dd253905f6",class:f.root,size:this.size},i("gov-form-input",Object.assign({key:"13797f47506657569fe824ecb8d82f54cdd7f62e",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":c(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this)},this.inheritedAttributes,{"aria-autocomplete":"list","aria-owns":[this.listBoxId,this.inheritedAttributes["aria-owns"]].join(" "),"aria-expanded":n(this.list.length&&this.focused?true:false),ref:s=>this.inputRef=s}),i("slot",{key:"aa60e7afc9f03418525f40f54989c56ac817a08a",name:"validation-icon"}),i("slot",{key:"fd1aa38d3f92793689e7238c4cc7b11fdb6d7c83",name:"icon-end"})),i("ul",{key:"f721a4bebd03c2837604e42d4ece440f2668e4db",class:f.list,role:"listbox","aria-hidden":a(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:s=>this.listRef=s},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?i("li",{class:f.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?i("li",{class:f.loading},i("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((s,t)=>{const e=this.arrowCounter===t;return i("li",{class:f.item,innerHTML:this.templateResolver(s,e),role:"option","aria-posinset":t,tabindex:e?0:-1,"aria-setsize":this.list.length,onTouchStart:s=>this.onSelectHandler(s,t),onMouseDown:s=>this.onSelectHandler(s,t),"aria-selected":a(e)},i("slot",{name:"list-item-left"}),i("slot",{name:"list-item-right"}))})):null))}onFocusHandler(s){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}s.stopPropagation();this.govFocus.emit({originalEvent:s,component:f.root,value:this.value,selected:null})}onBlurHandler(s){this.focused=false;this.clearList();this.arrowCounter=-1;s.stopPropagation();this.govBlur.emit({originalEvent:s,component:f.root,value:this.value,selected:null})}onInputHandler(s){this.value=s.target.value;s.stopPropagation();this.govInput.emit({originalEvent:s,component:f.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(s,t=-1){let i=null;if(t>-1){i=this.list[t]}else if(d(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:f.root,value:this.value,selected:i,originalEvent:s});this.clearList();if(d(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===38)this.onArrowUp();else if(t.keyCode===40)this.onArrowDown();else if(t.keyCode===13){s.preventDefault();t.preventDefault();this.onSelectHandler(s)}}onKeyDownHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===13){s.preventDefault();t.preventDefault()}}async setFocus(s){return this.inputRef.focus(s)}async setBlur(){return this.inputRef.blur()}async setOptions(s){this.list=Array.isArray(s)?s:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(s){this.processing=s}async setSearchCallback(s){this.searchCallback=s}async setTemplateResolver(s){this.templateResolver=s}get host(){return h(this)}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}};export{g as gov_form_autocomplete};
|
|
2
|
+
//# sourceMappingURL=p-fcac8531.entry.js.map
|
package/dist/esm/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, H, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, H, b as bootstrapLazy } from './index-087b155c.js';
|
|
2
|
+
export { s as setNonce } from './index-087b155c.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
3
|
import { a as AccordionClass, A as AccordionItemClass, b as AccordionSizes } from './constants-3ab65c42.js';
|
|
4
4
|
import { g as govHost, t as toBoolAttrIfDefined, b as booleanString } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
3
|
import { A as AccordionItemClass, a as AccordionClass, b as AccordionSizes } from './constants-3ab65c42.js';
|
|
4
4
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement, d as createEvent } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement, d as createEvent } from './index-087b155c.js';
|
|
2
2
|
import { b as validateWcagProp, v as validateAccessibleLabel } from './wcag-253a4421.js';
|
|
3
3
|
import { c as canValidateWcagOnRender } from './gov.log-6b64cda6.js';
|
|
4
4
|
import { d as delay } from './utils-e10e994d.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateAccessibleLabel } from './wcag-253a4421.js';
|
|
3
3
|
import { c as canValidateWcagOnRender } from './gov.log-6b64cda6.js';
|
|
4
4
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateAccessibleLabel } from './wcag-253a4421.js';
|
|
3
3
|
import { c as canValidateWcagOnRender } from './gov.log-6b64cda6.js';
|
|
4
4
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
3
|
import { B as ButtonClass, a as ButtonColors, c as ButtonType, N as NativeType } from './constants-51f51588.js';
|
|
4
4
|
import { g as govHost, t as toBoolAttrIfDefined } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govHost, b as booleanString } from './template-7ecee4d1.js';
|
|
3
3
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
4
4
|
import { v as validateAccessibleLabel } from './wcag-253a4421.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
import { p as pick } from './utils-e10e994d.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { C as Colors } from './colors-4cf64720.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
3
3
|
|
|
4
4
|
const CookieConsentClass = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govHost, a as boolToFocusValue, c as toBoolAttr } from './template-7ecee4d1.js';
|
|
3
3
|
import { c as canValidateWcagOnRender } from './gov.log-6b64cda6.js';
|
|
4
4
|
import { a as validateWcagRef } from './wcag-253a4421.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govHost, c as toBoolAttr } from './template-7ecee4d1.js';
|
|
3
3
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
4
4
|
import { B as ButtonClass } from './constants-51f51588.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { p as pick } from './utils-e10e994d.js';
|
|
3
3
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
4
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement, c as getAssetPath, d as createEvent } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement, c as getAssetPath, B as Build, d as createEvent } from './index-087b155c.js';
|
|
2
2
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
import { p as pick } from './utils-e10e994d.js';
|
|
@@ -52,7 +52,7 @@ const IconClass = {
|
|
|
52
52
|
holder: 'gov-icon__holder',
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
const version = "4.1.2";
|
|
55
|
+
const version = "4.1.3-BETA-2";
|
|
56
56
|
|
|
57
57
|
const dsVersion = () => {
|
|
58
58
|
return version;
|
|
@@ -69,10 +69,14 @@ const iconUrl = (path, name, type) => {
|
|
|
69
69
|
};
|
|
70
70
|
async function fetchIcon({ name, type }) {
|
|
71
71
|
const cacheKey = type + "-" + name;
|
|
72
|
+
console.log('cacheKey', cacheKey);
|
|
73
|
+
console.log('iconCache[cacheKey]', iconCache, iconCache[cacheKey]);
|
|
72
74
|
if (iconCache[cacheKey]) {
|
|
73
75
|
return iconCache[cacheKey];
|
|
74
76
|
}
|
|
77
|
+
console.log('requestCache[cacheKey]', requestCache, requestCache[cacheKey]);
|
|
75
78
|
if (!requestCache[cacheKey]) {
|
|
79
|
+
console.log('iconUrl(iconsPath(), name, type)', iconUrl(iconsPath(), name, type));
|
|
76
80
|
requestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {
|
|
77
81
|
if (resp.status === 200) {
|
|
78
82
|
return resp.text();
|
|
@@ -132,6 +136,7 @@ const isValidSVG = (svgContent) => {
|
|
|
132
136
|
}
|
|
133
137
|
};
|
|
134
138
|
|
|
139
|
+
console.log('GovIcon loaded');
|
|
135
140
|
const GovIcon = class {
|
|
136
141
|
constructor(hostRef) {
|
|
137
142
|
registerInstance(this, hostRef);
|
|
@@ -141,6 +146,7 @@ const GovIcon = class {
|
|
|
141
146
|
this.type = "components";
|
|
142
147
|
this.visible = false;
|
|
143
148
|
this.error = false;
|
|
149
|
+
console.log('GovIcon constructor');
|
|
144
150
|
this.h = govHost(this.host);
|
|
145
151
|
}
|
|
146
152
|
validateSize(newValue) {
|
|
@@ -151,12 +157,17 @@ const GovIcon = class {
|
|
|
151
157
|
}
|
|
152
158
|
async loadIconPathData() {
|
|
153
159
|
const { name, visible } = this;
|
|
160
|
+
console.log('name, visible', name, visible);
|
|
161
|
+
console.log('Build.isBrowser', Build.isBrowser);
|
|
154
162
|
if (!name || !visible) {
|
|
163
|
+
console.log('return');
|
|
155
164
|
return;
|
|
156
165
|
}
|
|
157
166
|
await this.loadIcon();
|
|
158
167
|
}
|
|
159
168
|
connectedCallback() {
|
|
169
|
+
console.log('connectedCallback icon', this.name);
|
|
170
|
+
console.log('iconsLazyLoad()', iconsLazyLoad());
|
|
160
171
|
if (iconsLazyLoad()) {
|
|
161
172
|
this.visible = true;
|
|
162
173
|
this.loadIconPathData().finally();
|
|
@@ -169,12 +180,14 @@ const GovIcon = class {
|
|
|
169
180
|
}
|
|
170
181
|
}
|
|
171
182
|
disconnectedCallback() {
|
|
183
|
+
console.log('disconnectedCallback');
|
|
172
184
|
if (this.intersectionObserver) {
|
|
173
185
|
this.intersectionObserver.disconnect();
|
|
174
186
|
this.intersectionObserver = null;
|
|
175
187
|
}
|
|
176
188
|
}
|
|
177
189
|
async componentWillLoad() {
|
|
190
|
+
console.log('componentWillLoad');
|
|
178
191
|
this.validateSize(this.size);
|
|
179
192
|
this.validateColor(this.color);
|
|
180
193
|
await this.loadIconPathData();
|
|
@@ -200,6 +213,7 @@ const GovIcon = class {
|
|
|
200
213
|
async loadIcon() {
|
|
201
214
|
try {
|
|
202
215
|
const { name, type } = this;
|
|
216
|
+
console.log('loadIcon -> name, type', name, type);
|
|
203
217
|
const data = await fetchIcon({ name, type });
|
|
204
218
|
const isValid = isValidSVG(data);
|
|
205
219
|
this.host.innerHTML = isValid ? data : null;
|
|
@@ -215,7 +229,6 @@ const GovIcon = class {
|
|
|
215
229
|
}
|
|
216
230
|
return (h(Host, { class: this.h.classes(IconClass.root), size: this.size, color: this.color }));
|
|
217
231
|
}
|
|
218
|
-
static get assetsDirs() { return ["assets"]; }
|
|
219
232
|
get host() { return getElement(this); }
|
|
220
233
|
static get watchers() { return {
|
|
221
234
|
"size": ["validateSize"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-flex.gov-icon.gov-theme-switch.entry.js","mappings":";;;;;;;;AAMO,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;CAChB;;MCAY,OAAO;IAGnB;;yBASyE,KAAK;;;;;;;QAR7E,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAsDD,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAC1C,8DAAa,CACP,EACP;KACD;;;;ACpEuB,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAC;AAG/F,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE;IACtC,SAAS;IACT,SAAS;IACT,WAAW;IACX,SAAS;IACT,OAAO;IACP,SAAS;IACT,SAAS;IACT,UAAU;IACV,OAAO;IAC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cAAc,IAC9D,+DACC,6DAAM,KAAK,EAAE,gBAAgB,CAAC,SAAS,IACrC,SAAS,CAAC,KAAK,IAAI,iEAAU,IAAI,EAAC,KAAK,EAAC,KAAK,EAAE,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAC,YAAY,GAAY,EACxG,SAAS,CAAC,IAAI,IAAI,iEAAU,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,gBAAgB,CAAC,QAAQ,EAAE,IAAI,EAAC,YAAY,GAAY,CAClG,EACN,IAAI,CAAC,YAAY,KAAK,MAAM,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,CAC3D,CACC,CACH,EACP;KACD;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-flex/constants.ts","../../../packages/core/src/components/gov-flex/gov-flex.tsx","../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/helpers/Dom/document.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx","../../../packages/core/src/components/gov-theme-switch/constants.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.types.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.tsx"],"sourcesContent":["import {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const FlexSizes = Sizes\nexport type FlexSizesType = `${ValueOf<typeof FlexSizes>}`\n\nexport const FlexClass = {\n\troot: 'gov-flex',\n}\n\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FlexClass, FlexSizesType} from './constants'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-flex',\n})\nexport class GovFlex {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\n\t/**\n\t * Controls the flex direction of the container.\n\t */\n\t@Prop() direction: 'row' | 'row-reverse' | 'column' | 'column-reverse' = 'row';\n\n\t/**\n\t * Defines how the browser distributes space between and around content items along the main axis.\n\t */\n\t@Prop({\n\t\tattribute: 'justify-content',\n\t\treflect: true\n\t}) justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';\n\n\t/**\n\t * Aligns flex items along the cross axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-items',\n\t\treflect: true\n\t}) alignItems?: 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';\n\n\t/**\n\t * Controls whether the flex container is a single-line or multi-line flex container.\n\t */\n\t@Prop({reflect: true}) wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';\n\n\t/**\n\t * Aligns the flex container's lines within when there is extra space in the cross-axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-content',\n\t\treflect: true\n\t}) alignContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';\n\n\t/**\n\t * Sets the alignment of the flex container’s children along the flex container’s cross axis, overriding the `align-items` property for individual flex items.\n\t */\n\t@Prop({\n\t\tattribute: 'align-self',\n\t\treflect: true\n\t}) alignSelf?: 'auto' | 'normal' | 'self-start' | 'self-end' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch' | 'anchor-center';\n\n\t/**\n\t * The gap property creates consistent spacing between flex items in the container.\n\t */\n\t@Prop({\n\t\tattribute: 'gap',\n\t\treflect: true\n\t}) gap?: FlexSizesType;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FlexClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n","import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const IconSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL', '_5XL'])\nexport type IconSizesType = `${ValueOf<typeof IconSizes>}`\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'PRIMARY',\n\t'SECONDARY',\n\t'NEUTRAL',\n\t'ERROR',\n\t'SUCCESS',\n\t'WARNING',\n\t'DISABLED',\n\t'WHITE',\n\t'BLACK',\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tif (!requestCache[cacheKey]) {\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","import {Nullable} from \"../../utils/helpers.types\";\nimport {isWindow} from \"./win\";\n\nexport const setCookie = (name: string, value: string, days?: number) => {\n\tif (!isWindow) {\n\t\treturn\n\t}\n\tlet expires = \"\";\n\tif (days) {\n\t\tconst date = new Date();\n\t\tdate.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n\t\texpires = \"; expires=\" + date.toUTCString();\n\t}\n\tdocument.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;\n}\n\nexport const getCookie = (name: string): Nullable<string> => {\n\tif (!isWindow) {\n\t\treturn null\n\t}\n\tconst nameEQ = name + \"=\";\n\tconst cookies = document.cookie.split(';');\n\tfor (let i = 0; i < cookies.length; i++) {\n\t\tlet cookie = cookies[i].trim();\n\t\tif (cookie.startsWith(nameEQ)) {\n\t\t\treturn decodeURIComponent(cookie.substring(nameEQ.length));\n\t\t}\n\t}\n\treturn null;\n}\n\nexport const isValidSVG = (svgContent: string): boolean => {\n\ttry {\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString(svgContent, \"image/svg+xml\");\n\t\tconst parseError = doc.querySelector(\"parsererror\");\n\t\tif (parseError) {\n\t\t\treturn false;\n\t\t}\n\t\tconst svgElement = doc.documentElement;\n\t\tif (svgElement.tagName.toLowerCase() !== \"svg\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t} catch (error) {\n\t\treturn false;\n\t}\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass, IconColors, type IconColorType, IconSizesType} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {isValidSVG} from \"../../helpers/Dom/document\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Icon size\n\t */\n\t@Prop({reflect: true}) readonly size?: IconSizesType\n\t/**\n\t * Icon color\n\t */\n\t@Prop({reflect: true}) readonly color?: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"components\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{rootMargin: \"50px\"},\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isValidSVG(data)\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)} size={this.size} color={this.color}/>\n\t\t)\n\t}\n}\n","import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const ThemeSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type ThemeSwitchSizesType = `${ValueOf<typeof ThemeSwitchSizes>}`\n\nexport const ThemeSwitchClass = {\n\troot: 'gov-theme-switch',\n\tindicator: 'gov-theme-switch__indicator',\n\ticonLight: 'gov-theme-switch__icon-light',\n\ticonDark: 'gov-theme-switch__icon-dark',\n}\n\nexport const ATTRIBUTE_THEME_NAME = 'data-theme'\n","import {GovBaseEvent} from \"../../types/event.types\";\n\nexport enum ThemeList {\n\tauto = 'auto',\n\tlight = 'light',\n\tdark = 'dark'\n}\n\nexport interface ThemeSwitchEvent extends GovBaseEvent {\n\tref: HTMLGovThemeSwitchElement;\n\tstate: ThemeList\n}\n\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\";\nimport {govHost} from \"../../helpers/Dom/template\";\nimport {ATTRIBUTE_THEME_NAME, ThemeSwitchClass, ThemeSwitchSizes, ThemeSwitchSizesType} from \"./constants\";\nimport {isWindow} from \"../../helpers/Dom/win\";\nimport {ThemeList, ThemeSwitchEvent} from \"./gov-theme-switch.types\";\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {getCookie, setCookie} from \"../../helpers/Dom/document\";\n\n@Component({\n\ttag: \"gov-theme-switch\",\n})\nexport class GovThemeSwitch {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovThemeSwitchElement\n\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: ThemeSwitchSizesType = \"m\"\n\t/**\n\t * Display switch label\n\t */\n\t@Prop({attribute: \"display-label\"}) readonly displayLabel? = false\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"aria-label-light\"}) readonly ariaLabelLight? = \"Přenout na tmavý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"aria-label-dark\"}) readonly ariaLabelDark? = \"Přepnout na světlý mód\"\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"label-light\"}) readonly labelLight? = \"Světlý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"label-dark\"}) readonly labelDark? = \"Tmavý mód\"\n\t/**\n\t * Called when the theme is changed by the user\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<ThemeSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ThemeSwitchSizes, newValue, ThemeSwitchClass.root)\n\t}\n\n\t@Watch(\"theme\")\n\twatchTheme(newValue: ThemeList): void {\n\t\tthis.htmlElement.setAttribute(ATTRIBUTE_THEME_NAME, newValue);\n\t\tthis.htmlElement.classList.remove(...Object.keys(ThemeList));\n\t\tthis.htmlElement.classList.add(newValue);\n\t\tsetCookie(ATTRIBUTE_THEME_NAME, newValue);\n\t}\n\n\t@State() theme: ThemeList = ThemeList.auto\n\n\tprivate get storageValue() {\n\t\treturn getCookie(ATTRIBUTE_THEME_NAME)\n\t}\n\n\tprivate get htmlElement(): HTMLElement {\n\t\treturn document.documentElement\n\t}\n\n\tprivate get isSystemPrefersColorDark(): boolean {\n\t\treturn isWindow && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.initDefaultState()\n\t\tthis.validateSize(this.size)\n\t}\n\n\tprivate initDefaultState() {\n\t\tconst options = Object.keys(ThemeList);\n\t\tlet currentState = this.storageValue;\n\t\tconst htmlState = this.htmlElement.getAttribute(ATTRIBUTE_THEME_NAME)\n\n\t\tif (currentState && options.includes(currentState)) {\n\t\t\tthis.theme = currentState as ThemeList;\n\t\t} else if (htmlState && options.includes(htmlState)) {\n\t\t\tthis.theme = htmlState as ThemeList;\n\t\t} else {\n\t\t\tthis.theme = ThemeList.auto;\n\t\t}\n\t}\n\n\tprivate setThemeState = (state: ThemeList) => {\n\t\tthis.theme = state;\n\n\t\tthis.govChange.emit({\n\t\t\tcomponent: ThemeSwitchClass.root,\n\t\t\tstate: this.theme,\n\t\t\tref: this.host\n\t\t})\n\t}\n\n\trender() {\n\t\tlet isDark = this.theme === ThemeList.dark;\n\t\tif (this.theme === ThemeList.auto) {\n\t\t\tisDark = this.isSystemPrefersColorDark;\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ThemeSwitchClass.root)}\n\t\t\t\t theme={isDark ? ThemeList.dark : ThemeList.light}\n\t\t\t\t size={this.size}>\n\t\t\t\t<button onClick={() => this.setThemeState(isDark ? ThemeList.light : ThemeList.dark)}\n\t\t\t\t\t\taria-current={this.theme}\n\t\t\t\t\t\taria-label={isDark ? this.ariaLabelDark : this.ariaLabelLight}>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<span class={ThemeSwitchClass.indicator}>\n\t\t\t\t\t\t\t{ThemeList.light && <gov-icon name=\"sun\" class={ThemeSwitchClass.iconLight} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{ThemeList.dark && <gov-icon name=\"moon\" class={ThemeSwitchClass.iconDark} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{this.displayLabel && (isDark ? this.labelDark : this.labelLight)}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-flex.gov-icon.gov-theme-switch.entry.js","mappings":";;;;;;;;AAMO,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;CAChB;;MCAY,OAAO;IAGnB;;yBASyE,KAAK;;;;;;;QAR7E,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAsDD,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAC1C,8DAAa,CACP,EACP;KACD;;;;ACpEuB,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAC;AAG/F,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE;IACtC,SAAS;IACT,SAAS;IACT,WAAW;IACX,SAAS;IACT,OAAO;IACP,SAAS;IACT,SAAS;IACT,UAAU;IACV,OAAO;IACP,OAAO;CACP,CAAC,CAAA;AAGF,IAAK,KAIJ;AAJD,WAAK,KAAK;IACT,wBAAe,CAAA;IACf,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;AACpB,CAAC,EAJI,KAAK,KAAL,KA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D,CACC,CACH,EACP;KACD;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-flex/constants.ts","../../../packages/core/src/components/gov-flex/gov-flex.tsx","../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/helpers/Dom/document.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx","../../../packages/core/src/components/gov-theme-switch/constants.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.types.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.tsx"],"sourcesContent":["import {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const FlexSizes = Sizes\nexport type FlexSizesType = `${ValueOf<typeof FlexSizes>}`\n\nexport const FlexClass = {\n\troot: 'gov-flex',\n}\n\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FlexClass, FlexSizesType} from './constants'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-flex',\n})\nexport class GovFlex {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\n\t/**\n\t * Controls the flex direction of the container.\n\t */\n\t@Prop() direction: 'row' | 'row-reverse' | 'column' | 'column-reverse' = 'row';\n\n\t/**\n\t * Defines how the browser distributes space between and around content items along the main axis.\n\t */\n\t@Prop({\n\t\tattribute: 'justify-content',\n\t\treflect: true\n\t}) justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';\n\n\t/**\n\t * Aligns flex items along the cross axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-items',\n\t\treflect: true\n\t}) alignItems?: 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';\n\n\t/**\n\t * Controls whether the flex container is a single-line or multi-line flex container.\n\t */\n\t@Prop({reflect: true}) wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';\n\n\t/**\n\t * Aligns the flex container's lines within when there is extra space in the cross-axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-content',\n\t\treflect: true\n\t}) alignContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';\n\n\t/**\n\t * Sets the alignment of the flex container’s children along the flex container’s cross axis, overriding the `align-items` property for individual flex items.\n\t */\n\t@Prop({\n\t\tattribute: 'align-self',\n\t\treflect: true\n\t}) alignSelf?: 'auto' | 'normal' | 'self-start' | 'self-end' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch' | 'anchor-center';\n\n\t/**\n\t * The gap property creates consistent spacing between flex items in the container.\n\t */\n\t@Prop({\n\t\tattribute: 'gap',\n\t\treflect: true\n\t}) gap?: FlexSizesType;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FlexClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n","import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const IconSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL', '_5XL'])\nexport type IconSizesType = `${ValueOf<typeof IconSizes>}`\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'PRIMARY',\n\t'SECONDARY',\n\t'NEUTRAL',\n\t'ERROR',\n\t'SUCCESS',\n\t'WARNING',\n\t'DISABLED',\n\t'WHITE',\n\t'BLACK',\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tconsole.log('cacheKey', cacheKey);\n\tconsole.log('iconCache[cacheKey]', iconCache, iconCache[cacheKey]);\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tconsole.log('requestCache[cacheKey]', requestCache, requestCache[cacheKey]);\n\t\n\tif (!requestCache[cacheKey]) {\n\t\tconsole.log('iconUrl(iconsPath(), name, type)', iconUrl(iconsPath(), name, type));\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","import {Nullable} from \"../../utils/helpers.types\";\nimport {isWindow} from \"./win\";\n\nexport const setCookie = (name: string, value: string, days?: number) => {\n\tif (!isWindow) {\n\t\treturn\n\t}\n\tlet expires = \"\";\n\tif (days) {\n\t\tconst date = new Date();\n\t\tdate.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n\t\texpires = \"; expires=\" + date.toUTCString();\n\t}\n\tdocument.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;\n}\n\nexport const getCookie = (name: string): Nullable<string> => {\n\tif (!isWindow) {\n\t\treturn null\n\t}\n\tconst nameEQ = name + \"=\";\n\tconst cookies = document.cookie.split(';');\n\tfor (let i = 0; i < cookies.length; i++) {\n\t\tlet cookie = cookies[i].trim();\n\t\tif (cookie.startsWith(nameEQ)) {\n\t\t\treturn decodeURIComponent(cookie.substring(nameEQ.length));\n\t\t}\n\t}\n\treturn null;\n}\n\nexport const isValidSVG = (svgContent: string): boolean => {\n\ttry {\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString(svgContent, \"image/svg+xml\");\n\t\tconst parseError = doc.querySelector(\"parsererror\");\n\t\tif (parseError) {\n\t\t\treturn false;\n\t\t}\n\t\tconst svgElement = doc.documentElement;\n\t\tif (svgElement.tagName.toLowerCase() !== \"svg\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t} catch (error) {\n\t\treturn false;\n\t}\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass, IconColors, type IconColorType, IconSizesType} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {isValidSVG} from \"../../helpers/Dom/document\";\nconsole.log('GovIcon loaded');\n@Component({\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tconsole.log('GovIcon constructor');\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Icon size\n\t */\n\t@Prop({reflect: true}) readonly size?: IconSizesType\n\t/**\n\t * Icon color\n\t */\n\t@Prop({reflect: true}) readonly color?: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"components\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tconsole.log('name, visible', name, visible);\n\t\tconsole.log('Build.isBrowser', Build.isBrowser);\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\tconsole.log('return');\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tconsole.log('connectedCallback icon', this.name);\n\t\tconsole.log('iconsLazyLoad()', iconsLazyLoad());\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tconsole.log('disconnectedCallback');\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tconsole.log('componentWillLoad');\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{rootMargin: \"50px\"},\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconsole.log('loadIcon -> name, type', name, type);\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isValidSVG(data)\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)} size={this.size} color={this.color}/>\n\t\t)\n\t}\n}\n","import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const ThemeSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type ThemeSwitchSizesType = `${ValueOf<typeof ThemeSwitchSizes>}`\n\nexport const ThemeSwitchClass = {\n\troot: 'gov-theme-switch',\n\tindicator: 'gov-theme-switch__indicator',\n\ticonLight: 'gov-theme-switch__icon-light',\n\ticonDark: 'gov-theme-switch__icon-dark',\n}\n\nexport const ATTRIBUTE_THEME_NAME = 'data-theme'\n","import {GovBaseEvent} from \"../../types/event.types\";\n\nexport enum ThemeList {\n\tauto = 'auto',\n\tlight = 'light',\n\tdark = 'dark'\n}\n\nexport interface ThemeSwitchEvent extends GovBaseEvent {\n\tref: HTMLGovThemeSwitchElement;\n\tstate: ThemeList\n}\n\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\";\nimport {govHost} from \"../../helpers/Dom/template\";\nimport {ATTRIBUTE_THEME_NAME, ThemeSwitchClass, ThemeSwitchSizes, ThemeSwitchSizesType} from \"./constants\";\nimport {isWindow} from \"../../helpers/Dom/win\";\nimport {ThemeList, ThemeSwitchEvent} from \"./gov-theme-switch.types\";\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {getCookie, setCookie} from \"../../helpers/Dom/document\";\n\n@Component({\n\ttag: \"gov-theme-switch\",\n})\nexport class GovThemeSwitch {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovThemeSwitchElement\n\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: ThemeSwitchSizesType = \"m\"\n\t/**\n\t * Display switch label\n\t */\n\t@Prop({attribute: \"display-label\"}) readonly displayLabel? = false\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"aria-label-light\"}) readonly ariaLabelLight? = \"Přenout na tmavý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"aria-label-dark\"}) readonly ariaLabelDark? = \"Přepnout na světlý mód\"\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"label-light\"}) readonly labelLight? = \"Světlý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"label-dark\"}) readonly labelDark? = \"Tmavý mód\"\n\t/**\n\t * Called when the theme is changed by the user\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<ThemeSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ThemeSwitchSizes, newValue, ThemeSwitchClass.root)\n\t}\n\n\t@Watch(\"theme\")\n\twatchTheme(newValue: ThemeList): void {\n\t\tthis.htmlElement.setAttribute(ATTRIBUTE_THEME_NAME, newValue);\n\t\tthis.htmlElement.classList.remove(...Object.keys(ThemeList));\n\t\tthis.htmlElement.classList.add(newValue);\n\t\tsetCookie(ATTRIBUTE_THEME_NAME, newValue);\n\t}\n\n\t@State() theme: ThemeList = ThemeList.auto\n\n\tprivate get storageValue() {\n\t\treturn getCookie(ATTRIBUTE_THEME_NAME)\n\t}\n\n\tprivate get htmlElement(): HTMLElement {\n\t\treturn document.documentElement\n\t}\n\n\tprivate get isSystemPrefersColorDark(): boolean {\n\t\treturn isWindow && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.initDefaultState()\n\t\tthis.validateSize(this.size)\n\t}\n\n\tprivate initDefaultState() {\n\t\tconst options = Object.keys(ThemeList);\n\t\tlet currentState = this.storageValue;\n\t\tconst htmlState = this.htmlElement.getAttribute(ATTRIBUTE_THEME_NAME)\n\n\t\tif (currentState && options.includes(currentState)) {\n\t\t\tthis.theme = currentState as ThemeList;\n\t\t} else if (htmlState && options.includes(htmlState)) {\n\t\t\tthis.theme = htmlState as ThemeList;\n\t\t} else {\n\t\t\tthis.theme = ThemeList.auto;\n\t\t}\n\t}\n\n\tprivate setThemeState = (state: ThemeList) => {\n\t\tthis.theme = state;\n\n\t\tthis.govChange.emit({\n\t\t\tcomponent: ThemeSwitchClass.root,\n\t\t\tstate: this.theme,\n\t\t\tref: this.host\n\t\t})\n\t}\n\n\trender() {\n\t\tlet isDark = this.theme === ThemeList.dark;\n\t\tif (this.theme === ThemeList.auto) {\n\t\t\tisDark = this.isSystemPrefersColorDark;\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ThemeSwitchClass.root)}\n\t\t\t\t theme={isDark ? ThemeList.dark : ThemeList.light}\n\t\t\t\t size={this.size}>\n\t\t\t\t<button onClick={() => this.setThemeState(isDark ? ThemeList.light : ThemeList.dark)}\n\t\t\t\t\t\taria-current={this.theme}\n\t\t\t\t\t\taria-label={isDark ? this.ariaLabelDark : this.ariaLabelLight}>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<span class={ThemeSwitchClass.indicator}>\n\t\t\t\t\t\t\t{ThemeList.light && <gov-icon name=\"sun\" class={ThemeSwitchClass.iconLight} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{ThemeList.dark && <gov-icon name=\"moon\" class={ThemeSwitchClass.iconDark} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{this.displayLabel && (isDark ? this.labelDark : this.labelLight)}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { c as toBoolAttr, b as booleanString } from './template-7ecee4d1.js';
|
|
3
3
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
4
4
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { F as FormCheckboxGroupClass, a as FormGroupClass, b as FormGroupSizes, c as FormGroupOrientation } from './constants-4da2b3c0.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
3
3
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
4
4
|
import { g as govForm, F as FormCheckboxClass, a as FormCheckboxSizes } from './form-713f26fd.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govForm, b as FormControlClass } from './form-713f26fd.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
import { s as splitByWhitespace } from './string.utils-1da8f8fb.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
3
3
|
import { g as govHost, c as toBoolAttr, t as toBoolAttrIfDefined } from './template-7ecee4d1.js';
|
|
4
4
|
import { g as govForm } from './form-713f26fd.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { a as FormGroupClass, b as FormGroupSizes, c as FormGroupOrientation } from './constants-4da2b3c0.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govForm, l as FormInputClass, m as FormInputSizes } from './form-713f26fd.js';
|
|
3
3
|
import { g as govHost, c as toBoolAttr, t as toBoolAttrIfDefined, d as toOnOffAttrIfDefined } from './template-7ecee4d1.js';
|
|
4
4
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host } from './index-087b155c.js';
|
|
2
2
|
import { F as FormLabelClass } from './constants-43f10674.js';
|
|
3
3
|
import './utils-e10e994d.js';
|
|
4
4
|
import './sizes-5b9e579f.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govForm, c as FormMultiSelectClass, d as FormMultiselectSizes } from './form-713f26fd.js';
|
|
3
3
|
import { g as govHost, c as toBoolAttr, t as toBoolAttrIfDefined } from './template-7ecee4d1.js';
|
|
4
4
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { d as FormRadioGroupClass, a as FormGroupClass, b as FormGroupSizes, c as FormGroupOrientation } from './constants-4da2b3c0.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
3
3
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
4
4
|
import { g as govForm, e as FormRadioClass, f as FormRadioSizes } from './form-713f26fd.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { C as Colors } from './colors-4cf64720.js';
|
|
3
3
|
import { p as pick } from './utils-e10e994d.js';
|
|
4
4
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govForm, j as FormSelectClass, k as FormSelectSizes } from './form-713f26fd.js';
|
|
3
3
|
import { g as govHost, c as toBoolAttr, t as toBoolAttrIfDefined } from './template-7ecee4d1.js';
|
|
4
4
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
3
3
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
4
4
|
import { g as govForm, h as FormSwitchClass, i as FormSwitchSizes } from './form-713f26fd.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { a as GridItemClass } from './constants-2d5a0e18.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { G as GridClass } from './constants-2d5a0e18.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { g as govHost, c as toBoolAttr } from './template-7ecee4d1.js';
|
|
3
3
|
import { F as Fragment } from './Fragment-8d8d54fb.js';
|
|
4
4
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { a as LayoutColumnClass } from './constants-f0f531b6.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { L as LayoutClass } from './constants-f0f531b6.js';
|
|
3
3
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { p as pick } from './utils-e10e994d.js';
|
|
3
3
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
4
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { p as pick } from './utils-e10e994d.js';
|
|
3
3
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
4
|
import { g as govHost, p as prepareClasses } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
3
|
import { C as Colors } from './colors-4cf64720.js';
|
|
4
4
|
import { p as pick } from './utils-e10e994d.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { F as Fragment } from './Fragment-8d8d54fb.js';
|
|
3
3
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
4
4
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
3
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
4
|
import { p as pick } from './utils-e10e994d.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
3
|
import { S as StepperItemClass, c as StepperColors } from './constants-372455eb.js';
|
|
4
4
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
3
|
import { S as StepperItemClass, a as StepperClass, b as StepperSizes } from './constants-372455eb.js';
|
|
4
4
|
import { g as govHost } from './template-7ecee4d1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-087b155c.js';
|
|
2
2
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
3
3
|
import { g as govHost, t as toBoolAttrIfDefined } from './template-7ecee4d1.js';
|
|
4
4
|
import { a as TabsClass, T as TabsItemClass } from './constants-9177ea52.js';
|