@gov-design-system-ce/components 4.6.4 → 4.6.5-b
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/cjs/gov-form-file.cjs.entry.js +35 -11
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-file.entry.cjs.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +7 -2
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/utils/file.utils.js +28 -9
- package/dist/collection/utils/file.utils.js.map +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-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-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-file.js.map +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-ibUK7mfI.js → p-BGK46VRO.js} +2 -2
- package/dist/components/{p-iTwUkISB.js → p-BICk4EuO.js} +2 -2
- package/dist/components/{p-DN5pb9xA.js → p-BNoNH6m-.js} +2 -2
- package/dist/components/{p-C_URF9Su.js → p-ClDhNt_H.js} +2 -2
- package/dist/components/p-DRXiDAHW.js +2 -0
- package/dist/components/{p-CXPP9vec.js.map → p-DRXiDAHW.js.map} +1 -1
- package/dist/components/{p-pJ_vPAO0.js → p-DjGO_trZ.js} +2 -2
- package/dist/components/{p-yIpIIG5A.js → p-DmK9qaKH.js} +2 -2
- package/dist/components/{p-DEthsMuE.js → p-isPjiQbr.js} +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-3314505d.entry.js → p-00ab0454.entry.js} +2 -2
- package/dist/core/{p-3314505d.entry.js.map → p-00ab0454.entry.js.map} +1 -1
- package/dist/core/{p-9d9e9401.entry.js → p-05bb35e1.entry.js} +2 -2
- package/dist/core/{p-9d9e9401.entry.js.map → p-05bb35e1.entry.js.map} +1 -1
- package/dist/core/{p-e30968b3.entry.js → p-06497d64.entry.js} +2 -2
- package/dist/core/{p-e30968b3.entry.js.map → p-06497d64.entry.js.map} +1 -1
- package/dist/core/p-0675617d.entry.js +2 -0
- package/dist/core/{p-fca7a0d6.entry.js.map → p-0675617d.entry.js.map} +1 -1
- package/dist/core/{p-4d36cd18.entry.js → p-2493a7f3.entry.js} +2 -2
- package/dist/core/{p-4d36cd18.entry.js.map → p-2493a7f3.entry.js.map} +1 -1
- package/dist/core/p-2e15a654.entry.js +2 -0
- package/dist/core/{p-bd2df430.entry.js.map → p-2e15a654.entry.js.map} +1 -1
- package/dist/core/{p-1626cc67.entry.js → p-30ad7514.entry.js} +2 -2
- package/dist/core/{p-1626cc67.entry.js.map → p-30ad7514.entry.js.map} +1 -1
- package/dist/core/{p-558e75a6.entry.js → p-378cf8de.entry.js} +2 -2
- package/dist/core/{p-558e75a6.entry.js.map → p-378cf8de.entry.js.map} +1 -1
- package/dist/core/{p-be9af807.entry.js → p-3a4799b3.entry.js} +2 -2
- package/dist/core/{p-be9af807.entry.js.map → p-3a4799b3.entry.js.map} +1 -1
- package/dist/core/{p-f7bdb44a.entry.js → p-3ebbe75a.entry.js} +2 -2
- package/dist/core/{p-f7bdb44a.entry.js.map → p-3ebbe75a.entry.js.map} +1 -1
- package/dist/core/p-41bef63a.entry.js +2 -0
- package/dist/core/{p-bec959c4.entry.js.map → p-41bef63a.entry.js.map} +1 -1
- package/dist/core/{p-4e2faea7.entry.js → p-4342c252.entry.js} +2 -2
- package/dist/core/{p-4e2faea7.entry.js.map → p-4342c252.entry.js.map} +1 -1
- package/dist/core/{p-c1b9f1ab.entry.js → p-473afd7d.entry.js} +2 -2
- package/dist/core/{p-c1b9f1ab.entry.js.map → p-473afd7d.entry.js.map} +1 -1
- package/dist/core/{p-5721cf9b.entry.js → p-48b74272.entry.js} +2 -2
- package/dist/core/{p-5721cf9b.entry.js.map → p-48b74272.entry.js.map} +1 -1
- package/dist/core/{p-04ec45ab.entry.js → p-49b67f59.entry.js} +2 -2
- package/dist/core/{p-04ec45ab.entry.js.map → p-49b67f59.entry.js.map} +1 -1
- package/dist/core/{p-6b44890d.entry.js → p-4bd3f101.entry.js} +2 -2
- package/dist/core/{p-6b44890d.entry.js.map → p-4bd3f101.entry.js.map} +1 -1
- package/dist/core/{p-157a1636.entry.js → p-4e534d68.entry.js} +2 -2
- package/dist/core/{p-157a1636.entry.js.map → p-4e534d68.entry.js.map} +1 -1
- package/dist/core/p-6638d034.entry.js +2 -0
- package/dist/core/{p-73bd93f9.entry.js.map → p-6638d034.entry.js.map} +1 -1
- package/dist/core/{p-46824842.entry.js → p-68a5d225.entry.js} +2 -2
- package/dist/core/{p-46824842.entry.js.map → p-68a5d225.entry.js.map} +1 -1
- package/dist/core/{p-8d47e346.entry.js → p-6ac9b0f2.entry.js} +2 -2
- package/dist/core/{p-8d47e346.entry.js.map → p-6ac9b0f2.entry.js.map} +1 -1
- package/dist/core/{p-0af96cc0.entry.js → p-6b0625ee.entry.js} +2 -2
- package/dist/core/{p-0af96cc0.entry.js.map → p-6b0625ee.entry.js.map} +1 -1
- package/dist/core/{p-f75ad657.entry.js → p-78202a44.entry.js} +2 -2
- package/dist/core/{p-f75ad657.entry.js.map → p-78202a44.entry.js.map} +1 -1
- package/dist/core/{p-eb766437.entry.js → p-80052953.entry.js} +2 -2
- package/dist/core/{p-eb766437.entry.js.map → p-80052953.entry.js.map} +1 -1
- package/dist/core/{p-d43959a0.entry.js → p-8ddb6dc6.entry.js} +2 -2
- package/dist/core/{p-d43959a0.entry.js.map → p-8ddb6dc6.entry.js.map} +1 -1
- package/dist/core/{p-d9c574f0.entry.js → p-90cc2ddb.entry.js} +2 -2
- package/dist/core/{p-d9c574f0.entry.js.map → p-90cc2ddb.entry.js.map} +1 -1
- package/dist/core/{p-f3887d6d.entry.js → p-91d5df66.entry.js} +2 -2
- package/dist/core/{p-f3887d6d.entry.js.map → p-91d5df66.entry.js.map} +1 -1
- package/dist/core/{p-187c0eda.entry.js → p-9321fb9d.entry.js} +2 -2
- package/dist/core/{p-187c0eda.entry.js.map → p-9321fb9d.entry.js.map} +1 -1
- package/dist/core/p-943a58b2.entry.js +2 -0
- package/dist/core/{p-33209782.entry.js.map → p-943a58b2.entry.js.map} +1 -1
- package/dist/core/p-B6CqPcY_.js.map +1 -1
- package/dist/core/p-B8TR1oqt.js +3 -0
- package/dist/core/p-B8TR1oqt.js.map +1 -0
- 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-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-a4fa2ffc.entry.js +2 -0
- package/dist/core/{p-c4734357.entry.js.map → p-a4fa2ffc.entry.js.map} +1 -1
- package/dist/core/{p-511eed88.entry.js → p-a6f27583.entry.js} +2 -2
- package/dist/core/{p-511eed88.entry.js.map → p-a6f27583.entry.js.map} +1 -1
- package/dist/core/p-a7c322a7.entry.js +2 -0
- package/dist/core/{p-abb7780e.entry.js.map → p-a7c322a7.entry.js.map} +1 -1
- package/dist/core/{p-6d2ce4c7.entry.js → p-ab367b0c.entry.js} +2 -2
- package/dist/core/{p-6d2ce4c7.entry.js.map → p-ab367b0c.entry.js.map} +1 -1
- package/dist/core/{p-c6b55c0a.entry.js → p-ac81cdf6.entry.js} +2 -2
- package/dist/core/{p-c6b55c0a.entry.js.map → p-ac81cdf6.entry.js.map} +1 -1
- package/dist/core/{p-a2c61d50.entry.js → p-ad9227b3.entry.js} +2 -2
- package/dist/core/{p-a2c61d50.entry.js.map → p-ad9227b3.entry.js.map} +1 -1
- package/dist/core/{p-d9d29f50.entry.js → p-af2bd9d3.entry.js} +2 -2
- package/dist/core/{p-d9d29f50.entry.js.map → p-af2bd9d3.entry.js.map} +1 -1
- package/dist/core/{p-70b5555f.entry.js → p-b0d4d6bd.entry.js} +2 -2
- package/dist/core/{p-70b5555f.entry.js.map → p-b0d4d6bd.entry.js.map} +1 -1
- package/dist/core/p-b181f85f.entry.js +2 -0
- package/dist/core/{p-57ca8ac7.entry.js.map → p-b181f85f.entry.js.map} +1 -1
- package/dist/core/{p-5305e82e.entry.js → p-b2648255.entry.js} +2 -2
- package/dist/core/{p-5305e82e.entry.js.map → p-b2648255.entry.js.map} +1 -1
- package/dist/core/{p-65a09763.entry.js → p-b37bd421.entry.js} +2 -2
- package/dist/core/{p-65a09763.entry.js.map → p-b37bd421.entry.js.map} +1 -1
- package/dist/core/{p-91cbee1b.entry.js → p-b5e40f40.entry.js} +2 -2
- package/dist/core/{p-91cbee1b.entry.js.map → p-b5e40f40.entry.js.map} +1 -1
- package/dist/core/{p-19300834.entry.js → p-b77c283e.entry.js} +2 -2
- package/dist/core/{p-19300834.entry.js.map → p-b77c283e.entry.js.map} +1 -1
- package/dist/core/{p-7f513718.entry.js → p-bb5b9ccd.entry.js} +2 -2
- package/dist/core/{p-7f513718.entry.js.map → p-bb5b9ccd.entry.js.map} +1 -1
- package/dist/core/{p-4c02094d.entry.js → p-c9b2f97c.entry.js} +2 -2
- package/dist/core/{p-4c02094d.entry.js.map → p-c9b2f97c.entry.js.map} +1 -1
- package/dist/core/{p-eb3f6808.entry.js → p-caf817d4.entry.js} +2 -2
- package/dist/core/{p-eb3f6808.entry.js.map → p-caf817d4.entry.js.map} +1 -1
- package/dist/core/p-dc0bd1e5.entry.js +2 -0
- package/dist/core/{p-3e07bf07.entry.js.map → p-dc0bd1e5.entry.js.map} +1 -1
- package/dist/core/{p-db860031.entry.js → p-dd390459.entry.js} +2 -2
- package/dist/core/{p-db860031.entry.js.map → p-dd390459.entry.js.map} +1 -1
- package/dist/core/{p-10991f00.entry.js → p-de5dfd70.entry.js} +2 -2
- package/dist/core/{p-10991f00.entry.js.map → p-de5dfd70.entry.js.map} +1 -1
- package/dist/core/p-dfb76a14.entry.js +2 -0
- package/dist/core/p-dfb76a14.entry.js.map +1 -0
- package/dist/core/{p-cd163299.entry.js → p-e17def2b.entry.js} +2 -2
- package/dist/core/{p-cd163299.entry.js.map → p-e17def2b.entry.js.map} +1 -1
- package/dist/core/{p-e39e5dc7.entry.js → p-e1d58751.entry.js} +2 -2
- package/dist/core/{p-e39e5dc7.entry.js.map → p-e1d58751.entry.js.map} +1 -1
- package/dist/core/{p-3e07bf07.entry.js → p-e913cfc8.entry.js} +2 -2
- package/dist/core/{p-90ab65b4.entry.js.map → p-e913cfc8.entry.js.map} +1 -1
- package/dist/core/{p-da997fb3.entry.js → p-ea299832.entry.js} +2 -2
- package/dist/core/{p-da997fb3.entry.js.map → p-ea299832.entry.js.map} +1 -1
- package/dist/core/{p-852310d9.entry.js → p-eff8ffff.entry.js} +2 -2
- package/dist/core/{p-852310d9.entry.js.map → p-eff8ffff.entry.js.map} +1 -1
- package/dist/core/{p-4d902f20.entry.js → p-f2d24551.entry.js} +2 -2
- package/dist/core/{p-4d902f20.entry.js.map → p-f2d24551.entry.js.map} +1 -1
- package/dist/core/{p-5c872d64.entry.js → p-f515d912.entry.js} +2 -2
- package/dist/core/{p-bf573a56.entry.js → p-febff4d1.entry.js} +2 -2
- package/dist/core/{p-bf573a56.entry.js.map → p-febff4d1.entry.js.map} +1 -1
- package/dist/core/p-vN03FcXN.js.map +1 -1
- package/dist/esm/gov-flex_3.entry.js +1 -1
- package/dist/esm/gov-form-file.entry.js +35 -11
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/hydrate/index.js +36 -12
- package/dist/hydrate/index.mjs +36 -12
- package/dist/types/components.d.ts +592 -119
- package/dist/types/stencil-public-runtime.d.ts +170 -11
- package/package.json +32 -28
- package/readme.md +1 -2
- package/dist/components/p-CXPP9vec.js +0 -2
- package/dist/core/core.css +0 -14776
- package/dist/core/gov-accordion-item.entry.esm.js.map +0 -1
- package/dist/core/gov-accordion.entry.esm.js.map +0 -1
- package/dist/core/gov-attachments.gov-attachments-item.gov-form-message.entry.esm.js.map +0 -1
- package/dist/core/gov-backdrop.entry.esm.js.map +0 -1
- package/dist/core/gov-banner.entry.esm.js.map +0 -1
- package/dist/core/gov-blockquote.entry.esm.js.map +0 -1
- package/dist/core/gov-breadcrumbs.entry.esm.js.map +0 -1
- package/dist/core/gov-button.entry.esm.js.map +0 -1
- package/dist/core/gov-card.entry.esm.js.map +0 -1
- package/dist/core/gov-chip.entry.esm.js.map +0 -1
- package/dist/core/gov-collapsible.entry.esm.js.map +0 -1
- package/dist/core/gov-container.entry.esm.js.map +0 -1
- package/dist/core/gov-control-group.entry.esm.js.map +0 -1
- package/dist/core/gov-cookiebar.entry.esm.js.map +0 -1
- package/dist/core/gov-dialog.entry.esm.js.map +0 -1
- package/dist/core/gov-dropdown.entry.esm.js.map +0 -1
- package/dist/core/gov-empty.entry.esm.js.map +0 -1
- package/dist/core/gov-error-code.entry.esm.js.map +0 -1
- package/dist/core/gov-flex.gov-icon.gov-theme-switch.entry.esm.js.map +0 -1
- package/dist/core/gov-form-autocomplete.entry.esm.js.map +0 -1
- package/dist/core/gov-form-checkbox-group.entry.esm.js.map +0 -1
- package/dist/core/gov-form-checkbox.entry.esm.js.map +0 -1
- package/dist/core/gov-form-control.entry.esm.js.map +0 -1
- package/dist/core/gov-form-file.entry.esm.js.map +0 -1
- package/dist/core/gov-form-group.entry.esm.js.map +0 -1
- package/dist/core/gov-form-input.gov-skeleton.entry.esm.js.map +0 -1
- package/dist/core/gov-form-label.entry.esm.js.map +0 -1
- package/dist/core/gov-form-multi-select.entry.esm.js.map +0 -1
- package/dist/core/gov-form-password-power.entry.esm.js.map +0 -1
- package/dist/core/gov-form-radio-group.entry.esm.js.map +0 -1
- package/dist/core/gov-form-radio.entry.esm.js.map +0 -1
- package/dist/core/gov-form-range.entry.esm.js.map +0 -1
- package/dist/core/gov-form-search.entry.esm.js.map +0 -1
- package/dist/core/gov-form-select.entry.esm.js.map +0 -1
- package/dist/core/gov-form-switch.entry.esm.js.map +0 -1
- package/dist/core/gov-grid-item.entry.esm.js.map +0 -1
- package/dist/core/gov-grid.entry.esm.js.map +0 -1
- package/dist/core/gov-infobar.entry.esm.js.map +0 -1
- package/dist/core/gov-layout-column.entry.esm.js.map +0 -1
- package/dist/core/gov-layout.entry.esm.js.map +0 -1
- package/dist/core/gov-lifecycle.entry.esm.js.map +0 -1
- package/dist/core/gov-link.entry.esm.js.map +0 -1
- package/dist/core/gov-loading.entry.esm.js.map +0 -1
- package/dist/core/gov-message.entry.esm.js.map +0 -1
- package/dist/core/gov-pagination.entry.esm.js.map +0 -1
- package/dist/core/gov-spacer.entry.esm.js.map +0 -1
- package/dist/core/gov-stepper-item.entry.esm.js.map +0 -1
- package/dist/core/gov-stepper.entry.esm.js.map +0 -1
- package/dist/core/gov-tabs-item.entry.esm.js.map +0 -1
- package/dist/core/gov-tabs.entry.esm.js.map +0 -1
- package/dist/core/gov-tag.entry.esm.js.map +0 -1
- package/dist/core/gov-tile.entry.esm.js.map +0 -1
- package/dist/core/gov-toast.entry.esm.js.map +0 -1
- package/dist/core/gov-tooltip.gov-tooltip-content.entry.esm.js.map +0 -1
- package/dist/core/gov-wizard-item.entry.esm.js.map +0 -1
- package/dist/core/gov-wizard.entry.esm.js.map +0 -1
- package/dist/core/loader.esm.js.map +0 -1
- package/dist/core/p-33209782.entry.js +0 -2
- package/dist/core/p-57ca8ac7.entry.js +0 -2
- package/dist/core/p-73bd93f9.entry.js +0 -2
- package/dist/core/p-90ab65b4.entry.js +0 -2
- package/dist/core/p-ClISz4NF.js +0 -3
- package/dist/core/p-ClISz4NF.js.map +0 -1
- package/dist/core/p-abb7780e.entry.js +0 -2
- package/dist/core/p-afe254cb.entry.js +0 -2
- package/dist/core/p-afe254cb.entry.js.map +0 -1
- package/dist/core/p-bd2df430.entry.js +0 -2
- package/dist/core/p-bec959c4.entry.js +0 -2
- package/dist/core/p-c4734357.entry.js +0 -2
- package/dist/core/p-fca7a0d6.entry.js +0 -2
- /package/dist/components/{p-ibUK7mfI.js.map → p-BGK46VRO.js.map} +0 -0
- /package/dist/components/{p-iTwUkISB.js.map → p-BICk4EuO.js.map} +0 -0
- /package/dist/components/{p-DN5pb9xA.js.map → p-BNoNH6m-.js.map} +0 -0
- /package/dist/components/{p-C_URF9Su.js.map → p-ClDhNt_H.js.map} +0 -0
- /package/dist/components/{p-pJ_vPAO0.js.map → p-DjGO_trZ.js.map} +0 -0
- /package/dist/components/{p-yIpIIG5A.js.map → p-DmK9qaKH.js.map} +0 -0
- /package/dist/components/{p-DEthsMuE.js.map → p-isPjiQbr.js.map} +0 -0
- /package/dist/core/{p-5c872d64.entry.js.map → p-f515d912.entry.js.map} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s,h as t,H as e,g as r}from"./p-ClISz4NF.js";import{L as a}from"./p-Q99QrOoi.js";import{g as o}from"./p-CoD1xawt.js";const i=class{constructor(t){s(this,t);this.type="stretch";this.inverse=false;this.h=o(this.host)}typeClass(s,t,e,r){const a=t?"-"+t:"";const o=e?"-"+e:"";const i=r?"-inverse":"";return s+" "+s+a+o+i}render(){return t(e,{key:"9dc8289f8ccb095d04c4d6f1851506137ba51a48",type:this.type,class:this.h.classes(a.root)},t("section",{key:"d87bf25092207d67f9ac85aa5d6907fefdb17f2d",class:this.typeClass(a.section,this.type,this.variant,this.inverse)},t("slot",{key:"557a015cddbf93b7a9ee4839be973525924fb2be"})))}get host(){return r(this)}};export{i as gov_layout};
|
|
2
|
-
//# sourceMappingURL=p-abb7780e.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as o}from"./p-ClISz4NF.js";import{c as h}from"./p-vN03FcXN.js";import{g as n,a,t as r}from"./p-CoD1xawt.js";import{g as l}from"./p-B6CqPcY_.js";import{i as c}from"./p-CzXeijOj.js";import{A as f,a as d}from"./p-Bz_RzYFb.js";import"./p-BcQO4NH2.js";import"./p-CQvUntGY.js";import"./p-EeKNA85D.js";import"./p-U40vKHrs.js";import"./p-DYcNEwSZ.js";import"./p-DBXGhafv.js";const p={root:"gov-form-file",area:"gov-form-file__area",input:"gov-form-file__input",inputFocus:"gov-form-file__input-focus",attachments:"gov-form-file__attachments"};function m(t){const s=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,e=parseInt(t,10)||0;while(e>=1024&&++i){e=e/1024}return e.toFixed(e<10&&i>0?1:0)+" "+s[i]}function u(t,s){if(typeof s==="string"&&s.length){return s.replace(/\s/g,"").split(",").filter((s=>new RegExp(s.replace("*",".*")).test(t.type))).length>0}else{return true}}function v(t,s){const i=Math.round(t.size);return i<=s}const g=class{constructor(i){t(this,i);this.govFocus=s(this,"gov-focus");this.govBlur=s(this,"gov-blur");this.govFiles=s(this,"gov-files");this.govAddFile=s(this,"gov-add-file");this.govRemoveFile=s(this,"gov-remove-file");this.eventsRegistered=false;this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=false;this.ignoreFileDuplicationCheck=false;this.displayAttachments=true;this.multiple=false;this.maxFileSize=-1;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.accessibleAttachmentsLabel="Přílohy";this.files=[];this.inheritedAttributes={};this.fileId=h("GovInputFile");this.h=n(this.host);this.f=l(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",a(this.invalid));this.f.passAttrToControl("disabled",a(this.disabled));this.f.passAttrToControl("type","File")}registerListeners(){if(this.eventsRegistered){return}this.eventsRegistered=true;function t(){this.areaRef.classList.add("highlight")}function s(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(t=>{t.preventDefault();t.stopPropagation();const s=t.target.files;if(this.resetAfterPick){if(s.length){this.validateFiles(s)}}else{this.validateFiles(s)}}),false);if(this.expanded){const i=["dragover","dragleave"];const e=["dragenter","dragover","mouseenter"];const o=["dragleave","mouseleave"];i.map((t=>this.inputRef.addEventListener(t,this.preventDefaults.bind(this),false)));e.map((s=>this.inputRef.addEventListener(s,t.bind(this),false)));o.forEach((t=>this.inputRef.addEventListener(t,s.bind(this),false)))}}preventDefaults(t){t.preventDefault();t.stopPropagation()}handleDrop(t){const s=t.dataTransfer;this.validateFiles(s.files)}validateFiles(t){let s=[];if(!this.multiple&&this.displayAttachments){this.files=[]}Array.from(t).forEach((t=>{const i=this.files.find((s=>s.file.name===t.name&&s.file.size===t.size))||null;if(i===null||this.ignoreFileDuplicationCheck){const i=typeof this.maxFileSize==="number"&&this.maxFileSize>0?v(t,this.maxFileSize):true;const e=u(t,this.accept);const o={id:h("GovFormFile"),file:t,acceptValid:e,sizeValid:i};if(this.displayAttachments){this.files=[...this.files,o]}else{s=[...s,o]}this.govAddFile.emit({component:p.root,file:o})}}));if(this.displayAttachments){this.syncNativeInputFiles()}this.govFiles.emit({component:p.root,files:s.length?s:this.files});if(this.resetAfterPick){this.reset().finally()}}syncNativeInputFiles(){if(!this.inputRef||typeof DataTransfer==="undefined"){return}try{const t=new DataTransfer;this.files.filter((t=>t.acceptValid===true&&t.sizeValid===true)).forEach((s=>t.items.add(s.file)));this.inputRef.files=t.files}catch(t){if(typeof process!=="undefined"&&process.env&&"production"!=="production");}}componentDidLoad(){this.attributeObserver=new f(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(d)}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs();this.inheritedAttributes=c(this.host)}async componentDidRender(){this.registerListeners()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){return i(e,{key:"6709aba5a796ccb9cf712dd5f962d5f903050d26",class:this.h.classes([p.root]),invalid:r(this.invalid),expanded:r(this.expanded)},i("div",{key:"668f6959ca55220ed2543dbbeddeb98f1b6c19ba",class:p.area,ref:t=>this.areaRef=t},i("slot",{key:"5f12f12d074163b525e2200e23f61e6d0fb34c74"}),i("input",Object.assign({key:"7cf43884dad3c28be956b9897862ff5a1fa22e75",class:p.input,ref:t=>this.inputRef=t,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,multiple:this.multiple,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled},this.inheritedAttributes,{"aria-required":r(this.required),"aria-invalid":r(this.invalid),"aria-disabled":r(this.disabled)})),i("div",{key:"ec717f584bcd4d74416821736fb4bdcea517bc83",class:p.inputFocus})),this.h.hasSlot("attachments")?i("div",{class:p.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:p.attachments},i("gov-attachments",{label:this.accessibleAttachmentsLabel,"accessible-label":this.accessibleAttachmentsLabel},this.files.map((t=>i("gov-attachments-item",{"accessible-remove-labelledby":t.id,"on-gov-remove":()=>this.onRemoveFileHandler(t)},t.file.name,i("span",{slot:"name"},t.file.name),t.acceptValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),t.acceptValid===false?this.errorAccept:null):null,t.sizeValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),this.errorSize.replace("{FILE_SIZE}",m(this.maxFileSize))):null,i("span",{slot:"info"},"(",m(t.file.size),")")))))):null)}onRemoveFileHandler(t){const s=this.files.findIndex((s=>s.id===t.id));if(s!==-1){const t=this.files;const i=this.files[s];t.splice(s,1);this.files=[...t];this.syncNativeInputFiles();this.govRemoveFile.emit({component:p.root,file:i});this.govFiles.emit({component:p.root,files:t})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:p.root,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:p.root,originalEvent:t})}onChangeHandler(t){t.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];if(this.inputRef){this.inputRef.value="";this.syncNativeInputFiles()}}get host(){return o(this)}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}};export{g as gov_form_file};
|
|
2
|
-
//# sourceMappingURL=p-afe254cb.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["FormFileClass","root","area","input","inputFocus","attachments","formatBytes","bytes","units","l","n","parseInt","toFixed","fileAcceptValidation","file","accept","length","replace","split","filter","RegExp","test","type","fileSizeValidation","maxSize","fileSize","Math","round","size","GovFormFile","constructor","hostRef","this","eventsRegistered","expanded","required","disabled","resetAfterPick","ignoreFileDuplicationCheck","displayAttachments","multiple","maxFileSize","errorSize","errorAccept","accessibleAttachmentsLabel","files","inheritedAttributes","fileId","createID","h","govHost","host","f","govForm","watchControlAttrs","passControlAttrs","passAttrToControl","toBoolAttr","invalid","registerListeners","highlight","areaRef","classList","add","unhighlight","remove","inputRef","addEventListener","e","preventDefault","stopPropagation","target","validateFiles","events","inEvents","outEvents","map","eventName","preventDefaults","bind","forEach","handleDrop","dataTransfer","filesBuffer","Array","from","isFile","find","item","name","isSizeValid","isAcceptValid","newFile","id","acceptValid","sizeValid","govAddFile","emit","component","syncNativeInputFiles","govFiles","reset","finally","DataTransfer","dt","items","process","env","componentDidLoad","attributeObserver","AttributeObserver","attributeName","newValue","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","passAttrToLabel","String","inheritAriaAttributes","componentDidRender","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","render","Host","key","class","classes","toBoolAttrIfDefined","ref","el","identifier","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","hasSlot","label","onRemoveFileHandler","slot","color","index","findIndex","removeFile","splice","govRemoveFile","govFocus","originalEvent","govBlur","getRef","getAreaRef","value"],"sources":["../../../packages/core/src/components/gov-form/file/constants.ts","../../../packages/core/src/utils/file.utils.ts","../../../packages/core/src/components/gov-form/file/gov-form-file.tsx"],"sourcesContent":["export const FormFileClass = {\n\troot: 'gov-form-file',\n\tarea: 'gov-form-file__area',\n\tinput: 'gov-form-file__input',\n\tinputFocus: 'gov-form-file__input-focus',\n\tattachments: 'gov-form-file__attachments',\n}\n","export function formatBytes(bytes: any): string {\n\tconst units = ['bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n\tlet l = 0,\n\t\tn = parseInt(bytes, 10) || 0\n\n\twhile (n >= 1024 && ++l) {\n\t\tn = n / 1024\n\t}\n\n\treturn n.toFixed(n < 10 && l > 0 ? 1 : 0) + ' ' + units[l]\n}\n\nexport function fileAcceptValidation(file: File, accept: string): boolean {\n\tif (typeof accept === 'string' && accept.length) {\n\t\treturn (\n\t\t\taccept\n\t\t\t\t.replace(/\\s/g, '')\n\t\t\t\t.split(',')\n\t\t\t\t.filter(accept => {\n\t\t\t\t\treturn new RegExp(accept.replace('*', '.*')).test(file.type)\n\t\t\t\t}).length > 0\n\t\t)\n\t} else {\n\t\treturn true\n\t}\n}\n\nexport function fileSizeValidation(file: File, maxSize: number): boolean {\n\tconst fileSize = Math.round(file.size)\n\treturn fileSize <= maxSize\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormFileClass} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {fileAcceptValidation, fileSizeValidation, formatBytes} from \"../../../utils/file.utils\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovFormFileEvent, GovFormFileItem} from \"./gov-form-file.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-file\",\n})\nexport class GovFormFile {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\n\tprivate areaRef?: HTMLDivElement\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly fileId: string\n\tprivate attributeObserver: AttributeObserver\n\tprivate eventsRegistered = false\n\n\tconstructor() {\n\t\tthis.fileId = createID(\"GovInputFile\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormFileElement\n\t/**\n\t * Expands the file input to fill 100% of the container width.\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the File component disabled.\n\t * This prevents users from being able to interact with the File, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * After selecting the files, the main input element will be reset.\n\t * The propagation of the event with the selected files will not be affected.\n\t */\n\t@Prop({attribute: \"reset-after-pick\"}) readonly resetAfterPick: boolean = false\n\t/**\n\t * Selected files will not be checked for duplicates based on name and size.\n\t */\n\t@Prop({attribute: \"ignore-file-duplication-check\"}) readonly ignoreFileDuplicationCheck: boolean = false\n\t/**\n\t * Show list of attachments\n\t */\n\t@Prop({attribute: \"display-attachments\"}) readonly displayAttachments: boolean = true\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept\n\t */\n\t@Prop() readonly accept: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple\n\t */\n\t@Prop() readonly multiple: boolean = false\n\t/**\n\t * Maximum embedded file size\n\t */\n\t@Prop({attribute: \"max-file-size\"}) readonly maxFileSize: number = -1\n\t/**\n\t * Custom File identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Error message when the maximum file size is exceeded\n\t */\n\t@Prop({attribute: \"error-size\"}) readonly errorSize: string = \"Soubor je větší než povolená velikost {FILE_SIZE}\"\n\t/**\n\t * Insert unsupported file error message\n\t */\n\t@Prop({attribute: \"error-accept\"}) readonly errorAccept: string = \"Soubor tohoto typu není povolen\"\n\t/**\n\t * Adds accessible label for the list of attachments.\n\t */\n\t@Prop({attribute: \"accessible-attachments-label\"}) readonly accessibleAttachmentsLabel: string = \"Přílohy\"\n\t/**\n\t * Emitted when the File has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Emitted when the File loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when the list of inserted files is changed\n\t */\n\t@Event({eventName: \"gov-files\"}) govFiles: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a new file is added\n\t */\n\t@Event({eventName: \"gov-add-file\"}) govAddFile: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a file is removed from the list\n\t */\n\t@Event({eventName: \"gov-remove-file\"}) govRemoveFile: EventEmitter<GovFormFileEvent>\n\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() files: GovFormFileItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"File\")\n\t}\n\n\n\tprivate registerListeners() {\n\t\tif (this.eventsRegistered) {\n\t\t\treturn\n\t\t}\n\t\tthis.eventsRegistered = true\n\n\t\tfunction highlight() {\n\t\t\tthis.areaRef.classList.add(\"highlight\")\n\t\t}\n\n\t\tfunction unhighlight() {\n\t\t\tthis.areaRef.classList.remove(\"highlight\")\n\t\t}\n\n\t\tthis.inputRef.addEventListener(\n\t\t\t\"change\",\n\t\t\te => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tconst files = (e.target as HTMLInputElement).files\n\t\t\t\tif (this.resetAfterPick) {\n\t\t\t\t\tif (files.length) {\n\t\t\t\t\t\tthis.validateFiles(files)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.validateFiles(files)\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse,\n\t\t)\n\n\t\tif (this.expanded) {\n\t\t\tconst events = [\"dragover\", \"dragleave\"]\n\t\t\tconst inEvents = [\"dragenter\", \"dragover\", \"mouseenter\"]\n\t\t\tconst outEvents = [\"dragleave\", \"mouseleave\"]\n\n\t\t\tevents.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false))\n\t\t\tinEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false))\n\t\t\toutEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false))\n\t\t}\n\t}\n\n\tpreventDefaults(e) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\t}\n\n\thandleDrop(e: DragEvent) {\n\t\tconst dataTransfer = e.dataTransfer\n\t\tthis.validateFiles(dataTransfer.files)\n\t}\n\n\tprivate validateFiles(files: FileList) {\n\t\tlet filesBuffer: GovFormFileItem[] = []\n\t\tif (!this.multiple && this.displayAttachments) {\n\t\t\tthis.files = []\n\t\t}\n\t\tArray.from(files).forEach(file => {\n\t\t\tconst isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null\n\t\t\tif (isFile === null || this.ignoreFileDuplicationCheck) {\n\t\t\t\tconst isSizeValid = typeof this.maxFileSize === \"number\" && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true\n\t\t\t\tconst isAcceptValid = fileAcceptValidation(file, this.accept)\n\t\t\t\tconst newFile = {\n\t\t\t\t\tid: createID(\"GovFormFile\"),\n\t\t\t\t\tfile,\n\t\t\t\t\tacceptValid: isAcceptValid,\n\t\t\t\t\tsizeValid: isSizeValid,\n\t\t\t\t}\n\t\t\t\tif (this.displayAttachments) {\n\t\t\t\t\tthis.files = [...this.files, newFile]\n\t\t\t\t} else {\n\t\t\t\t\tfilesBuffer = [...filesBuffer, newFile]\n\t\t\t\t}\n\t\t\t\tthis.govAddFile.emit({\n\t\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\t\tfile: newFile,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tif (this.displayAttachments) {\n\t\t\tthis.syncNativeInputFiles()\n\t\t}\n\n\t\tthis.govFiles.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\tfiles: filesBuffer.length ? filesBuffer : this.files,\n\t\t})\n\n\t\tif (this.resetAfterPick) {\n\t\t\tthis.reset().finally()\n\t\t}\n\t}\n\n\t// Keep native <input type=\"file\"> in sync with the visible attachments list so\n\t// that a native form submit / FormData carries exactly the files shown in the UI.\n\t// Invalid items (wrong type or oversize) are intentionally excluded.\n\tprivate syncNativeInputFiles() {\n\t\tif (!this.inputRef || typeof DataTransfer === \"undefined\") {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tconst dt = new DataTransfer()\n\t\t\tthis.files\n\t\t\t\t.filter(item => item.acceptValid === true && item.sizeValid === true)\n\t\t\t\t.forEach(item => dt.items.add(item.file))\n\t\t\tthis.inputRef.files = dt.files\n\t\t} catch (e) {\n\t\t\t// Safari < 14.1 / older browsers may reject assigning to .files; nothing safe to fall back to.\n\t\t\tif (typeof process !== \"undefined\" && process.env && process.env.NODE_ENV !== \"production\") {\n\t\t\t\tconsole.warn(\"[gov-form-file] Could not sync native input.files:\", e)\n\t\t\t}\n\t\t}\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.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.registerListeners()\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\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes([FormFileClass.root])}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t expanded={toBoolAttrIfDefined(this.expanded)}>\n\t\t\t\t<div class={FormFileClass.area} ref={el => (this.areaRef = el as HTMLDivElement)}>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormFileClass.input}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tid={this.identifier || this.fileId}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tmultiple={this.multiple}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div class={FormFileClass.inputFocus}/>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot(\"attachments\") ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<slot name={\"attachments\"}/>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.files.length && this.displayAttachments ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<gov-attachments label={this.accessibleAttachmentsLabel}\n\t\t\t\t\t\t\t\t\t\t accessible-label={this.accessibleAttachmentsLabel}>\n\t\t\t\t\t\t\t{this.files.map(item => (\n\t\t\t\t\t\t\t\t<gov-attachments-item accessible-remove-labelledby={item.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t on-gov-remove={() => this.onRemoveFileHandler(item)}>\n\t\t\t\t\t\t\t\t\t{item.file.name}\n\t\t\t\t\t\t\t\t\t<span slot=\"name\">{item.file.name}</span>\n\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" color=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? this.errorAccept : null}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{item.sizeValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" color=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{this.errorSize.replace(\"{FILE_SIZE}\", formatBytes(this.maxFileSize))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t<span slot=\"info\">({formatBytes(item.file.size)})</span>\n\t\t\t\t\t\t\t\t</gov-attachments-item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</gov-attachments>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onRemoveFileHandler(file: GovFormFileItem) {\n\t\tconst index = this.files.findIndex(item => item.id === file.id)\n\t\tif (index !== -1) {\n\t\t\tconst files = this.files\n\t\t\tconst removeFile = this.files[index]\n\t\t\tfiles.splice(index, 1)\n\t\t\tthis.files = [...files]\n\t\t\tthis.syncNativeInputFiles()\n\t\t\tthis.govRemoveFile.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfile: removeFile,\n\t\t\t})\n\t\t\tthis.govFiles.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfiles,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Returns the reference of the native area element\n\t */\n\t@Method()\n\tasync getAreaRef(): Promise<HTMLDivElement> {\n\t\treturn this.areaRef\n\t}\n\n\t/**\n\t * Remove all files from component state\n\t */\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.files = []\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.value = ''\n\t\t\tthis.syncNativeInputFiles()\n\t\t}\n\t}\n}\n"],"mappings":"oZAAO,MAAMA,EAAgB,CAC5BC,KAAM,gBACNC,KAAM,sBACNC,MAAO,uBACPC,WAAY,6BACZC,YAAa,8BCLR,SAAUC,EAAYC,GAC3B,MAAMC,EAAQ,CAAC,QAAS,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,OACzE,IAAIC,EAAI,EACPC,EAAIC,SAASJ,EAAO,KAAO,EAE5B,MAAOG,GAAK,QAAUD,EAAG,CACxBC,EAAIA,EAAI,I,CAGT,OAAOA,EAAEE,QAAQF,EAAI,IAAMD,EAAI,EAAI,EAAI,GAAK,IAAMD,EAAMC,EACzD,CAEgB,SAAAI,EAAqBC,EAAYC,GAChD,UAAWA,IAAW,UAAYA,EAAOC,OAAQ,CAChD,OACCD,EACEE,QAAQ,MAAO,IACfC,MAAM,KACNC,QAAOJ,GACA,IAAIK,OAAOL,EAAOE,QAAQ,IAAK,OAAOI,KAAKP,EAAKQ,QACrDN,OAAS,C,KAER,CACN,OAAO,I,CAET,CAEgB,SAAAO,EAAmBT,EAAYU,GAC9C,MAAMC,EAAWC,KAAKC,MAAMb,EAAKc,MACjC,OAAOH,GAAYD,CACpB,C,MCdaK,EAAW,MAUvB,WAAAC,CAAAC,G,kMAFQC,KAAgBC,iBAAG,MAaVD,KAAQE,SAAY,MAKpBF,KAAQG,SAAY,MAKLH,KAAQI,SAAY,MAKJJ,KAAcK,eAAY,MAIbL,KAA0BM,2BAAY,MAIhDN,KAAkBO,mBAAY,KAchEP,KAAQQ,SAAY,MAIQR,KAAWS,aAAW,EAYzBT,K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EAAM,QAAAgG,KAAK,QAAM,IAAG3I,EAAYkF,EAAK1E,KAAKc,MAAK,UAKhD,K,CAKC,mBAAAoH,CAAoBlI,GAC3B,MAAMqI,EAAQnH,KAAKa,MAAMuG,WAAU5D,GAAQA,EAAKK,KAAO/E,EAAK+E,KAC5D,GAAIsD,KAAU,EAAI,CACjB,MAAMtG,EAAQb,KAAKa,MACnB,MAAMwG,EAAarH,KAAKa,MAAMsG,GAC9BtG,EAAMyG,OAAOH,EAAO,GACpBnH,KAAKa,MAAQ,IAAIA,GACjBb,KAAKmE,uBACLnE,KAAKuH,cAActD,KAAK,CACvBC,UAAWlG,EAAcC,KACzBa,KAAMuI,IAEPrH,KAAKoE,SAASH,KAAK,CAClBC,UAAWlG,EAAcC,KACzB4C,S,EAKK,cAAA8F,CAAevE,GACtBA,EAAEE,kBACFtC,KAAKwH,SAASvD,KAAK,CAClBC,UAAWlG,EAAcC,KACzBwJ,cAAerF,G,CAIT,aAAAyE,CAAczE,GACrBA,EAAEE,kBACFtC,KAAK0H,QAAQzD,KAAK,CACjBC,UAAWlG,EAAcC,KACzBwJ,cAAerF,G,CAIT,eAAAqE,CAAgBrE,GACvBA,EAAEE,iB,CAOH,YAAMqF,GACL,OAAO3H,KAAKkC,Q,CAOb,gBAAM0F,GACL,OAAO5H,KAAK6B,O,CAOb,WAAMwC,GACLrE,KAAKa,MAAQ,GACb,GAAIb,KAAKkC,SAAU,CAClBlC,KAAKkC,SAAS2F,MAAQ,GACtB7H,KAAKmE,sB","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,H as i,g as o}from"./p-ClISz4NF.js";import{p as a}from"./p-CQvUntGY.js";import{S as e}from"./p-BcQO4NH2.js";import{g as r,b as d}from"./p-CoD1xawt.js";import{v as h}from"./p-NOJjz9dT.js";import{A as n,a as l}from"./p-Bz_RzYFb.js";import{c}from"./p-vN03FcXN.js";import{i as p}from"./p-CzXeijOj.js";import"./p-CgDnDrq5.js";const f=a(e,["_XS","_S","_M","_L","_XL"]);var b;(function(t){t["DOWN"]="down";t["UP"]="up"})(b||(b={}));const m={root:"gov-collapsible",content:"gov-collapsible__content",disabled:"gov-collapsible--disabled"};const v=class{constructor(s){t(this,s);this.hydrated=false;this.size="m";this.disabled=false;this.open=false;this.inheritedAttributes={};this.h=r(this.host);this.triggerId=c("GovCollapsibleControl");this.contentId=c("GovCollapsibleContent")}validateSize(t){h(f,t,m.root)}componentDidLoad(){this.attributeObserver=new n(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=p(this.host)}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}connectedCallback(){this.hydrated=true}render(){return s(i,{key:"769978332f69d9faf2a4e8b305db730f30aff4ef",hydrated:this.hydrated,class:this.h.classes([m.root,this.disabled&&m.disabled]),size:this.size},s("gov-button",Object.assign({key:"8471245d9dd22f5599d234f86b7bf2127d8632ac",color:"primary",size:this.size,type:"link",disabled:this.disabled,"onGov-click":t=>{t.stopPropagation();t.preventDefault();this.open=!this.open}},this.inheritedAttributes,{identifier:this.triggerId,"aria-controls":this.contentId,"aria-expanded":d(this.open),"aria-haspopup":"true"}),this.label,s("gov-icon",{key:"01d4627f3817249e3653f8a2fdf0cc2d2d2ad36a",slot:"icon-end",name:this.open?"chevron-up":"chevron-down",type:"components"})),s("div",{key:"0d680443f3fa888d753aaf0090e9c4da177dbf7b",class:m.content,hidden:!this.open,id:this.contentId,"aria-labelledby":this.triggerId,"aria-hidden":d(!this.open)},s("slot",{key:"4b3c64ff8fb7f6d6039d9042328121207ccf7580"})))}get host(){return o(this)}static get watchers(){return{size:["validateSize"]}}};export{v as gov_collapsible};
|
|
2
|
-
//# sourceMappingURL=p-bd2df430.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
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.4";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-bec959c4.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s,c as t,h as a,H as i,g as e}from"./p-ClISz4NF.js";import{v as o}from"./p-NOJjz9dT.js";import{A as r,a as c,b as h}from"./p-Cx3bEC5v.js";import{g as n}from"./p-CoD1xawt.js";import"./p-CgDnDrq5.js";import"./p-CQvUntGY.js";import"./p-BcQO4NH2.js";const p=class{constructor(a){s(this,a);this.govChange=t(this,"gov-change");this.hydrated=false;this.size="m";this.noBorder=false;this.h=n(this.host)}validateSize(s){o(h,s,c.root)}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.host.querySelectorAll(r.root).forEach((s=>{s.addEventListener("gov-change",(s=>{s.stopPropagation();this.govChange.emit({component:c.root,open:s.detail.open,ref:s.detail.ref})}))}))}connectedCallback(){this.hydrated=true}render(){return a(i,{key:"98666441f80fcb633f05142c4a695e2478af5383",hydrated:this.hydrated,class:this.h.classes(c.root),size:this.size,role:"list"},a("slot",{key:"db7aa61e809f901019dcb301aa529cdc9bc7530e"}))}get host(){return e(this)}static get watchers(){return{size:["validateSize"]}}};export{p as gov_accordion};
|
|
2
|
-
//# sourceMappingURL=p-c4734357.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as a,h as s,H as t,g as c}from"./p-ClISz4NF.js";import{v as d}from"./p-NOJjz9dT.js";import{S as o,c as i}from"./p-C3R1T_pg.js";import{c as r}from"./p-vN03FcXN.js";import{g as b}from"./p-CoD1xawt.js";import"./p-CgDnDrq5.js";import"./p-CQvUntGY.js";import"./p-U40vKHrs.js";import"./p-BcQO4NH2.js";const f=class{constructor(s){e(this,s);this.govChange=a(this,"gov-change");this.hydrated=false;this.color="primary";this.size="m";this.h=b(this.host);this.triggerId=r("GovStepperItem");this.contentId=r("GovStepperContent")}validateColor(e){d(i,e,o.root)}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const e=this.identifier||this.triggerId;const a=this.contentId;return s(t,{key:"126275cd984137b2c6d6cc5bdd2074adf14cee7b",id:e,class:this.h.classes(o.root),color:this.color,role:"listitem",hydrated:this.hydrated},s("div",{key:"15c1f0a0d533cd5473611b388590a6af94755ab9"},s("div",{key:"85535167b5359d00e773ffac3aa64ae95d9a005a",class:o.steps},s("span",{key:"37558ddd120824a5f234503b8cfb673352f642e1"}),s("span",{key:"647d2862b31d2e6e1c51f90e0cbf8eb76af9f5a8",class:o.prefix},s("slot",{key:"c58b03ec979eafc5db766c0134def19cbe2582d1",name:"prefix"})),s("span",{key:"c294e1f9af11588960c8ccf5d16186eb2e57cc74"})),s("div",{key:"ca82d4d7c0617f0c13de80c5a4247d8f9cd3d2e7",class:o.main},s("span",{key:"6d1cb25eca0517abcb0557579eab240beaff7557",class:o.headline},s("slot",{key:"3ef65e410481935cab120087b9454be9ce16ac1a",name:"headline"})),s("slot",{key:"8b7f8674a3347b2b51987ec7054835a8db203df8",name:"annotation"}),this.h.hasSlot("content")&&s("div",{key:"208b1c3d7f235748a04f4c31d525263aad01c90e",class:o.content,id:a,"aria-labelledby":e,role:"tabpanel"},s("slot",{key:"9b68d8eb8c095fd45b741fe2398d957b589fbd94",name:"content"})))))}get host(){return c(this)}static get watchers(){return{color:["validateColor"]}}};export{f as gov_stepper_item};
|
|
2
|
-
//# sourceMappingURL=p-fca7a0d6.entry.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|