@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-form-autocomplete.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/autocomplete/autocomplete.utils.ts","../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["import { removeDiacritics } from '../../../utils/string.utils'\nimport { GovFormAutocompleteItem } from './gov-form-autocomplete.types'\n\nconst normalize = (value: unknown): string =>\n\ttypeof value === 'string' ? removeDiacritics(value).toLowerCase() : ''\n\nexport const filterAutocompleteOptions = (\n\toptions: GovFormAutocompleteItem[],\n\tquery: string,\n\tnameKey: string,\n\tmaxOptions: number,\n): GovFormAutocompleteItem[] => {\n\tconst source = Array.isArray(options) ? options : []\n\tconst normalizedQuery = normalize(query)\n\tconst matches =\n\t\tnormalizedQuery.length === 0\n\t\t\t? source\n\t\t\t: source.filter(item => {\n\t\t\t\t\tconst text = item?.[nameKey]\n\t\t\t\t\treturn typeof text === 'string' && normalize(text).includes(normalizedQuery)\n\t\t\t\t})\n\treturn Number.isInteger(maxOptions) && maxOptions > 0 ? matches.slice(0, maxOptions) : matches\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {booleanString, toBoolAttr} from '../../../helpers/Dom/template'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {Nullable} from '../../../types/interfaces'\nimport {createID} from '../../../utils/string.utils'\nimport {delay, has, throttle} from '../../../utils/utils'\nimport {FormInputEvent} from '../input/gov-form-input.types'\nimport {FormAutocompleteClass, FormAutocompleteSizes, SizesType,} from './constants'\nimport {FormAutocompleteEvent, GovFormAutocompleteItem} from './gov-form-autocomplete.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport { filterAutocompleteOptions } from './autocomplete.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-form-autocomplete',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate listRef?: HTMLUListElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate fullOptions: GovFormAutocompleteItem[] = []\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\tprivate attributeObserver: AttributeObserver\n\tprivate debouncedSearch: (e: CustomEvent<FormInputEvent>) => void\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value = ''\n\t/**\n\t * Options of autocomplete\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormAutocompleteItem[]\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop({attribute: 'name-key'}) readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\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 input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\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 * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 3\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Maximum number of items shown from a static `options` list (0 = unlimited).\n\t * Applies only when no async search callback is set.\n\t */\n\t@Prop({attribute: 'max-options'}) readonly maxOptions: number = 10\n\t/**\n\t * Input throttle in milliseconds\n\t */\n\t@Prop() readonly throttleTime: number = 200\n\t/**\n\t * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-input'}) govInput: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormAutocompleteEvent>\n\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormAutocompleteItem[]): void {\n\t\tthis.fullOptions = propsValueToArray<GovFormAutocompleteItem[]>(newValue)\n\t\tif (this.searchCallback) {\n\t\t\tthis.setOptions(this.fullOptions).catch()\n\t\t} else {\n\t\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\t}\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate async moveToView() {\n\t\tawait delay(200)\n\t\tconst heightOfList = this.listRef.offsetHeight\n\t\tconst selected = this.listRef.querySelector('li[aria-selected=\"true\"]') as HTMLUListElement\n\t\tif (selected && heightOfList) {\n\t\t\tconst offsetTop = selected.offsetTop\n\t\t\tthis.listRef.scrollTo({top: offsetTop, behavior: 'smooth'})\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (this.searchCallback) {\n\t\t\tif (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {\n\t\t\t\tthis.list = []\n\t\t\t\tthis.arrowCounter = -1\n\t\t\t\tthis.processing = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\tthis.arrowCounter = -1\n\t}\n\n\tprivate clearList() {\n\t\tif (this.fullOptions.length === 0) {\n\t\t\tthis.list = []\n\t\t}\n\t}\n\n\tget isValueAccepted() {\n\t\tif (typeof this.value === 'string') {\n\t\t\treturn this.value.length >= this.minlength\n\t\t} else {\n\t\t\treturn false\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.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t\tthis.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime)\n\t\tthis.fullOptions = propsValueToArray<GovFormAutocompleteItem[]>(this.options)\n\t\tif (!this.searchCallback) {\n\t\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\t}\n\t}\n\n\t@Watch('throttleTime')\n\twatchThrottleTime() {\n\t\tthis.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime)\n\t}\n\n\tprivate emitAndSearch = (e: CustomEvent<FormInputEvent>) => {\n\t\tthis.govInput.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t\tthis.doSearch()\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={FormAutocompleteClass.root} size={this.size}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={this.onInputHandler}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-keydown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-autocomplete={'list'}\n\t\t\t\t\taria-owns={[this.listBoxId, this.inheritedAttributes['aria-owns']].join(' ')}\n\t\t\t\t\taria-expanded={booleanString(this.list.length && this.focused ? true : false)}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"validation-icon\" />\n\t\t\t\t\t<slot name=\"icon-end\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list}\n\t\t\t\t\trole={'listbox'}\n\t\t\t\t\taria-hidden={toBoolAttr(!this.focused)}\n\t\t\t\t\thidden={!this.focused}\n\t\t\t\t\tid={this.listBoxId}\n\t\t\t\t\tref={el => (this.listRef = el as HTMLUListElement)}>\n\t\t\t\t\t{this.focused && this.list.length === 0 && this.processing === false && (this.isValueAccepted || (!this.searchCallback && this.fullOptions.length > 0)) && this.messageEmpty ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.empty}>{this.messageEmpty}</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused && this.processing === true && this.isValueAccepted ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.loading}>\n\t\t\t\t\t\t\t<gov-skeleton size=\"m\"></gov-skeleton>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused ? this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonTouchStart={(e: TouchEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\tonMouseDown={(e: PointerEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-left\"/>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-right\"/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t}) : null}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif (this.searchCallback) {\n\t\t\tif (this.isValueAccepted) {\n\t\t\t\tthis.doSearch()\n\t\t\t}\n\t\t} else {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.clearList();\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onInputHandler = (e: CustomEvent<FormInputEvent>) => {\n\t\te.stopPropagation()\n\t\tthis.value = e.detail.value\n\t\tthis.debouncedSearch(e)\n\t}\n\n\tprivate onSelectHandler(e: PointerEvent | CustomEvent | TouchEvent, index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit({\n\t\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\tselected: selected,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t\tthis.clearList();\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t\tthis.onSelectHandler(e)\n\t\t}\n\t}\n\n\tprivate onKeyDownHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Focus main input element\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Blur main input element\n\t */\n\t@Method()\n\tasync setBlur(): Promise<void> {\n\t\treturn this.inputRef.blur()\n\t}\n\n\t/**\n\t * Set options for list\n\t */\n\t@Method()\n\tasync setOptions(options: GovFormAutocompleteItem[]): Promise<void> {\n\t\tthis.list = Array.isArray(options) ? options : []\n\t\tthis.arrowCounter = -1\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync setProcessing(status: boolean): Promise<void> {\n\t\tthis.processing = status\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAGA,MAAM,SAAS,GAAG,CAAC,KAAc,KAChC,OAAO,KAAK,KAAK,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE;AAEhE,MAAM,yBAAyB,GAAG,CACxC,OAAkC,EAClC,KAAa,EACb,OAAe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GjC;;AAEG;IAEH,MAAM,aAAa,CAAC,MAAe,EAAA;AAClC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM;;AAGzB;;AAEG;IAEH,MAAM,iBAAiB,CAAC,QAAyC,EAAA;AAChE,QAAA,IAAI,CAAC,cAAc,GAAG,QAAQ;;AAG/B;;;AAGG;IAEH,MAAM,mBAAmB,CAAC,QAAmD,EAAA;AAC5E,QAAA,IAAI,CAAC,gBAAgB,GAAG,QAAQ;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-checkbox-group.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-checkbox-group","../../../packages/core/src/components/gov-form/group/gov-form-checkbox-group.tsx"],"sourcesContent":["/* Form Group */\n\n@use \"sass:map\";\n@use \"../../../sass/mixins\" as mixin;\n@use \"./gov-form-group-variables\" as variable;\n\n\ngov-form-group, .gov-form-group,\ngov-form-radio-group, .gov-form-radio-group,\ngov-form-checkbox-group, .gov-form-checkbox-group {\n\t@include mixin.reset-margin();\n\t@include mixin.base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t// SIZES\n\t@each $size, $definitions in variable.$gaps {\n\t\t&[gap=\"#{$size}\"] {\n\t\t\tgap: map.get($definitions, \"gap\");\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormCheckboxGroupClass,\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormCheckboxEvent} from \"../checkbox/gov-form-checkbox.types\"\nimport {FormCheckboxGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\nimport {propsValueToArray} from \"../../../utils/array.utils\"\n\n@Component({\n\ttag: \"gov-form-checkbox-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormCheckboxGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string | string[] = undefined\n\t/**\n /* Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormCheckboxGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormCheckboxEvent>) => {\n\t\tevent.stopPropagation()\n\t\tconst value = propsValueToArray<string[]>(this.value);\n\t\tif (!Array.isArray(value)) return;\n\t\tif (event.detail.checked) {\n\t\t\tthis.value = [...value, event.detail.value]\n\t\t} else {\n\t\t\tthis.value = value.filter((val) => val !== event.detail.value) ?? []\n\t\t}\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormCheckboxGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t\tthis.value = propsValueToArray(this.value)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-checkbox').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\telement.checked = this.value.includes(element.value);\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,ssEAAssE;;MCqBjtE,oBAAoB,GAAA,MAAA;AAGhC,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAKA;;AAEG;AACc,QAAA,IAAG,CAAA,GAAA,GAAwB,SAAS;AACrD;;AAEG;AACc,QAAA,IAAW,CAAA,WAAA,GAA8B,UAAU;AACpE;;AAEG;AACwC,QAAA,IAAK,CAAA,KAAA,GAAuB,SAAS;AAoBhF,QAAA,IAAA,CAAA,YAAY,GAAG,CAAC,KAAqC,KAAI;;YACxD,KAAK,CAAC,eAAe,EAAE;YACvB,MAAM,KAAK,GAAG,iBAAiB,CAAW,IAAI,CAAC,KAAK,CAAC;AACrD,YAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBAAE;AAC3B,YAAA,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE;AACzB,gBAAA,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;;iBACrC;AACN,gBAAA,IAAI,CAAC,KAAK,GAAG,CAAA,EAAA,GAAA,KAA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,CAAC,mBAAmB,EAAE,MAAM,CAAC;AACjD,YAAA,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC;AACrD,SAAC,CAAC;;IAGH,MAAM,GAAA;QACL,QACC,CAAC,CAAA,IAAI,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAA,EACjF,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACP;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-checkbox.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormCheckboxEvent} from \"./gov-form-checkbox.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-form-checkbox\",\n})\nexport class GovFormCheckbox {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = 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 checkbox component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter (https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate)\n\t */\n\t@Prop({reflect: true}) readonly indeterminate: boolean = false\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkboxes size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormCheckboxSizesType = \"m\"\n\t/**\n\t * Custom checkbox identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\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 * Emitted when the checkbox has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormCheckboxEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"checkbox\")\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\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\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\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\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormCheckboxClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root}\n\t\t\t\t\t\thydrated={this.hydrated}\n\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tinvalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tindeterminate={this.indeterminate}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={toBoolAttr(this.checked)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check-lg\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.indeterminate} name=\"dash-lg\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\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: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\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"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAiBa,eAAe,GAAA,MAAA;AAS3B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAFQ,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAcxB;;AAEG;AACmC,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AACrD;;;AAGG;AACc,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAC1C;;AAEG;AAC6B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACzD;;AAEG;AAC6B,QAAA,IAAa,CAAA,aAAA,GAAY,KAAK;AAK9D;;AAEG;AAC6B,QAAA,IAAI,CAAA,IAAA,GAA2B,GAAG;AAKlE;;AAEG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AA8BvD,QAAA,IAAmB,CAAA,mB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","sources":["../../../packages/core/src/components/gov-form/control/gov-form-control.tsx"],"sourcesContent":["import {Component, Element, h, Host, Prop} from \"@stencil/core\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {splitByWhitespace} from \"../../../utils/string.utils\"\nimport {FormControlClass, FormControlSizesType} from \"./constants\"\nimport {isString} from \"../../../utils/helpers.types\";\n\n@Component({\n\ttag: \"gov-form-control\",\n})\nexport class GovFormControl {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate observer: MutationObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormControlElement\n\t/**\n\t * Custom form element identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of a child form element does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly invalid: boolean = false\n\t/**\n\t/**\n\t* Indicates the form control is disabled\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t/**\n\t* Indicates the entered value of a child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean = false\n\t/**\n\t * Use control as a fieldset for better accessibility.\n\t * Note: Remember to set the legend attribute of the gov-form-label component\n\t */\n\t@Prop() readonly fieldset: boolean = false\n\t/**\n\t * Form element size.\n\t */\n\t@Prop() readonly size?: FormControlSizesType = \"m\"\n\n\tcomponentDidRender() {\n\t\tthis.syncControlMessages()\n\t\tthis.formElementDescriptionControl()\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tthis.observer?.disconnect()\n\t}\n\n\tprivate formElementDescriptionControl() {\n\t\tconst bottomSlot = this.host.querySelector(\".\" + FormControlClass.bottom)\n\t\tif (!bottomSlot) return\n\t\tthis.observer = new MutationObserver(\n\t\t\tfunction () {\n\t\t\t\tthis.syncControlMessages()\n\t\t\t}.bind(this),\n\t\t)\n\n\t\tthis.observer.observe(bottomSlot, {childList: true})\n\t}\n\n\tprivate syncControlMessages() {\n\t\tPromise.all(this.f.messageElements.map((message: HTMLGovFormMessageElement) => message.identifier())).then((ids: string[]) => {\n\t\t\tthis.f.mainElementsInControl.forEach((element: Element) => {\n\t\t\t\tconst currentValue = splitByWhitespace(element.getAttribute(\"aria-describedby\"))\n\t\t\t\telement.removeAttribute(\"aria-describedby\")\n\t\t\t\tif (Array.isArray(currentValue)) {\n\t\t\t\t\tcurrentValue.forEach(id => (isString(id) && id.indexOf(\"GovFormMessage\") === -1 ? ids.push(id) : null))\n\t\t\t\t}\n\t\t\t\tif (ids.length) {\n\t\t\t\t\telement.setAttribute(\"aria-describedby\", ids.join(\" \"))\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n\n\trender() {\n\t\tconst Tag = this.fieldset ? \"fieldset\" : \"div\"\n\t\treturn (\n\t\t\t<Host size={this.size} class={this.h.classes(FormControlClass.root)}>\n\t\t\t\t<Tag class={FormControlClass.holder}>\n\t\t\t\t\t{this.h.hasSlot(\"top\") && <slot name=\"top\"></slot>}\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{this.h.hasSlot(\"bottom\") && (\n\t\t\t\t\t\t<div class={FormControlClass.bottom}>\n\t\t\t\t\t\t\t<slot name=\"bottom\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MAYa,cAAc,GAAA,MAAA;AAK1B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAUA;;AAEG;AAC6B,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AACxD;;;AAGG;AAC6B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACzD;;;AAGG;AAC6B,QAAA,IAAO,CAAA,OAAA,GAAY,KAA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AgB,CAAC,MAAM,EAAA,EAClC,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAA,CAAE,CAChB,CACN,CACI,CACA;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-file.entry.esm.js","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\n// Validates a file against an `accept` attribute value, following the HTML spec\n// (https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept):\n// - \".ext\" → matched against the file NAME suffix (case-insensitive)\n// - \"type/*\" → matched against the file MIME group\n// - \"type/sub\" → exact MIME match\n// Matching the name (not only file.type) is essential: browsers often report an\n// empty or non-standard MIME for extensions like .jsonld, which the previous\n// MIME-only RegExp check always rejected.\nexport function fileAcceptValidation(file: File, accept: string): boolean {\n\tif (typeof accept !== 'string' || accept.trim().length === 0) {\n\t\treturn true\n\t}\n\tconst fileName = file.name.toLowerCase()\n\tconst fileType = (file.type || '').toLowerCase()\n\treturn accept\n\t\t.split(',')\n\t\t.map(token => token.trim().toLowerCase())\n\t\t.filter(token => token.length > 0)\n\t\t.some(token => {\n\t\t\tif (token.startsWith('.')) {\n\t\t\t\treturn fileName.endsWith(token)\n\t\t\t}\n\t\t\tif (token === '*' || token === '*/*') {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (token.endsWith('/*')) {\n\t\t\t\tconst group = token.slice(0, token.indexOf('/') + 1)\n\t\t\t\treturn fileType.startsWith(group)\n\t\t\t}\n\t\t\treturn fileType === token\n\t\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\t// Without `multiple`, only a single file is allowed. An incoming batch\n\t\t// (drag-drop, framework wrapper, programmatic assignment) can still carry\n\t\t// several files, so cap it to the last one — consistent with the\n\t\t// \"second pick replaces the first\" semantics. (Bug #30570313)\n\t\tconst incoming = this.multiple ? Array.from(files) : Array.from(files).slice(-1)\n\t\tif (!this.multiple && this.displayAttachments) {\n\t\t\tthis.files = []\n\t\t}\n\t\tincoming.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"],"names":[],"mappings":";;;;;;;;;;;;;AAAO,MAAM,aAAa,GAAG;AAC5B,IAAA,IAAI,EAAE,eAAe;AACrB,IAAA,IA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Ae,EAAE;AACnB,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,SAAS,EAAE,aAAa,CAAC,IAAI;AAC7B,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGK,IAAA,aAAa,CAAC,CAAa,EAAA;QAClC,CAAC,CAAC,eAAe,EAAE;AACnB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,aAAa,CAAC,IAAI;AAC7B,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGK,IAAA,eAAe,CAAC,CAAQ,EAAA;QAC/B,CAAC,CAAC,eAAe,EAAE;;AAGpB;;AAEG;AAEH,IAAA,MAAM,MAAM,GAAA;QACX,OAAO,IAAI,CAAC,QAAQ;;AAGrB;;AAEG;AAEH,IAAA,MAAM,UAAU,GAAA;QACf,OAAO,IAAI,CAAC,OAAO;;AAGpB;;AAEG;AAEH,IAAA,MAAM,KAAK,GAAA;AACV,QAAA,IAAI,CAAC,KAAK,GAAG,EAAE;AACf,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AAClB,YAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE;YACxB,IAAI,CAAC,oBAAoB,EAAE;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-group.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.tsx"],"sourcesContent":["import {Component, Element, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n FormGroupClass,\n FormGroupOrientation,\n FormGroupOrientationType,\n FormGroupSizes,\n FormGroupSizesType\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\n\n@Component({\n tag: \"gov-form-group\",\n})\nexport class GovFormGroup {\n private readonly h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovFormGroupElement\n /**\n * Gap's size.\n */\n @Prop() readonly gap?: FormGroupSizesType = undefined\n /**\n * Elements orientation\n */\n @Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\n @Watch(\"gap\")\n validateGap(newValue: string): void {\n if (newValue) {\n validateProp(FormGroupSizes, newValue, FormGroupClass.root)\n }\n }\n\n @Watch(\"orientation\")\n validateOrientation(newValue: string): void {\n if (newValue) {\n validateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n }\n }\n\n componentWillLoad(): void {\n this.validateGap(this.gap)\n this.validateOrientation(this.orientation)\n }\n\n\n\n render() {\n return (\n <Host gap={this.gap} class={this.h.classes(FormGroupClass.root)}>\n <slot></slot>\n </Host>\n )\n }\n}\n"],"names":[],"mappings":";;;;;;;;MAea,YAAY,GAAA,MAAA;AAGvB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAKA;;AAEG;AACc,QAAA,IAAG,CAAA,GAAA,GAAwB,SAAS;AACrD;;AAEG;AACc,QAAA,IAAW,CAAA,WAAA,GAA8B,UAAU;QAXlE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC5B;AAaD,IAAA,WAAW,CAAC,QAAgB,EAAA;QAC1B,IAAI,QAAQ,EAAE;YACZ,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC;;;AAK/D,IAAA,mBAAmB,CAAC,QAAgB,EAAA;QAClC,IAAI,QAAQ,EAAE;YACZ,YAAY,CAAC,oBAAoB,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC;;;IAIrE,iBAAiB,GAAA;AACf,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;AAC1B,QAAA,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC;;IAK5C,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAA,EAC7D,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-input.gov-skeleton.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.tsx","../../../packages/core/src/components/gov-loading/skeleton/constants.ts","../../../packages/core/src/components/gov-loading/skeleton/gov-skeleton.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormInputClass, FormInputSizes, FormInputSizesType, InputType, Type,} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\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({reflect:true}) readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t */\n\t@Prop({reflect:true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({attribute: \"input-type\"}) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly invalid: boolean\n\t/**\n\t * Accessible text for password display\n\t */\n\t@Prop({attribute: \"accessible-show-password-label\"}) readonly accessibleShowPasswordLabel = 'Zobrazit heslo'\n\t/**\n\t * Accessible text to hide the password\n\t */\n\t@Prop({attribute: \"accessible-hide-password-label\"}) readonly accessibleHidePasswordLabel = 'Skrýt heslo'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keyup\"}) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-hydrated\"}) govHydrated: EventEmitter<void>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keydown\"}) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\t@State() showPassword: boolean = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\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\tthis.govHydrated.emit();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\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\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{(this.h.hasSlot(\"icon-start\") && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t<slot name=\"icon-start\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType === 'password' && this.showPassword ? 'text' : this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\tvalue={this.value}\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{((this.success || this.invalid || this.h.hasSlot(\"icon-end\") || this.inputType === 'password') && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && this.inputType !== 'password' && <slot name=\"icon-end\"/>}\n\t\t\t\t\t\t\t{this.inputType === 'password' ? (\n\t\t\t\t\t\t\t\t<gov-button color={'primary'}\n\t\t\t\t\t\t\t\t\t\t\ttype={'base'}\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\taria-label={this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.showPassword = !this.showPassword}>\n\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"eye\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t</gov-button>) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n","import { pick } from \"../../../utils/utils\"\nimport { ValueOf } from \"../../../types/interfaces\"\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {Colors} from \"../../../core/constants/colors\";\n\nexport const SkeletonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type SkeletonSizesType = `${ValueOf<typeof SkeletonSizes>}`\n\nexport const SkeletonColors = pick(Colors, [\"PRIMARY\", \"NEUTRAL\"])\nexport type SkeletonColorType = `${ValueOf<typeof SkeletonColors>}`\n\nexport enum SkeletonShapes {\n\tCIRCLE = 'circle',\n\tLINE = 'line'\n}\nexport type SkeletonShapesType = `${ValueOf<typeof SkeletonShapes>}`\n\nexport enum SkeletonAnimation {\n\tPULSE = 'pulse',\n\tPROGRESS = 'progress',\n\tFALSE = 'false'\n}\nexport type SkeletonAnimationType = `${ValueOf<typeof SkeletonAnimation>}`\n\nexport const SkeletonClass = {\n\troot: 'gov-skeleton',\n}\n","import {Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {\n\tSkeletonAnimation,\n\tSkeletonAnimationType,\n\tSkeletonClass,\n\tSkeletonColorType,\n\tSkeletonShapes,\n\tSkeletonShapesType,\n\tSkeletonSizes,\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormInputSizesType} from \"../../gov-form/input/constants\";\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-skeleton\",\n})\nexport class GovSkeleton {\n\th: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovSkeletonElement\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Style variation of the skeleton.\n\t */\n\t@Prop() readonly color?: SkeletonColorType = \"neutral\"\n\t/**\n\t * Shape of the skeleton\n\t */\n\t@Prop() shape?: SkeletonShapesType = \"line\"\n\t/**\n\t * Width of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) width?: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) height?: string = null\n\t/**\n\t * Animation type\n\t */\n\t@Prop() animation?: SkeletonAnimationType = \"progress\"\n\n\titems: number[] = []\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SkeletonSizes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('shape')\n\tvalidateShape(newValue: string): void {\n\t\tvalidateProp(SkeletonShapes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('animation')\n\tvalidateAnimation(newValue: string): void {\n\t\tvalidateProp(SkeletonAnimation, newValue, SkeletonClass.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() {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateShape(this.shape)\n\t\tthis.validateAnimation(this.animation)\n\t\tthis.init()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tthis.init()\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\tinit() {\n\t\tthis.items.fill(1)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t color={this.color}\n\t\t\t\t class={{\n\t\t\t\t\t [SkeletonClass.root]: true,\n\t\t\t\t\t circle: this.shape === \"circle\",\n\t\t\t\t\t line: this.shape === \"line\",\n\t\t\t\t\t progress: this.animation === \"progress\",\n\t\t\t\t\t pulse: this.animation === \"pulse\",\n\t\t\t\t }}\n\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t aria-busy=\"true\"\n\t\t\t\t aria-valuemin=\"0\"\n\t\t\t\t aria-valuemax=\"100\"\n\t\t\t\t role=\"progressbar\"\n\t\t\t\t tabindex=\"0\"\n\t\t\t\t style={{width: this.width, height: this.height}}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAcA,IAAK,IAGJ;AAHD,CAAA,UAAK,IAAI,EAAA;AACR,IAAA,IAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,IAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACtB,CAAC,EAHI,IAAI,KAAJ,IAAI,GAGR,EAAA,CAAA,CAAA;MAKY,YAAY,GAAA,MAAA;AAOxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;AAmBA;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAwB,GAAG;AAiBhD;;;AAGG;AAC4B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACxD;;AAEG;AAC4B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AA6CxD;;;AAGG;AACuC,QAAA,IAAS,CAAA,SAAA,GAAc,MAAM;AAUvE;;AAEG;AAC2D,QAAA,IAA2B,CAAA,2BAAA,GAAG,gBAAgB;AAC5G;;AAEG;AAC2D,QAAA,IAA2B,CAAA,2BAAA,GAAG,aAAa;AA0BhG,QAAA,IAAY,CAAA,YAAA,GAAY,KAAK;AAe7B,QAAA,IAAmB,CAAA,mBA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aAAa,EAClB,QAAQ,EAAC,GAAG,EACZ,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,EAAA,CAAA,CAC3C;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-label.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/label/gov-form-label.tsx"],"sourcesContent":["import { Component, Event, EventEmitter, h, Prop, Host } from '@stencil/core'\nimport { FormLabelClass, FormLabelSizesTypes } from './constants'\n\n@Component({\n\ttag: 'gov-form-label',\n})\nexport class GovFormLabel {\n\t/**\n\t * Identifier for label.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Label's size.\n\t */\n\t@Prop() readonly size?: FormLabelSizesTypes = 'm'\n\t/**\n\t * Set whether the input is required or not.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Use label as a legend for better accessibility.\n\t * Note: Don't forget to set the fieldset attribute of the gov-form-control component\n\t */\n\t@Prop() readonly legend: boolean = false\n\t/**\n\t * Emitted when the label click.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\n\trender() {\n\t\tconst Tag = this.legend ? 'legend' : 'label'\n\t\treturn (\n\t\t\t<Host class={FormLabelClass.root} size={this.size}>\n\t\t\t\t<Tag class={FormLabelClass.label} htmlFor={this.identifier} onClick={() => this.govClick.emit()}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{this.required ? <span class=\"gov-color--text-status-error\"> *</span> : null}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;MAMa,YAAY,GAAA,MAAA;AAHzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAQC;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAyB,GAAG;AACjD;;AAEG;AACc,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAC1C;;;AAGG;AACc,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAiBxC;IAXA,MAAM,GAAA;AACL,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,OAAO;QAC5C,QACC,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAA,EAChD,CAAC,CAAA,GAAG,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAA,EAC9F,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACZ,IAAI,CAAC,QAAQ,GAAG,YAAM,KAAK,EAAC,8BAA8B,EAAA,EAAA,SAAA,CAAe,GAAG,IAAI,CAC5E,CACA;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-multi-select.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {Nullable} from '../../../types/interfaces'\nimport {createID, removeDiacritics} from '../../../utils/string.utils'\nimport {FormAutocompleteEvent} from '../autocomplete/gov-form-autocomplete.types'\nimport {FormMultiSelectClass, FormMultiselectSizes, FormMultiselectSizesType} from './constants'\nimport {\n\tFormMultiselectEvent,\n\tGovFormMultiSelectItem,\n\tGovFormMultiSelectSelectedItem\n} from './gov-form-multi-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: 'gov-form-multi-select',\n})\nexport class GovFormMultiSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\n\tprivate selectRef?: HTMLSelectElement\n\tprivate autocompleteRef?: HTMLGovFormAutocompleteElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\tprivate readonly listId: string\n\n\tconstructor() {\n\t\tthis.selectId = createID('GovSelect')\n\t\tthis.listId = createID('GovMultiList')\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of multi-select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string | GovFormMultiSelectSelectedItem[]\n\t/**\n\t * Options of multi-select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormMultiSelectItem[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Custom select placeholder.\n\t */\n\t@Prop({attribute: 'placeholder'}) readonly placeholder: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormMultiselectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Option to hide the list of selected items\n\t */\n\t@Prop({attribute: 'hide-selected-list'}) readonly hideSelectedList: 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 select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly invalid: boolean\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Custom message for when data is loaded\n\t */\n\t@Prop({attribute: 'message-loading'}) readonly messageLoading: string = 'Načítám...'\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormMultiselectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormMultiselectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormMultiselectEvent>\n\t/**\n\t * Emitted when an item is selected\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormMultiselectEvent>\n\t/**\n\t * Emitted when an item is removed\n\t */\n\t@Event({eventName: 'gov-remove'}) govRemove: EventEmitter<FormMultiselectEvent>\n\n\t@State() focused: boolean\n\t@State() valueState: string\n\t@State() selectedOptionsState: GovFormMultiSelectSelectedItem[] = []\n\t@State() optionsState: GovFormMultiSelectItem[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormMultiselectSizes, newValue, FormMultiSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormMultiSelectItem[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('value')\n\twatchValue(newValue: string | GovFormMultiSelectItem[]): void {\n\t\tthis.selectedOptionsState = propsValueToArray(newValue)\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\tthis.initAutocomplete()\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.selectedOptionsState = propsValueToArray(this.value)\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 getAvailableOptions(ignoreFilter = false): GovFormMultiSelectItem[] {\n\t\tif (Array.isArray(this.optionsState) && this.optionsState.length) {\n\t\t\tif (ignoreFilter) {\n\t\t\t\treturn this.optionsState;\n\t\t\t}\n\t\t\treturn this.optionsState.filter((option) => {\n\t\t\t\tconst selectedIndex = this.selectedValueIndex(option.value)\n\t\t\t\treturn (selectedIndex !== -1 || option?.disabled) ? false : true\n\t\t\t}).map((option) => ({name: option.label ?? option.value, value: option.value}))\n\t\t}\n\t\treturn Array.from(this.selectRef.querySelectorAll('option'))\n\t\t\t.filter((option: HTMLOptionElement) => {\n\t\t\t\tif (ignoreFilter) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tconst selectedIndex = this.selectedValueIndex(option.value)\n\t\t\t\treturn !(option.disabled || option.selected || selectedIndex > -1)\n\t\t\t})\n\t\t\t.map((option: HTMLOptionElement) => ({name: option.textContent, value: option.value}))\n\t}\n\n\tprivate initAutocomplete() {\n\t\tthis.autocompleteRef?.addEventListener('gov-select', this.onSelectHandler.bind(this))\n\t\tthis.autocompleteRef?.addEventListener('gov-input', this.onInputHandler.bind(this))\n\t\tthis.autocompleteRef?.addEventListener('gov-focus', this.onFocusHandler.bind(this))\n\t\tthis.autocompleteRef?.addEventListener('gov-blur', this.onBlurHandler.bind(this))\n\t\tthis.autocompleteRef\n\t\t\t?.setSearchCallback(searchString => {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\tconst data = this.getAvailableOptions()\n\t\t\t\t\tif (String(searchString).length === 0) {\n\t\t\t\t\t\treturn resolve(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(\n\t\t\t\t\t\tdata.filter(({label, value}) => {\n\t\t\t\t\t\t\tif (!label) label = value;\n\t\t\t\t\t\t\treturn removeDiacritics(label).toLowerCase().indexOf(removeDiacritics(searchString).toLowerCase()) > -1\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t})\n\t\t\t.finally()\n\t}\n\n\tprivate selectedValueIndex(value: GovFormMultiSelectSelectedItem) {\n\t\treturn this.selectedOptionsState.findIndex((selected) => selected === value)\n\t}\n\n\tprivate getOptionElement(value: GovFormMultiSelectSelectedItem): Nullable<HTMLOptionElement> {\n\t\treturn this.selectRef.querySelector('option[value=\"' + value + '\"]') as HTMLOptionElement\n\t}\n\n\tprivate getOption(value: GovFormMultiSelectSelectedItem): GovFormMultiSelectItem | null {\n\t\treturn this.getAvailableOptions(true).find((option) => option.value === value) ?? null;\n\t}\n\n\tprivate selectOption(newOption: GovFormMultiSelectSelectedItem, notify = true) {\n\t\tconst index = this.selectedValueIndex(newOption)\n\t\tif (index === -1) {\n\t\t\tthis.selectedOptionsState = [...this.selectedOptionsState, newOption]\n\t\t\tthis.value = this.selectedOptionsState;\n\t\t\tif (notify) {\n\t\t\t\tthis.govChange.emit({\n\t\t\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\t\t\tvalue: this.selectedOptionsState,\n\t\t\t\t})\n\t\t\t\tthis.govSelect.emit({\n\t\t\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\t\t\tvalue: this.selectedOptionsState,\n\t\t\t\t})\n\t\t\t}\n\t\t\tconst option = this.getOptionElement(newOption)\n\t\t\tif (option) {\n\t\t\t\toption.selected = true\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate removeOption(removeOption: GovFormMultiSelectSelectedItem, notify = true) {\n\t\tconst index = this.selectedValueIndex(removeOption)\n\t\tif (index !== -1) {\n\t\t\tthis.selectedOptionsState.splice(index, 1)\n\t\t\tthis.selectedOptionsState = [...this.selectedOptionsState]\n\t\t\tthis.value = this.selectedOptionsState;\n\t\t\tif (notify) {\n\t\t\t\tthis.govChange.emit({\n\t\t\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\t\t\tvalue: this.selectedOptionsState,\n\t\t\t\t})\n\t\t\t\tthis.govRemove.emit({\n\t\t\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\t\t\tvalue: this.selectedOptionsState,\n\t\t\t\t})\n\t\t\t}\n\t\t\tconst option = this.getOptionElement(removeOption)\n\t\t\tif (option) {\n\t\t\t\toption.selected = false\n\t\t\t}\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\n\t\ttick(() => {\n\t\t\tthis.selectRef.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\t\tif (option.selected) {\n\t\t\t\t\tthis.selectOption(option.value, false)\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormMultiSelectClass.root} size={this.size}>\n\t\t\t\t<div class={FormMultiSelectClass.wrap}>\n\t\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t\t<gov-form-autocomplete\n\t\t\t\t\t\tvalue={this.valueState}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tidentifier={this.identifier || this.selectId}\n\t\t\t\t\t\trequired={false}\n\t\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tmessage-empty={this.messageEmpty}\n\t\t\t\t\t\tmessage-loading={this.messageLoading}\n\t\t\t\t\t\tref={el => (this.autocompleteRef = el as HTMLGovFormAutocompleteElement)}\n\t\t\t\t\t\tminlength={0}\n\t\t\t\t\t\taria-owns={this.listId}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.success && <gov-icon slot=\"validation-icon\" class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t{this.invalid && <gov-icon slot=\"validation-icon\" class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t<gov-icon slot=\"icon-end\" class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t\t</gov-form-autocomplete>\n\t\t\t\t\t<select\n\t\t\t\t\t\thidden\n\t\t\t\t\t\tclass={'hidden-select-list'}\n\t\t\t\t\t\taria-hidden={toBoolAttr(true)}\n\t\t\t\t\t\tmultiple\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\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>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\tconst selectedOption = this.selectedValueIndex(option.value);\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={selectedOption > -1}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t\t</div>\n\t\t\t\t{this.hideSelectedList === false ? (\n\t\t\t\t\t<ul role=\"listbox\" id={this.listId} class={FormMultiSelectClass.list}>\n\t\t\t\t\t\t{Array.isArray(this.selectedOptionsState) && this.selectedOptionsState.map(selected => {\n\t\t\t\t\t\t\tconst option = this.getOption(selected);\n\t\t\t\t\t\t\tif (!option) return null\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<li class={FormMultiSelectClass.item} role=\"option\">\n\t\t\t\t\t\t\t\t\t{option.label ?? option.value}\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\taria-label={`Odebrat vybranou položku ${option.label}`}\n\t\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onTagRemove(selected)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name=\"x-lg\" 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</li>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</ul>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.selectedOptionsState,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.selectedOptionsState,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: CustomEvent<FormAutocompleteEvent>) {\n\t\tthis.valueState = e.detail.value\n\t\te.stopPropagation()\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent<FormAutocompleteEvent>) {\n\t\te.stopPropagation()\n\t\tconst value = e.detail.selected\n\t\tthis.selectOption(value.value)\n\t\tthis.valueState = ''\n\t\tthis.autocompleteRef.clearValue().finally()\n\t\tthis.autocompleteRef.focus()\n\t}\n\n\tprivate onTagRemove(removeOption: GovFormMultiSelectSelectedItem) {\n\t\tthis.removeOption(removeOption)\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.valueState = value\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAuBa,kBAAkB,GAAA,MAAA;AAW9B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;AAyBA;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAA8B,GAAG;AAKtD;;AAEG;AAC+C,QAAA,IAAgB,CAAA,gBAAA,GAAY,KAAK;AACnF;;;AAGG;AACc,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAC1C;;;AAGG;AAC6B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASzD;;AAEG;AAC0C,QAAA,IAAY,CAAA,YAAA,GAAW,gCAAgC;AACpG;;AAEG;AAC4C,QAAA,IAAc,CAAA,cAAA,GAAW,YAAY;AAwB3E,QAAA,IAAoB,CAAA,oBAAA,GAAqC,EAAE;AAC3D,QAAA,IAAY,CAAA,YAAA,GAA6B,EAAE;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CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,oBAAoB,CAAC,IAAI;AACpC,YAAA,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,oBAAoB;AAChC,SAAA,CAAC;;AAGK,IAAA,cAAc,CAAC,CAAqC,EAAA;QAC3D,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK;QAChC,CAAC,CAAC,eAAe,EAAE;;AAGZ,IAAA,eAAe,CAAC,CAAqC,EAAA;QAC5D,CAAC,CAAC,eAAe,EAAE;AACnB,QAAA,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ;AAC/B,QAAA,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC;AAC9B,QAAA,IAAI,CAAC,UAAU,GAAG,EAAE;QACpB,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE;AAC3C,QAAA,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE;;AAGrB,IAAA,WAAW,CAAC,YAA4C,EAAA;AAC/D,QAAA,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;;AAGhC;;AAEG;IAEH,MAAM,QAAQ,CAAC,OAAsB,EAAA;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC;;AAGrC;;AAEG;IAEH,MAAM,QAAQ,CAAC,KAAa,EAAA;AAC3B,QAAA,IAAI,CAAC,UAAU,GAAG,KAAK;;AAGxB;;AAEG;AAEH,IAAA,MAAM,MAAM,GAAA;QACX,OAAO,IAAI,CAAC,SAAS;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-password-power.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/password-power/constants.ts","../../../packages/core/src/components/gov-form/password-power/gov-form-password-power.tsx"],"sourcesContent":["export const FormPasswordPowerClass = {\n\troot: 'gov-form-password-power',\n bar: 'gov-form-password-power__bar',\n text: 'gov-form-password-power__text',\n}\n","import {Component, h, Host, Prop} from '@stencil/core'\nimport {FormPasswordPowerClass} from './constants'\n\n@Component({\n\ttag: 'gov-form-password-power',\n})\nexport class GovFormPasswordPower {\n\t/**\n\t * Password power: 0 - none, 1 - weak, 2 - medium, 3 - strong\n\t */\n\t@Prop({reflect: true}) readonly power: number\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormPasswordPowerClass.root}>\n\t\t\t\t\t<span class={FormPasswordPowerClass.bar}>\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class={FormPasswordPowerClass.text}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;AAAO,MAAM,sBAAsB,GAAG;AACrC,IAAA,IAAI,EAAE,yBAAyB;AAC5B,IAAA,GAAG,EAAE,8BAA8B;AACnC,IAAA,IAAI,EAAE,+BAA+B;CACxC;;MCEY,oBAAoB,GAAA,MAAA;;;;IAMhC,MAAM,GAAA;QACL,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,sBAAsB,CAAC,IAAI,EAAA,EACtC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAE,sBAAsB,CAAC,GAAG,EAAA,EACrC,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACb,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACb,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACR,EACP,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAE,sBAAsB,CAAC,IAAI,EAAA,EACtC,CAAO,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACF,CACF;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-radio-group.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-radio-group","../../../packages/core/src/components/gov-form/group/gov-form-radio-group.tsx"],"sourcesContent":["/* Form Group */\n\n@use \"sass:map\";\n@use \"../../../sass/mixins\" as mixin;\n@use \"./gov-form-group-variables\" as variable;\n\n\ngov-form-group, .gov-form-group,\ngov-form-radio-group, .gov-form-radio-group,\ngov-form-checkbox-group, .gov-form-checkbox-group {\n\t@include mixin.reset-margin();\n\t@include mixin.base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t// SIZES\n\t@each $size, $definitions in variable.$gaps {\n\t\t&[gap=\"#{$size}\"] {\n\t\t\tgap: map.get($definitions, \"gap\");\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType,\n\tFormRadioGroupClass\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioEvent} from \"../radio/gov-form-radio.types\"\nimport {FormRadioGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\n\n@Component({\n\ttag: \"gov-form-radio-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormRadioGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string = undefined\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormRadioEvent>) => {\n\t\tevent.stopPropagation()\n\t\tthis.value = event.detail.value\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormRadioGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-radio').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\telement.checked = element.value === this.value;\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>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AC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,KAAI;YAChE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,EAAE;gBAC/C,OAAO,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;;AAE1D,YAAA,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,MAAM,CAAC;YACjD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK;AAC/C,SAAC,CAAC;;IAGH,MAAM,GAAA;QACL,QACC,CAAC,CAAA,IAAI,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAA,EACjF,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACP;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-radio.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioClass, FormRadioSizes, FormRadioSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormRadioEvent} from \"./gov-form-radio.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-radio\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly radioId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = 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 radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio 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 * Emitted when the radio has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\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\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\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\tconst wrapRadio = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapRadio(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\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: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\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"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAiBa,YAAY,GAAA,MAAA;AASxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAFQ,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAcxB;;AAEG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChE;;AAEG;AACmC,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AACrD;;;AAGG;AACc,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAC1C;;;AAGG;AAC6B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAKzD;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAwB,GAAG;AAkCvC,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;AAtE5C,QAAA,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC;QAEnC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB;AAuDD,IAAA,YAAY,CAAC,QAAgB,EAAA;QAC5B,YAAY,CAAC,cAAc,EAAE,QAAQ,EA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AAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;AACrB,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGK,IAAA,eAAe,CAAC,CAAQ,EAAA;QAC/B,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO;QACrD,CAAC,CAAC,eAAe,EAAE;AACnB,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAE,cAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;AACrB,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGH;;AAEG;AAEH,IAAA,MAAM,MAAM,GAAA;QACX,OAAO,IAAI,CAAC,QAAQ;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-range.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/range/constants.ts","../../../packages/core/src/components/gov-form/range/gov-form-range.tsx"],"sourcesContent":["import {pick} from \"../../../utils/utils\";\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {ValueOf} from \"../../../types/interfaces\";\n\nexport const FormRangeSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type FormRangeSizesType = `${ValueOf<typeof FormRangeSizes>}`\n\nexport const FormRangeClass = {\n\troot: 'gov-form-range',\n\tfill: 'gov-form-range--fill',\n\tinput: 'gov-form-range--input',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {FormRangeClass, FormRangeSizes, FormRangeSizesType} from './constants'\nimport {GovHost} from \"../../../helpers/Dom/template.types\";\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\";\nimport {validateProp} from \"../../../helpers/Validate/props\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {GovForm} from \"../../../helpers/Dom/form.types\";\nimport {govForm} from \"../../../helpers/Dom/form\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {isNumber} from \"../../../utils/helpers.types\";\nimport {createID} from \"../../../utils/string.utils\";\nimport {FormInputEvent} from \"../input/gov-form-input.types\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: 'gov-form-range',\n})\nexport class GovFormRange {\n\tprivate inputRef?: HTMLInputElement\n\tprivate outputRef?: HTMLOutputElement\n\tprivate fillRef?: HTMLDivElement\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.inputId = createID(\"GovInput\")\n\t}\n\n\t@Element() host: HTMLGovFormRangeElement\n\t/**\n\t * Range’s size\n\t */\n\t@Prop() readonly size?: FormRangeSizesType = \"m\"\n\t/**\n\t * Value of range\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom range identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Name of the range\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Minimum value that is acceptable\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Defines size of each step\n\t */\n\t@Prop() readonly step?: string | number\n\t/**\n\t * Show tooltip with current value\n\t */\n\t@Prop() readonly tooltip?: boolean = false\n\t/**\n\t * Show input with current value\n\t */\n\t@Prop() readonly input?: boolean = false\n\t/**\n\t * Links a <datalist/> element to a <input type=\"range\">, providing value markers as guidance for the user\n\t */\n\t@Prop() readonly listIdentifier?: string\n\t/**\n\t * Set whether the range is required or not\n\t */\n\t@Prop({reflect: true}) readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application\n\t */\n\t@Prop({reflect: true}) readonly invalid: boolean\n\t/**\n\t * Makes the range component disabled\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRangeSizes, newValue, FormRangeClass.root)\n\t}\n\n\t@Watch(\"value\")\n\twatchValue(): void {\n\t\tthis.controlOutputPosition();\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t}\n\n\tprivate get getThumbWidth() {\n\t\tconst styles = window.getComputedStyle(this.inputRef);\n\t\treturn parseFloat(styles.getPropertyValue('--thumb-size')) || 1;\n\t}\n\n\tprivate controlOutputPosition() {\n\t\tconst valueInt = +this.value;\n\t\tconst min = +this.inputRef.min;\n\t\tconst max = +this.inputRef.max;\n\n\t\tconst thumbWidth = (this.getThumbWidth * 16);\n\t\tconst rangeWidth = this.inputRef.offsetWidth;\n\t\tconst percentage = ((valueInt - min) / (max - min)) * 100;\n\n\t\tlet tooltipOffset = ((percentage / 100) * (rangeWidth - thumbWidth)) + (thumbWidth / 2);\n\n\t\tif (this.outputRef) {\n\t\t\tthis.outputRef.textContent = this.value;\n\t\t\tconst outputWidth = this.outputRef.offsetWidth / 2;\n\t\t\tthis.outputRef.style.left = `${tooltipOffset - outputWidth}px`;\n\t\t}\n\t\tif (this.fillRef) {\n\t\t\tthis.fillRef.style.width = `${tooltipOffset}px`\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.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\ttick(this.controlOutputPosition.bind(this))\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\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormRangeClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<input type=\"range\"\n\t\t\t\t\t\t ref={el => (this.inputRef = el)}\n\t\t\t\t\t\t onInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\t onFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t onBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t id={this.identifier || this.inputId}\n\t\t\t\t\t\t name={this.name}\n\t\t\t\t\t\t min={this.min}\n\t\t\t\t\t\t max={this.max}\n\t\t\t\t\t\t step={this.step}\n\t\t\t\t\t\t list={this.listIdentifier}\n\t\t\t\t\t\t value={this.value}\n\t\t\t\t\t\t required={this.required}\n\t\t\t\t\t\t disabled={this.disabled}\n\t\t\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t\t\t aria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t aria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t aria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div class={FormRangeClass.fill} ref={el => (this.fillRef = el)}></div>\n\t\t\t\t\t{this.tooltip ?\n\t\t\t\t\t\t<output htmlFor={this.name} ref={el => (this.outputRef = el)}>\n\t\t\t\t\t\t\t{this.value}\n\t\t\t\t\t\t</output>\n\t\t\t\t\t\t: null}\n\t\t\t\t\t<slot name=\"datalist\"></slot>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t\t{this.input ?\n\t\t\t\t\t<gov-form-input\n\t\t\t\t\t\ton-gov-input={this.onCustomInputHandler.bind(this)}\n\t\t\t\t\t\tclass={FormRangeClass.input}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t{...this.inheritedAttributes}>\n\t\t\t\t\t</gov-form-input>\n\t\t\t\t\t: null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCustomInputHandler(e: InputEvent) {\n\t\tconst value = (e.target as HTMLInputElement).value;\n\t\tif (this.step && isNumber(+this.step)) {\n\t\t\tconst numValue = +value;\n\t\t\tconst numMin = +this.min;\n\t\t\tconst numMax = +this.max;\n\t\t\tconst numStep = +this.step;\n\n\t\t\tif (isNaN(numValue)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (numValue < numMin || numValue > numMax) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst diff = numValue - numMin;\n\t\t\tif (diff % numStep !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tthis.govInput.emit({\n\t\t\t\tcomponent: FormRangeClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value;\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormRangeClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRangeClass.root,\n\t\t\tvalue: this.value,\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: FormRangeClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;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AC9B,KAAK,EAAE,IAAI,CAAC,KAAK;AACjB,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGK,IAAA,aAAa,CAAC,CAAa,EAAA;QAClC,CAAC,CAAC,eAAe,EAAE;AACnB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,cAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;AACjB,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGH;;AAEG;IAEH,MAAM,QAAQ,CAAC,OAAsB,EAAA;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC;;AAGpC;;AAEG;IAEH,MAAM,QAAQ,CAAC,KAAa,EAAA;AAC3B,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;;AAGnB;;AAEG;AAEH,IAAA,MAAM,UAAU,GAAA;AACf,QAAA,IAAI,CAAC,KAAK,GAAG,EAAE;AACf,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE;;AAGzB;;AAEG;AAEH,IAAA,MAAM,MAAM,GAAA;QACX,OAAO,IAAI,CAAC,QAAQ;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-search.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/search/constants.ts","../../../packages/core/src/components/gov-form/search/gov-form-search.tsx"],"sourcesContent":["import { Colors } from '../../../core/constants/colors'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\nimport {Sizes} from \"../../../core/constants/sizes\";\n\nexport const FormSearchSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type FormSearchSizesType = `${ValueOf<typeof FormSearchSizes>}`\n\nexport const FormSearchColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type FormSearchColorType = `${ValueOf<typeof FormSearchColors>}`\n\nexport const FormSearchClass = {\n\troot: 'gov-form-search',\n}\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FormSearchClass, FormSearchSizesType, FormSearchColorType} from './constants'\n\n@Component({\n\ttag: 'gov-form-search',\n})\nexport class GovFormSearch {\n\t@Element() host: HTMLGovFormSearchElement\n\t/**\n\t * Search’s size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormSearchSizesType = \"m\"\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop({reflect: true}) readonly color: FormSearchColorType = 'neutral'\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root} color={this.color} size={this.size}>\n\t\t\t\t<slot name=\"input\"/>\n\t\t\t\t<slot name=\"button-erase\"/>\n\t\t\t\t<slot name=\"button\"/>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;AAK+B,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAG7B,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;AAG5D,MAAM,eAAe,GAAG;AAC9B,IAAA,IAAI,EAAE,iBAAiB;CACvB;;MCPY,aAAa,GAAA,MAAA;AAH1B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAKC;;AAEG;AAC6B,QAAA,IAAI,CAAA,IAAA,GAAyB,GAAG;AAChE;;AAEG;AAC6B,QAAA,IAAK,CAAA,KAAA,GAAwB,SAAS;AAWtE;IATA,MAAM,GAAA;AACL,QAAA,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAA,EACpE,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,OAAO,EAAE,CAAA,EACpB,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,cAAc,EAAE,CAAA,EAC3B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,EAAE,CAAA,CACf;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-select.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.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-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\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 * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\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 * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.syncSelectValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\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\n\t\tthis.syncSelectValue()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\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 syncSelectValue() {\n\t\tif (this.selectRef && this.value !== undefined && this.selectRef.value !== this.value) {\n\t\t\tthis.selectRef.value = this.value\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.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\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\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>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAiBa,aAAa,GAAA,MAAA;AAQzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAmBA;;AAEG;AACc,QAAA,IAAI,CAAA,IAAA,GAAyB,GAAG;AAKjD;;;AAGG;AACc,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAK1C;;;AAGG;AAC6B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAkBhD,QAAA,IAAY,CAAA,YAAA,GAAuB,EAAE;AAyBrC,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;QAlF5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC;AACrC;AAyDD,IAAA,YAAY,CAAC,QAAgB,EAAA;QAC5B,YAAY,CAAC,eAAe,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC;;AAI9D,IAAA,YAAY,CAAC,QAAqC,EAAA;AACjD,QAAA,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,QAAQ,CAAC;;IAOhD,iBAAiB,GAAA;QAChB,IAAI,CAAC,gBAAgB,EAAE;;IAIxB,UAAU,GAAA;QACT,IAAI,CAAC,eAAe,EAAE;;IAKf,gBAAgB,GAAA;QACvB,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;AAC3C,QAAA,IAAI,CAAC,CAAC,CAAC,iBAAi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EH,IAAA,MAAM,MAAM,GAAA;QACX,OAAO,IAAI,CAAC,SAAS;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-form-switch.entry.esm.js","sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormSwitchClass, FormSwitchSizes, FormSwitchSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormSwitchEvent} from \"./gov-form-switch.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-form-switch\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = 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 */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the switch component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch 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 * Emitted when the switch has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\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.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\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\tconst wrapSwitch = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormSwitchClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\tconst noLabelSlot = !this.host.querySelector('[slot=\"label\"]');\n\t\tconst hostClasses = `${this.h.classes(FormSwitchClass.root)}${noLabelSlot ? ` ${FormSwitchClass.noLabel}` : ''}`;\n\n\t\treturn (\n\t\t\t<Host class={hostClasses} hydrated={this.hydrated} checked={this.checked}\n\t\t\t\t size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapSwitch(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}>\n\t\t\t\t\t\t\t\t{this.checked && <gov-icon name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\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: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\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"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAiBa,aAAa,GAAA,MAAA;AASzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAFQ,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAcxB;;AAEG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChE;;AAEG;AACmC,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AACrD;;AAEG;AACc,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAC1C;;AAEG;AAC6B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAKzD;;AAEG;AAC6B,QAAA,IAAI,CAAA,IAAA,GAAyB,GAAG;AAkCvD,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;AApE5C,QAAA,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC;QAEzC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB;AAqDD,IAAA,YAAY,CAAC,QAAgB,EAAA;QAC5B,YAAY,CAAC,eAAe,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC;;IAM9D,aAAa,GAAA;QACZ,IAAI,CAAC,gBAAgB,EAAE;;IAKhB,gBAAgB,GAAA;QACvB,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;AAC3C,QAAA,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7D,QAAA,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,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B,SAAA,CAAC;;AAGK,IAAA,aAAa,CAAC,CAAa,EAAA;QAClC,CAAC,CAAC,eAAe,EAAE;AACnB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;AACjB,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGK,IAAA,eAAe,CAAC,CAAQ,EAAA;QAC/B,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO;QACrD,CAAC,CAAC,eAAe,EAAE;AACnB,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;AACjB,YAAA,aAAa,EAAE,CAAC;AAChB,SAAA,CAAC;;AAGH;;AAEG;AAEH,IAAA,MAAM,MAAM,GAAA;QACX,OAAO,IAAI,CAAC,QAAQ;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-grid-item.entry.esm.js","sources":["../../../packages/core/src/components/gov-grid/gov-grid-item.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridItemClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid-item',\n})\nexport class GovGridItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovGridItemElement\n\t/**\n\t * Cell size as a fraction of 1/12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span' }) readonly column: string = \"12\";\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span-sm' }) readonly columnSm?: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span-md' }) readonly columnMd?: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span-lg' }) readonly columnLg?: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span-xl' }) readonly columnXl?: string\n\t/**\n\t * Connects rows in the grid\n\t */\n\t@Prop({ attribute: 'row-span' }) readonly row: string = \"1\";\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'row-span-sm' }) readonly rowSm?: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'row-span-md' }) readonly rowMd?: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'row-span-lg' }) readonly rowLg?: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'row-span-xl' }) readonly rowXl?: string\n\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(GridItemClass.root)}\n\t\t\t\trole=\"listitem\"\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;MAQa,WAAW,GAAA,MAAA;AAGvB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAKA;;AAEG;AACuC,QAAA,IAAM,CAAA,MAAA,GAAW,IAAI;AAiB/D;;AAEG;AACuC,QAAA,IAAG,CAAA,GAAA,GAAW,GAAG;QA3B1D,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;IA6CD,MAAM,GAAA;AACL,QAAA,QACC,CAAC,CAAA,IAAI,qDACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EACzC,IAAI,EAAC,UAAU,EAAA,EAEf,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACF;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-grid.entry.esm.js","sources":["../../../packages/core/src/components/gov-grid/gov-grid.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridClass, GridSizesType } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid',\n})\nexport class GovGrid {\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 * Horizontal align of cells\n\t */\n\t@Prop({ attribute: 'align-items', reflect: true }) alignItems?: 'start' | 'center' | 'end' | 'stretch';\n\n\t/**\n\t * Vertical align of cells\n\t */\n\t@Prop({ attribute: 'justify-items', reflect: true }) justifyItems?: 'start' | 'center' | 'end' | 'stretch';\n\n\t/**\n\t * The gap property creates consistent spacing between flex items in the container.\n\t */\n\t@Prop({ attribute: 'gap', reflect: true }) gap?: GridSizesType;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(GridClass.root)} role=\"list\">\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;MAQa,OAAO,GAAA,MAAA;AAGnB,IAAA,WAAA,CAAA,OAAA,EAAA;;QACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B;IAmBD,MAAM,GAAA;AACL,QAAA,QACC,CAAC,CAAA,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,MAAM,EAAA,EACvD,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACP;;;;;;;"}
|