@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,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
|
2
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
3
|
+
type MixinInstance<F> = F extends (base: MixedInCtor) => MixedInCtor<infer I> ? I : never;
|
|
2
4
|
export interface ComponentDecorator {
|
|
3
5
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
6
|
}
|
|
@@ -61,6 +63,12 @@ export interface ShadowRootOptions {
|
|
|
61
63
|
* focusable part is given focus, and the shadow host is given any available `:focus` styling.
|
|
62
64
|
*/
|
|
63
65
|
delegatesFocus?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
|
|
68
|
+
* slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
|
|
69
|
+
* declarative slotting behavior.
|
|
70
|
+
*/
|
|
71
|
+
slotAssignment?: 'manual' | 'named';
|
|
64
72
|
}
|
|
65
73
|
export interface ModeStyles {
|
|
66
74
|
[modeName: string]: string | string[];
|
|
@@ -117,12 +125,34 @@ export interface EventOptions {
|
|
|
117
125
|
*/
|
|
118
126
|
composed?: boolean;
|
|
119
127
|
}
|
|
128
|
+
export interface AttachInternalsOptions {
|
|
129
|
+
/**
|
|
130
|
+
* Initial custom states to set on the ElementInternals.states CustomStateSet.
|
|
131
|
+
* Each key is the state name and the value is the initial boolean state.
|
|
132
|
+
*
|
|
133
|
+
* These states can be targeted with the CSS `:state()` pseudo-class.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* @AttachInternals({ states: { open: true, active: false } })
|
|
138
|
+
* internals: ElementInternals;
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
|
|
142
|
+
*/
|
|
143
|
+
states?: {
|
|
144
|
+
[stateName: string]: boolean;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
120
147
|
export interface AttachInternalsDecorator {
|
|
121
|
-
(): PropertyDecorator;
|
|
148
|
+
(opts?: AttachInternalsOptions): PropertyDecorator;
|
|
122
149
|
}
|
|
123
150
|
export interface ListenDecorator {
|
|
124
151
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
125
152
|
}
|
|
153
|
+
export interface ResolveVarFunction {
|
|
154
|
+
<T>(variable: T): string;
|
|
155
|
+
}
|
|
126
156
|
export interface ListenOptions {
|
|
127
157
|
/**
|
|
128
158
|
* Handlers can also be registered for an event other than the host itself.
|
|
@@ -151,7 +181,15 @@ export interface StateDecorator {
|
|
|
151
181
|
(): PropertyDecorator;
|
|
152
182
|
}
|
|
153
183
|
export interface WatchDecorator {
|
|
154
|
-
(propName:
|
|
184
|
+
(propName: any, watchOptions?: {
|
|
185
|
+
immediate?: boolean;
|
|
186
|
+
}): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
|
|
187
|
+
}
|
|
188
|
+
export interface PropSerializeDecorator {
|
|
189
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
|
|
190
|
+
}
|
|
191
|
+
export interface AttrDeserializeDecorator {
|
|
192
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => any>;
|
|
155
193
|
}
|
|
156
194
|
export interface UserBuildConditionals {
|
|
157
195
|
isDev: boolean;
|
|
@@ -200,6 +238,24 @@ export declare const AttachInternals: AttachInternalsDecorator;
|
|
|
200
238
|
* https://stenciljs.com/docs/events#listen-decorator
|
|
201
239
|
*/
|
|
202
240
|
export declare const Listen: ListenDecorator;
|
|
241
|
+
/**
|
|
242
|
+
* The `resolveVar()` function is a compile-time utility that resolves const variables
|
|
243
|
+
* and object properties to their string literal values. This allows variables to be
|
|
244
|
+
* used in `@Listen` and `@Event` decorators instead of hardcoded strings.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* const MY_EVENT = 'myEvent';
|
|
249
|
+
* @Listen(resolveVar(MY_EVENT))
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```ts
|
|
254
|
+
* const EVENTS = { MY_EVENT: 'myEvent' } as const;
|
|
255
|
+
* @Event({ eventName: resolveVar(EVENTS.MY_EVENT) })
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
export declare const resolveVar: ResolveVarFunction;
|
|
203
259
|
/**
|
|
204
260
|
* The `@Method()` decorator is used to expose methods on the public API.
|
|
205
261
|
* Class methods decorated with the @Method() decorator can be called directly
|
|
@@ -233,6 +289,14 @@ export declare const State: StateDecorator;
|
|
|
233
289
|
* https://stenciljs.com/docs/reactive-data#watch-decorator
|
|
234
290
|
*/
|
|
235
291
|
export declare const Watch: WatchDecorator;
|
|
292
|
+
/**
|
|
293
|
+
* Decorator to serialize a property to an attribute string.
|
|
294
|
+
*/
|
|
295
|
+
export declare const PropSerialize: PropSerializeDecorator;
|
|
296
|
+
/**
|
|
297
|
+
* Decorator to deserialize an attribute string to a property.
|
|
298
|
+
*/
|
|
299
|
+
export declare const AttrDeserialize: AttrDeserializeDecorator;
|
|
236
300
|
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
237
301
|
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
238
302
|
/**
|
|
@@ -349,6 +413,58 @@ export declare function readTask(task: RafCallback): void;
|
|
|
349
413
|
* Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
|
|
350
414
|
*/
|
|
351
415
|
export declare const setErrorHandler: (handler: ErrorHandler) => void;
|
|
416
|
+
export type TagTransformer = (tag: string) => string;
|
|
417
|
+
/**
|
|
418
|
+
* Sets a tag transformer to be used when rendering your custom elements.
|
|
419
|
+
* ```ts
|
|
420
|
+
* setTagTransformer((tag) => {
|
|
421
|
+
* if (tag.startsWith('my-')) return `new-${tag}`
|
|
422
|
+
* return tag;
|
|
423
|
+
* });
|
|
424
|
+
* ```
|
|
425
|
+
* Will mean all your components that start with `my-` are defined instead with `new-my-` prefix.
|
|
426
|
+
*
|
|
427
|
+
* @param transformer the transformer function to use which must return a string.
|
|
428
|
+
*/
|
|
429
|
+
export declare function setTagTransformer(transformer: TagTransformer): void;
|
|
430
|
+
/**
|
|
431
|
+
* Transforms a tag name using a transformer set via `setTagTransformer`
|
|
432
|
+
*
|
|
433
|
+
* @param tag - the tag to transform e.g. `my-tag`
|
|
434
|
+
* @returns the transformed tag e.g. `new-my-tag`
|
|
435
|
+
*/
|
|
436
|
+
export declare function transformTag(tag: string): string;
|
|
437
|
+
/**
|
|
438
|
+
* @deprecated - Use `MixedInCtor` instead:
|
|
439
|
+
* ```ts
|
|
440
|
+
* import { MixedInCtor } from '@stencil/core';
|
|
441
|
+
*
|
|
442
|
+
* const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
443
|
+
* ```
|
|
444
|
+
*/
|
|
445
|
+
export type MixinFactory = (base: MixedInCtor) => MixedInCtor;
|
|
446
|
+
export type MixedInCtor<T = {}> = new (...args: any[]) => T;
|
|
447
|
+
/**
|
|
448
|
+
* Compose multiple mixin classes into a single constructor.
|
|
449
|
+
* The resulting class has the combined instance types of all mixed-in classes.
|
|
450
|
+
*
|
|
451
|
+
* Example:
|
|
452
|
+
* ```ts
|
|
453
|
+
* import { Mixin, MixedInCtor } from '@stencil/core';
|
|
454
|
+
*
|
|
455
|
+
* const AWrap = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
456
|
+
* const BWrap = <B extends MixedInCtor>(Base: B) => {class B extends Base { propB = B }; return B;}
|
|
457
|
+
* const CWrap = <B extends MixedInCtor>(Base: B) => {class C extends Base { propC = C }; return C;}
|
|
458
|
+
*
|
|
459
|
+
* class X extends Mixin(AWrap, BWrap, CWrap) {
|
|
460
|
+
* render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
|
|
461
|
+
* }
|
|
462
|
+
* ```
|
|
463
|
+
*
|
|
464
|
+
* @param mixinFactories mixin factory functions that return a class which extends from the provided class.
|
|
465
|
+
* @returns a class that is composed from extending each of the provided classes in the order they were provided.
|
|
466
|
+
*/
|
|
467
|
+
export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
|
|
352
468
|
/**
|
|
353
469
|
* This file gets copied to all distributions of stencil component collections.
|
|
354
470
|
* - no imports
|
|
@@ -521,7 +637,7 @@ export interface FunctionalUtilities {
|
|
|
521
637
|
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
|
|
522
638
|
}
|
|
523
639
|
export interface FunctionalComponent<T = {}> {
|
|
524
|
-
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
|
|
640
|
+
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
|
|
525
641
|
}
|
|
526
642
|
/**
|
|
527
643
|
* A Child VDOM node
|
|
@@ -563,6 +679,7 @@ export declare namespace h {
|
|
|
563
679
|
function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
564
680
|
function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
565
681
|
function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
682
|
+
function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
|
|
566
683
|
namespace JSX {
|
|
567
684
|
interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
|
|
568
685
|
[tagName: string]: any;
|
|
@@ -577,6 +694,36 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
|
|
|
577
694
|
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
578
695
|
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
579
696
|
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
697
|
+
export declare function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
|
|
698
|
+
/**
|
|
699
|
+
* Automatic JSX runtime functions for TypeScript's react-jsx mode.
|
|
700
|
+
* These functions are called automatically by TypeScript when using "jsx": "react-jsx".
|
|
701
|
+
* @param type type of node
|
|
702
|
+
* @param props properties of node
|
|
703
|
+
* @param key optional key for the node
|
|
704
|
+
* @returns a jsx vnode
|
|
705
|
+
*/
|
|
706
|
+
export declare function jsx(type: any, props: any, key?: string): VNode;
|
|
707
|
+
/**
|
|
708
|
+
* Automatic JSX runtime functions for TypeScript's react-jsxmode with multiple children.
|
|
709
|
+
* @param type type of node
|
|
710
|
+
* @param props properties of node
|
|
711
|
+
* @param key optional key for the node
|
|
712
|
+
* @returns a jsx vnode
|
|
713
|
+
*/
|
|
714
|
+
export declare function jsxs(type: any, props: any, key?: string): VNode;
|
|
715
|
+
/**
|
|
716
|
+
* Automatic JSX runtime functions for TypeScript's react-jsxdev mode.
|
|
717
|
+
* These functions are called automatically by TypeScript when using "jsx": "react-jsxdev".
|
|
718
|
+
* @param type type of node
|
|
719
|
+
* @param props properties of node
|
|
720
|
+
* @param key optional key for the node
|
|
721
|
+
* @param isStaticChildren indicates if the children are static
|
|
722
|
+
* @param source source information
|
|
723
|
+
* @param self reference to the component instance
|
|
724
|
+
* @returns a jsx vnode
|
|
725
|
+
*/
|
|
726
|
+
export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
|
|
580
727
|
/**
|
|
581
728
|
* A virtual DOM node
|
|
582
729
|
*/
|
|
@@ -606,7 +753,7 @@ declare namespace LocalJSX {
|
|
|
606
753
|
export { LocalJSX as JSX };
|
|
607
754
|
export declare namespace JSXBase {
|
|
608
755
|
interface IntrinsicElements {
|
|
609
|
-
slot: JSXBase.SlotAttributes
|
|
756
|
+
slot: JSXBase.SlotAttributes<HTMLSlotElement>;
|
|
610
757
|
a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
611
758
|
abbr: JSXBase.HTMLAttributes;
|
|
612
759
|
address: JSXBase.HTMLAttributes;
|
|
@@ -776,7 +923,7 @@ export declare namespace JSXBase {
|
|
|
776
923
|
use: JSXBase.SVGAttributes;
|
|
777
924
|
view: JSXBase.SVGAttributes;
|
|
778
925
|
}
|
|
779
|
-
interface SlotAttributes extends JSXAttributes {
|
|
926
|
+
interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
|
|
780
927
|
name?: string;
|
|
781
928
|
slot?: string;
|
|
782
929
|
onSlotchange?: (event: Event) => void;
|
|
@@ -832,6 +979,9 @@ export declare namespace JSXBase {
|
|
|
832
979
|
popoverTargetAction?: string;
|
|
833
980
|
popoverTargetElement?: Element | null;
|
|
834
981
|
popoverTarget?: string;
|
|
982
|
+
command?: string;
|
|
983
|
+
commandFor?: string;
|
|
984
|
+
commandfor?: string;
|
|
835
985
|
}
|
|
836
986
|
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
837
987
|
height?: number | string;
|
|
@@ -846,7 +996,7 @@ export declare namespace JSXBase {
|
|
|
846
996
|
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
847
997
|
open?: boolean;
|
|
848
998
|
name?: string;
|
|
849
|
-
onToggle?: (event:
|
|
999
|
+
onToggle?: (event: ToggleEvent) => void;
|
|
850
1000
|
}
|
|
851
1001
|
interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
852
1002
|
cite?: string;
|
|
@@ -920,6 +1070,7 @@ export declare namespace JSXBase {
|
|
|
920
1070
|
importance?: 'low' | 'auto' | 'high';
|
|
921
1071
|
height?: number | string;
|
|
922
1072
|
loading?: 'lazy' | 'auto' | 'eager';
|
|
1073
|
+
referrerPolicy?: ReferrerPolicy;
|
|
923
1074
|
sizes?: string;
|
|
924
1075
|
src?: string;
|
|
925
1076
|
srcSet?: string;
|
|
@@ -1552,6 +1703,13 @@ export declare namespace JSXBase {
|
|
|
1552
1703
|
z?: number | string;
|
|
1553
1704
|
zoomAndPan?: string;
|
|
1554
1705
|
}
|
|
1706
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1707
|
+
interface ToggleEvent extends Event {
|
|
1708
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
1709
|
+
readonly newState: string;
|
|
1710
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
|
|
1711
|
+
readonly oldState: string;
|
|
1712
|
+
}
|
|
1555
1713
|
interface DOMAttributes<T> extends JSXAttributes<T> {
|
|
1556
1714
|
slot?: string;
|
|
1557
1715
|
part?: string;
|
|
@@ -1568,6 +1726,10 @@ export declare namespace JSXBase {
|
|
|
1568
1726
|
onCompositionstartCapture?: (event: CompositionEvent) => void;
|
|
1569
1727
|
onCompositionupdate?: (event: CompositionEvent) => void;
|
|
1570
1728
|
onCompositionupdateCapture?: (event: CompositionEvent) => void;
|
|
1729
|
+
onBeforeToggle?: (event: ToggleEvent) => void;
|
|
1730
|
+
onBeforeToggleCapture?: (event: ToggleEvent) => void;
|
|
1731
|
+
onToggle?: (event: ToggleEvent) => void;
|
|
1732
|
+
onToggleCapture?: (event: ToggleEvent) => void;
|
|
1571
1733
|
onFocus?: (event: FocusEvent) => void;
|
|
1572
1734
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1573
1735
|
onFocusin?: (event: FocusEvent) => void;
|
|
@@ -1586,10 +1748,6 @@ export declare namespace JSXBase {
|
|
|
1586
1748
|
onSubmitCapture?: (event: Event) => void;
|
|
1587
1749
|
onInvalid?: (event: Event) => void;
|
|
1588
1750
|
onInvalidCapture?: (event: Event) => void;
|
|
1589
|
-
onBeforeToggle?: (event: Event) => void;
|
|
1590
|
-
onBeforeToggleCapture?: (event: Event) => void;
|
|
1591
|
-
onToggle?: (event: Event) => void;
|
|
1592
|
-
onToggleCapture?: (event: Event) => void;
|
|
1593
1751
|
onLoad?: (event: Event) => void;
|
|
1594
1752
|
onLoadCapture?: (event: Event) => void;
|
|
1595
1753
|
onError?: (event: Event) => void;
|
|
@@ -1693,6 +1851,7 @@ export interface CustomElementsDefineOptions {
|
|
|
1693
1851
|
exclude?: string[];
|
|
1694
1852
|
resourcesUrl?: string;
|
|
1695
1853
|
syncQueue?: boolean;
|
|
1854
|
+
/** @deprecated in-favour of `setTagTransformer` and `transformTag` */
|
|
1696
1855
|
transformTagName?: (tagName: string) => string;
|
|
1697
1856
|
jmp?: (c: Function) => any;
|
|
1698
1857
|
raf?: (c: FrameRequestCallback) => number;
|
package/package.json
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
"name": "@gov-design-system-ce/components",
|
|
3
|
+
"description": "This package includes Gov Design System Web Components and related utilities.",
|
|
4
|
+
"author": "Zdeněk Vítek",
|
|
5
|
+
"version": "4.6.5-b",
|
|
6
|
+
"license": "EUPL v1.2 Licensed",
|
|
7
|
+
"main": "./dist/index.cjs.js",
|
|
8
|
+
"unpkg": "./dist/core/core.esm.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"jsnext:main": "./dist/esm/index.js",
|
|
11
|
+
"collection": "./dist/collection/collection-manifest.json",
|
|
12
|
+
"collection:main": "./dist/collection/index.js",
|
|
13
|
+
"types": "dist/types/interfaces.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/",
|
|
16
|
+
"loader/"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@gov-design-system-ce/fonts": "^4.0.0",
|
|
26
|
+
"@gov-design-system-ce/icons": "^4.0.0",
|
|
27
|
+
"@gov-design-system-ce/styles": "^4.6.4",
|
|
28
|
+
"chokidar-cli": "3.0.0",
|
|
29
|
+
"rimraf": "5.0.10",
|
|
30
|
+
"sass": "1.101.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {}
|
|
33
|
+
}
|
package/readme.md
ADDED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,a as n}from"./index.js";import{p as o}from"./p-CQvUntGY.js";import{C as i}from"./p-U40vKHrs.js";import{S as r}from"./p-BcQO4NH2.js";import{a,i as c,b as l}from"./p-DrPpH_9c.js";import{g as h}from"./p-DKo9A5gq.js";import{v as u}from"./p-BKP-F1qP.js";o(r,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const f=o(i,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var m;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(m||(m={}));const p={root:"gov-icon"};const d="4.6.3";const v=()=>d;const g={};const w={};const y=t=>t.startsWith("http://")||t.startsWith("https://");const C=(t,s,e)=>{if(y(t)){return`${t}/${e}/${s}.svg?v=${v()}`}return`${t}/${e}/${s}.svg`+`?v=${v()}`};async function I({name:t,type:s}){const e=s+"-"+t;if(g[e]){return g[e]}if(!w[e]){w[e]=fetch(C(a(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await w[e];g[e]=n;return n}const D=(t,s,e)=>{if(!c){return}let n="";document.cookie=`${t}=${encodeURIComponent(s)}${n}; path=/`};const E=t=>{if(!c){return null}const s=t+"=";const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let n=e[t].trim();if(n.startsWith(s)){return decodeURIComponent(n.substring(s.length))}}return null};const L=t=>{try{const s=new DOMParser;const e=s.parseFromString(t,"image/svg+xml");const n=e.querySelector("parsererror");if(n){return false}const o=e.documentElement;if(o.tagName.toLowerCase()!=="svg"){return false}return true}catch(t){return false}};const S=t(class t extends s{constructor(){super();this.__registerHost();this.name=null;this.type="components";this.visible=false;this.error=false;this.h=h(this.host)}validateSize(t){u(r,t,p.root)}validateColor(t){u(f,t,p.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(l()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const e=await I({name:t,type:s});const n=L(e);this.host.innerHTML=n?e:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return e(n,{class:this.h.classes(p.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}},[0,"gov-icon",{size:[513],color:[513],name:[513],type:[513],visible:[32],error:[32]},undefined,{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}]);function $(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,S)}break}}))}$();export{S as G,$ as d,E as g,D as s};
|
|
2
|
-
//# sourceMappingURL=p-BrdXh0mI.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as t,H as s,c as i,h as e,a as o}from"./index.js";import{t as h,b as a}from"./p-DKo9A5gq.js";import{v as n}from"./p-BKP-F1qP.js";import{c as l}from"./p-vN03FcXN.js";import{d as r,t as c,h as m}from"./p-CQvUntGY.js";import{F as u,a as f}from"./p-9imLQpxb.js";import{p as d}from"./p-B0hcuYXk.js";import{A as p,a as v,i as g}from"./p-CXgom82_.js";import{d as b}from"./p-djqfSbq-.js";import{d as y}from"./p-Bv5L0j6n.js";import{d as k}from"./p-BrdXh0mI.js";import{d as j}from"./p-BNnuBQvo.js";const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus");this.govBlur=i(this,"gov-blur");this.govInput=i(this,"gov-input");this.govSelect=i(this,"gov-select");this.templateResolver=t=>t[this.nameKey];this.value="";this.size="m";this.nameKey="name";this.required=false;this.disabled=false;this.minlength=3;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=l("GovListBox")}validateSize(t){n(f,t,u.root)}watchOptions(t){this.setOptions(d(t)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await r(200);const t=this.listRef.offsetHeight;const s=this.listRef.querySelector('li[aria-selected="true"]');if(s&&t){const t=s.offsetTop;this.listRef.scrollTo({top:t,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const t=d(this.options);if(t.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){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})}render(){return e(o,{key:"531610863e3752a4e07f0b6c3b946c475a6420c6",class:u.root,size:this.size},e("gov-form-input",Object.assign({key:"82f74fc8139c85cddb4e206c5d82286107135fff",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":c(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this)},this.inheritedAttributes,{"aria-autocomplete":"list","aria-owns":[this.listBoxId,this.inheritedAttributes["aria-owns"]].join(" "),"aria-expanded":a(this.list.length&&this.focused?true:false),ref:t=>this.inputRef=t}),e("slot",{key:"d27f897ff5c405adc14640a7e8508319df7b5ff9",name:"validation-icon"}),e("slot",{key:"da5ec2879f9c6ba7c57a68cc2515539016a6ec43",name:"icon-end"})),e("ul",{key:"cbb3514f12fe3c506d7bcf2c3aa86b78303ac398",class:u.list,role:"listbox","aria-hidden":h(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:t=>this.listRef=t},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?e("li",{class:u.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?e("li",{class:u.loading},e("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((t,s)=>{const i=this.arrowCounter===s;return e("li",{class:u.item,innerHTML:this.templateResolver(t,i),role:"option","aria-posinset":s,tabindex:i?0:-1,"aria-setsize":this.list.length,onTouchStart:t=>this.onSelectHandler(t,s),onMouseDown:t=>this.onSelectHandler(t,s),"aria-selected":h(i)},e("slot",{name:"list-item-left"}),e("slot",{name:"list-item-right"}))})):null))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}t.stopPropagation();this.govFocus.emit({originalEvent:t,component:u.root,value:this.value,selected:null})}onBlurHandler(t){this.focused=false;this.clearList();this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit({originalEvent:t,component:u.root,value:this.value,selected:null})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({originalEvent:t,component:u.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(t,s=-1){let i=null;if(s>-1){i=this.list[s]}else if(m(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:u.root,value:this.value,selected:i,originalEvent:t});this.clearList();if(m(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===38)this.onArrowUp();else if(s.keyCode===40)this.onArrowDown();else if(s.keyCode===13){t.preventDefault();s.preventDefault();this.onSelectHandler(t)}}onKeyDownHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===13){t.preventDefault();s.preventDefault()}}async setFocus(t){return this.inputRef.focus(t)}async setBlur(){return this.inputRef.blur()}async setOptions(t){this.list=Array.isArray(t)?t:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(t){this.processing=t}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}},[4,"gov-form-autocomplete",{value:[1537],options:[1537],identifier:[1],success:[4],size:[1],nameKey:[1,"name-key"],name:[1],required:[4],disabled:[516],placeholder:[1],readonly:[4],invalid:[4],minlength:[2],maxlength:[2],throttleTime:[2,"throttle-time"],messageEmpty:[1,"message-empty"],focused:[32],processing:[32],arrowCounter:[32],list:[32],inheritedAttributes:[32],setFocus:[64],setBlur:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]},undefined,{size:["validateSize"],options:["watchOptions"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-autocomplete","gov-button","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-autocomplete":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-input":if(!customElements.get(t)){y()}break;case"gov-icon":if(!customElements.get(t)){k()}break;case"gov-skeleton":if(!customElements.get(t)){j()}break}}))}E();export{w as G,E as d};
|
|
2
|
-
//# sourceMappingURL=p-DFu5UVoP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["GovFormAutocomplete","__stencil_proxyCustomElement","HTMLElement","constructor","this","templateResolver","item","nameKey","value","size","required","disabled","minlength","throttleTime","messageEmpty","processing","arrowCounter","list","inheritedAttributes","listBoxId","createID","validateSize","newValue","validateProp","FormAutocompleteSizes","FormAutocompleteClass","root","watchOptions","setOptions","propsValueToArray","catch","onArrowUp","moveToView","finally","onArrowDown","length","delay","heightOfList","listRef","offsetHeight","selected","querySelector","offsetTop","scrollTo","top","behavior","doSearch","Number","isInteger","isValueAccepted","searchCallback","then","response","clearList","areOptions","options","componentDidLoad","attributeObserver","AttributeObserver","host","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","inheritAriaAttributes","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","render","h","Host","key","class","placeholder","name","readonly","autocomplete","invalid","success","role","maxlength","throttle","onInputHandler","bind","onKeyUpHandler","onKeyDownHandler","onFocusHandler","onBlurHandler","join","booleanString","focused","ref","el","inputRef","toBoolAttr","hidden","id","empty","loading","map","index","isSelected","innerHTML","tabindex","onTouchStart","e","onSelectHandler","onMouseDown","stopPropagation","govFocus","emit","originalEvent","component","govBlur","target","govInput","has","govSelect","event","detail","keyCode","preventDefault","setFocus","focus","setBlur","blur","Array","isArray","clearValue","setProcessing","status","setSearchCallback","callback","setTemplateResolver"],"sources":["../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {booleanString, toBoolAttr} from '../../../helpers/Dom/template'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {Nullable} from '../../../types/interfaces'\nimport {createID} from '../../../utils/string.utils'\nimport {delay, has, throttle} from '../../../utils/utils'\nimport {FormInputEvent} from '../input/gov-form-input.types'\nimport {FormAutocompleteClass, FormAutocompleteSizes, SizesType,} from './constants'\nimport {FormAutocompleteEvent, GovFormAutocompleteItem} from './gov-form-autocomplete.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-autocomplete',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate listRef?: HTMLUListElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value = ''\n\t/**\n\t * Options of autocomplete\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormAutocompleteItem[]\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop({attribute: 'name-key'}) readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 3\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Input throttle in milliseconds\n\t */\n\t@Prop() readonly throttleTime: number = 200\n\t/**\n\t * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-input'}) govInput: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormAutocompleteEvent>\n\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormAutocompleteItem[]): void {\n\t\tthis.setOptions(propsValueToArray(newValue)).catch()\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate async moveToView() {\n\t\tawait delay(200)\n\t\tconst heightOfList = this.listRef.offsetHeight\n\t\tconst selected = this.listRef.querySelector('li[aria-selected=\"true\"]') as HTMLUListElement\n\t\tif (selected && heightOfList) {\n\t\t\tconst offsetTop = selected.offsetTop\n\t\t\tthis.listRef.scrollTo({top: offsetTop, behavior: 'smooth'})\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {\n\t\t\tthis.list = []\n\t\t\tthis.arrowCounter = -1\n\t\t\tthis.processing = false\n\t\t\treturn\n\t\t}\n\t\tif (this.searchCallback) {\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t}\n\t}\n\n\tprivate clearList() {\n\t\tconst areOptions = propsValueToArray<GovFormAutocompleteItem[]>(this.options)\n\t\tif (areOptions.length === 0) {\n\t\t\tthis.list = []\n\t\t}\n\t}\n\n\tget isValueAccepted() {\n\t\tif (typeof this.value === 'string') {\n\t\t\treturn this.value.length >= this.minlength\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={throttle(this.onInputHandler.bind(this), this.throttleTime)}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-keydown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-autocomplete={'list'}\n\t\t\t\t\taria-owns={[this.listBoxId, this.inheritedAttributes['aria-owns']].join(' ')}\n\t\t\t\t\taria-expanded={booleanString(this.list.length && this.focused ? true : false)}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"validation-icon\" />\n\t\t\t\t\t<slot name=\"icon-end\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list}\n\t\t\t\t\trole={'listbox'}\n\t\t\t\t\taria-hidden={toBoolAttr(!this.focused)}\n\t\t\t\t\thidden={!this.focused}\n\t\t\t\t\tid={this.listBoxId}\n\t\t\t\t\tref={el => (this.listRef = el as HTMLUListElement)}>\n\t\t\t\t\t{this.focused && this.list.length === 0 && this.processing === false && this.isValueAccepted && this.messageEmpty ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.empty}>{this.messageEmpty}</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused && this.processing === true && this.isValueAccepted ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.loading}>\n\t\t\t\t\t\t\t<gov-skeleton size=\"m\"></gov-skeleton>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused ? this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonTouchStart={(e: TouchEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\tonMouseDown={(e: PointerEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-left\"/>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-right\"/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t}) : null}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif (this.isValueAccepted && this.searchCallback) {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.clearList();\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLGovFormInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t\tthis.doSearch()\n\t}\n\n\tprivate onSelectHandler(e: PointerEvent | CustomEvent | TouchEvent, index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit({\n\t\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\tselected: selected,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t\tthis.clearList();\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t\tthis.onSelectHandler(e)\n\t\t}\n\t}\n\n\tprivate onKeyDownHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Focus main input element\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Blur main input element\n\t */\n\t@Method()\n\tasync setBlur(): Promise<void> {\n\t\treturn this.inputRef.blur()\n\t}\n\n\t/**\n\t * Set options for list\n\t */\n\t@Method()\n\tasync setOptions(options: GovFormAutocompleteItem[]): Promise<void> {\n\t\tthis.list = Array.isArray(options) ? options : []\n\t\tthis.arrowCounter = -1\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync setProcessing(status: boolean): Promise<void> {\n\t\tthis.processing = status\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"mappings":"ufAiBaA,EAAmBC,EAAA,MAAAD,UAAAE,EAQ/B,WAAAC,G,sKAHQC,KAAgBC,iBAAiEC,GAAQA,EAAKF,KAAKG,SAWrEH,KAAKI,MAAG,GAgB7BJ,KAAIK,KAAe,IAIIL,KAAOG,QAAW,OASzCH,KAAQM,SAAY,MAKLN,KAAQO,SAAY,MAgBnCP,KAASQ,UAAW,EAQpBR,KAAYS,aAAW,IAIKT,KAAYU,aAAW,iCAmB3DV,KAAUW,WAAG,MACbX,KAAYY,cAAG,EACfZ,KAAIa,KAA8B,GAClCb,KAAmBc,oBAAe,GA3F1Cd,KAAKe,UAAYC,EAAS,aAC1B,CA6FD,YAAAC,CAAaC,GACZC,EAAaC,EAAuBF,EAAUG,EAAsBC,K,CAIrE,YAAAC,CAAaL,GACZlB,KAAKwB,WAAWC,EAAkBP,IAAWQ,O,CAGtC,SAAAC,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IU,EAAME,UAAY,GAAI,CACzBf,EAAEgB,iBACFH,EAAMG,gB,EAQR,cAAMC,CAASvE,GACd,OAAOnD,KAAK6F,SAAS8B,MAAMxE,E,CAO5B,aAAMyE,GACL,OAAO5H,KAAK6F,SAASgC,M,CAOtB,gBAAMrG,CAAW2B,GAChBnD,KAAKa,KAAOiH,MAAMC,QAAQ5E,GAAWA,EAAU,GAC/CnD,KAAKY,cAAe,C,CAOrB,gBAAMoH,GACLhI,KAAKI,MAAQ,GACbJ,KAAK6F,SAASzF,MAAQ,SAEhBJ,KAAK6F,SAASmC,Y,CAOrB,mBAAMC,CAAcC,GACnBlI,KAAKW,WAAauH,C,CAOnB,uBAAMC,CAAkBC,GACvBpI,KAAK8C,eAAiBsF,C,CAQvB,yBAAMC,CAAoBD,GACzBpI,KAAKC,iBAAmBmI,C","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as i,H as t,h as s,a as e}from"./index.js";import{v as o}from"./p-BKP-F1qP.js";import{T as h,a as n,b as a,c as r,d as l}from"./p-DfI_0WW6.js";import{c as d}from"./p-vN03FcXN.js";import{g as c}from"./p-DKo9A5gq.js";import{d as f}from"./p-DrPpH_9c.js";import{t as p}from"./p-Cjg0wpDG.js";const u=i(class i extends t{constructor(){super();this.__registerHost();this.tooltipContentId=undefined;this.tooltipId=undefined;this.color=h.PRIMARY;this.size=n._M;this.position="right";this.message=undefined;this.icon=undefined;this.persist=false;this.h=c(this.host);this.tooltipId=d("GovTooltip");this.tooltipContentId=d("GovContentTooltip")}validateColor(i){o(h,i,a.root)}validateSize(i){o(n,i,a.root)}validatePosition(i){o(r,i,a.root)}rerenderMessage(){this.createContentWrapper()}connectedCallback(){this.createContentWrapper();this.registerListeners()}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.validatePosition(this.position)}componentDidUpdate(){this.createContentWrapper()}disconnectedCallback(){this.removeContent()}createContentWrapper(){var i;if(this.tooltipContent){if(this.message){this.tooltipContent.innerHTML=this.message}else if(this.insideContent){this.tooltipContent.innerHTML=this.insideContent.innerHTML}return}let t;if(this.insideContent){t=this.insideContent}else{t=f().createElement(l.root);t.innerHTML=this.message}t.setAttribute("id",(i=this.identifier)!==null&&i!==void 0?i:this.tooltipContentId);t.setAttribute("parent-id",this.tooltipId);t.setAttribute("color",this.color);t.setAttribute("size",this.size);f().body.appendChild(t)}get tooltipContent(){var i;return f().body.querySelector(`#${(i=this.identifier)!==null&&i!==void 0?i:this.tooltipContentId}`)}get insideContent(){return this.host.querySelector(l.root)}registerListeners(){this.host.addEventListener("click",(i=>{i.preventDefault();this.persist=true;if(this.tooltipContent){this.tooltipContent.setAttribute("persist","true")}this.showTooltip()}));this.host.addEventListener("mouseenter",(i=>{i.preventDefault();this.showTooltip()}));this.host.addEventListener("mouseleave",(i=>{i.preventDefault();if(this.persist===false){this.hideTooltip()}}))}verifyPositionSpace(){const i=12;const t=window.innerWidth-(window.innerWidth-document.documentElement.clientWidth);const s=this.host.getBoundingClientRect();const e=this.host.offsetWidth;const o=this.host.offsetHeight;const h=this.tooltipContent.offsetWidth;const n=this.tooltipContent.offsetHeight;const a={left:s.left+document.documentElement.scrollLeft,top:s.top+document.documentElement.scrollTop};const l=a.left+i+s.width+h<=t;const d=a.left>h;if(this.position===r.LEFT||this.position===r.RIGHT){this.tooltipContent.style.top=a.top-(n-o)/2+"px";if(l===false&&d===false){this.position=r.TOP;this.tooltipContent.setAttribute("position",r.TOP)}if(d&&l===false&&this.position===r.RIGHT){this.position=r.LEFT}if(l&&d===false&&this.position===r.LEFT){this.position=r.RIGHT}}if(this.position===r.RIGHT){this.tooltipContent.setAttribute("position",r.RIGHT);this.tooltipContent.style.left=a.left+i+s.width+"px"}if(this.position===r.LEFT){this.tooltipContent.setAttribute("position",r.LEFT);this.tooltipContent.style.left=a.left-(h+i)+"px"}if(this.position===r.TOP||this.position===r.BOTTOM){if(h>e){let s=a.left-(h-e)/2;const o=s<0;const n=s+h>t;if(o&&n){this.tooltipContent.style.width="auto";this.tooltipContent.style.left=i+"px";this.tooltipContent.style.right=i+"px"}else{if(o){s=i}if(n){s=s-(t-(s+h+i))*-1}this.tooltipContent.style.left=s+"px"}}else{const i=a.left+(e-h)/2;this.tooltipContent.style.left=i+"px"}}if(this.position===r.TOP){this.tooltipContent.setAttribute("position",r.TOP);this.tooltipContent.style.top=a.top-(n+i)+"px"}if(this.position===r.BOTTOM){this.tooltipContent.setAttribute("position",r.BOTTOM);this.tooltipContent.style.top=a.top+(o+i)+"px"}this.tooltipContent.style.opacity="1"}showTooltip(){if(this.tooltipContent){this.tooltipContent.style.opacity="0";this.tooltipContent.hidden=false;this.tooltipContent.setAttribute("is-visible","true");p((()=>{this.verifyPositionSpace()}))}}hideTooltip(){if(this.tooltipContent){this.tooltipContent.setAttribute("is-visible","false");this.tooltipContent.setAttribute("persist","false");this.tooltipContent.removeAttribute("style")}}removeContent(){const i=document.getElementById(this.tooltipContentId);if(i){i.remove()}}render(){var i;return s(e,{key:"dd78d93d3b5ba4bc3a128435f58467c9bd6def43",id:this.tooltipId,class:this.h.classes(a.root),position:this.position},s("span",{key:"2ede8642a4cf998367da3756c795847195c0f694",role:"button",tabindex:0,onKeyPress:()=>this.showTooltip(),onBlur:()=>{if(this.persist===false){this.hideTooltip()}},"aria-describedby":(i=this.identifier)!==null&&i!==void 0?i:this.tooltipContentId},s("slot",{key:"9607b4c9b24766f70b53c6372e6e7219e7a3a6fd"})))}async show(){this.showTooltip()}async hide(){this.persist=false;this.hideTooltip()}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}}},[4,"gov-tooltip",{color:[1],size:[1],position:[1025],message:[1],identifier:[1],icon:[516],persist:[32],show:[64],hide:[64]},undefined,{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}]);function m(){if(typeof customElements==="undefined"){return}const i=["gov-tooltip"];i.forEach((i=>{switch(i){case"gov-tooltip":if(!customElements.get(i)){customElements.define(i,u)}break}}))}m();export{u as G,m as d};
|
|
2
|
-
//# sourceMappingURL=p-DMVQRz4f.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["GovTooltip","__stencil_proxyCustomElement","HTMLElement","constructor","this","tooltipContentId","undefined","tooltipId","color","TooltipColors","PRIMARY","size","TooltipSize","_M","position","message","icon","persist","h","govHost","host","createID","validateColor","newValue","validateProp","TooltipClass","root","validateSize","validatePosition","TooltipPosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","componentDidUpdate","disconnectedCallback","removeContent","tooltipContent","innerHTML","insideContent","content","documentNode","createElement","TooltipContentClass","setAttribute","_a","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","showTooltip","hideTooltip","verifyPositionSpace","offset","windowWidth","window","innerWidth","document","documentElement","clientWidth","trigger","getBoundingClientRect","trgWidth","offsetWidth","trgHeight","offsetHeight","contentWidth","contentHeight","triggerPos","left","scrollLeft","top","scrollTop","isRightSpace","width","isLeftSpace","LEFT","RIGHT","style","TOP","BOTTOM","leftPosition","isNotLeftSpace","isNotRightSpace","right","opacity","hidden","tick","removeAttribute","contentEl","getElementById","remove","render","Host","key","id","class","classes","role","tabindex","onKeyPress","onBlur","show","hide"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop({mutable: true}) position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.message\n\t\t\t} else if (this.insideContent) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.insideContent.innerHTML\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tcontent.innerHTML = this.message\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\n\t\t}\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}>\n\t\t\t\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n"],"mappings":"8SAsBaA,EAAUC,EAAA,MAAAD,UAAAE,EAKtB,WAAAC,G,8BAHiBC,KAAgBC,iBAAGC,UACnBF,KAASG,UAAGD,UAYZF,KAAAI,MAA2BC,EAAcC,QAIzCN,KAAAO,KAAyBC,EAAYC,GAI/BT,KAAQU,SAAwB,QAItCV,KAAOW,QAAWT,UAQHF,KAAIY,KAAYV,UAEvCF,KAAOa,QAAG,MA/BlBb,KAAKc,EAAIC,EA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GACLvG,KAAKa,QAAU,MACfb,KAAKmD,a","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,a as i}from"./index.js";import{T as o,a as n,d as c}from"./p-DfI_0WW6.js";import{t as a}from"./p-DKo9A5gq.js";import{d as l}from"./p-djqfSbq-.js";import{d as r}from"./p-BrdXh0mI.js";const d=t(class t extends s{constructor(){super();this.__registerHost();this.color=o.PRIMARY;this.size=n._M;this.persist=false;this.isVisible=false;this.parentId=null}visibleContent(t){clearTimeout(this.timeout);if(t===false){this.timeout=setTimeout((()=>{this.host.style.visibility="hidden"}),250)}else{this.host.style.visibility="visible"}}hideContent(){this.isVisible=false;this.persist=false;const t=document.getElementById(this.parentId);if(t){t.hide().catch()}}render(){return e(i,{key:"71d259cc8d7247030767f8ac36a6875f9c16ffea",class:c.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!a(this.isVisible),"is-visible":this.isVisible},e("slot",{key:"06d883340271717da9d0b8de6c35339cd5c9dfb9"}),this.persist?e("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},e("gov-icon",{slot:"icon-start",name:"x-lg",type:"components"})):null)}get host(){return this}static get watchers(){return{isVisible:["visibleContent"]}}},[4,"gov-tooltip-content",{color:[1],size:[1],persist:[4],isVisible:[1028,"is-visible"],parentId:[1,"parent-id"]},undefined,{isVisible:["visibleContent"]}]);function h(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip-content","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-tooltip-content":if(!customElements.get(t)){customElements.define(t,d)}break;case"gov-button":if(!customElements.get(t)){l()}break;case"gov-icon":if(!customElements.get(t)){r()}break}}))}h();export{d as G,h as d};
|
|
2
|
-
//# sourceMappingURL=p-UDT3DloZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["GovTooltipContent","__stencil_proxyCustomElement","HTMLElement","constructor","this","color","TooltipColors","PRIMARY","size","TooltipSize","_M","persist","isVisible","parentId","visibleContent","newValue","clearTimeout","timeout","setTimeout","host","style","visibility","hideContent","parentEl","document","getElementById","hide","catch","render","h","Host","key","class","TooltipContentClass","root","role","hidden","toBoolAttr","bind","type","slot","name"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipColors, TooltipColorType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t<slot></slot>\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}>\n\t\t\t\t\t\t<gov-icon slot={\"icon-start\"} name={\"x-lg\"} type={\"components\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"wNAOaA,EAAiBC,EAAA,MAAAD,UAAAE,EAH9B,WAAAC,G,8BAUkBC,KAAAC,MAA2BC,EAAcC,QAIzCH,KAAAI,KAAyBC,EAAYC,GAI9CN,KAAOO,QAAa,MAIsBP,KAASQ,UAAG,MAI5BR,KAAQS,SAAW,IA4CrD,CAzCA,cAAAC,CAAeC,GACdC,aAAaZ,KAAKa,SAClB,GAAIF,IAAa,MAAO,CACvBX,KAAKa,QAAUC,YAAW,KACzBd,KAAKe,KAAKC,MAAMC,WAAa,QAAQ,GACnC,I,KACG,CACNjB,KAAKe,KAAKC,MAAMC,WAAa,S,EAI/B,WAAAC,GACClB,KAAKQ,UAAY,MACjBR,KAAKO,QAAU,MACf,MAAMY,EAAWC,SAASC,eAAerB,KAAKS,UAC9C,GAAIU,EAAU,CACbA,EAASG,OAAOC,O,EAIlB,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CACJC,MAAOC,EAAoBC,KAC3BC,KAAM,UACNC,QAAShC,KAAKQ,UAAS,eACTyB,EAAWjC,KAAKQ,WAClB,aAAAR,KAAKQ,WACjBiB,EAAa,QAAAE,IAAA,6CACZ3B,KAAKO,QACLkB,EACe,6BAAAzB,KAAKkB,YAAYgB,KAAKlC,MACpCC,MAAOD,KAAKC,MACZG,KAAMJ,KAAKI,KACX+B,KAAM,QACNV,EAAU,YAAAW,KAAM,aAAcC,KAAM,OAAQF,KAAM,gBAEhD,K","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as t,H as s,c as e,h as i,a}from"./index.js";import{g as o,d as n,e as c}from"./p-9imLQpxb.js";import{g as h,t as r,c as l}from"./p-DKo9A5gq.js";import{v as d}from"./p-BKP-F1qP.js";import{c as f}from"./p-vN03FcXN.js";import{p as u}from"./p-B0hcuYXk.js";import{t as m}from"./p-Cjg0wpDG.js";import{A as p,a as v,i as b}from"./p-CXgom82_.js";import{d as g}from"./p-BrdXh0mI.js";const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=e(this,"gov-focus");this.govBlur=e(this,"gov-blur");this.govChange=e(this,"gov-change");this.size="m";this.required=false;this.disabled=false;this.optionsState=[];this.inheritedAttributes={};this.h=h(this.host);this.f=o(this.h);this.selectId=f("GovSelect")}validateSize(t){d(c,t,n.root)}watchOptions(t){this.optionsState=u(t)}watchControlAttrs(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","select")}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}componentWillLoad(){this.validateSize(this.size);this.markSelectedValue();this.optionsState=u(this.options);this.inheritedAttributes=b(this.host)}async componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));m((()=>this.markSelectedValue()))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}markSelectedValue(){this.host.querySelectorAll("option").forEach((t=>{if(t.value===this.value){t.setAttribute("selected","selected")}else{t.removeAttribute("selected")}}))}render(){return i(a,{key:"92b4679d9a9fb77628934ed90e00b1eafc593a3e",class:n.root,size:this.size},this.h.hasSlot("prefix")&&i("slot",{key:"b51835a8b6254898a064a41c75f95cc746d46d57",name:"prefix"}),i("span",{key:"2324839a4c3821a46fcdace4755961a96216dadc",class:"element"},i("select",Object.assign({key:"df1fe5989b6d427c0f48d673f951a4b1f5f8b728",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":l(this.disabled),"aria-required":l(this.required),"aria-invalid":l(this.invalid)}),i("slot",{key:"bc12463c981b174aa49a791f360d6001230c3fc4"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var s;return i("option",{value:t.value,selected:t.value===this.value,disabled:t===null||t===void 0?void 0:t.disabled},(s=t.label)!==null&&s!==void 0?s:t.value)}))),this.success&&i("gov-icon",{key:"def96c72b9bd804797472954d591e16d25860036",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&i("gov-icon",{key:"e20c8d4bac094529ff51d8412ae2105401edcf98",class:"validation-icon",name:"exclamation-lg",type:"components"}),i("gov-icon",{key:"e004aae985d9de1202fb50c06f5baa4d12c19fd2",class:"arrow-icon",name:"chevron-down",type:"components"})),this.h.hasSlot("sufix")&&i("slot",{key:"72b7791037616836108a7420d13b21bf44fdeb85",name:"sufix"}))}onFocusHandler(t){this.focused=true;this.govFocus.emit({component:n.root,originalEvent:t,value:this.value})}onBlurHandler(t){this.focused=false;this.govBlur.emit({component:n.root,originalEvent:t,value:this.value})}onChangeHandler(t){this.value=t.target.value;t.stopPropagation();this.govChange.emit({component:n.root,originalEvent:t,value:this.value})}async setFocus(t){return this.selectRef.focus(t)}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}}},[4,"gov-form-select",{value:[1537],options:[1537],identifier:[1],size:[1],name:[1],required:[4],success:[516],disabled:[516],invalid:[4],focused:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-form-select","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-select":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}y();export{w as G,y as d};
|
|
2
|
-
//# sourceMappingURL=p-x3w8Mun_.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["GovFormSelect","__stencil_proxyCustomElement","HTMLElement","constructor","this","size","required","disabled","optionsState","inheritedAttributes","h","govHost","host","f","govForm","selectId","createID","validateSize","newValue","validateProp","FormSelectSizes","FormSelectClass","root","watchOptions","propsValueToArray","watchControlAttrs","passControlAttrs","watchValue","markSelectedValue","passAttrToControl","toBoolAttr","invalid","success","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","disconnectedCallback","_a","stopObserving","componentWillLoad","options","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","tick","removeAttribute","Object","assign","querySelectorAll","forEach","option","value","setAttribute","render","Host","key","class","hasSlot","name","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","ref","el","selectRef","toBoolAttrIfDefined","Array","isArray","map","selected","label","type","e","focused","govFocus","emit","component","originalEvent","govBlur","target","stopPropagation","govChange","setFocus","focus","getRef"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\ttick(() => this.markSelectedValue())\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 markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectEl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