@gov-design-system-ce/components 4.6.5-b → 4.6.5
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/gov-flex_3.cjs.entry.js +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-blockquote.js +1 -1
- package/dist/components/gov-breadcrumbs.js +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-collapsible.js +1 -1
- package/dist/components/gov-dialog.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-multi-select.js +1 -1
- package/dist/components/gov-form-range.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-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-link.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-tabs.js +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-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/{p-isPjiQbr.js → p-BIB-JMbL.js} +2 -2
- package/dist/components/{p-BICk4EuO.js → p-BVG9PtuQ.js} +2 -2
- package/dist/components/{p-DmK9qaKH.js → p-DV0Pdd1S.js} +2 -2
- package/dist/components/p-Dj-FiQ37.js +2 -0
- package/dist/components/{p-DRXiDAHW.js.map → p-Dj-FiQ37.js.map} +1 -1
- package/dist/components/{p-DjGO_trZ.js → p-DlpZtTcv.js} +2 -2
- package/dist/components/{p-BNoNH6m-.js → p-Dw1o8KoZ.js} +2 -2
- package/dist/components/{p-BGK46VRO.js → p-NU_8kxGz.js} +2 -2
- package/dist/components/{p-ClDhNt_H.js → p-o4vVG5sG.js} +2 -2
- package/dist/core/core.css +14776 -0
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/gov-accordion-item.entry.esm.js.map +1 -0
- package/dist/core/gov-accordion.entry.esm.js.map +1 -0
- package/dist/core/gov-attachments.gov-attachments-item.gov-form-message.entry.esm.js.map +1 -0
- package/dist/core/gov-backdrop.entry.esm.js.map +1 -0
- package/dist/core/gov-banner.entry.esm.js.map +1 -0
- package/dist/core/gov-blockquote.entry.esm.js.map +1 -0
- package/dist/core/gov-breadcrumbs.entry.esm.js.map +1 -0
- package/dist/core/gov-button.entry.esm.js.map +1 -0
- package/dist/core/gov-card.entry.esm.js.map +1 -0
- package/dist/core/gov-chip.entry.esm.js.map +1 -0
- package/dist/core/gov-collapsible.entry.esm.js.map +1 -0
- package/dist/core/gov-container.entry.esm.js.map +1 -0
- package/dist/core/gov-control-group.entry.esm.js.map +1 -0
- package/dist/core/gov-cookiebar.entry.esm.js.map +1 -0
- package/dist/core/gov-dialog.entry.esm.js.map +1 -0
- package/dist/core/gov-dropdown.entry.esm.js.map +1 -0
- package/dist/core/gov-empty.entry.esm.js.map +1 -0
- package/dist/core/gov-error-code.entry.esm.js.map +1 -0
- package/dist/core/gov-flex.gov-icon.gov-theme-switch.entry.esm.js.map +1 -0
- package/dist/core/gov-form-autocomplete.entry.esm.js.map +1 -0
- package/dist/core/gov-form-checkbox-group.entry.esm.js.map +1 -0
- package/dist/core/gov-form-checkbox.entry.esm.js.map +1 -0
- package/dist/core/gov-form-control.entry.esm.js.map +1 -0
- package/dist/core/gov-form-file.entry.esm.js.map +1 -0
- package/dist/core/gov-form-group.entry.esm.js.map +1 -0
- package/dist/core/gov-form-input.gov-skeleton.entry.esm.js.map +1 -0
- package/dist/core/gov-form-label.entry.esm.js.map +1 -0
- package/dist/core/gov-form-multi-select.entry.esm.js.map +1 -0
- package/dist/core/gov-form-password-power.entry.esm.js.map +1 -0
- package/dist/core/gov-form-radio-group.entry.esm.js.map +1 -0
- package/dist/core/gov-form-radio.entry.esm.js.map +1 -0
- package/dist/core/gov-form-range.entry.esm.js.map +1 -0
- package/dist/core/gov-form-search.entry.esm.js.map +1 -0
- package/dist/core/gov-form-select.entry.esm.js.map +1 -0
- package/dist/core/gov-form-switch.entry.esm.js.map +1 -0
- package/dist/core/gov-grid-item.entry.esm.js.map +1 -0
- package/dist/core/gov-grid.entry.esm.js.map +1 -0
- package/dist/core/gov-infobar.entry.esm.js.map +1 -0
- package/dist/core/gov-layout-column.entry.esm.js.map +1 -0
- package/dist/core/gov-layout.entry.esm.js.map +1 -0
- package/dist/core/gov-lifecycle.entry.esm.js.map +1 -0
- package/dist/core/gov-link.entry.esm.js.map +1 -0
- package/dist/core/gov-loading.entry.esm.js.map +1 -0
- package/dist/core/gov-message.entry.esm.js.map +1 -0
- package/dist/core/gov-pagination.entry.esm.js.map +1 -0
- package/dist/core/gov-spacer.entry.esm.js.map +1 -0
- package/dist/core/gov-stepper-item.entry.esm.js.map +1 -0
- package/dist/core/gov-stepper.entry.esm.js.map +1 -0
- package/dist/core/gov-tabs-item.entry.esm.js.map +1 -0
- package/dist/core/gov-tabs.entry.esm.js.map +1 -0
- package/dist/core/gov-tag.entry.esm.js.map +1 -0
- package/dist/core/gov-tile.entry.esm.js.map +1 -0
- package/dist/core/gov-toast.entry.esm.js.map +1 -0
- package/dist/core/gov-tooltip.gov-tooltip-content.entry.esm.js.map +1 -0
- package/dist/core/gov-wizard-item.entry.esm.js.map +1 -0
- package/dist/core/gov-wizard.entry.esm.js.map +1 -0
- package/dist/core/loader.esm.js.map +1 -0
- package/dist/core/p-002e72bf.entry.js +2 -0
- package/dist/core/{p-41bef63a.entry.js.map → p-002e72bf.entry.js.map} +1 -1
- package/dist/core/{p-49b67f59.entry.js → p-04ec45ab.entry.js} +2 -2
- package/dist/core/{p-49b67f59.entry.js.map → p-04ec45ab.entry.js.map} +1 -1
- package/dist/core/{p-6b0625ee.entry.js → p-0af96cc0.entry.js} +2 -2
- package/dist/core/{p-6b0625ee.entry.js.map → p-0af96cc0.entry.js.map} +1 -1
- package/dist/core/{p-de5dfd70.entry.js → p-10991f00.entry.js} +2 -2
- package/dist/core/{p-de5dfd70.entry.js.map → p-10991f00.entry.js.map} +1 -1
- package/dist/core/{p-4e534d68.entry.js → p-157a1636.entry.js} +2 -2
- package/dist/core/{p-4e534d68.entry.js.map → p-157a1636.entry.js.map} +1 -1
- package/dist/core/{p-30ad7514.entry.js → p-1626cc67.entry.js} +2 -2
- package/dist/core/{p-30ad7514.entry.js.map → p-1626cc67.entry.js.map} +1 -1
- package/dist/core/{p-9321fb9d.entry.js → p-187c0eda.entry.js} +2 -2
- package/dist/core/{p-9321fb9d.entry.js.map → p-187c0eda.entry.js.map} +1 -1
- package/dist/core/{p-b77c283e.entry.js → p-19300834.entry.js} +2 -2
- package/dist/core/{p-b77c283e.entry.js.map → p-19300834.entry.js.map} +1 -1
- package/dist/core/{p-00ab0454.entry.js → p-3314505d.entry.js} +2 -2
- package/dist/core/{p-00ab0454.entry.js.map → p-3314505d.entry.js.map} +1 -1
- package/dist/core/p-33209782.entry.js +2 -0
- package/dist/core/{p-943a58b2.entry.js.map → p-33209782.entry.js.map} +1 -1
- package/dist/core/{p-e913cfc8.entry.js → p-3e07bf07.entry.js} +2 -2
- package/dist/core/{p-dc0bd1e5.entry.js.map → p-3e07bf07.entry.js.map} +1 -1
- package/dist/core/{p-dfb76a14.entry.js → p-441e67f6.entry.js} +2 -2
- package/dist/core/{p-dfb76a14.entry.js.map → p-441e67f6.entry.js.map} +1 -1
- package/dist/core/{p-68a5d225.entry.js → p-46824842.entry.js} +2 -2
- package/dist/core/{p-68a5d225.entry.js.map → p-46824842.entry.js.map} +1 -1
- package/dist/core/{p-c9b2f97c.entry.js → p-4c02094d.entry.js} +2 -2
- package/dist/core/{p-c9b2f97c.entry.js.map → p-4c02094d.entry.js.map} +1 -1
- package/dist/core/{p-2493a7f3.entry.js → p-4d36cd18.entry.js} +2 -2
- package/dist/core/{p-2493a7f3.entry.js.map → p-4d36cd18.entry.js.map} +1 -1
- package/dist/core/{p-f2d24551.entry.js → p-4d902f20.entry.js} +2 -2
- package/dist/core/{p-f2d24551.entry.js.map → p-4d902f20.entry.js.map} +1 -1
- package/dist/core/{p-4342c252.entry.js → p-4e2faea7.entry.js} +2 -2
- package/dist/core/{p-4342c252.entry.js.map → p-4e2faea7.entry.js.map} +1 -1
- package/dist/core/{p-a6f27583.entry.js → p-511eed88.entry.js} +2 -2
- package/dist/core/{p-a6f27583.entry.js.map → p-511eed88.entry.js.map} +1 -1
- package/dist/core/{p-b2648255.entry.js → p-5305e82e.entry.js} +2 -2
- package/dist/core/{p-b2648255.entry.js.map → p-5305e82e.entry.js.map} +1 -1
- package/dist/core/{p-378cf8de.entry.js → p-558e75a6.entry.js} +2 -2
- package/dist/core/{p-378cf8de.entry.js.map → p-558e75a6.entry.js.map} +1 -1
- package/dist/core/{p-48b74272.entry.js → p-5721cf9b.entry.js} +2 -2
- package/dist/core/{p-48b74272.entry.js.map → p-5721cf9b.entry.js.map} +1 -1
- package/dist/core/p-57ca8ac7.entry.js +2 -0
- package/dist/core/{p-b181f85f.entry.js.map → p-57ca8ac7.entry.js.map} +1 -1
- package/dist/core/{p-f515d912.entry.js → p-5c872d64.entry.js} +2 -2
- package/dist/core/{p-b37bd421.entry.js → p-65a09763.entry.js} +2 -2
- package/dist/core/{p-b37bd421.entry.js.map → p-65a09763.entry.js.map} +1 -1
- package/dist/core/{p-4bd3f101.entry.js → p-6b44890d.entry.js} +2 -2
- package/dist/core/{p-4bd3f101.entry.js.map → p-6b44890d.entry.js.map} +1 -1
- package/dist/core/{p-ab367b0c.entry.js → p-6d2ce4c7.entry.js} +2 -2
- package/dist/core/{p-ab367b0c.entry.js.map → p-6d2ce4c7.entry.js.map} +1 -1
- package/dist/core/{p-b0d4d6bd.entry.js → p-70b5555f.entry.js} +2 -2
- package/dist/core/{p-b0d4d6bd.entry.js.map → p-70b5555f.entry.js.map} +1 -1
- package/dist/core/p-73bd93f9.entry.js +2 -0
- package/dist/core/{p-6638d034.entry.js.map → p-73bd93f9.entry.js.map} +1 -1
- package/dist/core/{p-bb5b9ccd.entry.js → p-7f513718.entry.js} +2 -2
- package/dist/core/{p-bb5b9ccd.entry.js.map → p-7f513718.entry.js.map} +1 -1
- package/dist/core/{p-eff8ffff.entry.js → p-852310d9.entry.js} +2 -2
- package/dist/core/{p-eff8ffff.entry.js.map → p-852310d9.entry.js.map} +1 -1
- package/dist/core/{p-6ac9b0f2.entry.js → p-8d47e346.entry.js} +2 -2
- package/dist/core/{p-6ac9b0f2.entry.js.map → p-8d47e346.entry.js.map} +1 -1
- package/dist/core/p-90ab65b4.entry.js +2 -0
- package/dist/core/{p-e913cfc8.entry.js.map → p-90ab65b4.entry.js.map} +1 -1
- package/dist/core/{p-b5e40f40.entry.js → p-91cbee1b.entry.js} +2 -2
- package/dist/core/{p-b5e40f40.entry.js.map → p-91cbee1b.entry.js.map} +1 -1
- package/dist/core/{p-05bb35e1.entry.js → p-9d9e9401.entry.js} +2 -2
- package/dist/core/{p-05bb35e1.entry.js.map → p-9d9e9401.entry.js.map} +1 -1
- package/dist/core/p-B6CqPcY_.js.map +1 -1
- package/dist/core/p-BUmDydor.js.map +1 -1
- package/dist/core/p-BcQO4NH2.js.map +1 -1
- package/dist/core/p-BjcqOprh.js.map +1 -1
- package/dist/core/p-Bo1ROm5Q.js.map +1 -1
- package/dist/core/p-Bz_RzYFb.js.map +1 -1
- package/dist/core/p-C3R1T_pg.js.map +1 -1
- package/dist/core/p-C6JN9gdb.js.map +1 -1
- package/dist/core/p-CDIRBJsi.js.map +1 -1
- package/dist/core/p-CQvUntGY.js.map +1 -1
- package/dist/core/p-Ccwpa1ck.js.map +1 -1
- package/dist/core/p-CgDnDrq5.js.map +1 -1
- package/dist/core/p-Cjg0wpDG.js.map +1 -1
- package/dist/core/p-ClISz4NF.js +3 -0
- package/dist/core/p-ClISz4NF.js.map +1 -0
- package/dist/core/p-CoD1xawt.js.map +1 -1
- package/dist/core/p-Cx3bEC5v.js.map +1 -1
- package/dist/core/p-D4TGB274.js.map +1 -1
- package/dist/core/p-DBXGhafv.js.map +1 -1
- package/dist/core/p-DNztiAH0.js.map +1 -1
- package/dist/core/p-DQuL1Twl.js.map +1 -1
- package/dist/core/p-DYcNEwSZ.js.map +1 -1
- package/dist/core/p-EeKNA85D.js.map +1 -1
- package/dist/core/p-GYov8gU1.js.map +1 -1
- package/dist/core/p-NOJjz9dT.js.map +1 -1
- package/dist/core/p-Q99QrOoi.js.map +1 -1
- package/dist/core/p-U40vKHrs.js.map +1 -1
- package/dist/core/{p-ad9227b3.entry.js → p-a2c61d50.entry.js} +2 -2
- package/dist/core/{p-ad9227b3.entry.js.map → p-a2c61d50.entry.js.map} +1 -1
- package/dist/core/p-abb7780e.entry.js +2 -0
- package/dist/core/{p-a7c322a7.entry.js.map → p-abb7780e.entry.js.map} +1 -1
- package/dist/core/p-bd2df430.entry.js +2 -0
- package/dist/core/{p-2e15a654.entry.js.map → p-bd2df430.entry.js.map} +1 -1
- package/dist/core/{p-3a4799b3.entry.js → p-be9af807.entry.js} +2 -2
- package/dist/core/{p-3a4799b3.entry.js.map → p-be9af807.entry.js.map} +1 -1
- package/dist/core/{p-febff4d1.entry.js → p-bf573a56.entry.js} +2 -2
- package/dist/core/{p-febff4d1.entry.js.map → p-bf573a56.entry.js.map} +1 -1
- package/dist/core/{p-473afd7d.entry.js → p-c1b9f1ab.entry.js} +2 -2
- package/dist/core/{p-473afd7d.entry.js.map → p-c1b9f1ab.entry.js.map} +1 -1
- package/dist/core/p-c4734357.entry.js +2 -0
- package/dist/core/{p-a4fa2ffc.entry.js.map → p-c4734357.entry.js.map} +1 -1
- package/dist/core/{p-ac81cdf6.entry.js → p-c6b55c0a.entry.js} +2 -2
- package/dist/core/{p-ac81cdf6.entry.js.map → p-c6b55c0a.entry.js.map} +1 -1
- package/dist/core/{p-e17def2b.entry.js → p-cd163299.entry.js} +2 -2
- package/dist/core/{p-e17def2b.entry.js.map → p-cd163299.entry.js.map} +1 -1
- package/dist/core/{p-8ddb6dc6.entry.js → p-d43959a0.entry.js} +2 -2
- package/dist/core/{p-8ddb6dc6.entry.js.map → p-d43959a0.entry.js.map} +1 -1
- package/dist/core/{p-90cc2ddb.entry.js → p-d9c574f0.entry.js} +2 -2
- package/dist/core/{p-90cc2ddb.entry.js.map → p-d9c574f0.entry.js.map} +1 -1
- package/dist/core/{p-af2bd9d3.entry.js → p-d9d29f50.entry.js} +2 -2
- package/dist/core/{p-af2bd9d3.entry.js.map → p-d9d29f50.entry.js.map} +1 -1
- package/dist/core/{p-ea299832.entry.js → p-da997fb3.entry.js} +2 -2
- package/dist/core/{p-ea299832.entry.js.map → p-da997fb3.entry.js.map} +1 -1
- package/dist/core/{p-dd390459.entry.js → p-db860031.entry.js} +2 -2
- package/dist/core/{p-dd390459.entry.js.map → p-db860031.entry.js.map} +1 -1
- package/dist/core/{p-06497d64.entry.js → p-e30968b3.entry.js} +2 -2
- package/dist/core/{p-06497d64.entry.js.map → p-e30968b3.entry.js.map} +1 -1
- package/dist/core/{p-e1d58751.entry.js → p-e39e5dc7.entry.js} +2 -2
- package/dist/core/{p-e1d58751.entry.js.map → p-e39e5dc7.entry.js.map} +1 -1
- package/dist/core/{p-caf817d4.entry.js → p-eb3f6808.entry.js} +2 -2
- package/dist/core/{p-caf817d4.entry.js.map → p-eb3f6808.entry.js.map} +1 -1
- package/dist/core/{p-80052953.entry.js → p-eb766437.entry.js} +2 -2
- package/dist/core/{p-80052953.entry.js.map → p-eb766437.entry.js.map} +1 -1
- package/dist/core/{p-91d5df66.entry.js → p-f3887d6d.entry.js} +2 -2
- package/dist/core/{p-91d5df66.entry.js.map → p-f3887d6d.entry.js.map} +1 -1
- package/dist/core/{p-78202a44.entry.js → p-f75ad657.entry.js} +2 -2
- package/dist/core/{p-78202a44.entry.js.map → p-f75ad657.entry.js.map} +1 -1
- package/dist/core/{p-3ebbe75a.entry.js → p-f7bdb44a.entry.js} +2 -2
- package/dist/core/{p-3ebbe75a.entry.js.map → p-f7bdb44a.entry.js.map} +1 -1
- package/dist/core/p-fca7a0d6.entry.js +2 -0
- package/dist/core/{p-0675617d.entry.js.map → p-fca7a0d6.entry.js.map} +1 -1
- package/dist/core/p-vN03FcXN.js.map +1 -1
- package/dist/dist/components/gov-accordion-item.d.ts +11 -0
- package/dist/dist/components/gov-accordion.d.ts +11 -0
- package/dist/dist/components/gov-attachments-item.d.ts +11 -0
- package/dist/dist/components/gov-attachments.d.ts +11 -0
- package/dist/dist/components/gov-backdrop.d.ts +11 -0
- package/dist/dist/components/gov-banner.d.ts +11 -0
- package/dist/dist/components/gov-blockquote.d.ts +11 -0
- package/dist/dist/components/gov-breadcrumbs.d.ts +11 -0
- package/dist/dist/components/gov-button.d.ts +11 -0
- package/dist/dist/components/gov-card.d.ts +11 -0
- package/dist/dist/components/gov-chip.d.ts +11 -0
- package/dist/dist/components/gov-collapsible.d.ts +11 -0
- package/dist/dist/components/gov-container.d.ts +11 -0
- package/dist/dist/components/gov-control-group.d.ts +11 -0
- package/dist/dist/components/gov-cookiebar.d.ts +11 -0
- package/dist/dist/components/gov-dialog.d.ts +11 -0
- package/dist/dist/components/gov-dropdown.d.ts +11 -0
- package/dist/dist/components/gov-empty.d.ts +11 -0
- package/dist/dist/components/gov-error-code.d.ts +11 -0
- package/dist/dist/components/gov-flex.d.ts +11 -0
- package/dist/dist/components/gov-form-autocomplete.d.ts +11 -0
- package/dist/dist/components/gov-form-checkbox-group.d.ts +11 -0
- package/dist/dist/components/gov-form-checkbox.d.ts +11 -0
- package/dist/dist/components/gov-form-control.d.ts +11 -0
- package/dist/dist/components/gov-form-file.d.ts +11 -0
- package/dist/dist/components/gov-form-group.d.ts +11 -0
- package/dist/dist/components/gov-form-input.d.ts +11 -0
- package/dist/dist/components/gov-form-label.d.ts +11 -0
- package/dist/dist/components/gov-form-message.d.ts +11 -0
- package/dist/dist/components/gov-form-multi-select.d.ts +11 -0
- package/dist/dist/components/gov-form-password-power.d.ts +11 -0
- package/dist/dist/components/gov-form-radio-group.d.ts +11 -0
- package/dist/dist/components/gov-form-radio.d.ts +11 -0
- package/dist/dist/components/gov-form-range.d.ts +11 -0
- package/dist/dist/components/gov-form-search.d.ts +11 -0
- package/dist/dist/components/gov-form-select.d.ts +11 -0
- package/dist/dist/components/gov-form-switch.d.ts +11 -0
- package/dist/dist/components/gov-grid-item.d.ts +11 -0
- package/dist/dist/components/gov-grid.d.ts +11 -0
- package/dist/dist/components/gov-icon.d.ts +11 -0
- package/dist/dist/components/gov-infobar.d.ts +11 -0
- package/dist/dist/components/gov-layout-column.d.ts +11 -0
- package/dist/dist/components/gov-layout.d.ts +11 -0
- package/dist/dist/components/gov-lifecycle.d.ts +11 -0
- package/dist/dist/components/gov-link.d.ts +11 -0
- package/dist/dist/components/gov-loading.d.ts +11 -0
- package/dist/dist/components/gov-message.d.ts +11 -0
- package/dist/dist/components/gov-pagination.d.ts +11 -0
- package/dist/dist/components/gov-skeleton.d.ts +11 -0
- package/dist/dist/components/gov-spacer.d.ts +11 -0
- package/dist/dist/components/gov-stepper-item.d.ts +11 -0
- package/dist/dist/components/gov-stepper.d.ts +11 -0
- package/dist/dist/components/gov-tabs-item.d.ts +11 -0
- package/dist/dist/components/gov-tabs.d.ts +11 -0
- package/dist/dist/components/gov-tag.d.ts +11 -0
- package/dist/dist/components/gov-theme-switch.d.ts +11 -0
- package/dist/dist/components/gov-tile.d.ts +11 -0
- package/dist/dist/components/gov-toast.d.ts +11 -0
- package/dist/dist/components/gov-tooltip-content.d.ts +11 -0
- package/dist/dist/components/gov-tooltip.d.ts +11 -0
- package/dist/dist/components/gov-wizard-item.d.ts +11 -0
- package/dist/dist/components/gov-wizard.d.ts +11 -0
- package/dist/dist/components/index.d.ts +35 -0
- package/dist/dist/dist/components/gov-accordion-item.d.ts +11 -0
- package/dist/dist/dist/components/gov-accordion.d.ts +11 -0
- package/dist/dist/dist/components/gov-app.d.ts +11 -0
- package/dist/dist/dist/components/gov-attachments-item.d.ts +11 -0
- package/dist/dist/dist/components/gov-attachments.d.ts +11 -0
- package/dist/dist/dist/components/gov-backdrop.d.ts +11 -0
- package/dist/dist/dist/components/gov-banner.d.ts +11 -0
- package/dist/dist/dist/components/gov-blockquote.d.ts +11 -0
- package/dist/dist/dist/components/gov-breadcrumbs.d.ts +11 -0
- package/dist/dist/dist/components/gov-button.d.ts +11 -0
- package/dist/dist/dist/components/gov-card.d.ts +11 -0
- package/dist/dist/dist/components/gov-chip.d.ts +11 -0
- package/dist/dist/dist/components/gov-collapsible.d.ts +11 -0
- package/dist/dist/dist/components/gov-container.d.ts +11 -0
- package/dist/dist/dist/components/gov-control-group.d.ts +11 -0
- package/dist/dist/dist/components/gov-cookiebar.d.ts +11 -0
- package/dist/dist/dist/components/gov-dialog.d.ts +11 -0
- package/dist/dist/dist/components/gov-dropdown.d.ts +11 -0
- package/dist/dist/dist/components/gov-empty.d.ts +11 -0
- package/dist/dist/dist/components/gov-error-code.d.ts +11 -0
- package/dist/dist/dist/components/gov-flex.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-autocomplete.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-checkbox-group.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-checkbox.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-control.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-file.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-group.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-input.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-label.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-message.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-multi-select.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-password-power.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-radio-group.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-radio.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-range.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-search.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-select.d.ts +11 -0
- package/dist/dist/dist/components/gov-form-switch.d.ts +11 -0
- package/dist/dist/dist/components/gov-grid-item.d.ts +11 -0
- package/dist/dist/dist/components/gov-grid.d.ts +11 -0
- package/dist/dist/dist/components/gov-icon.d.ts +11 -0
- package/dist/dist/dist/components/gov-infobar.d.ts +11 -0
- package/dist/dist/dist/components/gov-layout-column.d.ts +11 -0
- package/dist/dist/dist/components/gov-layout.d.ts +11 -0
- package/dist/dist/dist/components/gov-lifecycle.d.ts +11 -0
- package/dist/dist/dist/components/gov-link.d.ts +11 -0
- package/dist/dist/dist/components/gov-loading.d.ts +11 -0
- package/dist/dist/dist/components/gov-message.d.ts +11 -0
- package/dist/dist/dist/components/gov-pagination.d.ts +11 -0
- package/dist/dist/dist/components/gov-skeleton.d.ts +11 -0
- package/dist/dist/dist/components/gov-spacer.d.ts +11 -0
- package/dist/dist/dist/components/gov-stepper-item.d.ts +11 -0
- package/dist/dist/dist/components/gov-stepper.d.ts +11 -0
- package/dist/dist/dist/components/gov-tabs-item.d.ts +11 -0
- package/dist/dist/dist/components/gov-tabs.d.ts +11 -0
- package/dist/dist/dist/components/gov-tag.d.ts +11 -0
- package/dist/dist/dist/components/gov-theme-switch.d.ts +11 -0
- package/dist/dist/dist/components/gov-tile.d.ts +11 -0
- package/dist/dist/dist/components/gov-toast.d.ts +11 -0
- package/dist/dist/dist/components/gov-tooltip-content.d.ts +11 -0
- package/dist/dist/dist/components/gov-tooltip.d.ts +11 -0
- package/dist/dist/dist/components/gov-wizard-item.d.ts +11 -0
- package/dist/dist/dist/components/gov-wizard.d.ts +11 -0
- package/dist/dist/dist/components/index.d.ts +35 -0
- package/dist/dist/dist/globals.d.ts +2 -0
- package/dist/dist/dist/hydrate/index.d.ts +287 -0
- package/dist/dist/dist/types/components/gov-accordion/constants.d.ts +19 -0
- package/dist/dist/dist/types/components/gov-accordion/gov-accordion-item.d.ts +43 -0
- package/dist/dist/dist/types/components/gov-accordion/gov-accordion.d.ts +26 -0
- package/dist/dist/dist/types/components/gov-accordion/gov-accordion.types.d.ts +9 -0
- package/dist/dist/dist/types/components/gov-attachments/constants.d.ts +11 -0
- package/dist/dist/dist/types/components/gov-attachments/gov-attachments-item.d.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-attachments/gov-attachments-item.d.ts +24 -0
- package/dist/dist/dist/types/components/gov-attachments/gov-attachments.d.ts +19 -0
- package/dist/dist/dist/types/components/gov-backdrop/constants.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-backdrop/gov-backdrop.d.ts +32 -0
- package/dist/dist/dist/types/components/gov-banner/constants.d.ts +26 -0
- package/dist/dist/dist/types/components/gov-banner/gov-banner.d.ts +28 -0
- package/dist/dist/dist/types/components/gov-blockquote/constants.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-blockquote/gov-blockquote.d.ts +15 -0
- package/dist/dist/dist/types/components/gov-breadcrumbs/constants.d.ts +3 -0
- package/dist/dist/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +42 -0
- package/dist/dist/dist/types/components/gov-button/button/constants.d.ts +29 -0
- package/dist/dist/dist/types/components/gov-button/button/gov-button.d.ts +133 -0
- package/dist/dist/dist/types/components/gov-button/button/gov-button.types.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-button/dropdown/constants.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-button/dropdown/gov-dropdown.d.ts +40 -0
- package/dist/dist/dist/types/components/gov-button/dropdown/gov-dropdown.types.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-card/constants.d.ts +16 -0
- package/dist/dist/dist/types/components/gov-card/gov-card.d.ts +57 -0
- package/dist/dist/dist/types/components/gov-card/interfaces.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-chip/constants.d.ts +21 -0
- package/dist/dist/dist/types/components/gov-chip/gov-chip.d.ts +82 -0
- package/dist/dist/dist/types/components/gov-collapsible/constants.d.ts +18 -0
- package/dist/dist/dist/types/components/gov-collapsible/gov-collapsible.d.ts +36 -0
- package/dist/dist/dist/types/components/gov-container/constants.d.ts +3 -0
- package/dist/dist/dist/types/components/gov-container/gov-container.d.ts +6 -0
- package/dist/dist/dist/types/components/gov-control-group/constants.d.ts +7 -0
- package/dist/dist/dist/types/components/gov-control-group/gov-control-group.d.ts +24 -0
- package/dist/dist/dist/types/components/gov-cookiebar/constants.d.ts +7 -0
- package/dist/dist/dist/types/components/gov-cookiebar/gov-cookiebar.d.ts +7 -0
- package/dist/dist/dist/types/components/gov-dialog/constants.d.ts +11 -0
- package/dist/dist/dist/types/components/gov-dialog/gov-dialog.d.ts +70 -0
- package/dist/dist/dist/types/components/gov-empty/constants.d.ts +19 -0
- package/dist/dist/dist/types/components/gov-empty/gov-empty.d.ts +21 -0
- package/dist/dist/dist/types/components/gov-error-code/constants.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-error-code/gov-error-code.d.ts +6 -0
- package/dist/dist/dist/types/components/gov-flex/constants.d.ts +7 -0
- package/dist/dist/dist/types/components/gov-flex/gov-flex.d.ts +39 -0
- package/dist/dist/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
- package/dist/dist/dist/types/components/gov-form/autocomplete/constants.d.ts +11 -0
- package/dist/dist/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +158 -0
- package/dist/dist/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.types.d.ts +9 -0
- package/dist/dist/dist/types/components/gov-form/checkbox/constants.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +86 -0
- package/dist/dist/dist/types/components/gov-form/checkbox/gov-form-checkbox.types.d.ts +5 -0
- package/dist/dist/dist/types/components/gov-form/control/constants.d.ts +9 -0
- package/dist/dist/dist/types/components/gov-form/control/gov-form-control.d.ts +40 -0
- package/dist/dist/dist/types/components/gov-form/file/constants.d.ts +7 -0
- package/dist/dist/dist/types/components/gov-form/file/gov-form-file.d.ts +130 -0
- package/dist/dist/dist/types/components/gov-form/file/gov-form-file.types.d.ts +11 -0
- package/dist/dist/dist/types/components/gov-form/group/constants.d.ts +18 -0
- package/dist/dist/dist/types/components/gov-form/group/gov-form-checkbox-group.d.ts +32 -0
- package/dist/dist/dist/types/components/gov-form/group/gov-form-group.d.ts +18 -0
- package/dist/dist/dist/types/components/gov-form/group/gov-form-group.types.d.ts +7 -0
- package/dist/dist/dist/types/components/gov-form/group/gov-form-radio-group.d.ts +32 -0
- package/dist/dist/dist/types/components/gov-form/input/constants.d.ts +28 -0
- package/dist/dist/dist/types/components/gov-form/input/gov-form-input.d.ts +178 -0
- package/dist/dist/dist/types/components/gov-form/input/gov-form-input.types.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-form/label/constants.d.ts +8 -0
- package/dist/dist/dist/types/components/gov-form/label/gov-form-label.d.ts +26 -0
- package/dist/dist/dist/types/components/gov-form/message/constants.d.ts +11 -0
- package/dist/dist/dist/types/components/gov-form/message/gov-form-message.d.ts +23 -0
- package/dist/dist/dist/types/components/gov-form/multiselect/constants.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +127 -0
- package/dist/dist/dist/types/components/gov-form/multiselect/gov-form-multi-select.types.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-form/password-power/constants.d.ts +5 -0
- package/dist/dist/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +7 -0
- package/dist/dist/dist/types/components/gov-form/radio/constants.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-form/radio/gov-form-radio.d.ts +83 -0
- package/dist/dist/dist/types/components/gov-form/radio/gov-form-radio.types.d.ts +5 -0
- package/dist/dist/dist/types/components/gov-form/range/constants.d.ts +9 -0
- package/dist/dist/dist/types/components/gov-form/range/gov-form-range.d.ts +116 -0
- package/dist/dist/dist/types/components/gov-form/search/constants.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-form/search/gov-form-search.d.ts +13 -0
- package/dist/dist/dist/types/components/gov-form/select/constants.d.ts +8 -0
- package/dist/dist/dist/types/components/gov-form/select/gov-form-select.d.ts +89 -0
- package/dist/dist/dist/types/components/gov-form/select/gov-form-select.types.d.ts +9 -0
- package/dist/dist/dist/types/components/gov-form/switch/constants.d.ts +12 -0
- package/dist/dist/dist/types/components/gov-form/switch/gov-form-switch.d.ts +81 -0
- package/dist/dist/dist/types/components/gov-form/switch/gov-form-switch.types.d.ts +5 -0
- package/dist/dist/dist/types/components/gov-grid/constants.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-grid/gov-grid-item.d.ts +46 -0
- package/dist/dist/dist/types/components/gov-grid/gov-grid.d.ts +19 -0
- package/dist/dist/dist/types/components/gov-icon/constants.d.ts +18 -0
- package/dist/dist/dist/types/components/gov-icon/gov-icon.d.ts +34 -0
- package/dist/dist/dist/types/components/gov-icon/helpers.d.ts +6 -0
- package/dist/dist/dist/types/components/gov-icon/list.d.ts +3 -0
- package/dist/dist/dist/types/components/gov-infobar/constants.d.ts +16 -0
- package/dist/dist/dist/types/components/gov-infobar/gov-infobar.d.ts +51 -0
- package/dist/dist/dist/types/components/gov-infobar/gov-infobar.types.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-layout/constants.d.ts +20 -0
- package/dist/dist/dist/types/components/gov-layout/gov-layout-column.d.ts +6 -0
- package/dist/dist/dist/types/components/gov-layout/gov-layout.d.ts +20 -0
- package/dist/dist/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
- package/dist/dist/dist/types/components/gov-link/constants.d.ts +8 -0
- package/dist/dist/dist/types/components/gov-link/gov-link.d.ts +34 -0
- package/dist/dist/dist/types/components/gov-loading/loading/constants.d.ts +9 -0
- package/dist/dist/dist/types/components/gov-loading/loading/gov-loading.d.ts +13 -0
- package/dist/dist/dist/types/components/gov-loading/skeleton/constants.d.ts +21 -0
- package/dist/dist/dist/types/components/gov-loading/skeleton/gov-skeleton.d.ts +46 -0
- package/dist/dist/dist/types/components/gov-message/constants.d.ts +13 -0
- package/dist/dist/dist/types/components/gov-message/gov-message.d.ts +16 -0
- package/dist/dist/dist/types/components/gov-pagination/constants.d.ts +22 -0
- package/dist/dist/dist/types/components/gov-pagination/gov-pagination.d.ts +97 -0
- package/dist/dist/dist/types/components/gov-pagination/gov-pagination.types.d.ts +5 -0
- package/dist/dist/dist/types/components/gov-pagination/pagination.d.ts +12 -0
- package/dist/dist/dist/types/components/gov-spacer/constants.d.ts +15 -0
- package/dist/dist/dist/types/components/gov-spacer/gov-spacer.d.ts +18 -0
- package/dist/dist/dist/types/components/gov-stepper/stepper/constants.d.ts +21 -0
- package/dist/dist/dist/types/components/gov-stepper/stepper/gov-stepper-item.d.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-stepper/stepper/gov-stepper-item.d.ts +31 -0
- package/dist/dist/dist/types/components/gov-stepper/stepper/gov-stepper.d.ts +22 -0
- package/dist/dist/dist/types/components/gov-tabs/constants.d.ts +28 -0
- package/dist/dist/dist/types/components/gov-tabs/gov-tabs-item.d.ts +54 -0
- package/dist/dist/dist/types/components/gov-tabs/gov-tabs.d.ts +70 -0
- package/dist/dist/dist/types/components/gov-tabs/gov-tabs.types.d.ts +14 -0
- package/dist/dist/dist/types/components/gov-tag/constants.d.ts +12 -0
- package/dist/dist/dist/types/components/gov-tag/gov-tag.d.ts +35 -0
- package/dist/dist/dist/types/components/gov-theme-switch/constants.d.ts +12 -0
- package/dist/dist/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +46 -0
- package/dist/dist/dist/types/components/gov-theme-switch/gov-theme-switch.types.d.ts +10 -0
- package/dist/dist/dist/types/components/gov-tile/constants.d.ts +13 -0
- package/dist/dist/dist/types/components/gov-tile/gov-tile.d.ts +34 -0
- package/dist/dist/dist/types/components/gov-toast/constants.d.ts +17 -0
- package/dist/dist/dist/types/components/gov-toast/gov-toast.d.ts +58 -0
- package/dist/dist/dist/types/components/gov-tooltip/constants.d.ts +20 -0
- package/dist/dist/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +32 -0
- package/dist/dist/dist/types/components/gov-tooltip/gov-tooltip.d.ts +61 -0
- package/dist/dist/dist/types/components/gov-wizard/constants.d.ts +19 -0
- package/dist/dist/dist/types/components/gov-wizard/gov-wizard-item.d.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-wizard/gov-wizard-item.d.ts +60 -0
- package/dist/dist/dist/types/components/gov-wizard/gov-wizard-item.types.d.ts +4 -0
- package/dist/dist/dist/types/components/gov-wizard/gov-wizard.d.ts +35 -0
- package/dist/dist/dist/types/core/constants/colors.d.ts +13 -0
- package/dist/dist/dist/types/core/constants/sizes.d.ts +13 -0
- package/dist/dist/dist/types/core/constants/tags.d.ts +12 -0
- package/dist/dist/dist/types/core/constants/tokens.d.ts +1 -0
- package/dist/dist/dist/types/helpers/Accessibility/accessibility.d.ts +1 -0
- package/dist/dist/dist/types/helpers/Accessibility/attributes.d.ts +1 -0
- package/dist/dist/dist/types/helpers/Dom/attribute.d.ts +13 -0
- package/dist/dist/dist/types/helpers/Dom/document.d.ts +4 -0
- package/dist/dist/dist/types/helpers/Dom/form.d.ts +3 -0
- package/dist/dist/dist/types/helpers/Dom/form.types.d.ts +11 -0
- package/dist/dist/dist/types/helpers/Dom/template.d.ts +10 -0
- package/dist/dist/dist/types/helpers/Dom/template.types.d.ts +14 -0
- package/dist/dist/dist/types/helpers/Dom/win.d.ts +18 -0
- package/dist/dist/dist/types/helpers/Fragment.d.ts +2 -0
- package/dist/dist/dist/types/helpers/Log/gov.log.d.ts +8 -0
- package/dist/dist/dist/types/helpers/Validate/props.d.ts +1 -0
- package/dist/dist/dist/types/helpers/Validate/wcag.d.ts +4 -0
- package/dist/dist/dist/types/index.d.ts +0 -0
- package/dist/dist/dist/types/interfaces.d.ts +1 -0
- package/dist/dist/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/dist/dist/dist/types/types/event.types.d.ts +4 -0
- package/dist/dist/dist/types/types/interfaces.d.ts +2 -0
- package/dist/dist/dist/types/types/typings.d.ts +6 -0
- package/dist/dist/dist/types/utils/array.utils.d.ts +2 -0
- package/dist/dist/dist/types/utils/bool.utils.d.ts +1 -0
- package/dist/dist/dist/types/utils/dom.utils.d.ts +1 -0
- package/dist/dist/dist/types/utils/ds.utils.d.ts +1 -0
- package/dist/dist/dist/types/utils/file.utils.d.ts +3 -0
- package/dist/dist/dist/types/utils/helpers.types.d.ts +49 -0
- package/dist/dist/dist/types/utils/icon.utils.d.ts +4 -0
- package/dist/dist/dist/types/utils/number.utils.d.ts +1 -0
- package/dist/dist/dist/types/utils/object.utils.d.ts +2 -0
- package/dist/dist/dist/types/utils/stencil.utils.d.ts +1 -0
- package/dist/dist/dist/types/utils/string.utils.d.ts +4 -0
- package/dist/dist/dist/types/utils/utils.d.ts +20 -0
- package/dist/dist/globals.d.ts +2 -0
- package/dist/dist/hydrate/index.d.ts +287 -0
- package/dist/dist/types/components/gov-accordion/constants.d.ts +19 -0
- package/dist/dist/types/components/gov-accordion/gov-accordion-item.d.ts +43 -0
- package/dist/dist/types/components/gov-accordion/gov-accordion.d.ts +26 -0
- package/dist/dist/types/components/gov-accordion/gov-accordion.types.d.ts +9 -0
- package/dist/dist/types/components/gov-attachments/constants.d.ts +11 -0
- package/dist/dist/types/components/gov-attachments/gov-attachments-item.d.d.ts +4 -0
- package/dist/dist/types/components/gov-attachments/gov-attachments-item.d.ts +24 -0
- package/dist/dist/types/components/gov-attachments/gov-attachments.d.ts +19 -0
- package/dist/dist/types/components/gov-backdrop/constants.d.ts +4 -0
- package/dist/dist/types/components/gov-backdrop/gov-backdrop.d.ts +32 -0
- package/dist/dist/types/components/gov-banner/constants.d.ts +26 -0
- package/dist/dist/types/components/gov-banner/gov-banner.d.ts +28 -0
- package/dist/dist/types/components/gov-blockquote/constants.d.ts +10 -0
- package/dist/dist/types/components/gov-blockquote/gov-blockquote.d.ts +15 -0
- package/dist/dist/types/components/gov-breadcrumbs/constants.d.ts +3 -0
- package/dist/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.d.ts +4 -0
- package/dist/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +42 -0
- package/dist/dist/types/components/gov-button/button/constants.d.ts +29 -0
- package/dist/dist/types/components/gov-button/button/gov-button.d.ts +133 -0
- package/dist/dist/types/components/gov-button/button/gov-button.types.d.ts +4 -0
- package/dist/dist/types/components/gov-button/dropdown/constants.d.ts +10 -0
- package/dist/dist/types/components/gov-button/dropdown/gov-dropdown.d.ts +40 -0
- package/dist/dist/types/components/gov-button/dropdown/gov-dropdown.types.d.ts +4 -0
- package/dist/dist/types/components/gov-card/constants.d.ts +16 -0
- package/dist/dist/types/components/gov-card/gov-card.d.ts +57 -0
- package/dist/dist/types/components/gov-card/interfaces.d.ts +4 -0
- package/dist/dist/types/components/gov-chip/constants.d.ts +21 -0
- package/dist/dist/types/components/gov-chip/gov-chip.d.ts +82 -0
- package/dist/dist/types/components/gov-collapsible/constants.d.ts +18 -0
- package/dist/dist/types/components/gov-collapsible/gov-collapsible.d.ts +36 -0
- package/dist/dist/types/components/gov-container/constants.d.ts +3 -0
- package/dist/dist/types/components/gov-container/gov-container.d.ts +6 -0
- package/dist/dist/types/components/gov-control-group/constants.d.ts +7 -0
- package/dist/dist/types/components/gov-control-group/gov-control-group.d.ts +24 -0
- package/dist/dist/types/components/gov-cookiebar/constants.d.ts +7 -0
- package/dist/dist/types/components/gov-cookiebar/gov-cookiebar.d.ts +7 -0
- package/dist/dist/types/components/gov-dialog/constants.d.ts +11 -0
- package/dist/dist/types/components/gov-dialog/gov-dialog.d.ts +70 -0
- package/dist/dist/types/components/gov-empty/constants.d.ts +19 -0
- package/dist/dist/types/components/gov-empty/gov-empty.d.ts +21 -0
- package/dist/dist/types/components/gov-error-code/constants.d.ts +4 -0
- package/dist/dist/types/components/gov-error-code/gov-error-code.d.ts +6 -0
- package/dist/dist/types/components/gov-flex/constants.d.ts +7 -0
- package/dist/dist/types/components/gov-flex/gov-flex.d.ts +39 -0
- package/dist/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
- package/dist/dist/types/components/gov-form/autocomplete/constants.d.ts +11 -0
- package/dist/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +158 -0
- package/dist/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.types.d.ts +9 -0
- package/dist/dist/types/components/gov-form/checkbox/constants.d.ts +10 -0
- package/dist/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +86 -0
- package/dist/dist/types/components/gov-form/checkbox/gov-form-checkbox.types.d.ts +5 -0
- package/dist/dist/types/components/gov-form/control/constants.d.ts +9 -0
- package/dist/dist/types/components/gov-form/control/gov-form-control.d.ts +40 -0
- package/dist/dist/types/components/gov-form/file/constants.d.ts +7 -0
- package/dist/dist/types/components/gov-form/file/gov-form-file.d.ts +130 -0
- package/dist/dist/types/components/gov-form/file/gov-form-file.types.d.ts +11 -0
- package/dist/dist/types/components/gov-form/group/constants.d.ts +18 -0
- package/dist/dist/types/components/gov-form/group/gov-form-checkbox-group.d.ts +32 -0
- package/dist/dist/types/components/gov-form/group/gov-form-group.d.ts +18 -0
- package/dist/dist/types/components/gov-form/group/gov-form-group.types.d.ts +7 -0
- package/dist/dist/types/components/gov-form/group/gov-form-radio-group.d.ts +32 -0
- package/dist/dist/types/components/gov-form/input/constants.d.ts +28 -0
- package/dist/dist/types/components/gov-form/input/gov-form-input.d.ts +178 -0
- package/dist/dist/types/components/gov-form/input/gov-form-input.types.d.ts +4 -0
- package/dist/dist/types/components/gov-form/label/constants.d.ts +8 -0
- package/dist/dist/types/components/gov-form/label/gov-form-label.d.ts +26 -0
- package/dist/dist/types/components/gov-form/message/constants.d.ts +11 -0
- package/dist/dist/types/components/gov-form/message/gov-form-message.d.ts +23 -0
- package/dist/dist/types/components/gov-form/multiselect/constants.d.ts +10 -0
- package/dist/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +127 -0
- package/dist/dist/types/components/gov-form/multiselect/gov-form-multi-select.types.d.ts +10 -0
- package/dist/dist/types/components/gov-form/password-power/constants.d.ts +5 -0
- package/dist/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +7 -0
- package/dist/dist/types/components/gov-form/radio/constants.d.ts +10 -0
- package/dist/dist/types/components/gov-form/radio/gov-form-radio.d.ts +83 -0
- package/dist/dist/types/components/gov-form/radio/gov-form-radio.types.d.ts +5 -0
- package/dist/dist/types/components/gov-form/range/constants.d.ts +9 -0
- package/dist/dist/types/components/gov-form/range/gov-form-range.d.ts +116 -0
- package/dist/dist/types/components/gov-form/search/constants.d.ts +10 -0
- package/dist/dist/types/components/gov-form/search/gov-form-search.d.ts +13 -0
- package/dist/dist/types/components/gov-form/select/constants.d.ts +8 -0
- package/dist/dist/types/components/gov-form/select/gov-form-select.d.ts +89 -0
- package/dist/dist/types/components/gov-form/select/gov-form-select.types.d.ts +9 -0
- package/dist/dist/types/components/gov-form/switch/constants.d.ts +12 -0
- package/dist/dist/types/components/gov-form/switch/gov-form-switch.d.ts +81 -0
- package/dist/dist/types/components/gov-form/switch/gov-form-switch.types.d.ts +5 -0
- package/dist/dist/types/components/gov-grid/constants.d.ts +10 -0
- package/dist/dist/types/components/gov-grid/gov-grid-item.d.ts +46 -0
- package/dist/dist/types/components/gov-grid/gov-grid.d.ts +19 -0
- package/dist/dist/types/components/gov-icon/constants.d.ts +18 -0
- package/dist/dist/types/components/gov-icon/gov-icon.d.ts +34 -0
- package/dist/dist/types/components/gov-icon/helpers.d.ts +6 -0
- package/dist/dist/types/components/gov-icon/list.d.ts +3 -0
- package/dist/dist/types/components/gov-infobar/constants.d.ts +16 -0
- package/dist/dist/types/components/gov-infobar/gov-infobar.d.ts +51 -0
- package/dist/dist/types/components/gov-infobar/gov-infobar.types.d.ts +4 -0
- package/dist/dist/types/components/gov-layout/constants.d.ts +20 -0
- package/dist/dist/types/components/gov-layout/gov-layout-column.d.ts +6 -0
- package/dist/dist/types/components/gov-layout/gov-layout.d.ts +20 -0
- package/dist/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
- package/dist/dist/types/components/gov-link/constants.d.ts +8 -0
- package/dist/dist/types/components/gov-link/gov-link.d.ts +34 -0
- package/dist/dist/types/components/gov-loading/loading/constants.d.ts +9 -0
- package/dist/dist/types/components/gov-loading/loading/gov-loading.d.ts +13 -0
- package/dist/dist/types/components/gov-loading/skeleton/constants.d.ts +21 -0
- package/dist/dist/types/components/gov-loading/skeleton/gov-skeleton.d.ts +46 -0
- package/dist/dist/types/components/gov-message/constants.d.ts +13 -0
- package/dist/dist/types/components/gov-message/gov-message.d.ts +16 -0
- package/dist/dist/types/components/gov-pagination/constants.d.ts +22 -0
- package/dist/dist/types/components/gov-pagination/gov-pagination.d.ts +97 -0
- package/dist/dist/types/components/gov-pagination/gov-pagination.types.d.ts +5 -0
- package/dist/dist/types/components/gov-pagination/pagination.d.ts +12 -0
- package/dist/dist/types/components/gov-spacer/constants.d.ts +15 -0
- package/dist/dist/types/components/gov-spacer/gov-spacer.d.ts +18 -0
- package/dist/dist/types/components/gov-stepper/stepper/constants.d.ts +21 -0
- package/dist/dist/types/components/gov-stepper/stepper/gov-stepper-item.d.d.ts +4 -0
- package/dist/dist/types/components/gov-stepper/stepper/gov-stepper-item.d.ts +31 -0
- package/dist/dist/types/components/gov-stepper/stepper/gov-stepper.d.ts +22 -0
- package/dist/dist/types/components/gov-tabs/constants.d.ts +28 -0
- package/dist/dist/types/components/gov-tabs/gov-tabs-item.d.ts +54 -0
- package/dist/dist/types/components/gov-tabs/gov-tabs.d.ts +70 -0
- package/dist/dist/types/components/gov-tabs/gov-tabs.types.d.ts +14 -0
- package/dist/dist/types/components/gov-tag/constants.d.ts +12 -0
- package/dist/dist/types/components/gov-tag/gov-tag.d.ts +35 -0
- package/dist/dist/types/components/gov-theme-switch/constants.d.ts +12 -0
- package/dist/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +46 -0
- package/dist/dist/types/components/gov-theme-switch/gov-theme-switch.types.d.ts +10 -0
- package/dist/dist/types/components/gov-tile/constants.d.ts +13 -0
- package/dist/dist/types/components/gov-tile/gov-tile.d.ts +34 -0
- package/dist/dist/types/components/gov-toast/constants.d.ts +17 -0
- package/dist/dist/types/components/gov-toast/gov-toast.d.ts +58 -0
- package/dist/dist/types/components/gov-tooltip/constants.d.ts +20 -0
- package/dist/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +32 -0
- package/dist/dist/types/components/gov-tooltip/gov-tooltip.d.ts +61 -0
- package/dist/dist/types/components/gov-wizard/constants.d.ts +19 -0
- package/dist/dist/types/components/gov-wizard/gov-wizard-item.d.d.ts +4 -0
- package/dist/dist/types/components/gov-wizard/gov-wizard-item.d.ts +60 -0
- package/dist/dist/types/components/gov-wizard/gov-wizard-item.types.d.ts +4 -0
- package/dist/dist/types/components/gov-wizard/gov-wizard.d.ts +35 -0
- package/dist/dist/types/core/constants/colors.d.ts +13 -0
- package/dist/dist/types/core/constants/sizes.d.ts +13 -0
- package/dist/dist/types/core/constants/tags.d.ts +12 -0
- package/dist/dist/types/core/constants/tokens.d.ts +1 -0
- package/dist/dist/types/helpers/Accessibility/accessibility.d.ts +1 -0
- package/dist/dist/types/helpers/Accessibility/attributes.d.ts +1 -0
- package/dist/dist/types/helpers/Dom/attribute.d.ts +13 -0
- package/dist/dist/types/helpers/Dom/document.d.ts +4 -0
- package/dist/dist/types/helpers/Dom/form.d.ts +3 -0
- package/dist/dist/types/helpers/Dom/form.types.d.ts +11 -0
- package/dist/dist/types/helpers/Dom/template.d.ts +10 -0
- package/dist/dist/types/helpers/Dom/template.types.d.ts +14 -0
- package/dist/dist/types/helpers/Dom/win.d.ts +18 -0
- package/dist/dist/types/helpers/Fragment.d.ts +2 -0
- package/dist/dist/types/helpers/Log/gov.log.d.ts +8 -0
- package/dist/dist/types/helpers/Validate/props.d.ts +1 -0
- package/dist/dist/types/helpers/Validate/wcag.d.ts +4 -0
- package/dist/dist/types/index.d.ts +0 -0
- package/dist/dist/types/interfaces.d.ts +1 -0
- package/dist/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/dist/dist/types/types/event.types.d.ts +4 -0
- package/dist/dist/types/types/interfaces.d.ts +2 -0
- package/dist/dist/types/types/typings.d.ts +6 -0
- package/dist/dist/types/utils/array.utils.d.ts +2 -0
- package/dist/dist/types/utils/bool.utils.d.ts +1 -0
- package/dist/dist/types/utils/dom.utils.d.ts +1 -0
- package/dist/dist/types/utils/ds.utils.d.ts +1 -0
- package/dist/dist/types/utils/file.utils.d.ts +3 -0
- package/dist/dist/types/utils/helpers.types.d.ts +49 -0
- package/dist/dist/types/utils/icon.utils.d.ts +4 -0
- package/dist/dist/types/utils/number.utils.d.ts +1 -0
- package/dist/dist/types/utils/object.utils.d.ts +2 -0
- package/dist/dist/types/utils/stencil.utils.d.ts +1 -0
- package/dist/dist/types/utils/string.utils.d.ts +4 -0
- package/dist/dist/types/utils/utils.d.ts +20 -0
- package/dist/esm/gov-flex_3.entry.js +1 -1
- package/dist/hydrate/index.js +1 -1
- package/dist/hydrate/index.mjs +1 -1
- package/dist/types/components.d.ts +119 -592
- package/dist/types/stencil-public-runtime.d.ts +11 -170
- package/package.json +28 -32
- package/dist/components/p-DRXiDAHW.js +0 -2
- package/dist/core/p-0675617d.entry.js +0 -2
- package/dist/core/p-2e15a654.entry.js +0 -2
- package/dist/core/p-41bef63a.entry.js +0 -2
- package/dist/core/p-6638d034.entry.js +0 -2
- package/dist/core/p-943a58b2.entry.js +0 -2
- package/dist/core/p-B8TR1oqt.js +0 -3
- package/dist/core/p-B8TR1oqt.js.map +0 -1
- package/dist/core/p-a4fa2ffc.entry.js +0 -2
- package/dist/core/p-a7c322a7.entry.js +0 -2
- package/dist/core/p-b181f85f.entry.js +0 -2
- package/dist/core/p-dc0bd1e5.entry.js +0 -2
- package/readme.md +0 -8
- /package/dist/components/{p-isPjiQbr.js.map → p-BIB-JMbL.js.map} +0 -0
- /package/dist/components/{p-BICk4EuO.js.map → p-BVG9PtuQ.js.map} +0 -0
- /package/dist/components/{p-DmK9qaKH.js.map → p-DV0Pdd1S.js.map} +0 -0
- /package/dist/components/{p-DjGO_trZ.js.map → p-DlpZtTcv.js.map} +0 -0
- /package/dist/components/{p-BNoNH6m-.js.map → p-Dw1o8KoZ.js.map} +0 -0
- /package/dist/components/{p-BGK46VRO.js.map → p-NU_8kxGz.js.map} +0 -0
- /package/dist/components/{p-ClDhNt_H.js.map → p-o4vVG5sG.js.map} +0 -0
- /package/dist/core/{p-f515d912.entry.js.map → p-5c872d64.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-infobar.entry.esm.js","sources":["../../../packages/core/src/components/gov-infobar/constants.ts","../../../packages/core/src/components/gov-infobar/gov-infobar.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const InfobarColors = pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ColorType = `${ValueOf<typeof InfobarColors>}`\n\nexport enum InfobarType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type InfobarTypesType = `${ValueOf<typeof InfobarType>}`\n\nexport const InfobarClass = {\n\troot: 'gov-infobar',\n\tsection: 'gov-infobar__section',\n\tcontent: 'gov-infobar__content',\n\theadline: 'gov-infobar__headline',\n\tclose: 'gov-infobar__close',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from '@stencil/core'\nimport {govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport Fragment from '../../helpers/Fragment'\nimport {validateProp} from '../../helpers/Validate/props'\nimport {ButtonEvent} from '../gov-button/button/gov-button.types'\nimport {ColorType, InfobarClass, InfobarColors, InfobarTypesType} from './constants'\nimport {InfobarEvent} from './gov-infobar.types'\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-infobar',\n})\nexport class GovInfobar {\n\tprivate h: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate hydrated = false\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 color: ColorType = 'primary'\n\t/**\n\t * Infobar appearance\n\t */\n\t@Prop() readonly type?: InfobarTypesType = \"bold\"\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly role: HTMLElement['role'] = undefined\n\t/**\n\t * Aria label for the closing button. It is mandatory if the infobar is closable\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít informační lištu'\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the infobar has headline\n\t */\n\t@Prop({attribute: 'accessible-toggle-label'}) readonly accessibleToggleLabel: string = 'Zobrazit více informací'\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\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(InfobarColors, newValue, InfobarClass.root)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst closeButton = (\n\t\t\t<gov-button size=\"s\"\n\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tcolor={this.isBold ? this.color : \"neutral\"}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\tclass={InfobarClass.close}>\n\t\t\t\t<gov-icon name=\"x-lg\" type=\"components\"></gov-icon>\n\t\t\t</gov-button>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(InfobarClass.root)} color={this.color} type={this.type} hydrated={this.hydrated}>\n\t\t\t\t<section class={InfobarClass.section} {...this.inheritedAttributes} role={this.role}>\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={InfobarClass.content}>\n\t\t\t\t\t\t{this.h.hasSlot('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<slot name={\"headline\"}/>\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\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tcolor={this.isBold ? this.color : \"neutral\"}\n\t\t\t\t\t\t\t\t\t\taria-label={this.accessibleToggleLabel}\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'} type=\"components\"></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\t{this.closable && closeButton}\n\t\t\t\t</section>\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\tget isBold(): boolean {\n\t\treturn this.type === \"bold\"\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;AAIO,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAG7G,IAAY,WAGX;AAHD,CAAA,UAAY,WAAW,EAAA;AACtB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAHW,WAAW,KAAX,WAAW,GAGtB,EAAA,CAAA,CAAA;AAGM,MAAM,YAAY,GAAG;AAC3B,IAAA,IAAI,EA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AAA,EAAA,EAAK,MAAM,EAAE,CAAC,IAAI,CAAC,aAAa,EAAe,aAAA,EAAA,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,EAAA,EAC5E,CAAO,CAAA,MAAA,EAAA,IAAA,CAAA,CACF,CACI,KAEX,CAAO,CAAA,MAAA,EAAA,IAAA,CAAA,CACP,CACI,EACL,IAAI,CAAC,QAAQ,IAAI,WAAW,CACpB,CACJ;;AAIT,IAAA,cAAc,CAAC,CAA2B,EAAA;AACzC,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,SAAS,EAAE,YAAY,CAAC,IAAI;YAC5B,GAAG,EAAE,IAAI,CAAC,IAAI;AACd,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGH,IAAA,IAAI,MAAM,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,IAAI,KAAK,MAAM;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-layout-column.entry.esm.js","sources":["../../../packages/core/src/components/gov-layout/gov-layout-column.tsx"],"sourcesContent":["import { Component, Element, h, Host } from '@stencil/core'\nimport { LayoutColumnClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-layout-column',\n})\nexport class GovLayoutColumn {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovLayoutColumnElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LayoutColumnClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;MAQa,eAAe,GAAA,MAAA;AAG3B,IAAA,WAAA,CAAA,OAAA,EAAA;;QACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;IAID,MAAM,GAAA;AACL,QAAA,QACC,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAA,EAClD,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACF;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-layout.entry.esm.js","sources":["../../../packages/core/src/components/gov-layout/gov-layout.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { LayoutClass, LayoutType, LayoutVariantType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-layout',\n})\nexport class GovLayout {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLayoutElement\n\t/**\n\t * Layout type\n\t */\n\t@Prop() readonly type?: LayoutType = 'stretch'\n\t/**\n\t * Layout align\n\t */\n\t@Prop() readonly variant?: LayoutVariantType\n\t/**\n\t * Determine if component should have inverse column order\n\t */\n\t@Prop() readonly inverse: boolean = false\n\n\tprivate typeClass(originalClass: string, type: string, variant: string, inverse: boolean) {\n\t\tconst isType = type ? '-' + type : ''\n\t\tconst isVariant = variant ? '-' + variant : ''\n\t\tconst isInverse = inverse ? '-inverse' : ''\n\t\treturn originalClass + ' ' + originalClass + isType + isVariant + isInverse\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host type={this.type} class={this.h.classes(LayoutClass.root)}>\n\t\t\t\t<section class={this.typeClass(LayoutClass.section, this.type, this.variant, this.inverse)}>\n\t\t\t\t\t<slot />\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;MAQa,SAAS,GAAA,MAAA;AAGrB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAKA;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAgB,SAAS;AAK9C;;AAEG;AACc,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;QAfxC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;AAgBO,IAAA,SAAS,CAAC,aAAqB,EAAE,IAAY,EAAE,OAAe,EAAE,OAAgB,EAAA;AACvF,QAAA,MAAM,MAAM,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,EAAE;AACrC,QAAA,MAAM,SAAS,GAAG,OAAO,GAAG,GAAG,GAAG,OAAO,GAAG,EAAE;QAC9C,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,EAAE;QAC3C,OAAO,aAAa,GAAG,GAAG,GAAG,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS;;IAG5E,MAAM,GAAA;AACL,QAAA,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAA,EAC7D,CAAS,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,EAAA,EACzF,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACC,CACJ;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-lifecycle.entry.esm.js","sources":["../../../packages/core/src/components/gov-lifecycle-tester/gov-lifecycle-tester.tsx"],"sourcesContent":["import {Component, h, Host} from '@stencil/core';\nimport {chr4} from \"../../utils/string.utils\";\n\n@Component({\n\ttag: 'gov-lifecycle',\n})\nexport class GovLifecycle {\n\tprivate readonly uniqueId: string;\n\n\tconstructor() {\n\t\tthis.uniqueId = 'lifecycle-' + chr4();\n\t}\n\n\tconnectedCallback() {\n\t\tconsole.log('connectedCallback', this.uniqueId);\n\t}\n\n\tdisconnectedCallback() {\n\t\tconsole.log('disconnectedCallback', this.uniqueId);\n\t}\n\n\tcomponentWillLoad() {\n\t\tconsole.log('componentWillLoad', this.uniqueId);\n\t}\n\n\tcomponentDidLoad() {\n\t\tconsole.log('componentDidLoad', this.uniqueId);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tconsole.log('componentShouldUpdate', this.uniqueId);\n\t}\n\n\tcomponentWillRender() {\n\t\tconsole.log('componentWillRender', this.uniqueId);\n\t}\n\n\tcomponentDidRender() {\n\t\tconsole.log('componentDidRender', this.uniqueId);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tconsole.log('componentWillUpdate', this.uniqueId);\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconsole.log('componentDidUpdate', this.uniqueId);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host identifier={this.uniqueId}>\n\t\t\t\t<span>lifecycle {this.uniqueId}</span>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"names":[],"mappings":";;;MAMa,YAAY,GAAA,MAAA;AAGxB,IAAA,WAAA,CAAA,OAAA,EAAA;;AACC,QAAA,IAAI,CAAC,QAAQ,GAAG,YAAY,GAAG,IAAI,EAAE;AACrC;IAED,iBAAiB,GAAA;QAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAGhD,oBAAoB,GAAA;QACnB,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAGnD,iBAAiB,GAAA;QAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAGhD,gBAAgB,GAAA;QACf,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAG/C,qBAAqB,GAAA;QACpB,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAGpD,mBAAmB,GAAA;QAClB,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAGlD,kBAAkB,GAAA;QACjB,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAGjD,mBAAmB,GAAA;QAClB,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAGlD,kBAAkB,GAAA;QACjB,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAGjD,MAAM,GAAA;AACL,QAAA,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAA,EAC9B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,gBAAiB,IAAI,CAAC,QAAQ,CAAQ,CAChC;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-link.entry.esm.js","sources":["../../../packages/core/src/components/gov-link/constants.ts","../../../packages/core/src/components/gov-link/gov-link.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const LinkSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type LinkSizesType = `${ValueOf<typeof LinkSizes>}`\n\nexport const LinkClass = {\n\troot: 'gov-link',\n\texternal: 'gov-link--external',\n}\n","import {Component, Element, Host, h, Prop, Watch, State} from '@stencil/core'\nimport {LinkClass, LinkSizes, LinkSizesType} from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Attributes} from \"../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-link',\n})\nexport class GovLink {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLinkElement\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly size?: LinkSizesType = 'm'\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly external?: boolean = false\n\t/**\n\t * Cutting text to one line\n\t */\n\t@Prop() readonly truncate?: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(LinkSizes, newValue, LinkClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host)\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LinkClass.root)}\n\t\t\t\t size={this.size}\n\t\t\t\t href={this.href}\n\t\t\t\t external={this.external}\n\t\t\t\t truncate={this.truncate}>\n\t\t\t\t<a class=\"element\"\n\t\t\t\t href={this.href}\n\t\t\t\t target={this.external ? '_blank' : this.target}\n\t\t\t\t rel={this.external ? \"noreferrer\" : null}\n\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<slot name=\"icon-start\"/>\n\t\t\t\t\t<span><slot/></span>\n\t\t\t\t\t<slot name=\"icon-end\"/>\n\t\t\t\t\t{this.external && <gov-icon name=\"box-arrow-up-right\" type=\"components\" size={this.size} class={LinkClass.external}></gov-icon>}\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;AAIO,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAGjD,MAAM,SAAS,GAAG;AACxB,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,QAAQ,EAAE,oBAAoB;CAC9B;;MCCY,OAAO,GAAA,MAAA;AAGnB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAKA;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAmB,GAAG;AAC3C;;AAEG;AACc,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAC3C;;AAEG;AACc,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAkBlC,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;QAjC5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;AA4BD,IAAA,YAAY,CAAC,QAAgB,EAAA;QAC5B,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC;;IAKlD,iBAAiB,GAAA;AAChB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,mBAAmB,GAAG,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;;IAG5D,qBAAqB,CAAC,aAAqB,EAAE,QAAgB,EAAA;AAC5D,QAAA,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,mBAAmB,GAAO,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA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Q,EAAa,CAAA,CAC5H,CACE;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-loading.entry.esm.js","sources":["../../../packages/core/src/components/gov-loading/loading/constants.ts","../../../packages/core/src/components/gov-loading/loading/gov-loading.tsx"],"sourcesContent":["import {pick} from \"../../../utils/utils\";\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {ValueOf} from \"../../../types/interfaces\";\n\nexport const LoadingSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type LoadingSizesType = `${ValueOf<typeof LoadingSizes>}`\n\nexport const LoadingClass = {\n\troot: 'gov-loading',\n\tcontent: 'gov-loading__content',\n\ticon: 'gov-loading__icon',\n}\n","import {Component, Element, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {LoadingClass, LoadingSizes, LoadingSizesType} from \"./constants\"\nimport { govHost, prepareClasses } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../../helpers/Validate/props\";\n\n@Component({\n\ttag: \"gov-loading\",\n})\nexport class GovLoading {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLoadingElement\n\t/**\n\t * Loading size\n\t */\n\t@Prop() readonly size?: LoadingSizesType = 'm'\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(LoadingSizes, newValue, LoadingClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LoadingClass.root)} size={this.size}>\n\t\t\t\t<div class={LoadingClass.content}>\n\t\t\t\t\t<gov-icon\n\t\t\t\t\t\tclass={prepareClasses([LoadingClass.icon, \"gov-spin-animation\"])}\n\t\t\t\t\t\tname=\"loader\"\n\t\t\t\t\t\ttype=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t\t<slot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A,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACH,EACN,CAAA,CAAA,cAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAc,OAAO,EAAE,IAAI,EAAI,CAAA,CACzB;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-message.entry.esm.js","sources":["../../../packages/core/src/components/gov-message/constants.ts","../../../packages/core/src/components/gov-message/gov-message.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const MessageColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type MessageColorType = `${ValueOf<typeof MessageColors>}`\n\nexport enum MessageType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type MessageTypesType = `${ValueOf<typeof MessageType>}`\n\nexport const MessageClass = {\n\troot: 'gov-message',\n\tcontent: 'gov-message__content',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { MessageTypesType, MessageClass, MessageColorType} from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { Colors } from \"../../core/constants/colors\"\n\n@Component({\n\ttag: \"gov-message\",\n})\nexport class GovMessage {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovMessageElement\n\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: MessageColorType = Colors.PRIMARY\n\t/**\n\t * Message type\n\t */\n\t@Prop() readonly type?: MessageTypesType = \"subtle\"\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, MessageClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(MessageClass.root)} color={this.color} type={this.type} role=\"status\">\n\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t<div class={MessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAI6B,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;AAG/F,IAAY,WAGX;AAHD,CAAA,UAAY,WAAW,EAAA;AACtB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAHW,WAAW,KAAX,WAAW,GAGtB,EAAA,CAAA,CAAA;AAGM,MAAM,YAAY,GAAG;AAC3B,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,OAAO,EAAE,sBAAsB;CAC/B;;MCNY,UAAU,GAAA,MAAA;AAGtB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAMA;;AAEG;AACc,QAAA,IAAA,CAAA,KAAK,GAAqB,MAAM,CAAC,OAAO;AACzD;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAsB,QAAQ;QAZlD,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;AAcD,IAAA,aAAa,CAAC,QAAgB,EAAA;QAC7B,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;;IAGlD,MAAM,GAAA;QACL,QACC,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,QAAQ,EAAA,EAC/F,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,MAAM,EAAA,CAAG,CACd,CACP,EAED,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,YAAY,CAAC,OAAO,EAAA,EAC/B,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH,CACA;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-pagination.entry.esm.js","sources":["../../../packages/core/src/components/gov-pagination/constants.ts","../../../packages/core/src/components/gov-pagination/pagination.ts","../../../packages/core/src/components/gov-pagination/gov-pagination.tsx"],"sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const PaginationSizes = pick(Sizes, ['_S', '_M'])\nexport type PaginationSizeType = `${ValueOf<typeof PaginationSizes>}`\n\nexport const PaginationColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type PaginationColorType = `${ValueOf<typeof PaginationColors>}`\n\nexport enum PaginationTypes {\n\tBUTTON = 'button',\n\tSELECT = 'select',\n}\nexport type PaginationType = `${ValueOf<typeof PaginationTypes>}`\n\nexport const PaginationClass = {\n\troot: 'gov-pagination',\n\tlist: 'gov-pagination__list',\n\titem: 'gov-pagination__item',\n\titemArrow: 'gov-pagination__item--arrow',\n\titemMore: 'gov-pagination__item--more',\n\titemSelect: 'gov-pagination__item--select',\n\tinner: 'gov-pagination__inner',\n\tarrow: 'gov-pagination__arrow',\n}\n","export interface Pagination {\n\ttotalItems: number\n\tcurrentPage: number\n\tpageSize: number\n\ttotalPages: number\n\tstartPage: number\n\tendPage: number\n\tstartIndex: number\n\tendIndex: number\n\tpages: number[]\n}\n\nexport function paginate(totalItems: number, currentPage = 1, pageSize = 10, maxPages = 10): Pagination {\n\t// calculate total pages\n\tconst totalPages = Math.ceil(totalItems / pageSize)\n\n\t// ensure current page isn't out of range\n\tif (currentPage < 1) {\n\t\tcurrentPage = 1\n\t} else if (currentPage > totalPages) {\n\t\tcurrentPage = totalPages\n\t}\n\n\tlet startPage: number, endPage: number\n\tif (totalPages <= maxPages) {\n\t\t// total pages less than max so show all pages\n\t\tstartPage = 1\n\t\tendPage = totalPages\n\t} else {\n\t\t// total pages more than max so calculate start and end pages\n\t\tconst maxPagesBeforeCurrentPage = Math.floor(maxPages / 2)\n\t\tconst maxPagesAfterCurrentPage = Math.ceil(maxPages / 2) - 1\n\t\tif (currentPage <= maxPagesBeforeCurrentPage) {\n\t\t\t// current page near the start\n\t\t\tstartPage = 1\n\t\t\tendPage = maxPages\n\t\t} else if (currentPage + maxPagesAfterCurrentPage >= totalPages) {\n\t\t\t// current page near the end\n\t\t\tstartPage = totalPages - maxPages + 1\n\t\t\tendPage = totalPages\n\t\t} else {\n\t\t\t// current page somewhere in the middle\n\t\t\tstartPage = currentPage - maxPagesBeforeCurrentPage\n\t\t\tendPage = currentPage + maxPagesAfterCurrentPage\n\t\t}\n\t}\n\n\t// calculate start and end item indexes\n\tconst startIndex = (currentPage - 1) * pageSize\n\tconst endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1)\n\n\t// create an array of pages to ng-repeat in the pager control\n\tconst pages = Array.from(Array(endPage + 1 - startPage).keys()).map(i => startPage + i)\n\n\t// return object with all pager properties required by the view\n\treturn {\n\t\ttotalItems: totalItems,\n\t\tcurrentPage: currentPage,\n\t\tpageSize: pageSize,\n\t\ttotalPages: totalPages,\n\t\tstartPage: startPage,\n\t\tendPage: endPage,\n\t\tstartIndex: startIndex,\n\t\tendIndex: endIndex,\n\t\tpages: pages,\n\t}\n}\n","import Fragment from \"../../helpers/Fragment\"\nimport {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tPaginationClass,\n\tPaginationColors,\n\tPaginationColorType,\n\tPaginationSizes,\n\tPaginationSizeType,\n\tPaginationType,\n\tPaginationTypes,\n} from \"./constants\"\nimport {govHost, prepareClasses, toBoolAttrIfDefined} from \"../../helpers/Dom/template\"\nimport {paginate, Pagination} from \"./pagination\"\nimport {createID} from \"../../utils/string.utils\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {createArrayRange} from \"../../utils/array.utils\"\nimport {FormSelectEvent} from \"../gov-form/select/gov-form-select.types\"\nimport {PaginationEvent} from \"./gov-pagination.types\"\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-pagination\",\n})\nexport class GovPagination {\n\tprivate h: GovHost\n\tprivate readonly pageSelectId: string\n\tprivate readonly selectId: string\n\n\tprivate spreadSelectRef?: HTMLGovFormSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.pageSelectId = createID(\"GovPageSelect\")\n\t\tthis.selectId = createID(\"GovSelect\")\n\t}\n\n\t@Element() readonly host: HTMLGovPaginationElement\n\t/**\n\t * Pagination type\n\t */\n\t@Prop() readonly type: PaginationType = \"button\"\n\t/**\n\t * Currently displayed page\n\t */\n\t@Prop() readonly current: number = 1\n\t/**\n\t * Total count of entries\n\t */\n\t@Prop() readonly total: number = 0\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'select-identifier'}) readonly selectIdentifier: string\n\t/**\n\t * Pagination's size\n\t */\n\t@Prop() readonly size?: PaginationSizeType = \"m\"\n\t/**\n\t * Style variation of the pagination.\n\t */\n\t@Prop() readonly color?: PaginationColorType = \"primary\"\n\t/**\n\t * Maximum number of entries per page\n\t */\n\t@Prop({attribute: \"page-size\"}) readonly pageSize: number = 10\n\t/**\n\t * Maximum pages displayed for selection\n\t */\n\t@Prop({attribute: \"max-pages\"}) readonly maxPages: number = 5\n\t/**\n\t * Setting a link to redirect to a given page.\n\t * The {PAGE} wildcard can be used in the link to replace the page number.\n\t * Note that in the case of paging through a link, it is always necessary to send to the component the current page where the user is.\n\t */\n\t@Prop() readonly link: string\n\t/**\n\t * Adds accessible label for the page select\n\t */\n\t@Prop({attribute: \"accessible-select-label\"}) readonly accessibleSelectLabel: string = \"Vybrat stranu\"\n\t/**\n\t * Adds accessible label for the page item\n\t */\n\t@Prop({attribute: \"accessible-page-label\"}) readonly accessiblePageLabel: string = \"Strana\"\n\t/**\n\t * Description of the possibility to go back one page\n\t */\n\t@Prop({attribute: \"label-prev\"}) readonly labelPrev = 'Přejít o stranu zpět'\n\t/**\n\t * Description of the option to go to the top of paging\n\t */\n\t@Prop({attribute: \"label-start\"}) readonly labelStart = 'Přejít na začátek'\n\t/**\n\t * Description of the option to go to the end of paging\n\t */\n\t@Prop({attribute: \"label-next\"}) readonly labelNext = 'Přejít na další stranu'\n\t/**\n\t * Description of the option to move one page forward\n\t */\n\t@Prop({attribute: \"label-end\"}) readonly labelEnd = 'Přejít na konec'\n\t/**\n\t * Event called when changing the page with the current setting of the whole paging\n\t */\n\t@Event({eventName: \"gov-page\"}) govPage: EventEmitter<PaginationEvent>\n\n\t@State() pagination: Pagination\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(PaginationTypes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(PaginationSizes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(PaginationColors, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"current\")\n\t@Watch(\"total\")\n\t@Watch(\"pageSize\")\n\t@Watch(\"maxPages\")\n\trecalculate(): void {\n\t\tthis.recalculatePagination(this.current)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.recalculatePagination(this.current)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate recalculatePagination(currentPage: number) {\n\t\tthis.pagination = paginate(this.total, currentPage, this.pageSize, this.maxPages)\n\t}\n\n\tprivate isActivePageClass(originalClass: string, page: number) {\n\t\tif (this.pagination.currentPage === page) {\n\t\t\treturn originalClass + \" is-active\"\n\t\t} else {\n\t\t\treturn originalClass\n\t\t}\n\t}\n\n\tprivate prepareLinkUrl(page: number) {\n\t\tif (this.link) {\n\t\t\treturn String(this.link).replace(\"{PAGE}\", String(page))\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate resetSelectValue() {\n\t\tif (this.spreadSelectRef) {\n\t\t\tthis.spreadSelectRef.getRef()\n\t\t\t\t.then((el: HTMLSelectElement) => {\n\t\t\t\t\tel.value = '...'\n\t\t\t\t})\n\t\t}\n\t}\n\n\trender() {\n\t\tconst pageResolver = (page: number, content: any, description: string) => {\n\t\t\tconst isDisabled = page === -1\n\t\t\tconst ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined)\n\t\t\treturn (\n\t\t\t\t<gov-button\n\t\t\t\t\thref={this.prepareLinkUrl(page)}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ton-gov-click={(e) => this.onClickHandler(e, page)}\n\t\t\t\t\taria-label={description ? description : page > -1 ? `${this.accessiblePageLabel} ${page}` : undefined}\n\t\t\t\t\taria-current={ariaCurrent}\n\t\t\t\t\tclass={PaginationClass.inner}\n\t\t\t\t\tfocusable={true}>\n\t\t\t\t\t{content}\n\t\t\t\t</gov-button>\n\t\t\t)\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(PaginationClass.root)} type={this.type} color={this.color} size={this.size}>\n\t\t\t\t<nav {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={PaginationClass.list}>\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.currentPage > 1 ? 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-left\" type=\"components\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelStart\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-left\" type=\"components\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelPrev\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t{this.type == \"select\" ? (\n\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemSelect])}>\n\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t{this.accessibleSelectLabel}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tidentifier={this.selectIdentifier || this.selectId}\n\t\t\t\t\t\t\t\t\t\taria-labelledby={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={this.pagination.currentPage === page}>\n\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t{this.pagination.pages.map(page => (\n\t\t\t\t\t\t\t\t\t<li class={this.isActivePageClass(PaginationClass.item, page)}>{pageResolver(page, page, '')}</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t{this.pagination.totalPages ? (\n\t\t\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemMore])}>\n\t\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t\t{this.accessibleSelectLabel}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\t\tidentifier={this.selectIdentifier || this.selectId}\n\t\t\t\t\t\t\t\t\t\t\taria-labelledby={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\t\tref={el => (this.spreadSelectRef = el as HTMLGovFormSelectElement)}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t\t<option selected hidden>...</option>\n\t\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={false}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-right\" type=\"components\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelNext\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-right\" type=\"components\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelEnd\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: CustomEvent, page: number): void {\n\t\te.stopPropagation()\n\t\tthis.recalculatePagination(page)\n\t\tthis.govPage.emit({\n\t\t\tcomponent: PaginationClass.root,\n\t\t\tpagination: this.pagination\n\t\t})\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent<FormSelectEvent>): void {\n\t\te.stopPropagation()\n\t\tconst value = e.detail.value\n\t\tconst page = parseInt(value)\n\t\tthis.resetSelectValue()\n\t\tif (isNaN(page) === false) {\n\t\t\tthis.recalculatePagination(page)\n\t\t\tif (this.link) {\n\t\t\t\twindow.location.href = this.prepareLinkUrl(page)\n\t\t\t} else {\n\t\t\t\tthis.govPage.emit({\n\t\t\t\t\tcomponent: PaginationClass.root,\n\t\t\t\t\tpagination: this.pagination\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAKO,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAGjD,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAGpE,IAAY,eAGX;AAHD,CAAA,UAAY,eAAe,EAAA;AAC1B,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAHW,eAAe,KAAf,eAAe,GAG1B,EAAA,CAAA,CAAA;AAGM,MAAM,eAAe,GAAG;AAC9B,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,IAAI,EAAE,sBAAsB;AAC5B,IAAA,IAAI,EAAE,sBAAsB;AAC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U,CAAC,UAAU,GAAG,EAAE,EAC1F,CAAU,CAAA,UAAA,EAAA,EAAA,KAAK,EAAE,eAAe,CAAC,KAAK,EAAE,IAAI,EAAC,sBAAsB,EAAC,IAAI,EAAC,YAAY,EAAA,CAAY,EACjG,IAAI,CAAC,QAAQ,CACb,CACG,CACD,CACA,CACA;;IAID,cAAc,CAAC,CAAc,EAAE,IAAY,EAAA;QAClD,CAAC,CAAC,eAAe,EAAE;AACnB,QAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC;AAChC,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,UAAU,EAAE,IAAI,CAAC;AACjB,SAAA,CAAC;;AAGK,IAAA,eAAe,CAAC,CAA+B,EAAA;QACtD,CAAC,CAAC,eAAe,EAAE;AACnB,QAAA,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK;AAC5B,QAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,gBAAgB,EAAE;AACvB,QAAA,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE;AAC1B,YAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC;AAChC,YAAA,IAAI,IAAI,CAAC,IAAI,EAAE;gBACd,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;;iBAC1C;AACN,gBAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBACjB,SAAS,EAAE,eAAe,CAAC,IAAI;oBAC/B,UAAU,EAAE,IAAI,CAAC;AACjB,iBAAA,CAAC;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-spacer.entry.esm.js","sources":["../../../packages/core/src/components/gov-spacer/constants.tsx","../../../packages/core/src/components/gov-spacer/gov-spacer.tsx"],"sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const SpacerSize = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL'])\nexport type SpacerSizeType = `${ValueOf<typeof SpacerSize>}`\n\nexport enum SpacerBreakpoints {\n\tNONE = 'none',\n\tSM = 'sm',\n\tMD = 'md',\n\tLG = 'lg',\n\tXL = 'xl',\n}\nexport type SpacerBreakpointsType = `${ValueOf<typeof SpacerBreakpoints>}`\n\nexport const SpacerClass = {\n\troot: 'gov-spacer',\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { SpacerBreakpoints, SpacerBreakpointsType, SpacerClass, SpacerSize, SpacerSizeType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-spacer',\n})\nexport class GovSpacer {\n\tprivate h: GovHost\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovSpacerElement\n\t/**\n\t * Spacer’s size\n\t */\n\t@Prop() readonly size?: SpacerSizeType\n\t/**\n\t * Breakpoint\n\t */\n\t@Prop() readonly breakpoint?: SpacerBreakpointsType = undefined\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SpacerSize, newValue, SpacerClass.root)\n\t}\n\n\t@Watch('breakpoint')\n\tvalidateBreakpoint(newValue: string): void {\n\t\tvalidateProp(SpacerBreakpoints, newValue, SpacerClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateBreakpoint(this.breakpoint)\n\t}\n\n\trender() {\n\t\treturn <Host class={this.h.classes(SpacerClass.root)} size={this.size} breakpoint={this.breakpoint}></Host>\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,UAAU,GAA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AI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAA,CAAS;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-stepper-item.entry.esm.js","sources":["../../../packages/core/src/components/gov-stepper/stepper/gov-stepper-item.tsx"],"sourcesContent":["import { Component, Element, h, Prop, Watch, Host, Event, EventEmitter } from '@stencil/core'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperColorType, StepperColors } from './constants'\nimport { createID } from '../../../utils/string.utils'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: StepperColorType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(StepperColors, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\n\t\treturn (\n\t\t\t<Host id={triggerId} class={this.h.classes(StepperItemClass.root)} color={this.color} role=\"listitem\" hydrated={this.hydrated}>\n\t\t\t\t<div>\n\t\t\t\t\t<div class={StepperItemClass.steps}>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t\t<slot name=\"prefix\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class={StepperItemClass.main}>\n\t\t\t\t\t\t<span class={StepperItemClass.headline}>\n\t\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<slot name=\"annotation\"/>\n\n\t\t\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId}\n\t\t\t\t\t\t\t\t role=\"tabpanel\">\n\t\t\t\t\t\t\t\t<slot name=\"content\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;MAWa,cAAc,GAAA,MAAA;AAM1B,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAFQ,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAUxB;;AAEG;AACc,QAAA,IAAK,CAAA,KAAA,GAAsB,SAAS;AACrD;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAsB,GAAG;QAd7C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC;AAC3C,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ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A,0CAAA,EAAK,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAA,EAChC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAE,gBAAgB,CAAC,QAAQ,EAAA,EACrC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,UAAU,EAAA,CAAE,CACjB,EACP,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,YAAY,EAAE,CAAA,EAExB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,KACzB,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,SAAS,qBAAmB,SAAS,EAC7E,IAAI,EAAC,UAAU,EAAA,EAChB,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAE,CAAA,CACjB,CACN,CACI,CACD,CACA;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-stepper.entry.esm.js","sources":["../../../packages/core/src/components/gov-stepper/stepper/gov-stepper.tsx"],"sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { StepperClass, StepperItemClass, StepperSizes, StepperSizesType } from './constants'\nimport { GovStepperItemCustomEvent } from '../../../components'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { govHost } from '../../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-stepper',\n})\nexport class GovStepper {\n\tprivate h: GovHost\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovStepperElement\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Called when the Stepper state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(StepperSizes, newValue, StepperClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(StepperItemClass.root).forEach((child: HTMLGovStepperItemElement) => {\n\t\t\tchild.setAttribute('size', this.size)\n\t\t\tchild.addEventListener('gov-change', (e: GovStepperItemCustomEvent<GovStepperItemChangeEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit(e.detail)\n\t\t\t})\n\t\t})\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(StepperClass.root)} role=\"list\" size={this.size} hydrated={this.hydrated}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;MAWa,UAAU,GAAA,MAAA;AAItB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAFQ,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAOxB;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAsB,GAAG;QAP7C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;AAaD,IAAA,YAAY,CAAC,QAAgB,EAAA;QAC5B,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;;IAGxD,iBAAiB,GAAA;AAChB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;IAG7B,gBAAgB,GAAA;AACf,QAAA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAgC,KAAI;YAC9F,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;YACrC,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAuD,KAAI;gBAChG,CAAC,CAAC,eAAe,EAAE;gBACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AAC9B,aAAC,CAAC;AACH,SAAC,CAAC;;IAGH,iBAAiB,GAAA;AAChB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;;IAGrB,MAAM,GAAA;QACL,QACC,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAA,EACnG,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACF;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-tabs-item.entry.esm.js","sources":["../../../packages/core/src/components/gov-tabs/gov-tabs-item.tsx"],"sourcesContent":["import {Component, Element, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {createID} from '../../utils/string.utils'\nimport {govHost, toBoolAttrIfDefined} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {TabsClass, TabsItemClass} from './constants'\n\n@Component({\n\ttag: 'gov-tabs-item',\n})\nexport class GovTabsItem {\n\tprivate h: GovHost\n\tprivate readonly contentId: string\n\tprivate readonly triggerId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.contentId = createID('GovTabContent')\n\t\tthis.triggerId = createID('GovTabTrigger')\n\t}\n\n\t@Element() host: HTMLGovTabsItemElement\n\t/**\n\t * Custom tab item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Custom tab trigger item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly triggerIdentifier: string\n\t/**\n\t * Item name of the tab\n\t */\n\t@Prop({reflect: true}) readonly label: string\n\t/**\n\t * Item disable state\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Icon definition at the stat. Use the type/name notation\n\t */\n\t@Prop({reflect: true, attribute: 'icon-start'}) readonly iconStart: string\n\t/**\n\t * Icon definition at the end. Use the type/name notation\n\t */\n\t@Prop({reflect: true, attribute: 'icon-end'}) readonly iconEnd: string\n\t/**\n\t * Default selected tab\n\t */\n\t@Prop() readonly default: boolean = false\n\t@State() isActive = false\n\n\t@Watch('label')\n\t@Watch('disabled')\n\trerenderParent() {\n\t\tconst element = this.h.getParent(TabsClass.root) as HTMLGovTabsElement;\n\t\tif (element) {\n\t\t\telement.rerender().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TabsItemClass.root)} default={this.default}>\n\t\t\t\t<div\n\t\t\t\t\tclass={TabsItemClass.inner}\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\tid={this.identifier || this.contentId}\n\t\t\t\t\thidden={!this.isActive}\n\t\t\t\t\taria-labelledby={this.triggerIdentifier || this.triggerId}\n\t\t\t\t\taria-hidden={toBoolAttrIfDefined(!this.isActive)}\n\t\t\t\t>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns a unique tab content identifier\n\t */\n\t@Method()\n\tasync getIdentifier(): Promise<string> {\n\t\treturn this.identifier || this.contentId\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getTriggerIdentifier(): Promise<string> {\n\t\treturn this.triggerIdentifier || this.triggerId\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getDisableState(): Promise<boolean> {\n\t\treturn this.disabled\n\t}\n\n\t/**\n\t * Set status of tab-item\n\t */\n\t@Method()\n\tasync setActiveStatus(status: boolean): Promise<void> {\n\t\tthis.isActive = status\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;MASa,WAAW,GAAA,MAAA;AAKvB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAmBA;;AAEG;AAC6B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASzD;;AAEG;AACc,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChC,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;QAlCxB,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,eAAe,CAAC;AAC1C,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,eAAe,CAAC;AAC1C;IAmCD,cAAc,GAAA;AACb,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAuB;QACtE,IAAI,OAAO,EAAE;AACZ,YAAA,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;;;IAI5B,MAAM,GAAA;QACL,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAA,EACrE,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,KAAK,EAAE,aAAa,CAAC,KAAK,EAC1B,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,EACrC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,EACL,iBAAA,EAAA,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,SAAS,iBAC5C,mBAAmB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAA,EAEhD,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR,CACA;;AAIT;;AAEG;AAEH,IAAA,MAAM,aAAa,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS;;AAGzC;;AAEG;AAEH,IAAA,MAAM,oBAAoB,GAAA;AACzB,QAAA,OAAO,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,SAAS;;AAGhD;;AAEG;AAEH,IAAA,MAAM,eAAe,GAAA;QACpB,OAAO,IAAI,CAAC,QAAQ;;AAGrB;;AAEG;IAEH,MAAM,eAAe,CAAC,MAAe,EAAA;AACpC,QAAA,IAAI,CAAC,QAAQ,GAAG,MAAM;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-tabs.entry.esm.js","sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tColorType,\n\tTabColors,\n\tTabOrientationType,\n\tTabsClass,\n\tTabsItemClass,\n\tTabSizes,\n\tTabSizeType,\n\tTabType,\n\tTabTypes\n} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\nimport {booleanString, govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {hasOwnProperty} from \"../../utils/helpers.types\";\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: \"gov-tabs\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Tabs size.\n\t */\n\t@Prop() readonly size?: TabSizeType = 'm'\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly color?: ColorType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Icon and description display direction\n\t */\n\t@Prop({reflect: true}) readonly direction: 'row' | 'column' = 'row'\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TabColors, newValue, TabsClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TabSizes, newValue, TabsClass.root)\n\t}\n\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate prepareControllers(skipDefault = false): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(':scope > ' + TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\tconst iconStart = prepareIconFormat(tab.getAttribute('icon-start'))\n\t\t\t\tconst iconEnd = prepareIconFormat(tab.getAttribute('icon-end'))\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tdirection: tab.getAttribute(\"direction\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t\ticonStart,\n\t\t\t\t\ticonEnd\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tif (skipDefault === false) {\n\t\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\t} else if (this.focusIndex > -1 && hasOwnProperty(controllers, this.focusIndex)) {\n\t\t\t\tcontrollers[this.focusIndex].active = true\n\t\t\t}\n\t\t\tconst isWrongCombination = controllers.findIndex((controller) => controller.active && controller.disabled)\n\t\t\tif (isWrongCombination > -1) {\n\t\t\t\tcontrollers[isWrongCombination].active = false;\n\t\t\t\tconst firstGoodTab = controllers.findIndex((controller) => !controller.disabled)\n\t\t\t\tif (firstGoodTab > -1) {\n\t\t\t\t\tcontrollers[firstGoodTab].active = true\n\t\t\t\t\tthis.focusIndex = firstGoodTab;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tsize={this.size}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tdirection={this.direction}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs}\n\t\t\t\t\t role=\"tablist\"\n\t\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\taria-selected={booleanString(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tsize={this.size === \"xs\" ? \"xs\" : (this.size === \"s\" ? \"s\" : \"m\")}\n\t\t\t\t\t\t\t\t\t\ttype={control.active ? \"solid\" : \"outlined\"}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-start\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-end\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers(true);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;MA2Ba,OAAO,GAAA,MAAA;AAKnB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAHQ,QAAA,IAAW,CAAA,WAAA,GAA2D,EAAE;AAQhF;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAY,MAAM;AACvC;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAiB,GAAG;AACzC;;AAEG;AACc,QAAA,IAAK,CAAA,KAAA,GAAe,SAAS;AAC9C;;AAEG;AACc,QAAA,IAAW,CAAA,WAAA,GAAuB,YAAY;AAC/D;;AAEG;AAC6B,QAAA,IAAS,CAAA,SAAA,GAAqB,KAAK;AAqB1D,QAAA,IAAW,CAAA,WAAA,GAA2B,EAAE;AACxC,QAAA,IAAU,CAAA,UAAA,GAAG,CAAC;AACd,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;QA9C5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;AA6BD,IAAA,YAAY,CAAC,QAAgB,EAAA;QAC5B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC;;AAIjD,IAAA,aAAa,CAAC,QAAgB,EAAA;QAC7B,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC;;AAIlD,IAAA,YAAY,CAAC,QAAgB,EAAA;QAC5B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC;;I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AM,GAAG,CAAC,EAAE;gBAC3E,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC;AACjD,gBAAA,OAAO,CAAC,MAAM,GAAG,IAAI;gBACrB,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC;gBAC3D,IAAI,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,UAAU,EAAE;oBACjD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAwB,CAAC,QAAQ,EAAE;;qBACxE;oBACN,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,KAAK,EAAE;;gBAGpD,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;gBACxC,IAAI,CAAC,QAAQ,EAAE;AACf,gBAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC;;;;AAKpD;;AAEG;AAEH,IAAA,MAAM,OAAO,GAAA;QACZ,IAAI,CAAC,kBAAkB,EAAE;;AAG1B;;AAEG;AAEH,IAAA,MAAM,UAAU,GAAA;QACf,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,IAAI,IAAI;;AAG5C;;AAEG;IAEH,MAAM,YAAY,CAAC,UAAkB,EAAA;AACpC,QAAA,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC;QACtC,IAAI,CAAC,QAAQ,EAAE;;AAGhB;;AAEG;AAEH,IAAA,MAAM,QAAQ,GAAA;AACb,QAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-tag.entry.esm.js","sources":["../../../packages/core/src/components/gov-tag/constants.ts","../../../packages/core/src/components/gov-tag/gov-tag.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const TagSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type TagSizesType = `${ValueOf<typeof TagSizes>}`\n\nexport enum TagType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type TagTypesType = `${ValueOf<typeof TagType>}`\n\nexport const TagClass = {\n\troot: 'gov-tag',\n}\n","import {Component, Element, h, Host, Prop, Watch} from '@stencil/core'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {validateProp} from '../../helpers/Validate/props'\nimport {ButtonSizes, ButtonColors, ButtonColorType} from '../gov-button/button/constants'\nimport {TagClass, TagSizes, TagSizesType, TagTypesType} from './constants'\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\n\n@Component({\n\ttag: 'gov-tag',\n})\nexport class GovTag {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTagElement\n\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-start\"}) readonly iconStart?: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-end\"}) readonly iconEnd?: string\n\t/**\n\t * Tag’s size.\n\t */\n\t@Prop({reflect: true}) readonly size: TagSizesType = TagSizes._S\n\t/**\n\t * Style variation of the tag.\n\t */\n\t@Prop({reflect: true}) readonly color: ButtonColorType = ButtonColors.PRIMARY\n\t/**\n\t * Tag’s type\n\t */\n\t@Prop({reflect: true}) readonly type: TagTypesType\n\t/**\n\t * Expands the tag to fill 100% of the container width\n\t */\n\t@Prop({reflect: true}) readonly expanded: boolean = false\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, TagClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, TagClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\tconst iconStart = prepareIconFormat(this.iconStart)\n\t\tconst iconEnd = prepareIconFormat(this.iconEnd)\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TagClass.root)}\n\t\t\t\tcolor={this.color}\n\t\t\t\tsize={this.size}\n\t\t\t\ttype={this.type}\n\t\t\t>\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<slot name=\"icon-start\">\n\t\t\t\t\t\t{iconStart && <gov-icon type={iconStart.type} name={iconStart.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<slot name=\"icon-end\">\n\t\t\t\t\t\t{iconEnd && <gov-icon type={iconEnd.type} name={iconEnd.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;AAIO,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAGxD,IAAY,OAGX;AAHD,CAAA,UAAY,OAAO,EAAA;AAClB,IAAA,OAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,OAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAHW,OAAO,KAAP,OAAO,GAGlB,EAAA,CAAA,CAAA;AAGM,MAAM,QAAQ,GAAG;AACvB,IAAA,IAAI,EAAE,SAAS;CACf;;MCJY,MAAM,GAAA,MAAA;AAGlB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAcA;;AAEG;AAC6B,QAAA,IAAA,CAAA,IAAI,GAAiB,QAAQ,CAAC,EAAE;AAChE;;AAEG;AAC6B,QAAA,IAAA,CAAA,KAAK,GAAoB,Y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,0CAAA,EAAA,CAAA,EACP,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,UAAU,EAAA,EACnB,OAAO,IAAI,CAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,GAAa,CACnE,CACD,CACD;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-tile.entry.esm.js","sources":["../../../packages/core/src/components/gov-tile/constants.ts","../../../packages/core/src/components/gov-tile/gov-tile.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const TileSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type TileSizesType = `${ValueOf<typeof TileSizes>}`\n\nexport const TileClass = {\n\troot: 'gov-tile',\n\tlink: 'gov-tile__link',\n\tcontent: 'gov-tile__content',\n\ttext: 'gov-tile__text',\n\ttitle: 'gov-tile__title',\n\ticon: 'gov-tile__icon',\n\tannotation: 'gov-tile__annotation',\n}\n","import {Component, Element, Fragment, h, Host, Method, Prop} from \"@stencil/core\"\nimport {TileClass, TileSizesType} from \"./constants\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {ButtonTargetType} from \"../gov-button/button/constants\"\n\n@Component({\n\ttag: \"gov-tile\",\n})\nexport class GovTile {\n\t@Element() host: HTMLGovTileElement\n\t/**\n\t * Tile’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: TileSizesType = \"m\"\n\t/**\n\t * Style variation of the tile.\n\t */\n\t@Prop() readonly orientation: \"vertical\" | \"horizontal\"\n\t/**\n\t * Tiles border\n\t */\n\t@Prop({ attribute: 'no-border' }) readonly noBorder: boolean = false\n\t/**\n\t * Link on whole tile\n\t */\n\t@Prop({reflect: true}) readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\tprivate triggerRef?: HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TileClass.root)}\n\t\t\t\t size={this.size}\n\t\t\t\t orientation={this.orientation}\n\t\t\t\t clickable={this.href ? true : null}\n\t\t\t>\n\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t<div class={TileClass.content}>\n\t\t\t\t\t<div class={TileClass.text}>\n\t\t\t\t\t\t<div class={TileClass.title}>\n\t\t\t\t\t\t\t{this.href ? (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\thref={this.href}\n\t\t\t\t\t\t\t\t\t\ttarget={this.target}\n\t\t\t\t\t\t\t\t\t\tclass={TileClass.link}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLSpanElement)}>\n\t\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t<span class={TileClass.icon}>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name=\"chevron-right\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={`${TileClass.annotation} ${this.href ? `${TileClass.annotation}--padding` : ''}`}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot name=\"button\"/>\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 @@
|
|
|
1
|
+
{"version":3,"file":"gov-toast.entry.esm.js","sources":["../../../packages/core/src/components/gov-toast/constants.ts","../../../packages/core/src/components/gov-toast/gov-toast.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const ToastColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ToastColorType = `${ValueOf<typeof ToastColors>}`\n\nexport enum ToastType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type ToastTypesType = `${ValueOf<typeof ToastType>}`\n\nexport const ToastClass = {\n\troot: 'gov-toast',\n\thidden: 'gov-toast--hidden',\n\tcontent: 'gov-toast__content',\n\ticon: 'gov-toast__icon',\n\tclose: 'gov-toast__close',\n\ttimer: 'gov-toast__timer',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {ToastClass, ToastColors, ToastColorType, ToastTypesType} from \"./constants\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {createID} from \"../../utils/string.utils\"\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-toast\",\n})\nexport class GovToast {\n\tprivate h: GovHost\n\tprivate timeout\n\tprivate readonly toastId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.toastId = createID(\"GovToast\")\n\t}\n\n\t@Element() host: HTMLGovToastElement\n\t/**\n\t * Style variation of the toast message.\n\t */\n\t@Prop() readonly color?: ToastColorType = \"primary\"\n\n\t/**\n\t * Toast’s gravity\n\t */\n\t@Prop() readonly gravity: \"top\" | \"bottom\" = \"top\"\n\t/**\n\t * Toast’s position\n\t */\n\t@Prop() readonly position: \"left\" | \"center\" | \"right\" = \"right\"\n\t/**\n\t * Toast type\n\t */\n\t@Prop() readonly type?: ToastTypesType = \"bold\"\n\t/**\n\t * Number of milliseconds to wait before Toast disappear\n\t */\n\t@Prop() readonly time: number = 0\n\t/**\n\t * Closing button texting instead of icons\n\t */\n\t@Prop({attribute: \"close-label\"}) readonly closeLabel: string\n\t/**\n\t * Aria label for the closing button. It is mandatory if the alert is closable\n\t */\n\t@Prop({attribute: \"accessible-close-label\"}) readonly accessibleCloseLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({eventName: \"gov-close\"}) govClose: EventEmitter<string>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ToastColors, newValue, ToastClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.runTimer()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\n\tdisconnectedCallback() {\n\t\tclearTimeout(this.timeout)\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate runTimer() {\n\t\tif (this.isTimer) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.classList.add(ToastClass.hidden)\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.destroy().catch()\n\t\t\t\t\tthis.govClose.emit(this.toastId)\n\t\t\t\t}, 600)\n\t\t\t}, this.time)\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(ToastClass.root)}\n\t\t\t\tdata-toast-id={this.toastId}\n\t\t\t\tgravity={this.gravity}\n\t\t\t\tposition={this.position}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tstyle={{\"--toast-duration\": this.time + \"ms\"}}\n\t\t\t>\n\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t<span class={ToastClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t<div class={ToastClass.content} {...this.inheritedAttributes} aria-live=\"polite\" role=\"status\">\n\t\t\t\t\t<slot/>\n\t\t\t\t</div>\n\n\t\t\t\t<gov-button\n\t\t\t\t\tsize=\"s\"\n\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\tcolor={this.isBold ? this.color : \"neutral\"}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\tclass={ToastClass.close}\n\t\t\t\t>\n\t\t\t\t\t{this.closeLabel ? this.closeLabel : <gov-icon name=\"x-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t</gov-button>\n\n\t\t\t\t<div class={ToastClass.timer}></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(): void {\n\t\tthis.govClose.emit(this.toastId)\n\t\tthis.destroy().catch()\n\t}\n\n\tget isBold(): boolean {\n\t\treturn this.type === \"bold\"\n\t}\n\n\tget isTimer(): boolean {\n\t\treturn Number.isInteger(this.time) && this.time > 0\n\t}\n\n\t/**\n\t * Remove toast from dom\n\t */\n\t@Method()\n\tasync destroy(): Promise<void> {\n\t\tclearTimeout(this.timeout)\n\t\tconst toast = document.querySelector(`[data-toast-id=\"${this.toastId}\"]`)\n\t\tif (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,UAAU,EAAE;gBACvC,KAAK,CAAC,MAAM,EAAE;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-tooltip.gov-tooltip-content.entry.esm.js","sources":["../../../packages/core/src/components/gov-tooltip/constants.tsx","../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx","../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { Sizes } from '../../core/constants/sizes'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const TooltipColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type TooltipColorType = `${ValueOf<typeof TooltipColors>}`\n\nexport const TooltipSize = pick(Sizes, ['_S', '_M', '_L'])\nexport type TooltipSizeType = `${ValueOf<typeof TooltipSize>}`\n\nexport enum TooltipPosition {\n\tTOP = 'top',\n\tRIGHT = 'right',\n\tBOTTOM = 'bottom',\n\tLEFT = 'left',\n}\nexport type TooltipPositionType = `${ValueOf<typeof TooltipPosition>}`\n\nexport const TooltipClass = {\n\troot: 'gov-tooltip',\n}\n\nexport const TooltipContentClass = {\n\troot: 'gov-tooltip-content',\n}\n","import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop({mutable: true}) position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.resizeObserver?.disconnect()\n\t\tthis.resizeObserver = undefined\n\t\twindow.removeEventListener(\"resize\", this.reposition)\n\t\tthis.repositionListenersAttached = false\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message != null) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"message\", this.message)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tif (this.message != null) {\n\t\t\t\tcontent.setAttribute(\"message\", this.message)\n\t\t\t}\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate resizeObserver?: ResizeObserver\n\tprivate repositionListenersAttached = false\n\tprivate readonly reposition = () => {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.verifyPositionSpace()\n\t\t}\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t\tif (!this.repositionListenersAttached) {\n\t\t\t\tthis.repositionListenersAttached = true\n\t\t\t\tif (typeof ResizeObserver !== \"undefined\") {\n\t\t\t\t\tthis.resizeObserver = new ResizeObserver(this.reposition)\n\t\t\t\t\tthis.resizeObserver.observe(this.tooltipContent)\n\t\t\t\t}\n\t\t\t\twindow.addEventListener(\"resize\", this.reposition)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\n\t\t}\n\t\tthis.resizeObserver?.disconnect()\n\t\tthis.resizeObserver = undefined\n\t\twindow.removeEventListener(\"resize\", this.reposition)\n\t\tthis.repositionListenersAttached = false\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}>\n\t\t\t\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipColors, TooltipColorType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\t/**\n\t * Tooltip text. When set, renders the HTML message; otherwise the default `<slot/>` is used.\n\t */\n\t@Prop({ attribute: \"message\", mutable: true }) message?: string\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t{this.message\n\t\t\t\t\t? <span class=\"gov-tooltip-content__message\" innerHTML={this.message}></span>\n\t\t\t\t\t: <slot></slot>}\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}>\n\t\t\t\t\t\t<gov-icon slot={\"icon-start\"} name={\"x-lg\"} type={\"components\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;AAKO,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAG1D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAG1D,IAAY,eAKX;AALD,CAAA,UAAY,eAAe,EAAA;AAC1B,IAAA,eAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACd,CAAC,EALW,eAAe,KAAf,eAAe,GAK1B,EAAA,CAAA,CAAA;AAGM,MAAM,YAAY,GAAG;AAC3B,IAAA,IAAI,EAAE,aAAa;CACnB;AAEM,MAAM,mBAAmB,GAAG;AAClC,IAAA,IAAI,EAAE,qBAAq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,EAAA,GAAA,EAAA,0CAAA,EACJ,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAC/B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,EAAA,aAAA,EACV,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAC5B,YAAA,EAAA,IAAI,CAAC,SAAS,EAAA,EACzB,IAAI,CAAC;AACL,cAAE,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,8BAA8B,EAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAS;AAC7E,cAAE,CAAa,CAAA,MAAA,EAAA,IAAA,CAAA,EACf,IAAI,CAAC,OAAO,IACZ,CACe,CAAA,YAAA,EAAA,EAAA,cAAA,EAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EACzC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,MAAM,EAAA,EACZ,CAAU,CAAA,UAAA,EAAA,EAAA,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAa,CAAA,CAC/D,IACV,IAAI,CACF;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-wizard-item.entry.esm.js","sources":["../../../packages/core/src/components/gov-wizard/gov-wizard-item.tsx"],"sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardColors, WizardColorType, WizardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizardItemEvent } from \"./gov-wizard-item.types\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizard-item\",\n})\nexport class GovWizardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizardItem\")\n\t\tthis.contentId = createID(\"GovWizardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: WizardColorType = \"primary\"\n\t/**\n\t * Size of wizard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Makes the wizard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by button\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizardItemEvent>\n\n\t@Watch(\"color\")\n\tprivate validateColor(newValue: string): void {\n\t\tvalidateProp(WizardColors, newValue, WizardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizardItemClass.root)}\n\t\t\t\t is-expanded={this.isExpanded}\n\t\t\t\t color={this.color}\n\t\t\t\t size={this.size}\n\t\t\t\t role=\"listitem\"\n\t\t\t\t collapsible={this.collapsible}\n\t\t\t\t hydrated={this.hydrated}>\n\t\t\t\t<div class={WizardItemClass.header}>\n\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={this.h.classes(WizardItemClass.label)}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class={WizardItemClass.headline}>\n\t\t\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.chevron} name=\"chevron-down\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"annotation\"/>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Tag class={this.h.classes(WizardItemClass.label)}>\n\t\t\t\t\t\t\t<span class={WizardItemClass.headline}>\n\t\t\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.chevron} name=\"chevron-down\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"annotation\"/>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizardItemClass.content}\n\t\t\t\t\t\t aria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\t hidden={!this.isExpanded}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the Wizard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;AAQA,IAAK,IAGJ;AAHD,CAAA,UAAK,IAAI,EAAA;AACR,IAAA,IAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,IAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,GAGR,EAAA,CAAA,CAAA;MAKY,aAAa,GAAA,MAAA;AAMzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAFQ,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AASxB;;AAEG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E;;AAGnB;;AAEG;AAEI,IAAA,MAAM,KAAK,GAAA;AACjB,QAAA,IAAI,CAAC,UAAU,GAAG,KAAK;QACvB,IAAI,CAAC,WAAW,EAAE;;AAGnB;;AAEG;AAEI,IAAA,MAAM,MAAM,GAAA;AAClB,QAAA,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU;QAClC,IAAI,CAAC,WAAW,EAAE;;AAGnB;;AAEG;AAEI,IAAA,MAAM,YAAY,GAAA;QACxB,OAAO,IAAI,CAAC,UAAU;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-wizard.entry.esm.js","sources":["../../../packages/core/src/components/gov-wizard/gov-wizard.tsx"],"sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizes, WizardSizesType, WizardClass, WizardItemClass } from \"./constants\"\nimport { GovWizardItemChangeEvent } from \"./gov-wizard-item.d\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateAccessibleLabel } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\n\n@Component({\n\ttag: \"gov-wizard\",\n})\nexport class GovWizard {\n\tprivate h: GovHost\n\tprivate hydrated = false\n\n\t@Element() readonly host: HTMLGovWizardElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t/**\n\t * Size of wizard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Adds accessible label for the wizard that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-label\" }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Called when the wizard children state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<GovWizardItemChangeEvent>\n\n\t@Watch(\"size\")\n\tprivate validateSize(newValue: string): void {\n\t\tvalidateProp(WizardSizes, newValue, WizardClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(WizardItemClass.root).forEach((child: HTMLGovWizardItemElement) => {\n\t\t\tchild.setAttribute(\"size\", this.size)\n\t\t\t/*\n\t\t\tchild.addEventListener('gov-change', (e: GovWizardItemCustomEvent<GovWizardItemChangeEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit(e.detail)\n\t\t\t})\n\t\t\t*/\n\t\t})\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\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizardClass.root)} role=\"list\" size={this.size} hydrated={this.hydrated}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tpublic async validateWcag(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.wcagLabel, this.wcagLabelledBy, WizardClass.root)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MAaa,SAAS,GAAA,MAAA;AAMrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAJQ,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAQxB;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAqB,GAAG;QAN5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;AAoBO,IAAA,YAAY,CAAC,QAAgB,EAAA;QACpC,YAAY,CAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC;;IAGtD,iBAAiB,GAAA;AAChB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;IAG7B,gBAAgB,GAAA;AACf,QAAA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAA+B,KAAI;YAC5F,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;AACrC;;;;;AAKE;AACH,SAAC,CAAC;;AAGH,IAAA,MAAM,kBAAkB,GAAA;QACvB,IAAI,uBAAuB,EAAE,EAAE;AAC9B,YAAA,MAAM,KAAK,CAAC,GAAG,CAAC;AAChB,YAAA,MAAM,IAAI,CAAC,YAAY,EAAE;;;IAI3B,iBAAiB,GAAA;AAChB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;;IAGrB,MAAM,GAAA;QACL,QACC,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAA,EAClG,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACF;;AAIT;;AAEG;AAEI,IAAA,MAAM,YAAY,GAAA;AACxB,QAAA,uBAAuB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.esm.js","sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = async (win, options) => {\n if (typeof window === 'undefined') return undefined;\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"names":[],"mappings":";;;;AAGY,MAAC,oBAAoB,GAAG,OAAO,GAAG,EAAE,OAAO,KAAK;AAC5D,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,SAAS;AACrD,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as s,H as e,g as i,c as n}from"./p-ClISz4NF.js";import{S as o}from"./p-BcQO4NH2.js";import{g as a}from"./p-CoD1xawt.js";import{p as r}from"./p-CQvUntGY.js";import{C as c}from"./p-U40vKHrs.js";import{i as h,a as l,b as f}from"./p-CgDnDrq5.js";import{v as d}from"./p-NOJjz9dT.js";const u={root:"gov-flex"};const m=class{constructor(s){t(this,s);this.direction="row";this.responsive="true";this.h=a(this.host)}render(){return s(e,{key:"a6d1aed0cf8fd8c94ef83821d142756943bc55f3",class:this.h.classes(u.root)},s("slot",{key:"34551ed862ff8384c3eade0d12762847772a0331"}))}get host(){return i(this)}};r(o,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const p=r(c,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var v;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(v||(v={}));const g={root:"gov-icon"};const w="4.6.5";const b=()=>w;const _={};const y={};const S=t=>t.startsWith("http://")||t.startsWith("https://");const C=(t,s,e)=>{if(S(t)){return`${t}/${e}/${s}.svg?v=${b()}`}return`${t}/${e}/${s}.svg`+`?v=${b()}`};async function k({name:t,type:s}){const e=s+"-"+t;if(_[e]){return _[e]}if(!y[e]){y[e]=fetch(C(h(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const i=await y[e];_[e]=i;return i}const L=(t,s,e)=>{if(!l){return}let i="";document.cookie=`${t}=${encodeURIComponent(s)}${i}; path=/`};const D=t=>{if(!l){return null}const s=t+"=";const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let i=e[t].trim();if(i.startsWith(s)){return decodeURIComponent(i.substring(s.length))}}return null};const I=t=>{try{const s=new DOMParser;const e=s.parseFromString(t,"image/svg+xml");const i=e.querySelector("parsererror");if(i){return false}const n=e.documentElement;if(n.tagName.toLowerCase()!=="svg"){return false}return true}catch(t){return false}};const $=class{constructor(s){t(this,s);this.name=null;this.type="components";this.visible=false;this.error=false;this.h=a(this.host)}validateSize(t){d(o,t,g.root)}validateColor(t){d(p,t,g.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(f()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const e=await k({name:t,type:s});const i=I(e);this.host.innerHTML=i?e:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return s(e,{class:this.h.classes(g.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return i(this)}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}};const j=r(o,["_XS","_S","_M","_L","_XL"]);const z={root:"gov-theme-switch",indicator:"gov-theme-switch__indicator",label:"gov-theme-switch__label",iconLight:"gov-theme-switch__icon-light",iconDark:"gov-theme-switch__icon-dark"};const R="data-theme";var E;(function(t){t["auto"]="auto";t["light"]="light";t["dark"]="dark"})(E||(E={}));const x=class{constructor(s){t(this,s);this.govChange=n(this,"gov-change");this.size="m";this.displayLabel=false;this.ariaLabelLight="Přepnout na tmavý mód";this.ariaLabelDark="Přepnout na světlý mód";this.labelLight="Světlý mód";this.labelDark="Tmavý mód";this.theme=E.auto;this.setThemeState=t=>{this.theme=t;this.govChange.emit({component:z.root,state:this.theme,ref:this.host})};this.h=a(this.host)}validateSize(t){d(j,t,z.root)}watchTheme(t){this.htmlElement.setAttribute(R,t);this.htmlElement.classList.remove(...Object.keys(E));this.htmlElement.classList.add(t);L(R,t)}get storageValue(){return D(R)}get htmlElement(){return document.documentElement}get isSystemPrefersColorDark(){return l&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}componentWillLoad(){this.initDefaultState();this.validateSize(this.size)}initDefaultState(){const t=Object.keys(E);let s=this.storageValue;const e=this.htmlElement.getAttribute(R);if(s&&t.includes(s)){this.theme=s}else if(e&&t.includes(e)){this.theme=e}else{this.theme=E.auto}}render(){let t=this.theme===E.dark;if(this.theme===E.auto){t=this.isSystemPrefersColorDark}return s(e,{key:"3015dd1049b1c9a2b5902d1d56c8b3872a275c10",class:this.h.classes(z.root),theme:t?E.dark:E.light,size:this.size},s("button",{key:"ca4b331189fca45f66c4eef138db66482add2834",onClick:()=>this.setThemeState(t?E.light:E.dark),"aria-current":this.theme,"aria-label":t?this.ariaLabelDark:this.ariaLabelLight},s("span",{key:"ed2a779f1e9fe1a0e722439598c9a413e9b39071"},s("span",{key:"f58e164a6b1b389ecfe93f7d2673ea5749a8fd96",class:z.indicator},E.light&&s("gov-icon",{key:"24663f2d33ea2bead59df37fef9932e549070ce4",name:"sun",class:z.iconLight,type:"components"}),E.dark&&s("gov-icon",{key:"a4482c64c35b9c70122a687aca4bb90bfa1000f3",name:"moon",class:z.iconDark,type:"components"})),this.displayLabel?s("span",{class:z.label},t?this.labelDark:this.labelLight):null)))}get host(){return i(this)}static get watchers(){return{size:["validateSize"],theme:["watchTheme"]}}};export{m as gov_flex,$ as gov_icon,x as gov_theme_switch};
|
|
2
|
+
//# sourceMappingURL=p-002e72bf.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FlexClass","root","GovFlex","constructor","hostRef","this","direction","responsive","h","govHost","host","render","Host","key","class","classes","pick","Sizes","IconColors","Colors","Types","IconClass","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","setCookie","value","days","isWindow","expires","document","cookie","encodeURIComponent","getCookie","nameEQ","cookies","split","i","length","trim","decodeURIComponent","substring","isValidSVG","svgContent","parser","DOMParser","doc","parseFromString","parseError","querySelector","svgElement","documentElement","tagName","toLowerCase","error","GovIcon","visible","validateSize","newValue","validateProp","validateColor","loadIconPathData","loadIcon","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","size","color","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","data","isValid","innerHTML","e","ThemeSwitchSizes","ThemeSwitchClass","indicator","label","iconLight","iconDark","ATTRIBUTE_THEME_NAME","ThemeList","GovThemeSwitch","displayLabel","ariaLabelLight","ariaLabelDark","labelLight","labelDark","theme","auto","setThemeState","state","govChange","emit","component","ref","watchTheme","htmlElement","setAttribute","classList","remove","Object","keys","add","storageValue","isSystemPrefersColorDark","matchMedia","matches","initDefaultState","options","currentState","htmlState","getAttribute","includes","isDark","dark","light","onClick"],"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({reflect: true}) 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\t/**\n\t * Option to turn off responsive\n\t */\n\t@Prop({reflect: true}) readonly responsive: string = \"true\"\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 {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 if (isExternalUrl(path)) {\n return `${path}/${type}/${name}.svg?v=${dsVersion()}`\n }\n return `${path}/${type}/${name}.svg` + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({name, type}: { name: string; type: string }): Promise<string> {\n const cacheKey = type + \"-\" + name\n if (iconCache[cacheKey]) {\n return iconCache[cacheKey]\n }\n\n if (!requestCache[cacheKey]) {\n requestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n if (resp.status === 200) {\n return resp.text()\n } else {\n throw new Error(\"Gov Icon doesn't exists\")\n }\n })\n }\n const path = await requestCache[cacheKey]\n iconCache[cacheKey] = path\n return 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\tlabel: 'gov-theme-switch__label',\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řepnout 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 ? (\n\t\t\t\t\t\t\t<span class={ThemeSwitchClass.label}>\n\t\t\t\t\t\t\t\t{isDark ? this.labelDark : this.labelLight}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : null\n\t\t\t\t\t\t}\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"],"mappings":"sSAMO,MAAMA,EAAY,CACxBC,KAAM,Y,MCCMC,EAAO,MAGnB,WAAAC,CAAAC,G,UASuBC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H,MAAQuB,C,KACP,CACNvI,KAAKgH,MAAQP,EAAUQ,I,EAczB,MAAA3G,GACC,IAAIoI,EAAS1I,KAAKgH,QAAUP,EAAUkC,KACtC,GAAI3I,KAAKgH,QAAUP,EAAUQ,KAAM,CAClCyB,EAAS1I,KAAKiI,wB,CAEf,OACC9H,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOT,KAAKG,EAAEO,QAAQyF,EAAiBvG,MAC1CoH,MAAO0B,EAASjC,EAAUkC,KAAOlC,EAAUmC,MAC3CzD,KAAMnF,KAAKmF,MACbhF,EAAA,UAAAK,IAAA,2CAAQqI,QAAS,IAAM7I,KAAKkH,cAAcwB,EAASjC,EAAUmC,MAAQnC,EAAUkC,MAAK,eACpE3I,KAAKgH,MAAK,aACZ0B,EAAS1I,KAAK6G,cAAgB7G,KAAK4G,gBAChDzG,EAAA,QAAAK,IAAA,4CACCL,EAAA,QAAAK,IAAA,2CAAMC,MAAO0F,EAAiBC,WAC5BK,EAAUmC,OAASzI,EAAA,YAAAK,IAAA,2CAAUiB,KAAK,MAAMhB,MAAO0F,EAAiBG,UAAW5E,KAAK,eAChF+E,EAAUkC,MAAQxI,EAAA,YAAAK,IAAA,2CAAUiB,KAAK,OAAOhB,MAAO0F,EAAiBI,SAAU7E,KAAK,gBAEhF1B,KAAK2G,aACLxG,EAAA,QAAMM,MAAO0F,EAAiBE,OAC5BqC,EAAS1I,KAAK+G,UAAY/G,KAAK8G,YAE7B,O","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["FlexClass","root","GovFlex","constructor","hostRef","this","direction","responsive","h","govHost","host","render","Host","key","class","classes","pick","Sizes","IconColors","Colors","Types","IconClass","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","setCookie","value","days","isWindow","expires","document","cookie","encodeURIComponent","getCookie","nameEQ","cookies","split","i","length","trim","decodeURIComponent","substring","isValidSVG","svgContent","parser","DOMParser","doc","parseFromString","parseError","querySelector","svgElement","documentElement","tagName","toLowerCase","error","GovIcon","visible","validateSize","newValue","validateProp","validateColor","loadIconPathData","loadIcon","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","size","color","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","data","isValid","innerHTML","e","ThemeSwitchSizes","ThemeSwitchClass","indicator","label","iconLight","iconDark","ATTRIBUTE_THEME_NAME","ThemeList","GovThemeSwitch","displayLabel","ariaLabelLight","ariaLabelDark","labelLight","labelDark","theme","auto","setThemeState","state","govChange","emit","component","ref","watchTheme","htmlElement","setAttribute","classList","remove","Object","keys","add","storageValue","isSystemPrefersColorDark","matchMedia","matches","initDefaultState","options","currentState","htmlState","getAttribute","includes","isDark","dark","light","onClick"],"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({reflect: true}) 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\t/**\n\t * Option to turn off responsive\n\t */\n\t@Prop({reflect: true}) readonly responsive: string = \"true\"\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 {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 if (isExternalUrl(path)) {\n return `${path}/${type}/${name}.svg?v=${dsVersion()}`\n }\n return `${path}/${type}/${name}.svg` + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({name, type}: { name: string; type: string }): Promise<string> {\n const cacheKey = type + \"-\" + name\n if (iconCache[cacheKey]) {\n return iconCache[cacheKey]\n }\n\n if (!requestCache[cacheKey]) {\n requestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n if (resp.status === 200) {\n return resp.text()\n } else {\n throw new Error(\"Gov Icon doesn't exists\")\n }\n })\n }\n const path = await requestCache[cacheKey]\n iconCache[cacheKey] = path\n return 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\tlabel: 'gov-theme-switch__label',\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řepnout 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 ? (\n\t\t\t\t\t\t\t<span class={ThemeSwitchClass.label}>\n\t\t\t\t\t\t\t\t{isDark ? this.labelDark : this.labelLight}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : null\n\t\t\t\t\t\t}\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"],"mappings":"sSAMO,MAAMA,EAAY,CACxBC,KAAM,Y,MCCMC,EAAO,MAGnB,WAAAC,CAAAC,G,UASuBC,KAASC,UAAyD,MAkDzDD,KAAUE,WAAW,OA1DpDF,KAAKG,EAAIC,EAAQJ,KAAKK,KACtB,CA2DD,MAAAC,GACC,OACCH,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOT,KAAKG,EAAEO,QAAQf,EAAUC,OACrCO,EAAa,QAAAK,IAAA,6C,6BCtEQG,EAAKC,EAAO,CAAC,MAAO,KAAM,KAAM,KAAM,MAAO,OAAQ,OAAQ,OAAQ,SAGvF,MAAMC,EAAaF,EAAKG,EAAQ,CACtC,UACA,UACA,YACA,UACA,QACA,UACA,UACA,WACA,QACA,UAID,IAAKC,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,qBACAA,EAAA,oBACA,EAJD,CAAKA,MAIJ,KAGM,MAAMC,EAAY,CACxBpB,KAAM,Y,gBC5BA,MAAMqB,EAAY,IACjBC,ECAR,MAAMC,EAAuC,GAC7C,MAAMC,EAAmD,GAEzD,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