@gov-design-system-ce/components 4.6.3 → 4.6.5-b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/gov-banner.cjs.entry.js +3 -3
- package/dist/cjs/gov-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-banner.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-flex_3.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +67 -23
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-autocomplete.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +65 -12
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-file.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +8 -15
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-tooltip.gov-tooltip-content.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-tooltip_2.cjs.entry.js +34 -9
- package/dist/cjs/gov-tooltip_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +2 -2
- package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
- package/dist/cjs/index-BEF5cZxd.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-banner/gov-banner.js +4 -4
- package/dist/collection/components/gov-banner/gov-banner.js.map +1 -1
- package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js +14 -0
- package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js.map +1 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +76 -22
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +39 -3
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js +2 -2
- package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +8 -15
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +22 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +31 -8
- package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
- package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
- package/dist/collection/utils/file.utils.js +28 -9
- package/dist/collection/utils/file.utils.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-banner.js +1 -1
- package/dist/components/gov-banner.js.map +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-collapsible.js.map +1 -1
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/gov-flex.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox-group.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-control.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-message.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-radio-group.js +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-range.js +1 -1
- package/dist/components/gov-form-range.js.map +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-search.js.map +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-grid-item.js +1 -1
- package/dist/components/gov-grid.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-layout-column.js +1 -1
- package/dist/components/gov-layout.js +1 -1
- package/dist/components/gov-link.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-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-tooltip.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/{p-BZTY3MxF.js → p-BGK46VRO.js} +2 -2
- package/dist/components/{p-DKo9A5gq.js → p-BHRF-5cf.js} +2 -2
- package/dist/components/{p-DesycS6d.js → p-BICk4EuO.js} +2 -2
- package/dist/components/{p-Bv5L0j6n.js → p-BNoNH6m-.js} +2 -2
- package/dist/components/{p-9imLQpxb.js → p-BSr8e18S.js} +2 -2
- package/dist/components/{p-BNnuBQvo.js → p-BxS4InzB.js} +2 -2
- package/dist/components/{p-CfaJM4SA.js → p-CMmyR4-k.js} +2 -2
- package/dist/components/{p-B0KFtEn3.js → p-CU0plGZP.js} +2 -2
- package/dist/components/{p-djqfSbq-.js → p-ClDhNt_H.js} +2 -2
- package/dist/components/{p-yqJEurSE.js → p-CnKqUwf9.js} +2 -2
- package/dist/components/p-DRXiDAHW.js +2 -0
- package/dist/components/{p-BrdXh0mI.js.map → p-DRXiDAHW.js.map} +1 -1
- package/dist/components/p-DjGO_trZ.js +2 -0
- package/dist/components/p-DjGO_trZ.js.map +1 -0
- package/dist/components/p-DmK9qaKH.js +2 -0
- package/dist/components/p-DmK9qaKH.js.map +1 -0
- package/dist/components/p-isPjiQbr.js +2 -0
- package/dist/components/p-isPjiQbr.js.map +1 -0
- package/dist/components/p-keC6luw7.js +2 -0
- package/dist/components/p-keC6luw7.js.map +1 -0
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-3314505d.entry.js → p-00ab0454.entry.js} +2 -2
- package/dist/core/{p-3314505d.entry.js.map → p-00ab0454.entry.js.map} +1 -1
- package/dist/core/{p-9d9e9401.entry.js → p-05bb35e1.entry.js} +2 -2
- package/dist/core/{p-9d9e9401.entry.js.map → p-05bb35e1.entry.js.map} +1 -1
- package/dist/core/{p-e30968b3.entry.js → p-06497d64.entry.js} +2 -2
- package/dist/core/{p-e30968b3.entry.js.map → p-06497d64.entry.js.map} +1 -1
- package/dist/core/p-0675617d.entry.js +2 -0
- package/dist/core/{p-fca7a0d6.entry.js.map → p-0675617d.entry.js.map} +1 -1
- package/dist/core/{p-4d36cd18.entry.js → p-2493a7f3.entry.js} +2 -2
- package/dist/core/{p-4d36cd18.entry.js.map → p-2493a7f3.entry.js.map} +1 -1
- package/dist/core/p-2e15a654.entry.js +2 -0
- package/dist/core/{p-bd2df430.entry.js.map → p-2e15a654.entry.js.map} +1 -1
- package/dist/core/{p-1626cc67.entry.js → p-30ad7514.entry.js} +2 -2
- package/dist/core/{p-1626cc67.entry.js.map → p-30ad7514.entry.js.map} +1 -1
- package/dist/core/{p-558e75a6.entry.js → p-378cf8de.entry.js} +2 -2
- package/dist/core/{p-558e75a6.entry.js.map → p-378cf8de.entry.js.map} +1 -1
- package/dist/core/{p-be9af807.entry.js → p-3a4799b3.entry.js} +2 -2
- package/dist/core/{p-be9af807.entry.js.map → p-3a4799b3.entry.js.map} +1 -1
- package/dist/core/{p-f7bdb44a.entry.js → p-3ebbe75a.entry.js} +2 -2
- package/dist/core/{p-f7bdb44a.entry.js.map → p-3ebbe75a.entry.js.map} +1 -1
- package/dist/core/p-41bef63a.entry.js +2 -0
- package/dist/core/{p-469f14db.entry.js.map → p-41bef63a.entry.js.map} +1 -1
- package/dist/core/p-4342c252.entry.js +2 -0
- package/dist/core/p-4342c252.entry.js.map +1 -0
- package/dist/core/{p-c1b9f1ab.entry.js → p-473afd7d.entry.js} +2 -2
- package/dist/core/{p-c1b9f1ab.entry.js.map → p-473afd7d.entry.js.map} +1 -1
- package/dist/core/{p-5721cf9b.entry.js → p-48b74272.entry.js} +2 -2
- package/dist/core/{p-5721cf9b.entry.js.map → p-48b74272.entry.js.map} +1 -1
- package/dist/core/{p-04ec45ab.entry.js → p-49b67f59.entry.js} +2 -2
- package/dist/core/{p-04ec45ab.entry.js.map → p-49b67f59.entry.js.map} +1 -1
- package/dist/core/{p-6b44890d.entry.js → p-4bd3f101.entry.js} +2 -2
- package/dist/core/{p-6b44890d.entry.js.map → p-4bd3f101.entry.js.map} +1 -1
- package/dist/core/{p-157a1636.entry.js → p-4e534d68.entry.js} +2 -2
- package/dist/core/{p-157a1636.entry.js.map → p-4e534d68.entry.js.map} +1 -1
- package/dist/core/p-6638d034.entry.js +2 -0
- package/dist/core/{p-73bd93f9.entry.js.map → p-6638d034.entry.js.map} +1 -1
- package/dist/core/{p-46824842.entry.js → p-68a5d225.entry.js} +2 -2
- package/dist/core/{p-46824842.entry.js.map → p-68a5d225.entry.js.map} +1 -1
- package/dist/core/p-6ac9b0f2.entry.js +2 -0
- package/dist/core/p-6ac9b0f2.entry.js.map +1 -0
- package/dist/core/{p-0af96cc0.entry.js → p-6b0625ee.entry.js} +2 -2
- package/dist/core/{p-0af96cc0.entry.js.map → p-6b0625ee.entry.js.map} +1 -1
- package/dist/core/{p-4d365881.entry.js → p-78202a44.entry.js} +2 -2
- package/dist/core/{p-4d365881.entry.js.map → p-78202a44.entry.js.map} +1 -1
- package/dist/core/{p-eb766437.entry.js → p-80052953.entry.js} +2 -2
- package/dist/core/{p-eb766437.entry.js.map → p-80052953.entry.js.map} +1 -1
- package/dist/core/{p-d43959a0.entry.js → p-8ddb6dc6.entry.js} +2 -2
- package/dist/core/{p-d43959a0.entry.js.map → p-8ddb6dc6.entry.js.map} +1 -1
- package/dist/core/{p-d9c574f0.entry.js → p-90cc2ddb.entry.js} +2 -2
- package/dist/core/{p-d9c574f0.entry.js.map → p-90cc2ddb.entry.js.map} +1 -1
- package/dist/core/{p-f3887d6d.entry.js → p-91d5df66.entry.js} +2 -2
- package/dist/core/{p-f3887d6d.entry.js.map → p-91d5df66.entry.js.map} +1 -1
- package/dist/core/{p-187c0eda.entry.js → p-9321fb9d.entry.js} +2 -2
- package/dist/core/{p-187c0eda.entry.js.map → p-9321fb9d.entry.js.map} +1 -1
- package/dist/core/p-943a58b2.entry.js +2 -0
- package/dist/core/{p-33209782.entry.js.map → p-943a58b2.entry.js.map} +1 -1
- package/dist/core/p-B6CqPcY_.js.map +1 -1
- package/dist/core/p-B8TR1oqt.js +3 -0
- package/dist/core/p-B8TR1oqt.js.map +1 -0
- package/dist/core/p-BUmDydor.js.map +1 -1
- package/dist/core/p-BcQO4NH2.js.map +1 -1
- package/dist/core/p-BjcqOprh.js.map +1 -1
- package/dist/core/p-Bo1ROm5Q.js.map +1 -1
- package/dist/core/p-Bz_RzYFb.js.map +1 -1
- package/dist/core/p-C3R1T_pg.js.map +1 -1
- package/dist/core/p-C6JN9gdb.js.map +1 -1
- package/dist/core/p-CDIRBJsi.js.map +1 -1
- package/dist/core/p-CQvUntGY.js.map +1 -1
- package/dist/core/p-Ccwpa1ck.js.map +1 -1
- package/dist/core/p-CgDnDrq5.js.map +1 -1
- package/dist/core/p-Cjg0wpDG.js.map +1 -1
- package/dist/core/p-CoD1xawt.js.map +1 -1
- package/dist/core/p-Cx3bEC5v.js.map +1 -1
- package/dist/core/p-D4TGB274.js.map +1 -1
- package/dist/core/p-DBXGhafv.js.map +1 -1
- package/dist/core/p-DNztiAH0.js.map +1 -1
- package/dist/core/p-DQuL1Twl.js.map +1 -1
- package/dist/core/p-DYcNEwSZ.js.map +1 -1
- package/dist/core/p-EeKNA85D.js.map +1 -1
- package/dist/core/p-GYov8gU1.js.map +1 -1
- package/dist/core/p-NOJjz9dT.js.map +1 -1
- package/dist/core/p-Q99QrOoi.js.map +1 -1
- package/dist/core/p-U40vKHrs.js.map +1 -1
- package/dist/core/p-a4fa2ffc.entry.js +2 -0
- package/dist/core/{p-c4734357.entry.js.map → p-a4fa2ffc.entry.js.map} +1 -1
- package/dist/core/{p-511eed88.entry.js → p-a6f27583.entry.js} +2 -2
- package/dist/core/{p-511eed88.entry.js.map → p-a6f27583.entry.js.map} +1 -1
- package/dist/core/p-a7c322a7.entry.js +2 -0
- package/dist/core/{p-abb7780e.entry.js.map → p-a7c322a7.entry.js.map} +1 -1
- package/dist/core/{p-6d2ce4c7.entry.js → p-ab367b0c.entry.js} +2 -2
- package/dist/core/{p-6d2ce4c7.entry.js.map → p-ab367b0c.entry.js.map} +1 -1
- package/dist/core/{p-c6b55c0a.entry.js → p-ac81cdf6.entry.js} +2 -2
- package/dist/core/{p-c6b55c0a.entry.js.map → p-ac81cdf6.entry.js.map} +1 -1
- package/dist/core/{p-a2c61d50.entry.js → p-ad9227b3.entry.js} +2 -2
- package/dist/core/{p-a2c61d50.entry.js.map → p-ad9227b3.entry.js.map} +1 -1
- package/dist/core/p-af2bd9d3.entry.js +2 -0
- package/dist/core/p-af2bd9d3.entry.js.map +1 -0
- package/dist/core/{p-70b5555f.entry.js → p-b0d4d6bd.entry.js} +2 -2
- package/dist/core/{p-70b5555f.entry.js.map → p-b0d4d6bd.entry.js.map} +1 -1
- package/dist/core/p-b181f85f.entry.js +2 -0
- package/dist/core/{p-57ca8ac7.entry.js.map → p-b181f85f.entry.js.map} +1 -1
- package/dist/core/{p-5305e82e.entry.js → p-b2648255.entry.js} +2 -2
- package/dist/core/{p-5305e82e.entry.js.map → p-b2648255.entry.js.map} +1 -1
- package/dist/core/{p-65a09763.entry.js → p-b37bd421.entry.js} +2 -2
- package/dist/core/{p-65a09763.entry.js.map → p-b37bd421.entry.js.map} +1 -1
- package/dist/core/{p-91cbee1b.entry.js → p-b5e40f40.entry.js} +2 -2
- package/dist/core/{p-91cbee1b.entry.js.map → p-b5e40f40.entry.js.map} +1 -1
- package/dist/core/p-b77c283e.entry.js +2 -0
- package/dist/core/{p-bd389bfd.entry.js.map → p-b77c283e.entry.js.map} +1 -1
- package/dist/core/p-bb5b9ccd.entry.js +2 -0
- package/dist/core/p-bb5b9ccd.entry.js.map +1 -0
- package/dist/core/{p-4c02094d.entry.js → p-c9b2f97c.entry.js} +2 -2
- package/dist/core/{p-4c02094d.entry.js.map → p-c9b2f97c.entry.js.map} +1 -1
- package/dist/core/{p-eb3f6808.entry.js → p-caf817d4.entry.js} +2 -2
- package/dist/core/{p-eb3f6808.entry.js.map → p-caf817d4.entry.js.map} +1 -1
- package/dist/core/p-dc0bd1e5.entry.js +2 -0
- package/dist/core/{p-3e07bf07.entry.js.map → p-dc0bd1e5.entry.js.map} +1 -1
- package/dist/core/{p-db860031.entry.js → p-dd390459.entry.js} +2 -2
- package/dist/core/{p-db860031.entry.js.map → p-dd390459.entry.js.map} +1 -1
- package/dist/core/p-de5dfd70.entry.js +2 -0
- package/dist/core/{p-4da8ac1d.entry.js.map → p-de5dfd70.entry.js.map} +1 -1
- package/dist/core/p-dfb76a14.entry.js +2 -0
- package/dist/core/p-dfb76a14.entry.js.map +1 -0
- package/dist/core/{p-cd163299.entry.js → p-e17def2b.entry.js} +2 -2
- package/dist/core/{p-cd163299.entry.js.map → p-e17def2b.entry.js.map} +1 -1
- package/dist/core/{p-e39e5dc7.entry.js → p-e1d58751.entry.js} +2 -2
- package/dist/core/{p-e39e5dc7.entry.js.map → p-e1d58751.entry.js.map} +1 -1
- package/dist/core/{p-3e07bf07.entry.js → p-e913cfc8.entry.js} +2 -2
- package/dist/core/{p-90ab65b4.entry.js.map → p-e913cfc8.entry.js.map} +1 -1
- package/dist/core/{p-da997fb3.entry.js → p-ea299832.entry.js} +2 -2
- package/dist/core/{p-da997fb3.entry.js.map → p-ea299832.entry.js.map} +1 -1
- package/dist/core/{p-852310d9.entry.js → p-eff8ffff.entry.js} +2 -2
- package/dist/core/{p-852310d9.entry.js.map → p-eff8ffff.entry.js.map} +1 -1
- package/dist/core/{p-4d902f20.entry.js → p-f2d24551.entry.js} +2 -2
- package/dist/core/{p-4d902f20.entry.js.map → p-f2d24551.entry.js.map} +1 -1
- package/dist/core/{p-5c872d64.entry.js → p-f515d912.entry.js} +2 -2
- package/dist/core/{p-bf573a56.entry.js → p-febff4d1.entry.js} +2 -2
- package/dist/core/{p-bf573a56.entry.js.map → p-febff4d1.entry.js.map} +1 -1
- package/dist/core/p-vN03FcXN.js.map +1 -1
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-banner.entry.js +3 -3
- package/dist/esm/gov-banner.entry.js.map +1 -1
- package/dist/esm/gov-flex_3.entry.js +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +68 -24
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-file.entry.js +65 -12
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js +1 -1
- package/dist/esm/gov-form-search.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +8 -15
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip_2.entry.js +34 -9
- package/dist/esm/gov-tooltip_2.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +2 -2
- package/dist/esm/gov-wizard.entry.js +1 -1
- package/dist/esm/index-ClISz4NF.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +187 -69
- package/dist/hydrate/index.mjs +187 -69
- package/dist/types/Users/jf/dev/designSystem/gov-design-system/packages/core/.stencil/packages/core/stencil.config.d.ts +2 -0
- package/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +9 -0
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -0
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +1 -1
- package/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +4 -0
- package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +612 -121
- package/dist/types/stencil-public-runtime.d.ts +170 -11
- package/package.json +32 -28
- package/readme.md +8 -0
- package/dist/components/p-BrdXh0mI.js +0 -2
- package/dist/components/p-DFu5UVoP.js +0 -2
- package/dist/components/p-DFu5UVoP.js.map +0 -1
- package/dist/components/p-DMVQRz4f.js +0 -2
- package/dist/components/p-DMVQRz4f.js.map +0 -1
- package/dist/components/p-UDT3DloZ.js +0 -2
- package/dist/components/p-UDT3DloZ.js.map +0 -1
- package/dist/components/p-x3w8Mun_.js +0 -2
- package/dist/components/p-x3w8Mun_.js.map +0 -1
- package/dist/core/core.css +0 -14776
- package/dist/core/gov-accordion-item.entry.esm.js.map +0 -1
- package/dist/core/gov-accordion.entry.esm.js.map +0 -1
- package/dist/core/gov-attachments.gov-attachments-item.gov-form-message.entry.esm.js.map +0 -1
- package/dist/core/gov-backdrop.entry.esm.js.map +0 -1
- package/dist/core/gov-banner.entry.esm.js.map +0 -1
- package/dist/core/gov-blockquote.entry.esm.js.map +0 -1
- package/dist/core/gov-breadcrumbs.entry.esm.js.map +0 -1
- package/dist/core/gov-button.entry.esm.js.map +0 -1
- package/dist/core/gov-card.entry.esm.js.map +0 -1
- package/dist/core/gov-chip.entry.esm.js.map +0 -1
- package/dist/core/gov-collapsible.entry.esm.js.map +0 -1
- package/dist/core/gov-container.entry.esm.js.map +0 -1
- package/dist/core/gov-control-group.entry.esm.js.map +0 -1
- package/dist/core/gov-cookiebar.entry.esm.js.map +0 -1
- package/dist/core/gov-dialog.entry.esm.js.map +0 -1
- package/dist/core/gov-dropdown.entry.esm.js.map +0 -1
- package/dist/core/gov-empty.entry.esm.js.map +0 -1
- package/dist/core/gov-error-code.entry.esm.js.map +0 -1
- package/dist/core/gov-flex.gov-icon.gov-theme-switch.entry.esm.js.map +0 -1
- package/dist/core/gov-form-autocomplete.entry.esm.js.map +0 -1
- package/dist/core/gov-form-checkbox-group.entry.esm.js.map +0 -1
- package/dist/core/gov-form-checkbox.entry.esm.js.map +0 -1
- package/dist/core/gov-form-control.entry.esm.js.map +0 -1
- package/dist/core/gov-form-file.entry.esm.js.map +0 -1
- package/dist/core/gov-form-group.entry.esm.js.map +0 -1
- package/dist/core/gov-form-input.gov-skeleton.entry.esm.js.map +0 -1
- package/dist/core/gov-form-label.entry.esm.js.map +0 -1
- package/dist/core/gov-form-multi-select.entry.esm.js.map +0 -1
- package/dist/core/gov-form-password-power.entry.esm.js.map +0 -1
- package/dist/core/gov-form-radio-group.entry.esm.js.map +0 -1
- package/dist/core/gov-form-radio.entry.esm.js.map +0 -1
- package/dist/core/gov-form-range.entry.esm.js.map +0 -1
- package/dist/core/gov-form-search.entry.esm.js.map +0 -1
- package/dist/core/gov-form-select.entry.esm.js.map +0 -1
- package/dist/core/gov-form-switch.entry.esm.js.map +0 -1
- package/dist/core/gov-grid-item.entry.esm.js.map +0 -1
- package/dist/core/gov-grid.entry.esm.js.map +0 -1
- package/dist/core/gov-infobar.entry.esm.js.map +0 -1
- package/dist/core/gov-layout-column.entry.esm.js.map +0 -1
- package/dist/core/gov-layout.entry.esm.js.map +0 -1
- package/dist/core/gov-lifecycle.entry.esm.js.map +0 -1
- package/dist/core/gov-link.entry.esm.js.map +0 -1
- package/dist/core/gov-loading.entry.esm.js.map +0 -1
- package/dist/core/gov-message.entry.esm.js.map +0 -1
- package/dist/core/gov-pagination.entry.esm.js.map +0 -1
- package/dist/core/gov-spacer.entry.esm.js.map +0 -1
- package/dist/core/gov-stepper-item.entry.esm.js.map +0 -1
- package/dist/core/gov-stepper.entry.esm.js.map +0 -1
- package/dist/core/gov-tabs-item.entry.esm.js.map +0 -1
- package/dist/core/gov-tabs.entry.esm.js.map +0 -1
- package/dist/core/gov-tag.entry.esm.js.map +0 -1
- package/dist/core/gov-tile.entry.esm.js.map +0 -1
- package/dist/core/gov-toast.entry.esm.js.map +0 -1
- package/dist/core/gov-tooltip.gov-tooltip-content.entry.esm.js.map +0 -1
- package/dist/core/gov-wizard-item.entry.esm.js.map +0 -1
- package/dist/core/gov-wizard.entry.esm.js.map +0 -1
- package/dist/core/loader.esm.js.map +0 -1
- package/dist/core/p-11fc3899.entry.js +0 -2
- package/dist/core/p-11fc3899.entry.js.map +0 -1
- package/dist/core/p-33209782.entry.js +0 -2
- package/dist/core/p-33b462c9.entry.js +0 -2
- package/dist/core/p-33b462c9.entry.js.map +0 -1
- package/dist/core/p-3e5ae012.entry.js +0 -2
- package/dist/core/p-3e5ae012.entry.js.map +0 -1
- package/dist/core/p-469f14db.entry.js +0 -2
- package/dist/core/p-4da8ac1d.entry.js +0 -2
- package/dist/core/p-57ca8ac7.entry.js +0 -2
- package/dist/core/p-73bd93f9.entry.js +0 -2
- package/dist/core/p-90ab65b4.entry.js +0 -2
- package/dist/core/p-ClISz4NF.js +0 -3
- package/dist/core/p-ClISz4NF.js.map +0 -1
- package/dist/core/p-abb7780e.entry.js +0 -2
- package/dist/core/p-bd2df430.entry.js +0 -2
- package/dist/core/p-bd389bfd.entry.js +0 -2
- package/dist/core/p-c21bc8f9.entry.js +0 -2
- package/dist/core/p-c21bc8f9.entry.js.map +0 -1
- package/dist/core/p-c4734357.entry.js +0 -2
- package/dist/core/p-def34832.entry.js +0 -2
- package/dist/core/p-def34832.entry.js.map +0 -1
- package/dist/core/p-fca7a0d6.entry.js +0 -2
- package/dist/types/work/packages/core/.stencil/packages/core/stencil.config.d.ts +0 -2
- /package/dist/components/{p-BZTY3MxF.js.map → p-BGK46VRO.js.map} +0 -0
- /package/dist/components/{p-DKo9A5gq.js.map → p-BHRF-5cf.js.map} +0 -0
- /package/dist/components/{p-DesycS6d.js.map → p-BICk4EuO.js.map} +0 -0
- /package/dist/components/{p-Bv5L0j6n.js.map → p-BNoNH6m-.js.map} +0 -0
- /package/dist/components/{p-9imLQpxb.js.map → p-BSr8e18S.js.map} +0 -0
- /package/dist/components/{p-BNnuBQvo.js.map → p-BxS4InzB.js.map} +0 -0
- /package/dist/components/{p-CfaJM4SA.js.map → p-CMmyR4-k.js.map} +0 -0
- /package/dist/components/{p-B0KFtEn3.js.map → p-CU0plGZP.js.map} +0 -0
- /package/dist/components/{p-djqfSbq-.js.map → p-ClDhNt_H.js.map} +0 -0
- /package/dist/components/{p-yqJEurSE.js.map → p-CnKqUwf9.js.map} +0 -0
- /package/dist/core/{p-5c872d64.entry.js.map → p-f515d912.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ChipSizes","pick","Sizes","ChipType","NativeType","ChipClass","root","hasRight","hasLeft","GovChip","constructor","hostRef","this","hydrated","disabled","size","_M","tag","color","ButtonColors","PRIMARY","focusable","inheritedAttributes","h","govHost","host","chipId","createID","validateColor","newValue","validateProp","validateSize","ButtonSizes","componentWillLoad","inheritAriaAttributes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","disconnectedCallback","_a","stopObserving","connectedCallback","removeAttribute","Object","assign","render","Tag","href","A","nativeType","BUTTON","undefined","iconStart","prepareIconFormat","iconEnd","Host","key","class","classes","hasSlot","type","target","ref","el","triggerRef","onClick","onClickHandler","bind","tabindex","id","identifier","name","e","stopPropagation","govClick","emit","geRef","setFocus","focus"],"sources":["../../../packages/core/src/components/gov-chip/constants.ts","../../../packages/core/src/components/gov-chip/gov-chip.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const ChipSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type ChipSizesType = `${ValueOf<typeof ChipSizes>}`\n\nexport enum ChipType {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n}\nexport type ChipTypesType = `${ValueOf<typeof ChipType>}`\n\nexport enum NativeType {\n\tA = 'a',\n\tSPAN = 'span',\n\tBUTTON = 'button',\n}\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport const ChipClass = {\n\troot: 'gov-chip',\n\tinner: 'gov-chip__inner',\n\thasRight: 'gov-chip--has-right',\n\thasLeft: 'gov-chip--has-left',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {ChipClass, ChipSizes, ChipSizesType, ChipTypesType, NativeType, NativeTypesType} from \"./constants\"\nimport {ButtonColors, ButtonColorType, ButtonSizes} from \"../gov-button/button/constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\n\n@Component({\n\ttag: \"gov-chip\",\n})\nexport class GovChip {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\tprivate readonly chipId: string\n\tprivate hydrated = false\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.chipId = createID('GovChip')\n\t}\n\n\t@Element() host: HTMLGovChipElement\n\n\t/**\n\t * Makes the chip component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-start\"}) readonly iconStart?: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-end\"}) readonly iconEnd?: string\n\t/**\n\t * Chip’s size.\n\t */\n\t@Prop() readonly size: ChipSizesType = ChipSizes._M\n\t/**\n\t * Used to change the HTML tag in the chip\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the chip.\n\t */\n\t@Prop() readonly color: ButtonColorType = ButtonColors.PRIMARY\n\t/**\n\t * Chip’s type\n\t */\n\t@Prop({reflect: true}) readonly type: ChipTypesType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom chip identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ChipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, ChipClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\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\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\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 Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\tconst iconStart = prepareIconFormat(this.iconStart)\n\t\tconst iconEnd = prepareIconFormat(this.iconEnd)\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tChipClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? ChipClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? ChipClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tsize={this.size}\n\t\t\t\tfocusable={this.focusable}\n\t\t\t\thydrated={this.hydrated}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\ttabindex={(this.h.hasSlot(\"left\") || this.h.hasSlot(\"right\") || this.disabled || !this.focusable) ? \"-1\" : \"0\"}\n\t\t\t\t\tid={this.identifier || this.chipId}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={this.disabled}>\n\t\t\t\t\t<slot name=\"left\"></slot>\n\t\t\t\t\t<slot name=\"icon-start\">\n\t\t\t\t\t\t{iconStart && <gov-icon type={iconStart.type} name={iconStart.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<slot name=\"icon-end\">\n\t\t\t\t\t\t{iconEnd && <gov-icon type={iconEnd.type} name={iconEnd.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot name=\"right\"></slot>\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync geRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.trigger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EAAA,QAAAqC,IAAA,2CAAMe,KAAK,YACTjB,GAAWnC,EAAA,YAAAqC,IAAA,2CAAUI,KAAMN,EAAQM,KAAMW,KAAMjB,EAAQiB,QAEzDpD,EAAA,QAAAqC,IAAA,2CAAMe,KAAK,W,CAMP,cAAAL,CAAeM,GACtBA,EAAEC,kBACF,GAAIjE,KAAKE,WAAa,OAASF,KAAKK,MAAQb,EAAWkD,OAAQ,CAC9D1C,KAAKkE,SAASC,KAAKH,E,EAQrB,WAAMI,GACL,OAAOpE,KAAKwD,U,CAOb,cAAMa,GACLrE,KAAKwD,WAAWc,O","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ChipSizes","pick","Sizes","ChipType","NativeType","ChipClass","root","hasRight","hasLeft","GovChip","constructor","hostRef","this","hydrated","disabled","size","_M","tag","color","ButtonColors","PRIMARY","focusable","inheritedAttributes","h","govHost","host","chipId","createID","validateColor","newValue","validateProp","validateSize","ButtonSizes","componentWillLoad","inheritAriaAttributes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","disconnectedCallback","_a","stopObserving","connectedCallback","removeAttribute","Object","assign","render","Tag","href","A","nativeType","BUTTON","undefined","iconStart","prepareIconFormat","iconEnd","Host","key","class","classes","hasSlot","type","target","ref","el","triggerRef","onClick","onClickHandler","bind","tabindex","id","identifier","name","e","stopPropagation","govClick","emit","geRef","setFocus","focus"],"sources":["../../../packages/core/src/components/gov-chip/constants.ts","../../../packages/core/src/components/gov-chip/gov-chip.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const ChipSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type ChipSizesType = `${ValueOf<typeof ChipSizes>}`\n\nexport enum ChipType {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n}\nexport type ChipTypesType = `${ValueOf<typeof ChipType>}`\n\nexport enum NativeType {\n\tA = 'a',\n\tSPAN = 'span',\n\tBUTTON = 'button',\n}\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport const ChipClass = {\n\troot: 'gov-chip',\n\tinner: 'gov-chip__inner',\n\thasRight: 'gov-chip--has-right',\n\thasLeft: 'gov-chip--has-left',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {ChipClass, ChipSizes, ChipSizesType, ChipTypesType, NativeType, NativeTypesType} from \"./constants\"\nimport {ButtonColors, ButtonColorType, ButtonSizes} from \"../gov-button/button/constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\n\n@Component({\n\ttag: \"gov-chip\",\n})\nexport class GovChip {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\tprivate readonly chipId: string\n\tprivate hydrated = false\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.chipId = createID('GovChip')\n\t}\n\n\t@Element() host: HTMLGovChipElement\n\n\t/**\n\t * Makes the chip component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-start\"}) readonly iconStart?: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-end\"}) readonly iconEnd?: string\n\t/**\n\t * Chip’s size.\n\t */\n\t@Prop() readonly size: ChipSizesType = ChipSizes._M\n\t/**\n\t * Used to change the HTML tag in the chip\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the chip.\n\t */\n\t@Prop() readonly color: ButtonColorType = ButtonColors.PRIMARY\n\t/**\n\t * Chip’s type\n\t */\n\t@Prop({reflect: true}) readonly type: ChipTypesType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom chip identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ChipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, ChipClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\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\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\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 Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\tconst iconStart = prepareIconFormat(this.iconStart)\n\t\tconst iconEnd = prepareIconFormat(this.iconEnd)\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tChipClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? ChipClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? ChipClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tsize={this.size}\n\t\t\t\tfocusable={this.focusable}\n\t\t\t\thydrated={this.hydrated}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\ttabindex={(this.h.hasSlot(\"left\") || this.h.hasSlot(\"right\") || this.disabled || !this.focusable) ? \"-1\" : \"0\"}\n\t\t\t\t\tid={this.identifier || this.chipId}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={this.disabled}>\n\t\t\t\t\t<slot name=\"left\"></slot>\n\t\t\t\t\t<slot name=\"icon-start\">\n\t\t\t\t\t\t{iconStart && <gov-icon type={iconStart.type} name={iconStart.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<slot name=\"icon-end\">\n\t\t\t\t\t\t{iconEnd && <gov-icon type={iconEnd.type} name={iconEnd.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot name=\"right\"></slot>\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync geRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n}\n"],"mappings":"kcAIO,MAAMA,EAAYC,EAAKC,EAAO,CAAC,MAAO,KAAM,OAGnD,IAAYC,GAAZ,SAAYA,GACXA,EAAA,iBACAA,EAAA,sBACA,EAHD,CAAYA,MAAQ,KAMpB,IAAYC,GAAZ,SAAYA,GACXA,EAAA,SACAA,EAAA,eACAA,EAAA,kBACA,EAJD,CAAYA,MAAU,KAOf,MAAMC,EAAY,CACxBC,KAAM,WAENC,SAAU,sBACVC,QAAS,sB,MCTGC,EAAO,MAOnB,WAAAC,CAAAC,G,4CAHQC,KAAAC,SAAW,MAaaD,KAAAE,SAAoB,MAsBnCF,KAAAG,KAAsBf,EAAUgB,GAIhCJ,KAAAK,IAAuB,OAIvBL,KAAAM,MAAyBC,EAAaC,QAStCR,KAAAS,UAAqB,KAoB7BT,KAAAU,oBAAkC,GApE1CV,KAAKW,EAAIC,EAAQZ,KAAKa,MACtBb,KAAKc,OAASC,EAAS,UACvB,CAyDD,aAAAC,CAAcC,GACbC,EAAaX,EAAcU,EAAUxB,EAAUC,K,CAIhD,YAAAyB,CAAaF,GACZC,EAAaE,EAAaH,EAAUxB,EAAUC,K,CAK/C,iBAAA2B,GACCrB,KAAKgB,cAAchB,KAAKM,OACx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D,WAAaD,EAC9BE,QAASzD,KAAK0D,eAAeC,KAAK3D,MAClC4D,SAAW5D,KAAKW,EAAEwC,QAAQ,SAAWnD,KAAKW,EAAEwC,QAAQ,UAAYnD,KAAKE,WAAaF,KAAKS,UAAa,KAAO,IAC3GoD,GAAI7D,KAAK8D,YAAc9D,KAAKc,OAC5BsC,KAAMX,GACFzC,KAAKU,oBAAmB,iBACbV,KAAKE,WACpBS,EAAA,QAAAqC,IAAA,2CAAMe,KAAK,SACXpD,EAAA,QAAAqC,IAAA,2CAAMe,KAAK,cACTnB,GAAajC,EAAA,YAAAqC,IAAA,2CAAUI,KAAMR,EAAUQ,KAAMW,KAAMnB,EAAUmB,QAE/DpD,EAAA,QAAAqC,IAAA,6CACArC,EAAA,QAAAqC,IAAA,2CAAMe,KAAK,YACTjB,GAAWnC,EAAA,YAAAqC,IAAA,2CAAUI,KAAMN,EAAQM,KAAMW,KAAMjB,EAAQiB,QAEzDpD,EAAA,QAAAqC,IAAA,2CAAMe,KAAK,W,CAMP,cAAAL,CAAeM,GACtBA,EAAEC,kBACF,GAAIjE,KAAKE,WAAa,OAASF,KAAKK,MAAQb,EAAWkD,OAAQ,CAC9D1C,KAAKkE,SAASC,KAAKH,E,EAQrB,WAAMI,GACL,OAAOpE,KAAKwD,U,CAOb,cAAMa,GACLrE,KAAKwD,WAAWc,O","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,c as r,h as g,H as a,g as p}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as o,c as r,h as g,H as a,g as p}from"./p-B8TR1oqt.js";import{c as i,F as t,a as e,b as m}from"./p-BUmDydor.js";import{g as l}from"./p-CoD1xawt.js";import{v}from"./p-NOJjz9dT.js";import{t as f}from"./p-Cjg0wpDG.js";import{p as s}from"./p-Ccwpa1ck.js";import"./p-CQvUntGY.js";import"./p-BcQO4NH2.js";import"./p-CgDnDrq5.js";import"./p-DNztiAH0.js";const n=()=>`gov-form-group,.gov-form-group,gov-form-radio-group,.gov-form-radio-group,gov-form-checkbox-group,.gov-form-checkbox-group{margin-top:0;margin-bottom:0;position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,.gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,.gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-checkbox-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],.gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],.gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-checkbox-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,.gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=xs],.gov-form-group[gap=xs],gov-form-radio-group[gap=xs],.gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-checkbox-group[gap=xs]{gap:var(--gap, var(--spacing-xs-nudge))}gov-form-group[gap=s],.gov-form-group[gap=s],gov-form-radio-group[gap=s],.gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-checkbox-group[gap=s]{gap:var(--gap, var(--spacing-s))}gov-form-group[gap=m],.gov-form-group[gap=m],gov-form-radio-group[gap=m],.gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-checkbox-group[gap=m]{gap:var(--gap, var(--spacing-m))}gov-form-group[gap=l],.gov-form-group[gap=l],gov-form-radio-group[gap=l],.gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-checkbox-group[gap=l]{gap:var(--gap, var(--spacing-l))}gov-form-group[gap=xl],.gov-form-group[gap=xl],gov-form-radio-group[gap=xl],.gov-form-radio-group[gap=xl],gov-form-checkbox-group[gap=xl],.gov-form-checkbox-group[gap=xl]{gap:var(--gap, var(--spacing-xl))}`;const c=class{constructor(g){o(this,g);this.govChange=r(this,"gov-change");this.gap=undefined;this.orientation="vertical";this.value=undefined;this.handleChange=o=>{var r;o.stopPropagation();const g=s(this.value);if(!Array.isArray(g))return;if(o.detail.checked){this.value=[...g,o.detail.value]}else{this.value=(r=g.filter((r=>r!==o.detail.value)))!==null&&r!==void 0?r:[]}this.govChange.emit({value:this.value,component:i.root})};this.h=l(this.host)}validateGap(o){if(o){v(e,o,t.root)}}validateOrientation(o){if(o){v(m,o,t.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation);this.value=s(this.value)}componentDidRender(){f((()=>this.rerenderComponent()))}rerenderComponent(){this.host.querySelectorAll("gov-form-checkbox").forEach((o=>{if(!o.hasAttribute("listener-attached")){o.addEventListener("gov-change",this.handleChange)}o.setAttribute("listener-attached","true");o.checked=this.value.includes(o.value)}))}render(){return g(a,{key:"05922c255d84c7e5d454096842080afb3baf7e35",gap:this.gap,class:this.h.classes(t.root),value:this.value},g("slot",{key:"b770a32c6c932f71c041bb2996c675b84ee594f0"}))}get host(){return p(this)}static get watchers(){return{gap:[{validateGap:0}],orientation:[{validateOrientation:0}]}}};c.style=n();export{c as gov_form_checkbox_group};
|
|
2
|
+
//# sourceMappingURL=p-e913cfc8.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["govFormGroupCss","GovFormCheckboxGroup","constructor","hostRef","this","gap","undefined","orientation","value","handleChange","event","stopPropagation","propsValueToArray","Array","isArray","detail","checked","_a","filter","val","govChange","emit","component","FormCheckboxGroupClass","root","h","govHost","host","validateGap","newValue","validateProp","FormGroupSizes","FormGroupClass","validateOrientation","FormGroupOrientation","componentWillLoad","componentDidRender","tick","rerenderComponent","querySelectorAll","forEach","element","hasAttribute","addEventListener","setAttribute","includes","render","Host","key","class","classes"],"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"],"mappings":"oWAAA,MAAMA,EAAkB,usE,
|
|
1
|
+
{"version":3,"names":["govFormGroupCss","GovFormCheckboxGroup","constructor","hostRef","this","gap","undefined","orientation","value","handleChange","event","stopPropagation","propsValueToArray","Array","isArray","detail","checked","_a","filter","val","govChange","emit","component","FormCheckboxGroupClass","root","h","govHost","host","validateGap","newValue","validateProp","FormGroupSizes","FormGroupClass","validateOrientation","FormGroupOrientation","componentWillLoad","componentDidRender","tick","rerenderComponent","querySelectorAll","forEach","element","hasAttribute","addEventListener","setAttribute","includes","render","Host","key","class","classes"],"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"],"mappings":"oWAAA,MAAMA,EAAkB,IAAM,usE,MCqBjBC,EAAoB,MAGhC,WAAAC,CAAAC,G,8CAQiBC,KAAAC,IAA2BC,UAI3BF,KAAAG,YAAyC,WAIfH,KAAAI,MAA4BF,UAoBvEF,KAAAK,aAAgBC,I,MACfA,EAAMC,kBACN,MAAMH,EAAQI,EAA4BR,KAAKI,OAC/C,IAAKK,MAAMC,QAAQN,GAAQ,OAC3B,GAAIE,EAAMK,OAAOC,QAAS,CACzBZ,KAAKI,MAAQ,IAAIA,EAAOE,EAAMK,OAAOP,M,KAC/B,CACNJ,KAAKI,OAAQS,EAAAT,EAAMU,QAAQC,GAAQA,IAAQT,EAAMK,OAAOP,WAAM,MAAAS,SAAA,EAAAA,EAAI,E,CAEnEb,KAAKgB,UAAUC,KAAK,CACnBb,MAAOJ,KAAKI,MACZc,UAAWC,EAAuBC,MACjC,EA/CFpB,KAAKqB,EAAIC,EAAQtB,KAAKuB,KACtB,CAqBD,WAAAC,CAAYC,GACX,GAAIA,EAAU,CACbC,EAAaC,EAAgBF,EAAUG,EAAeR,K,EAKxD,mBAAAS,CAAoBJ,GACnB,GAAIA,EAAU,CACbC,EAAaI,EAAsBL,EAAUG,EAAeR,K,EAmB9D,iBAAAW,GACC/B,KAAKwB,YAAYxB,KAAKC,KACtBD,KAAK6B,oBAAoB7B,KAAKG,aAC9BH,KAAKI,MAAQI,EAAkBR,KAAKI,M,CAGrC,kBAAA4B,GACCC,GAAK,IAAMjC,KAAKkC,qB,CAGjB,iBAAAA,GACClC,KAAKuB,KAAKY,iBAAiB,qBAAqBC,SAASC,IACxD,IAAKA,EAAQC,aAAa,qBAAsB,CAC/CD,EAAQE,iBAAiB,aAAcvC,KAAKK,a,CAE7CgC,EAAQG,aAAa,oBAAqB,QAC1CH,EAAQzB,QAAUZ,KAAKI,MAAMqC,SAASJ,EAAQjC,MAAM,G,CAItD,MAAAsC,GACC,OACCrB,EAACsB,EAAI,CAAAC,IAAA,2CAAC3C,IAAKD,KAAKC,IAAK4C,MAAO7C,KAAKqB,EAAEyB,QAAQlB,EAAeR,MAAOhB,MAAOJ,KAAKI,OAC5EiB,EAAA,QAAAuB,IAAA,6C","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as o}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as o}from"./p-B8TR1oqt.js";import{v as a}from"./p-NOJjz9dT.js";import{T as h,a as r,b as n,c,d as l}from"./p-D4TGB274.js";import{g as d,a as f,b as p}from"./p-CoD1xawt.js";import{h as b}from"./p-DNztiAH0.js";import{p as m}from"./p-GYov8gU1.js";import{A as u,a as v}from"./p-Bz_RzYFb.js";import{i as g}from"./p-CzXeijOj.js";import"./p-CgDnDrq5.js";import"./p-CQvUntGY.js";import"./p-BcQO4NH2.js";import"./p-U40vKHrs.js";const y=class{constructor(i){t(this,i);this.govChange=s(this,"gov-change");this.triggerRefs={};this.type="text";this.size="m";this.color="primary";this.orientation="horizontal";this.direction="row";this.controllers=[];this.focusIndex=0;this.inheritedAttributes={};this.h=d(this.host)}validateType(t){a(n,t,r.root)}validateColor(t){a(c,t,r.root)}validateSize(t){a(l,t,r.root)}componentDidLoad(){this.attributeObserver=new u(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.prepareControllers();this.validateSize(this.size);this.inheritedAttributes=g(this.host)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}prepareControllers(t=false){this.controllers=[];const s=[];this.host.querySelectorAll(":scope > "+h.root).forEach((t=>{const i=Promise.all([t.getIdentifier(),t.getTriggerIdentifier(),t.getDisableState()]).then((([s,i,e])=>{const o=typeof t.getAttribute("default")==="string";const a=m(t.getAttribute("icon-start"));const h=m(t.getAttribute("icon-end"));return{label:t.getAttribute("label"),direction:t.getAttribute("direction"),contentIdentifier:s,disabled:e,triggerIdentifier:i,element:t,active:false,default:o,iconStart:a,iconEnd:h}}));s.push(i)}));Promise.all(s).then((s=>{if(t===false){let t=s.findIndex((t=>t.default));if(t===-1)t=0;this.focusIndex=t;s[t].active=true}else if(this.focusIndex>-1&&b(s,this.focusIndex)){s[this.focusIndex].active=true}const i=s.findIndex((t=>t.active&&t.disabled));if(i>-1){s[i].active=false;const t=s.findIndex((t=>!t.disabled));if(t>-1){s[t].active=true;this.focusIndex=t}}this.controllers=[...s];this.reRender()}))}setActiveByIdentifier(t){const s=[];this.controllers.map((i=>{i.active=t===i.triggerIdentifier||t===i.contentIdentifier;s.push(i)}));this.controllers=[...s]}reRender(){this.controllers.map((t=>{t.element.setActiveStatus(t.active).catch()}))}render(){return i(e,{key:"5dfd9d6ca4a17c425a96a1f766d599de80db6028",class:this.h.classes(r.root),size:this.size,color:this.color,type:this.type,direction:this.direction,onKeyDown:this.onKeydownHandler.bind(this)},i("div",Object.assign({key:"a195131ab673e7b9906777757f5c7e8c8421ddad",class:r.tabs,role:"tablist"},this.inheritedAttributes),i("ul",{key:"3dd46399f5054881f71242b2f184ebfb11fac51e",class:r.list},this.controllers.map((t=>i("li",{class:r.item},this.type=="text"?i("button",{class:r.btn,id:t.triggerIdentifier,role:"tab",type:"button",onClick:()=>this.onSelectHandler(t),disabled:t.disabled,"aria-disabled":f(t.disabled),"aria-selected":f(t.active),"aria-controls":t.contentIdentifier,tabindex:t.active&&!t.disabled?0:-1,ref:s=>this.triggerRefs[t.triggerIdentifier]=s},t.iconStart?i("gov-icon",{name:t.iconStart.name,type:t.iconStart.type}):null,t.label,t.iconEnd?i("gov-icon",{name:t.iconEnd.name,type:t.iconEnd.type}):null):i("gov-chip",{role:"tab",tag:"button",identifier:t.triggerIdentifier,"aria-selected":p(t.active),"aria-controls":t.contentIdentifier,focusable:t.active,disabled:t.disabled,color:this.color,size:this.size==="xs"?"xs":this.size==="s"?"s":"m",type:t.active?"solid":"outlined",ref:s=>this.triggerRefs[t.triggerIdentifier]=s,"on-gov-click":()=>this.onSelectHandler(t)},t.iconStart?i("gov-icon",{name:t.iconStart.name,type:t.iconStart.type,slot:"icon-start"}):null,t.label,t.iconEnd?i("gov-icon",{name:t.iconEnd.name,type:t.iconEnd.type,slot:"icon-end"}):null)))))),i("slot",{key:"5fc402a27b6236ca10c8f3370f946b7ceadb5342"}))}getCurrentTab(){return this.controllers.find((t=>t.active))||null}onSelectHandler(t){const s=this.controllers.findIndex((s=>s.triggerIdentifier===t.triggerIdentifier));this.focusIndex=s;this.setActiveByIdentifier(t.triggerIdentifier);this.reRender();this.govChange.emit(this.getCurrentTab().element)}onKeydownHandler(t){const s=t.keyCode;t.stopPropagation();this.goToPrevNext(s)}goToPrevNext(t){if([37,38,39,40].includes(t)){if(false===(this.focusIndex>=0&&this.focusIndex<=this.controllers.length-1)){return}this.controllers[this.focusIndex].active=false;if(t===39||t===40){this.focusIndex++;if(this.focusIndex>=this.controllers.length){this.focusIndex=0}if(this.controllers[this.focusIndex].disabled){this.goToPrevNext(40)}}else if(t===37||t===38){this.focusIndex--;if(this.focusIndex<0){this.focusIndex=this.controllers.length-1}if(this.controllers[this.focusIndex].disabled){this.goToPrevNext(38)}}if(this.focusIndex>=0&&this.focusIndex<=this.controllers.length-1){const t=this.controllers[this.focusIndex];t.active=true;const s=this.triggerRefs[t.triggerIdentifier];if(s.nodeName.toLowerCase()==="gov-chip"){this.triggerRefs[t.triggerIdentifier].setFocus()}else{this.triggerRefs[t.triggerIdentifier].focus()}this.controllers=[...this.controllers];this.reRender();this.govChange.emit(this.getCurrentTab().element)}}}async refresh(){this.prepareControllers()}async currentTab(){return this.getCurrentTab().element||null}async setActiveTab(t){this.setActiveByIdentifier(t);this.reRender()}async rerender(){this.prepareControllers(true)}get host(){return o(this)}static get watchers(){return{type:[{validateType:0}],color:[{validateColor:0}],size:[{validateSize:0}]}}};export{y as gov_tabs};
|
|
2
|
+
//# sourceMappingURL=p-ea299832.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GovTabs","constructor","hostRef","this","triggerRefs","type","size","color","orientation","direction","controllers","focusIndex","inheritedAttributes","h","govHost","host","validateType","newValue","validateProp","TabTypes","TabsClass","root","validateColor","TabColors","validateSize","TabSizes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","prepareControllers","inheritAriaAttributes","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","skipDefault","promises","querySelectorAll","TabsItemClass","forEach","tab","controlItem","Promise","all","getIdentifier","getTriggerIdentifier","getDisableState","then","identifier","triggerIdentifier","disabled","isDefault","getAttribute","iconStart","prepareIconFormat","iconEnd","label","contentIdentifier","element","active","default","push","defaultTabIndex","findIndex","controller","hasOwnProperty","isWrongCombination","firstGoodTab","reRender","setActiveByIdentifier","temp","map","item","control","setActiveStatus","catch","render","Host","key","class","classes","onKeyDown","onKeydownHandler","bind","tabs","role","list","btn","id","onClick","onSelectHandler","toBoolAttr","tabindex","ref","el","name","tag","booleanString","focusable","slot","getCurrentTab","find","index","t","govChange","emit","e","keyCode","stopPropagation","goToPrevNext","includes","length","current","trigger","nodeName","toLowerCase","setFocus","focus","refresh","currentTab","setActiveTab","rerender"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tColorType,\n\tTabColors,\n\tTabOrientationType,\n\tTabsClass,\n\tTabsItemClass,\n\tTabSizes,\n\tTabSizeType,\n\tTabType,\n\tTabTypes\n} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\nimport {booleanString, govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {hasOwnProperty} from \"../../utils/helpers.types\";\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: \"gov-tabs\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Tabs size.\n\t */\n\t@Prop() readonly size?: TabSizeType = 'm'\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly color?: ColorType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Icon and description display direction\n\t */\n\t@Prop({reflect: true}) readonly direction: 'row' | 'column' = 'row'\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TabColors, newValue, TabsClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TabSizes, newValue, TabsClass.root)\n\t}\n\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate prepareControllers(skipDefault = false): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(':scope > ' + TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\tconst iconStart = prepareIconFormat(tab.getAttribute('icon-start'))\n\t\t\t\tconst iconEnd = prepareIconFormat(tab.getAttribute('icon-end'))\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tdirection: tab.getAttribute(\"direction\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t\ticonStart,\n\t\t\t\t\ticonEnd\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tif (skipDefault === false) {\n\t\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\t} else if (this.focusIndex > -1 && hasOwnProperty(controllers, this.focusIndex)) {\n\t\t\t\tcontrollers[this.focusIndex].active = true\n\t\t\t}\n\t\t\tconst isWrongCombination = controllers.findIndex((controller) => controller.active && controller.disabled)\n\t\t\tif (isWrongCombination > -1) {\n\t\t\t\tcontrollers[isWrongCombination].active = false;\n\t\t\t\tconst firstGoodTab = controllers.findIndex((controller) => !controller.disabled)\n\t\t\t\tif (firstGoodTab > -1) {\n\t\t\t\t\tcontrollers[firstGoodTab].active = true\n\t\t\t\t\tthis.focusIndex = firstGoodTab;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tsize={this.size}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tdirection={this.direction}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs}\n\t\t\t\t\t role=\"tablist\"\n\t\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\taria-selected={booleanString(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tsize={this.size === \"xs\" ? \"xs\" : (this.size === \"s\" ? \"s\" : \"m\")}\n\t\t\t\t\t\t\t\t\t\ttype={control.active ? \"solid\" : \"outlined\"}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-start\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-end\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers(true);\n\t}\n}\n"],"mappings":"8cA2BaA,EAAO,MAKnB,WAAAC,CAAAC,G,8CAHQC,KAAWC,YAA2D,GAW7DD,KAAIE,KAAY,OAIhBF,KAAIG,KAAiB,IAIrBH,KAAKI,MAAe,UAIpBJ,KAAWK,YAAuB,aAInBL,KAASM,UAAqB,MAqBrDN,KAAWO,Y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IAAY,GAAI,CAC5C/G,KAAKQ,aACL,GAAIR,KAAKQ,WAAa,EAAG,CACxBR,KAAKQ,WAAaR,KAAKO,YAAY4G,OAAS,C,CAE7C,GAAInH,KAAKO,YAAYP,KAAKQ,YAAY8C,SAAU,CAC/CtD,KAAKiH,aAAa,G,EAIpB,GAAIjH,KAAKQ,YAAc,GAAKR,KAAKQ,YAAcR,KAAKO,YAAY4G,OAAS,EAAG,CAC3E,MAAMC,EAAUpH,KAAKO,YAAYP,KAAKQ,YACtC4G,EAAQrD,OAAS,KACjB,MAAMsD,EAAUrH,KAAKC,YAAYmH,EAAQ/D,mBACzC,GAAIgE,EAAQC,SAASC,gBAAkB,WAAY,CACjDvH,KAAKC,YAAYmH,EAAQ/D,mBAA0CmE,U,KAC9D,CACNxH,KAAKC,YAAYmH,EAAQ/D,mBAAmBoE,O,CAG7CzH,KAAKO,YAAc,IAAIP,KAAKO,aAC5BP,KAAKwE,WACLxE,KAAK4G,UAAUC,KAAK7G,KAAKwG,gBAAgB1C,Q,GAS5C,aAAM4D,GACL1H,KAAK+B,oB,CAON,gBAAM4F,GACL,OAAO3H,KAAKwG,gBAAgB1C,SAAW,I,CAOxC,kBAAM8D,CAAaxE,GAClBpD,KAAKyE,sBAAsBrB,GAC3BpD,KAAKwE,U,CAON,cAAMqD,GACL7H,KAAK+B,mBAAmB,K","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["GovTabs","constructor","hostRef","this","triggerRefs","type","size","color","orientation","direction","controllers","focusIndex","inheritedAttributes","h","govHost","host","validateType","newValue","validateProp","TabTypes","TabsClass","root","validateColor","TabColors","validateSize","TabSizes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","prepareControllers","inheritAriaAttributes","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","skipDefault","promises","querySelectorAll","TabsItemClass","forEach","tab","controlItem","Promise","all","getIdentifier","getTriggerIdentifier","getDisableState","then","identifier","triggerIdentifier","disabled","isDefault","getAttribute","iconStart","prepareIconFormat","iconEnd","label","contentIdentifier","element","active","default","push","defaultTabIndex","findIndex","controller","hasOwnProperty","isWrongCombination","firstGoodTab","reRender","setActiveByIdentifier","temp","map","item","control","setActiveStatus","catch","render","Host","key","class","classes","onKeyDown","onKeydownHandler","bind","tabs","role","list","btn","id","onClick","onSelectHandler","toBoolAttr","tabindex","ref","el","name","tag","booleanString","focusable","slot","getCurrentTab","find","index","t","govChange","emit","e","keyCode","stopPropagation","goToPrevNext","includes","length","current","trigger","nodeName","toLowerCase","setFocus","focus","refresh","currentTab","setActiveTab","rerender"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tColorType,\n\tTabColors,\n\tTabOrientationType,\n\tTabsClass,\n\tTabsItemClass,\n\tTabSizes,\n\tTabSizeType,\n\tTabType,\n\tTabTypes\n} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\nimport {booleanString, govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {hasOwnProperty} from \"../../utils/helpers.types\";\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: \"gov-tabs\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Tabs size.\n\t */\n\t@Prop() readonly size?: TabSizeType = 'm'\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly color?: ColorType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Icon and description display direction\n\t */\n\t@Prop({reflect: true}) readonly direction: 'row' | 'column' = 'row'\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TabColors, newValue, TabsClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TabSizes, newValue, TabsClass.root)\n\t}\n\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate prepareControllers(skipDefault = false): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(':scope > ' + TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\tconst iconStart = prepareIconFormat(tab.getAttribute('icon-start'))\n\t\t\t\tconst iconEnd = prepareIconFormat(tab.getAttribute('icon-end'))\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tdirection: tab.getAttribute(\"direction\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t\ticonStart,\n\t\t\t\t\ticonEnd\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tif (skipDefault === false) {\n\t\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\t} else if (this.focusIndex > -1 && hasOwnProperty(controllers, this.focusIndex)) {\n\t\t\t\tcontrollers[this.focusIndex].active = true\n\t\t\t}\n\t\t\tconst isWrongCombination = controllers.findIndex((controller) => controller.active && controller.disabled)\n\t\t\tif (isWrongCombination > -1) {\n\t\t\t\tcontrollers[isWrongCombination].active = false;\n\t\t\t\tconst firstGoodTab = controllers.findIndex((controller) => !controller.disabled)\n\t\t\t\tif (firstGoodTab > -1) {\n\t\t\t\t\tcontrollers[firstGoodTab].active = true\n\t\t\t\t\tthis.focusIndex = firstGoodTab;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tsize={this.size}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tdirection={this.direction}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs}\n\t\t\t\t\t role=\"tablist\"\n\t\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\taria-selected={booleanString(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tsize={this.size === \"xs\" ? \"xs\" : (this.size === \"s\" ? \"s\" : \"m\")}\n\t\t\t\t\t\t\t\t\t\ttype={control.active ? \"solid\" : \"outlined\"}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-start\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-end\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers(true);\n\t}\n}\n"],"mappings":"8cA2BaA,EAAO,MAKnB,WAAAC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cQO4NH2.js";const a=class{constructor(t){s(this,t);this.h=c(this.host)}render(){return t(r,{key:"709f373fe63ba089e6c37ed7c61359e7b07a67e2",class:this.h.classes(o.root),role:"list"},t("slot",{key:"acb0cc5b4279d57c375c7cee80ebf305809dfd4d"}))}get host(){return e(this)}};export{a as gov_grid};
|
|
2
|
+
//# sourceMappingURL=p-eff8ffff.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GovGrid","constructor","hostRef","this","h","govHost","host","render","Host","key","class","classes","GridClass","root","role"],"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"],"mappings":"+JAQaA,EAAO,MAGnB,WAAAC,CAAAC,G,UACCC,KAAKC,EAAIC,EAAQF,KAAKG,KACtB,CAmBD,MAAAC,GACC,OACCH,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOP,KAAKC,EAAEO,QAAQC,EAAUC,MAAOC,KAAK,QACjDV,
|
|
1
|
+
{"version":3,"names":["GovGrid","constructor","hostRef","this","h","govHost","host","render","Host","key","class","classes","GridClass","root","role"],"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"],"mappings":"+JAQaA,EAAO,MAGnB,WAAAC,CAAAC,G,UACCC,KAAKC,EAAIC,EAAQF,KAAKG,KACtB,CAmBD,MAAAC,GACC,OACCH,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOP,KAAKC,EAAEO,QAAQC,EAAUC,MAAOC,KAAK,QACjDV,EAAA,QAAAK,IAAA,6C","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as t,H as o,g as s}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as t,H as o,g as s}from"./p-B8TR1oqt.js";import{g as c}from"./p-CoD1xawt.js";var a;(function(e){e["PRIMARY"]="primary";e["SUBTLE"]="subtle";e["NEUTRAL"]="neutral"})(a||(a={}));const d={root:"gov-blockquote"};const r=class{constructor(t){e(this,t);this.type=a.SUBTLE;this.h=c(this.host)}render(){return t(o,{key:"c12f0f01c2db5025112edd1ebc834a18ff754546",class:this.h.classes(d.root),type:this.type},t("gov-icon",{key:"f043fdebbbd95c4eb3909985243f5ef253eb0335",type:"components",name:"quote",size:"3xl"}),t("blockquote",{key:"57cdec66772ad7732a79dd9a55cad1d9e5058ed7",cite:this.cite},t("slot",{key:"71a0e5ca7f377e22f4c12c44c517f142d45e47a9"})),t("slot",{key:"b0c7f4796b12e1baec71c03d20cb2ff99ae51311",name:"image"}),t("slot",{key:"55e5588b7e9793743a6b8ef403d363ddde8300d8",name:"author"}))}get host(){return s(this)}};export{r as gov_blockquote};
|
|
2
|
+
//# sourceMappingURL=p-f2d24551.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BlockquoteType","BlockquoteClass","root","GovBlockquote","constructor","hostRef","this","type","SUBTLE","h","govHost","host","render","Host","key","class","classes","name","size","cite"],"sources":["../../../packages/core/src/components/gov-blockquote/constants.ts","../../../packages/core/src/components/gov-blockquote/gov-blockquote.tsx"],"sourcesContent":["import {ValueOf} from \"../../types/interfaces\";\n\nexport enum BlockquoteType {\n\tPRIMARY = 'primary',\n\tSUBTLE = 'subtle',\n\tNEUTRAL = 'neutral',\n}\nexport type BlockquoteTypesType = `${ValueOf<typeof BlockquoteType>}`\n\nexport const BlockquoteClass = {\n\troot: 'gov-blockquote',\n}\n","import {Component, Element, Host, h, Prop} from '@stencil/core'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport {BlockquoteClass, BlockquoteType, BlockquoteTypesType} from \"./constants\";\n\n\n@Component({\n\ttag: 'gov-blockquote',\n})\nexport class GovBlockquote {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBlockquoteElement\n\t/**\n\t * Blockquote’s type\n\t */\n\t@Prop({reflect: true}) readonly type: BlockquoteTypesType = BlockquoteType.SUBTLE\n\t/**\n\t * Blockquote’s cite url\n\t */\n\t@Prop({attribute: 'cite'}) readonly cite: string\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BlockquoteClass.root)} type={this.type}>\n\t\t\t\t<gov-icon type=\"components\" name=\"quote\" size=\"3xl\"></gov-icon>\n\t\t\t\t<blockquote cite={this.cite}>\n\t\t\t\t\t<slot />\n\t\t\t\t</blockquote>\n\t\t\t\t<slot name=\"image\" />\n\t\t\t\t<slot name=\"author\" />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"6FAEA,IAAYA,GAAZ,SAAYA,GACXA,EAAA,qBACAA,EAAA,mBACAA,EAAA,oBACA,EAJD,CAAYA,
|
|
1
|
+
{"version":3,"names":["BlockquoteType","BlockquoteClass","root","GovBlockquote","constructor","hostRef","this","type","SUBTLE","h","govHost","host","render","Host","key","class","classes","name","size","cite"],"sources":["../../../packages/core/src/components/gov-blockquote/constants.ts","../../../packages/core/src/components/gov-blockquote/gov-blockquote.tsx"],"sourcesContent":["import {ValueOf} from \"../../types/interfaces\";\n\nexport enum BlockquoteType {\n\tPRIMARY = 'primary',\n\tSUBTLE = 'subtle',\n\tNEUTRAL = 'neutral',\n}\nexport type BlockquoteTypesType = `${ValueOf<typeof BlockquoteType>}`\n\nexport const BlockquoteClass = {\n\troot: 'gov-blockquote',\n}\n","import {Component, Element, Host, h, Prop} from '@stencil/core'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport {BlockquoteClass, BlockquoteType, BlockquoteTypesType} from \"./constants\";\n\n\n@Component({\n\ttag: 'gov-blockquote',\n})\nexport class GovBlockquote {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBlockquoteElement\n\t/**\n\t * Blockquote’s type\n\t */\n\t@Prop({reflect: true}) readonly type: BlockquoteTypesType = BlockquoteType.SUBTLE\n\t/**\n\t * Blockquote’s cite url\n\t */\n\t@Prop({attribute: 'cite'}) readonly cite: string\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BlockquoteClass.root)} type={this.type}>\n\t\t\t\t<gov-icon type=\"components\" name=\"quote\" size=\"3xl\"></gov-icon>\n\t\t\t\t<blockquote cite={this.cite}>\n\t\t\t\t\t<slot />\n\t\t\t\t</blockquote>\n\t\t\t\t<slot name=\"image\" />\n\t\t\t\t<slot name=\"author\" />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"6FAEA,IAAYA,GAAZ,SAAYA,GACXA,EAAA,qBACAA,EAAA,mBACAA,EAAA,oBACA,EAJD,CAAYA,MAAc,KAOnB,MAAMC,EAAkB,CAC9BC,KAAM,kB,MCDMC,EAAa,MAGzB,WAAAC,CAAAC,G,UAQgCC,KAAAC,KAA4BP,EAAeQ,OAP1EF,KAAKG,EAAIC,EAAQJ,KAAKK,KACtB,CAYD,MAAAC,GACC,OACCH,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOT,KAAKG,EAAEO,QAAQf,EAAgBC,MAAOK,KAAMD,KAAKC,MAC7DE,EAAA,YAAAK,IAAA,2CAAUP,KAAK,aAAaU,KAAK,QAAQC,KAAK,QAC9CT,EAAA,cAAAK,IAAA,2CAAYK,KAAMb,KAAKa,MACtBV,EAAA,QAAAK,IAAA,8CAEDL,EAAA,QAAAK,IAAA,2CAAMG,KAAK,UACXR,EAAA,QAAAK,IAAA,2CAAMG,KAAK,W","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as o,H as n}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as o,H as n}from"./p-B8TR1oqt.js";import{a as c}from"./p-vN03FcXN.js";const t=class{constructor(o){e(this,o);this.uniqueId="lifecycle-"+c()}connectedCallback(){console.log("connectedCallback",this.uniqueId)}disconnectedCallback(){console.log("disconnectedCallback",this.uniqueId)}componentWillLoad(){console.log("componentWillLoad",this.uniqueId)}componentDidLoad(){console.log("componentDidLoad",this.uniqueId)}componentShouldUpdate(){console.log("componentShouldUpdate",this.uniqueId)}componentWillRender(){console.log("componentWillRender",this.uniqueId)}componentDidRender(){console.log("componentDidRender",this.uniqueId)}componentWillUpdate(){console.log("componentWillUpdate",this.uniqueId)}componentDidUpdate(){console.log("componentDidUpdate",this.uniqueId)}render(){return o(n,{key:"eeda9523c33256ff4687e071bf2546383aad6ffc",identifier:this.uniqueId},o("span",{key:"ae7cbbfca20d4a882c2021a309746359e8296eee"},"lifecycle ",this.uniqueId))}};export{t as gov_lifecycle};
|
|
2
|
+
//# sourceMappingURL=p-f515d912.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as s,h as t,H as o,g as r}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as s,h as t,H as o,g as r}from"./p-B8TR1oqt.js";import{C as a}from"./p-U40vKHrs.js";import{g as c}from"./p-CoD1xawt.js";import{v as e}from"./p-NOJjz9dT.js";import{p as i}from"./p-CQvUntGY.js";import"./p-CgDnDrq5.js";i(a,["PRIMARY","NEUTRAL","ERROR"]);const p={root:"gov-control-group"};const l=class{constructor(t){s(this,t);this.color=a.NEUTRAL;this.noBorder=false;this.noInnerBorder=false;this.fitContent=false;this.h=c(this.host)}validateColor(s){e(a,s,p.root)}render(){return t(o,{key:"be061d7c1f49481bc31a0a8b8222eacc044051e3",class:this.h.classes(p.root),color:this.color},t("slot",{key:"1af88c06c1f92db2c34727a87a7acac4abf895c1"}))}get host(){return r(this)}static get watchers(){return{color:[{validateColor:0}]}}};export{l as gov_control_group};
|
|
2
|
+
//# sourceMappingURL=p-febff4d1.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pick","Colors","ControlGroupClass","root","GovControlGroup","constructor","hostRef","this","color","NEUTRAL","noBorder","noInnerBorder","fitContent","h","govHost","host","validateColor","newValue","validateProp","render","Host","key","class","classes"],"sources":["../../../packages/core/src/components/gov-control-group/constants.ts","../../../packages/core/src/components/gov-control-group/gov-control-group.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const ControlGroupColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR'])\nexport type ControlGroupColorType = `${ValueOf<typeof ControlGroupColors>}`\n\nexport const ControlGroupClass = {\n\troot: 'gov-control-group',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { Colors } from \"../../core/constants/colors\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { ControlGroupClass, ControlGroupColorType } from \"./constants\"\n\n@Component({\n\ttag: \"gov-control-group\",\n})\nexport class GovControlGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovControlGroupElement\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: ControlGroupColorType = Colors.NEUTRAL\n\t/**\n\t * Specifies the display of the border between elements\n\t */\n\t@Prop({ attribute: \"no-border\" }) readonly noBorder: boolean = false\n\t/**\n\t * Specifies the display of the border between elements\n\t */\n\t@Prop({ attribute: \"no-inner-border\" }) readonly noInnerBorder: boolean = false\n\t/**\n\t * Specifies the display of elements to full width\n\t */\n\t@Prop({ attribute: \"fit-content\" }) readonly fitContent: boolean = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, ControlGroupClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(ControlGroupClass.root)}\n\t\t\t\tcolor={this.color}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"iOAIkCA,EAAKC,EAAQ,CAAC,UAAW,UAAW,UAG/D,MAAMC,EAAoB,CAChCC,KAAM,qB,MCEMC,EAAe,MAG3B,WAAAC,CAAAC,G,UAQiBC,KAAAC,MAA+BP,EAAOQ,QAIZF,
|
|
1
|
+
{"version":3,"names":["pick","Colors","ControlGroupClass","root","GovControlGroup","constructor","hostRef","this","color","NEUTRAL","noBorder","noInnerBorder","fitContent","h","govHost","host","validateColor","newValue","validateProp","render","Host","key","class","classes"],"sources":["../../../packages/core/src/components/gov-control-group/constants.ts","../../../packages/core/src/components/gov-control-group/gov-control-group.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const ControlGroupColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR'])\nexport type ControlGroupColorType = `${ValueOf<typeof ControlGroupColors>}`\n\nexport const ControlGroupClass = {\n\troot: 'gov-control-group',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { Colors } from \"../../core/constants/colors\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { ControlGroupClass, ControlGroupColorType } from \"./constants\"\n\n@Component({\n\ttag: \"gov-control-group\",\n})\nexport class GovControlGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovControlGroupElement\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: ControlGroupColorType = Colors.NEUTRAL\n\t/**\n\t * Specifies the display of the border between elements\n\t */\n\t@Prop({ attribute: \"no-border\" }) readonly noBorder: boolean = false\n\t/**\n\t * Specifies the display of the border between elements\n\t */\n\t@Prop({ attribute: \"no-inner-border\" }) readonly noInnerBorder: boolean = false\n\t/**\n\t * Specifies the display of elements to full width\n\t */\n\t@Prop({ attribute: \"fit-content\" }) readonly fitContent: boolean = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, ControlGroupClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(ControlGroupClass.root)}\n\t\t\t\tcolor={this.color}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"iOAIkCA,EAAKC,EAAQ,CAAC,UAAW,UAAW,UAG/D,MAAMC,EAAoB,CAChCC,KAAM,qB,MCEMC,EAAe,MAG3B,WAAAC,CAAAC,G,UAQiBC,KAAAC,MAA+BP,EAAOQ,QAIZF,KAAAG,SAAoB,MAIdH,KAAAI,cAAyB,MAI7BJ,KAAAK,WAAsB,MAnBlEL,KAAKM,EAAIC,EAAQP,KAAKQ,KACtB,CAqBD,aAAAC,CAAcC,GACbC,EAAajB,EAAQgB,EAAUf,EAAkBC,K,CAGlD,MAAAgB,GACC,OACCN,EAACO,EAAI,CAAAC,IAAA,2CACJC,MAAOf,KAAKM,EAAEU,QAAQrB,EAAkBC,MACxCK,MAAOD,KAAKC,OACZK,EAAA,QAAAQ,IAAA,6C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-vN03FcXN.js","sources":["../../../packages/core/src/utils/string.utils.ts"],"sourcesContent":["export function chr4(): string {\n\treturn Math.random().toString(16).slice(-4)\n}\n\nexport function createID(prefix: string): string {\n\treturn `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`\n}\n\nexport function removeDiacritics(string: any): string | any {\n\tif (typeof string !== 'string') return string\n\treturn string.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '')\n}\n\nexport function splitByWhitespace(string: any): string | any {\n\tif (typeof string !== 'string') return string\n\treturn string.split(/(\\s+)/)\n}\n"],"names":[],"mappings":"SAAgB,IAAI,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AAC5C;AAEM,SAAU,QAAQ,CAAC,MAAc,EAAA;IACtC,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"p-vN03FcXN.js","sources":["../../../packages/core/src/utils/string.utils.ts"],"sourcesContent":["export function chr4(): string {\n\treturn Math.random().toString(16).slice(-4)\n}\n\nexport function createID(prefix: string): string {\n\treturn `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`\n}\n\nexport function removeDiacritics(string: any): string | any {\n\tif (typeof string !== 'string') return string\n\treturn string.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '')\n}\n\nexport function splitByWhitespace(string: any): string | any {\n\tif (typeof string !== 'string') return string\n\treturn string.split(/(\\s+)/)\n}\n"],"names":[],"mappings":"SAAgB,IAAI,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AAC5C;AAEM,SAAU,QAAQ,CAAC,MAAc,EAAA;IACtC,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAA,CAAE;AAChG;AAEM,SAAU,gBAAgB,CAAC,MAAW,EAAA;IAC3C,IAAI,OAAO,MAAM,KAAK,QAAQ;AAAE,QAAA,OAAO,MAAM;AAC7C,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AAC/D;AAEM,SAAU,iBAAiB,CAAC,MAAW,EAAA;IAC5C,IAAI,OAAO,MAAM,KAAK,QAAQ;AAAE,QAAA,OAAO,MAAM;AAC7C,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;AAC7B;;;;"}
|