@gov-design-system-ce/components 4.1.1 → 4.1.3-BETA-1
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/core.cjs.js +2 -2
- package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +3 -3
- package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +10 -7
- package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-chip.cjs.entry.js +3 -3
- package/dist/cjs/gov-container.cjs.entry.js +2 -2
- package/dist/cjs/gov-control-group.cjs.entry.js +2 -2
- package/dist/cjs/gov-cookiebar.cjs.entry.js +2 -2
- package/dist/cjs/gov-dialog.cjs.entry.js +2 -2
- package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gov-empty.cjs.entry.js +2 -2
- package/dist/cjs/gov-error-code.cjs.entry.js +2 -2
- package/dist/cjs/{gov-flex_4.cjs.entry.js → gov-flex_3.cjs.entry.js} +24 -29
- package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-file.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-group.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-input_2.cjs.entry.js +7 -7
- package/dist/cjs/gov-form-label.cjs.entry.js +27 -0
- package/dist/cjs/gov-form-label.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-password-power.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-select.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-switch.cjs.entry.js +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/gov-grid.cjs.entry.js +2 -2
- package/dist/cjs/gov-infobar.cjs.entry.js +3 -3
- package/dist/cjs/gov-layout-column.cjs.entry.js +2 -2
- package/dist/cjs/gov-layout.cjs.entry.js +2 -2
- package/dist/cjs/gov-lifecycle.cjs.entry.js +2 -2
- package/dist/cjs/gov-link.cjs.entry.js +2 -2
- package/dist/cjs/gov-loading.cjs.entry.js +2 -2
- package/dist/cjs/gov-message.cjs.entry.js +2 -2
- package/dist/cjs/gov-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +2 -2
- package/dist/cjs/gov-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/gov-stepper.cjs.entry.js +2 -2
- package/dist/cjs/gov-tabs-item.cjs.entry.js +2 -2
- package/dist/cjs/gov-tabs.cjs.entry.js +2 -2
- package/dist/cjs/gov-tag.cjs.entry.js +3 -2
- package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js +2 -2
- package/dist/cjs/gov-tiles.cjs.entry.js +2 -2
- package/dist/cjs/gov-toast.cjs.entry.js +2 -2
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
- package/dist/cjs/gov-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/gov-wizard-item.cjs.entry.js +3 -3
- package/dist/cjs/gov-wizard.cjs.entry.js +2 -2
- package/dist/cjs/{index-7ff4447c.js → index-67e87c27.js} +14 -3
- package/dist/cjs/index-67e87c27.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +2 -7
- package/dist/collection/components/gov-card/constants.js +7 -4
- package/dist/collection/components/gov-card/constants.js.map +1 -1
- package/dist/collection/components/gov-card/gov-card.js +16 -10
- package/dist/collection/components/gov-card/gov-card.js.map +1 -1
- package/dist/collection/components/gov-chip/gov-chip.js +2 -2
- package/dist/collection/components/gov-container/gov-container.js +1 -1
- package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
- package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
- package/dist/collection/components/gov-empty/gov-empty.js +1 -1
- package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
- package/dist/collection/components/gov-flex/constants.js +2 -0
- package/dist/collection/components/gov-flex/constants.js.map +1 -1
- package/dist/collection/components/gov-flex/gov-flex.js +33 -9
- package/dist/collection/components/gov-flex/gov-flex.js.map +1 -1
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.css +3 -8
- package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +5 -5
- package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
- package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +2 -2
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
- package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
- package/dist/collection/components/gov-grid/gov-grid.js +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +8 -0
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
- package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
- package/dist/collection/components/gov-layout/gov-layout.js +1 -1
- package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +1 -1
- package/dist/collection/components/gov-link/gov-link.js +1 -1
- package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
- package/dist/collection/components/gov-message/gov-message.js +1 -1
- package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
- package/dist/collection/components/gov-tag/gov-tag.js +20 -1
- package/dist/collection/components/gov-tag/gov-tag.js.map +1 -1
- package/dist/collection/components/gov-theme-switch/constants.js +0 -2
- package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
- package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +32 -9
- package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
- package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
- package/dist/collection/components/gov-tile/gov-tile.js +1 -1
- package/dist/collection/components/gov-toast/gov-toast.js +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
- 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/pages/Card.js +22 -37
- package/dist/collection/pages/Card.js.map +1 -1
- package/dist/collection/pages/Flex.js +62 -0
- package/dist/collection/pages/Flex.js.map +1 -0
- package/dist/collection/pages/Forms.js +5 -5
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Tag.js +30 -23
- package/dist/collection/pages/Tag.js.map +1 -1
- package/dist/collection/utils/icon.utils.js +4 -0
- package/dist/collection/utils/icon.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-breadcrumbs.js +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-card.js.map +1 -1
- package/dist/components/gov-chip.js +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-flex.js.map +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-group.js.map +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-label.js +1 -1
- package/dist/components/gov-form-label.js.map +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-password-power.js +1 -1
- package/dist/components/gov-form-radio-group.js +1 -1
- package/dist/components/gov-form-radio-group.js.map +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-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-lifecycle.js +1 -1
- package/dist/components/gov-link.js +1 -1
- package/dist/components/gov-link.js.map +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-loading.js.map +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-tabs.js.map +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-tag.js.map +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-theme-switch.js.map +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-tiles.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-tooltip.js.map +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-73938936.js → p-03ad4e0f.js} +2 -2
- package/dist/components/p-115b9cf3.js +3 -0
- package/dist/components/p-115b9cf3.js.map +1 -0
- package/dist/components/p-2bd9e821.js +2 -0
- package/dist/components/{p-1eb9c053.js.map → p-2bd9e821.js.map} +1 -1
- package/dist/components/p-34c6a704.js +2 -0
- package/dist/components/{p-b95ebe8c.js.map → p-34c6a704.js.map} +1 -1
- package/dist/components/{p-ac359044.js → p-350e060c.js} +2 -2
- package/dist/components/{p-7be2301a.js → p-384c7f2a.js} +2 -2
- package/dist/components/p-50964838.js +2 -0
- package/dist/components/p-50964838.js.map +1 -0
- package/dist/components/{p-318d89bd.js → p-8080982e.js} +2 -2
- package/dist/components/p-8ee6f2f3.js +2 -0
- package/dist/components/{p-a6be4769.js → p-915c4f3a.js} +2 -2
- package/dist/components/p-ae7a283c.js +2 -0
- package/dist/components/{p-283b66c3.js → p-e532e5e5.js} +2 -2
- package/dist/core/core.css +438 -273
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-017ff5a5.entry.js +2 -0
- package/dist/core/{p-2739fa61.entry.js.map → p-017ff5a5.entry.js.map} +1 -1
- package/dist/core/{p-c916d0d2.entry.js → p-032accfb.entry.js} +2 -2
- package/dist/core/p-058e6fe2.entry.js +2 -0
- package/dist/core/{p-3d6edb09.entry.js.map → p-058e6fe2.entry.js.map} +1 -1
- package/dist/core/{p-0be19b89.entry.js → p-063b70a2.entry.js} +2 -2
- package/dist/core/{p-dea64896.entry.js → p-0724cb6a.entry.js} +2 -2
- package/dist/core/p-09c9eba6.entry.js +2 -0
- package/dist/core/p-09ea5c11.entry.js +2 -0
- package/dist/core/p-09ea5c11.entry.js.map +1 -0
- package/dist/core/p-0c076b21.entry.js +2 -0
- package/dist/core/{p-97a9725d.entry.js → p-0f0f7302.entry.js} +2 -2
- package/dist/core/p-10f773c2.entry.js +2 -0
- package/dist/core/p-14d66f26.entry.js +2 -0
- package/dist/core/p-1aa7450e.entry.js +2 -0
- package/dist/core/{p-6bb37fe2.entry.js.map → p-1aa7450e.entry.js.map} +1 -1
- package/dist/core/p-237a5b91.entry.js +2 -0
- package/dist/core/{p-e61aa53b.entry.js.map → p-237a5b91.entry.js.map} +1 -1
- package/dist/core/p-269071f5.entry.js +2 -0
- package/dist/core/{p-da7f1e11.entry.js.map → p-269071f5.entry.js.map} +1 -1
- package/dist/core/p-2ee042d4.js +3 -0
- package/dist/core/p-2ee042d4.js.map +1 -0
- package/dist/core/{p-ed833334.entry.js → p-33310735.entry.js} +2 -2
- package/dist/core/p-347d15d5.entry.js +2 -0
- package/dist/core/{p-019e967c.entry.js.map → p-347d15d5.entry.js.map} +1 -1
- package/dist/core/p-37473c34.entry.js +2 -0
- package/dist/core/p-37473c34.entry.js.map +1 -0
- package/dist/core/{p-432c3875.entry.js → p-3849ca02.entry.js} +2 -2
- package/dist/core/p-3a7381e7.entry.js +2 -0
- package/dist/core/{p-bdc51179.entry.js.map → p-3a7381e7.entry.js.map} +1 -1
- package/dist/core/p-43d3dbc0.entry.js +2 -0
- package/dist/core/p-45b759f4.entry.js +2 -0
- package/dist/core/{p-f4dac942.entry.js.map → p-45b759f4.entry.js.map} +1 -1
- package/dist/core/p-4c60e125.entry.js +2 -0
- package/dist/core/p-4e29744a.entry.js +2 -0
- package/dist/core/{p-41c6b262.entry.js.map → p-4e29744a.entry.js.map} +1 -1
- package/dist/core/p-4fa0320d.entry.js +2 -0
- package/dist/core/p-50af9ae8.entry.js +2 -0
- package/dist/core/{p-ccec8019.entry.js → p-5c3f4cfe.entry.js} +2 -2
- package/dist/core/p-6b7c3a96.entry.js +2 -0
- package/dist/core/{p-4c5f6299.entry.js.map → p-6b7c3a96.entry.js.map} +1 -1
- package/dist/core/p-71f5d4ff.entry.js +2 -0
- package/dist/core/{p-439b66a5.entry.js.map → p-71f5d4ff.entry.js.map} +1 -1
- package/dist/core/{p-9fe35463.entry.js → p-77daba72.entry.js} +2 -2
- package/dist/core/p-7a21fb90.entry.js +2 -0
- package/dist/core/{p-56dc370d.entry.js.map → p-7a21fb90.entry.js.map} +1 -1
- package/dist/core/{p-d65cef62.entry.js → p-7baee44f.entry.js} +2 -2
- package/dist/core/{p-7e04730a.entry.js → p-7dfb7e36.entry.js} +2 -2
- package/dist/core/p-8bb6c816.entry.js +2 -0
- package/dist/core/{p-bc966c46.entry.js.map → p-8bb6c816.entry.js.map} +1 -1
- package/dist/core/p-8cc5ad01.entry.js +2 -0
- package/dist/core/p-8cc5ad01.entry.js.map +1 -0
- package/dist/core/p-906865d0.entry.js +2 -0
- package/dist/core/{p-c054f955.entry.js.map → p-906865d0.entry.js.map} +1 -1
- package/dist/core/{p-b7cfe254.entry.js → p-927c31dd.entry.js} +2 -2
- package/dist/core/p-967a1094.entry.js +2 -0
- package/dist/core/{p-04fa0ab5.entry.js.map → p-967a1094.entry.js.map} +1 -1
- package/dist/core/{p-3cb36bae.entry.js → p-9846fd13.entry.js} +2 -2
- package/dist/core/{p-1200a32d.entry.js → p-994385ca.entry.js} +2 -2
- package/dist/core/{p-d836fcde.entry.js → p-9f8d69a9.entry.js} +2 -2
- package/dist/core/{p-e834ee73.entry.js → p-a6a9de9a.entry.js} +2 -2
- package/dist/core/p-b62e49ee.entry.js +2 -0
- package/dist/core/{p-bcb45a18.entry.js → p-c0800e6d.entry.js} +2 -2
- package/dist/core/p-cecbe73f.entry.js +2 -0
- package/dist/core/{p-5c9e6275.entry.js.map → p-cecbe73f.entry.js.map} +1 -1
- package/dist/core/p-d795a421.entry.js +2 -0
- package/dist/core/{p-0fdd8929.entry.js → p-d9b42773.entry.js} +2 -2
- package/dist/core/{p-561718cd.entry.js → p-e0a199ff.entry.js} +2 -2
- package/dist/core/p-e215f3ee.entry.js +2 -0
- package/dist/core/p-ed02945f.entry.js +2 -0
- package/dist/core/p-ee55932a.entry.js +2 -0
- package/dist/core/{p-f7a4da9d.entry.js → p-f2bb8c29.entry.js} +2 -2
- package/dist/core/{p-72130a8f.entry.js → p-f54edd6c.entry.js} +2 -2
- package/dist/core/p-f7f60f91.entry.js +2 -0
- package/dist/core/{p-b923a8d9.entry.js.map → p-f7f60f91.entry.js.map} +1 -1
- package/dist/core/{p-ed8fc183.entry.js → p-fcac8531.entry.js} +2 -2
- package/dist/esm/core.js +3 -3
- package/dist/esm/gov-accordion-item.entry.js +1 -1
- package/dist/esm/gov-accordion.entry.js +1 -1
- package/dist/esm/gov-attachments_3.entry.js +3 -3
- package/dist/esm/gov-attachments_3.entry.js.map +1 -1
- package/dist/esm/gov-backdrop.entry.js +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +1 -1
- package/dist/esm/gov-button.entry.js +1 -1
- package/dist/esm/gov-card.entry.js +10 -7
- package/dist/esm/gov-card.entry.js.map +1 -1
- package/dist/esm/gov-chip.entry.js +3 -3
- package/dist/esm/gov-container.entry.js +2 -2
- package/dist/esm/gov-control-group.entry.js +2 -2
- package/dist/esm/gov-cookiebar.entry.js +2 -2
- package/dist/esm/gov-dialog.entry.js +2 -2
- package/dist/esm/gov-dropdown.entry.js +1 -1
- package/dist/esm/gov-empty.entry.js +2 -2
- package/dist/esm/gov-error-code.entry.js +2 -2
- package/dist/esm/{gov-flex_4.entry.js → gov-flex_3.entry.js} +25 -29
- package/dist/esm/gov-flex_3.entry.js.map +1 -0
- package/dist/esm/gov-form-autocomplete.entry.js +2 -2
- package/dist/esm/gov-form-checkbox-group.entry.js +3 -3
- package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +1 -1
- package/dist/esm/gov-form-control.entry.js +2 -2
- package/dist/esm/gov-form-file.entry.js +2 -2
- package/dist/esm/gov-form-group.entry.js +2 -2
- package/dist/esm/gov-form-input_2.entry.js +7 -7
- package/dist/esm/gov-form-label.entry.js +23 -0
- package/dist/esm/gov-form-label.entry.js.map +1 -0
- package/dist/esm/gov-form-multi-select.entry.js +3 -3
- package/dist/esm/gov-form-password-power.entry.js +2 -2
- package/dist/esm/gov-form-radio-group.entry.js +3 -3
- package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +1 -1
- package/dist/esm/gov-form-search.entry.js +2 -2
- package/dist/esm/gov-form-select.entry.js +3 -3
- package/dist/esm/gov-form-switch.entry.js +1 -1
- package/dist/esm/gov-grid-item.entry.js +2 -2
- package/dist/esm/gov-grid.entry.js +2 -2
- package/dist/esm/gov-infobar.entry.js +3 -3
- package/dist/esm/gov-layout-column.entry.js +2 -2
- package/dist/esm/gov-layout.entry.js +2 -2
- package/dist/esm/gov-lifecycle.entry.js +2 -2
- package/dist/esm/gov-link.entry.js +2 -2
- package/dist/esm/gov-loading.entry.js +2 -2
- package/dist/esm/gov-message.entry.js +2 -2
- package/dist/esm/gov-pagination.entry.js +1 -1
- package/dist/esm/gov-spacer.entry.js +2 -2
- package/dist/esm/gov-stepper-item.entry.js +2 -2
- package/dist/esm/gov-stepper.entry.js +2 -2
- package/dist/esm/gov-tabs-item.entry.js +2 -2
- package/dist/esm/gov-tabs.entry.js +2 -2
- package/dist/esm/gov-tag.entry.js +3 -2
- package/dist/esm/gov-tag.entry.js.map +1 -1
- package/dist/esm/gov-tile.entry.js +2 -2
- package/dist/esm/gov-tiles.entry.js +2 -2
- package/dist/esm/gov-toast.entry.js +2 -2
- package/dist/esm/gov-tooltip-content.entry.js +2 -2
- package/dist/esm/gov-tooltip.entry.js +3 -3
- package/dist/esm/gov-wizard-item.entry.js +3 -3
- package/dist/esm/gov-wizard.entry.js +2 -2
- package/dist/esm/{index-c263e031.js → index-087b155c.js} +14 -4
- package/dist/esm/index-087b155c.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/hydrate/index.js +102 -76
- package/dist/hydrate/index.mjs +102 -76
- package/dist/types/components/gov-card/constants.d.ts +8 -4
- package/dist/types/components/gov-card/gov-card.d.ts +3 -2
- package/dist/types/components/gov-flex/constants.d.ts +4 -0
- package/dist/types/components/gov-flex/gov-flex.d.ts +9 -7
- package/dist/types/components/gov-tag/gov-tag.d.ts +4 -0
- package/dist/types/components/gov-theme-switch/constants.d.ts +0 -2
- package/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +8 -4
- package/dist/types/components.d.ts +50 -22
- package/dist/types/pages/Flex.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/gov-flex_4.cjs.entry.js.map +0 -1
- package/dist/cjs/index-7ff4447c.js.map +0 -1
- package/dist/components/p-1eb9c053.js +0 -2
- package/dist/components/p-3d7a21b5.js +0 -2
- package/dist/components/p-42200001.js +0 -3
- package/dist/components/p-42200001.js.map +0 -1
- package/dist/components/p-46c567fd.js +0 -2
- package/dist/components/p-46c567fd.js.map +0 -1
- package/dist/components/p-68a1aaec.js +0 -2
- package/dist/components/p-68a1aaec.js.map +0 -1
- package/dist/components/p-a6b7a6c2.js +0 -2
- package/dist/components/p-b95ebe8c.js +0 -2
- package/dist/core/p-00d153bf.entry.js +0 -2
- package/dist/core/p-019e967c.entry.js +0 -2
- package/dist/core/p-04fa0ab5.entry.js +0 -2
- package/dist/core/p-22fa411d.entry.js +0 -2
- package/dist/core/p-2739fa61.entry.js +0 -2
- package/dist/core/p-30eaeeec.entry.js +0 -2
- package/dist/core/p-3d6edb09.entry.js +0 -2
- package/dist/core/p-3f6a2d20.entry.js +0 -2
- package/dist/core/p-3f6a2d20.entry.js.map +0 -1
- package/dist/core/p-41c6b262.entry.js +0 -2
- package/dist/core/p-439b66a5.entry.js +0 -2
- package/dist/core/p-4b90fbc4.entry.js +0 -2
- package/dist/core/p-4c5f6299.entry.js +0 -2
- package/dist/core/p-535316b4.entry.js +0 -2
- package/dist/core/p-5396935e.entry.js +0 -2
- package/dist/core/p-56dc370d.entry.js +0 -2
- package/dist/core/p-5b2131c1.entry.js +0 -2
- package/dist/core/p-5c9e6275.entry.js +0 -2
- package/dist/core/p-65e67731.entry.js +0 -2
- package/dist/core/p-6bb37fe2.entry.js +0 -2
- package/dist/core/p-6e457b3d.entry.js +0 -2
- package/dist/core/p-7b7e502b.entry.js +0 -2
- package/dist/core/p-8506b611.js +0 -3
- package/dist/core/p-8506b611.js.map +0 -1
- package/dist/core/p-9c2c5447.entry.js +0 -2
- package/dist/core/p-9c2c5447.entry.js.map +0 -1
- package/dist/core/p-b923a8d9.entry.js +0 -2
- package/dist/core/p-bc966c46.entry.js +0 -2
- package/dist/core/p-bdc51179.entry.js +0 -2
- package/dist/core/p-c054f955.entry.js +0 -2
- package/dist/core/p-cd2d335d.entry.js +0 -2
- package/dist/core/p-da7f1e11.entry.js +0 -2
- package/dist/core/p-e61aa53b.entry.js +0 -2
- package/dist/core/p-ea44d447.entry.js +0 -2
- package/dist/core/p-f4bcf817.entry.js +0 -2
- package/dist/core/p-f4dac942.entry.js +0 -2
- package/dist/esm/gov-flex_4.entry.js.map +0 -1
- package/dist/esm/index-c263e031.js.map +0 -1
- /package/dist/components/{p-73938936.js.map → p-03ad4e0f.js.map} +0 -0
- /package/dist/components/{p-ac359044.js.map → p-350e060c.js.map} +0 -0
- /package/dist/components/{p-7be2301a.js.map → p-384c7f2a.js.map} +0 -0
- /package/dist/components/{p-318d89bd.js.map → p-8080982e.js.map} +0 -0
- /package/dist/components/{p-a6b7a6c2.js.map → p-8ee6f2f3.js.map} +0 -0
- /package/dist/components/{p-a6be4769.js.map → p-915c4f3a.js.map} +0 -0
- /package/dist/components/{p-3d7a21b5.js.map → p-ae7a283c.js.map} +0 -0
- /package/dist/components/{p-283b66c3.js.map → p-e532e5e5.js.map} +0 -0
- /package/dist/core/{p-c916d0d2.entry.js.map → p-032accfb.entry.js.map} +0 -0
- /package/dist/core/{p-0be19b89.entry.js.map → p-063b70a2.entry.js.map} +0 -0
- /package/dist/core/{p-dea64896.entry.js.map → p-0724cb6a.entry.js.map} +0 -0
- /package/dist/core/{p-7b7e502b.entry.js.map → p-09c9eba6.entry.js.map} +0 -0
- /package/dist/core/{p-5b2131c1.entry.js.map → p-0c076b21.entry.js.map} +0 -0
- /package/dist/core/{p-97a9725d.entry.js.map → p-0f0f7302.entry.js.map} +0 -0
- /package/dist/core/{p-65e67731.entry.js.map → p-10f773c2.entry.js.map} +0 -0
- /package/dist/core/{p-cd2d335d.entry.js.map → p-14d66f26.entry.js.map} +0 -0
- /package/dist/core/{p-ed833334.entry.js.map → p-33310735.entry.js.map} +0 -0
- /package/dist/core/{p-432c3875.entry.js.map → p-3849ca02.entry.js.map} +0 -0
- /package/dist/core/{p-22fa411d.entry.js.map → p-43d3dbc0.entry.js.map} +0 -0
- /package/dist/core/{p-30eaeeec.entry.js.map → p-4c60e125.entry.js.map} +0 -0
- /package/dist/core/{p-5396935e.entry.js.map → p-4fa0320d.entry.js.map} +0 -0
- /package/dist/core/{p-6e457b3d.entry.js.map → p-50af9ae8.entry.js.map} +0 -0
- /package/dist/core/{p-ccec8019.entry.js.map → p-5c3f4cfe.entry.js.map} +0 -0
- /package/dist/core/{p-9fe35463.entry.js.map → p-77daba72.entry.js.map} +0 -0
- /package/dist/core/{p-d65cef62.entry.js.map → p-7baee44f.entry.js.map} +0 -0
- /package/dist/core/{p-7e04730a.entry.js.map → p-7dfb7e36.entry.js.map} +0 -0
- /package/dist/core/{p-b7cfe254.entry.js.map → p-927c31dd.entry.js.map} +0 -0
- /package/dist/core/{p-3cb36bae.entry.js.map → p-9846fd13.entry.js.map} +0 -0
- /package/dist/core/{p-1200a32d.entry.js.map → p-994385ca.entry.js.map} +0 -0
- /package/dist/core/{p-d836fcde.entry.js.map → p-9f8d69a9.entry.js.map} +0 -0
- /package/dist/core/{p-e834ee73.entry.js.map → p-a6a9de9a.entry.js.map} +0 -0
- /package/dist/core/{p-ea44d447.entry.js.map → p-b62e49ee.entry.js.map} +0 -0
- /package/dist/core/{p-bcb45a18.entry.js.map → p-c0800e6d.entry.js.map} +0 -0
- /package/dist/core/{p-00d153bf.entry.js.map → p-d795a421.entry.js.map} +0 -0
- /package/dist/core/{p-0fdd8929.entry.js.map → p-d9b42773.entry.js.map} +0 -0
- /package/dist/core/{p-561718cd.entry.js.map → p-e0a199ff.entry.js.map} +0 -0
- /package/dist/core/{p-535316b4.entry.js.map → p-e215f3ee.entry.js.map} +0 -0
- /package/dist/core/{p-4b90fbc4.entry.js.map → p-ed02945f.entry.js.map} +0 -0
- /package/dist/core/{p-f4bcf817.entry.js.map → p-ee55932a.entry.js.map} +0 -0
- /package/dist/core/{p-f7a4da9d.entry.js.map → p-f2bb8c29.entry.js.map} +0 -0
- /package/dist/core/{p-72130a8f.entry.js.map → p-f54edd6c.entry.js.map} +0 -0
- /package/dist/core/{p-ed8fc183.entry.js.map → p-fcac8531.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GovStepperItem","constructor","hostRef","this","hydrated","h","govHost","host","triggerId","createID","contentId","validateColor","newValue","validateProp","StepperColors","StepperItemClass","root","componentWillLoad","color","connectedCallback","render","identifier","Host","key","id","class","classes","role","hasSlot","prefix","name","headline","content"],"sources":["../../../packages/core/src/components/gov-stepper/gov-stepper-item.tsx"],"sourcesContent":["import { Component, Element, h, Prop, Watch, Host, Event, EventEmitter } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperColorType, StepperColors } from './constants'\nimport { createID } from '../../utils/string.utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: StepperColorType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(StepperColors, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\n\t\treturn (\n\t\t\t<Host id={triggerId} class={this.h.classes(StepperItemClass.root)} color={this.color} role=\"listitem\" hydrated={this.hydrated}>\n\t\t\t\t{this.h.hasSlot('prefix') && (\n\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t<slot name=\"prefix\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div>\n\t\t\t\t\t<span class={StepperItemClass.headline}>\n\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<slot name=\"annotation\" />\n\n\t\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId} role=\"tabpanel\">\n\t\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["GovStepperItem","constructor","hostRef","this","hydrated","h","govHost","host","triggerId","createID","contentId","validateColor","newValue","validateProp","StepperColors","StepperItemClass","root","componentWillLoad","color","connectedCallback","render","identifier","Host","key","id","class","classes","role","hasSlot","prefix","name","headline","content"],"sources":["../../../packages/core/src/components/gov-stepper/gov-stepper-item.tsx"],"sourcesContent":["import { Component, Element, h, Prop, Watch, Host, Event, EventEmitter } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperColorType, StepperColors } from './constants'\nimport { createID } from '../../utils/string.utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: StepperColorType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(StepperColors, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\n\t\treturn (\n\t\t\t<Host id={triggerId} class={this.h.classes(StepperItemClass.root)} color={this.color} role=\"listitem\" hydrated={this.hydrated}>\n\t\t\t\t{this.h.hasSlot('prefix') && (\n\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t<slot name=\"prefix\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div>\n\t\t\t\t\t<span class={StepperItemClass.headline}>\n\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<slot name=\"annotation\" />\n\n\t\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId} role=\"tabpanel\">\n\t\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"wTAWaA,EAAc,MAM1B,WAAAC,CAAAC,G,gDAFQC,KAAAC,SAAW,M,WAayB,U,UAID,I,0BAd1CD,KAAKE,EAAIC,EAAQH,KAAKI,MACtBJ,KAAKK,UAAYC,EAAS,kBAC1BN,KAAKO,UAAYD,EAAS,oB,CAuB3B,aAAAE,CAAcC,GACbC,EAAaC,EAAeF,EAAUG,EAAiBC,K,CAGxD,iBAAAC,GACCd,KAAKQ,cAAcR,KAAKe,M,CAGzB,iBAAAC,GACChB,KAAKC,SAAW,I,CAGjB,MAAAgB,GACC,MAAMZ,EAAYL,KAAKkB,YAAclB,KAAKK,UAC1C,MAAME,EAAYP,KAAKO,UAEvB,OACCL,EAACiB,EAAI,CAAAC,IAAA,2CAACC,GAAIhB,EAAWiB,MAAOtB,KAAKE,EAAEqB,QAAQX,EAAiBC,MAAOE,MAAOf,KAAKe,MAAOS,KAAK,WAAWvB,SAAUD,KAAKC,UACnHD,KAAKE,EAAEuB,QAAQ,WACfvB,EAAA,QAAAkB,IAAA,2CAAME,MAAOV,EAAiBc,QAC7BxB,EAAA,QAAAkB,IAAA,2CAAMO,KAAK,YAGbzB,EAAA,OAAAkB,IAAA,4CACClB,EAAA,QAAAkB,IAAA,2CAAME,MAAOV,EAAiBgB,UAC7B1B,EAAA,QAAAkB,IAAA,2CAAMO,KAAK,cAEZzB,EAAA,QAAAkB,IAAA,2CAAMO,KAAK,eAEV3B,KAAKE,EAAEuB,QAAQ,YACfvB,EAAA,OAAAkB,IAAA,2CAAKE,MAAOV,EAAiBiB,QAASR,GAAId,EAAS,kBAAmBF,EAAWmB,KAAK,YACrFtB,EAAA,QAAAkB,IAAA,2CAAMO,KAAK,c","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,h as o,a as c,g as s}from"./p-2ee042d4.js";import{g as t}from"./p-ea7fdd2e.js";const r={root:"gov-error-code",content:"gov-error-code__content"};const d=class{constructor(o){e(this,o);this.h=t(this.host)}render(){return o(c,{key:"c47e051194598ee060955a36959d11340b66dadc",class:this.h.classes(r.root),align:"center"},this.h.hasSlot("icon")&&o("slot",{key:"510cdd27231b580403e76154d263af37877bd7b3",name:"icon"}),o("div",{key:"1b65726c29093652b1f2b6470669cedb5b951c7b",class:r.content},o("slot",{key:"d5fb45bfdfd4cc096e9f4ed213f0b50baaf225e6",name:"headline"}),o("slot",{key:"1950c6c8b034319c3d499b3470b4a2e0e1c7855a"})))}get host(){return s(this)}};export{d as gov_error_code};
|
|
2
|
+
//# sourceMappingURL=p-4fa0320d.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as s,a as t,g as e}from"./p-2ee042d4.js";import{C as r}from"./p-5aad3497.js";import{g as a}from"./p-ea7fdd2e.js";import{v as c}from"./p-0b3574c2.js";import{p as i}from"./p-e0e2e9c1.js";import"./p-e8ec030e.js";i(r,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);const p={root:"gov-control-group"};const d=class{constructor(s){o(this,s);this.color=r.PRIMARY;this.noBorder=false;this.fitContent=false;this.h=a(this.host)}validateColor(o){c(r,o,p.root)}render(){return s(t,{key:"bee513bb064b3a276eaede7f93ed12b97edb7adb",class:this.h.classes(p.root),color:this.color},s("slot",{key:"adba55ccd38d432ae11fa4967996d8bcaf552427"}))}get host(){return e(this)}static get watchers(){return{color:["validateColor"]}}};export{d as gov_control_group};
|
|
2
|
+
//# sourceMappingURL=p-50af9ae8.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,d as s,h as i,a as e,g as o}from"./p-2ee042d4.js";import{v as a}from"./p-0b3574c2.js";import{C as h}from"./p-5aad3497.js";import{p as c}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{c as d}from"./p-cd6c2938.js";import{A as n,a as l}from"./p-9ac55bd1.js";import{i as m}from"./p-d9a299a4.js";import"./p-e8ec030e.js";const f=c(h,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var p;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(p||(p={}));const b={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",icon:"gov-toast__icon",close:"gov-toast__close",timer:"gov-toast__timer"};const u=class{constructor(i){t(this,i);this.govClose=s(this,"gov-close",7);this.color="primary";this.gravity="top";this.position="right";this.type="bold";this.time=0;this.closeLabel=undefined;this.accessibleCloseLabel=undefined;this.inheritedAttributes={};this.h=r(this.host);this.toastId=d("GovToast")}validateColor(t){a(f,t,b.root)}componentDidLoad(){this.attributeObserver=new n(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateColor(this.color);this.runTimer();this.inheritedAttributes=m(this.host)}disconnectedCallback(){clearTimeout(this.timeout);this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}runTimer(){if(this.isTimer){this.timeout=setTimeout((()=>{this.host.classList.add(b.hidden);setTimeout((()=>{this.destroy().catch();this.govClose.emit(this.toastId)}),600)}),this.time)}}render(){return i(e,{key:"632972ed59aac0d696428d6f32e6c99615ccf687",class:this.h.classes(b.root),"data-toast-id":this.toastId,gravity:this.gravity,position:this.position,color:this.color,type:this.type,style:{"--toast-duration":this.time+"ms"}},this.h.hasSlot("icon")&&i("span",{key:"da93a05f1976eeb4e356160fd0daea409b836a05",class:b.icon},i("slot",{key:"d374f5dea570b27643d960e65d0d5b2c710cb2b4",name:"icon"})),i("div",Object.assign({key:"1680aff627c809348ae7812ab72a34dbad33a368",class:b.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),i("slot",{key:"8208b697e9fbefd964a17c6bfdb06d3a5ff9d2f2"})),i("gov-button",{key:"9f05e19a672f66c2203a5556370e12e2ce7819f7",size:"s","aria-label":this.accessibleCloseLabel,color:this.isBold?this.color:"neutral",type:"base","on-gov-click":this.onCloseHandler.bind(this),class:b.close},this.closeLabel?this.closeLabel:i("gov-icon",{name:"x-lg",type:"components"})),i("div",{key:"a954d22ce3a0e06e2d17aa14903dae7264d9e03c",class:b.timer}))}onCloseHandler(){this.govClose.emit(this.toastId);this.destroy().catch()}get isBold(){return this.type==="bold"}get isTimer(){return Number.isInteger(this.time)&&this.time>0}async destroy(){clearTimeout(this.timeout);const t=document.querySelector(`[data-toast-id="${this.toastId}"]`);if(t){t.classList.add(b.hidden);if(typeof t.remove==="function"){t.remove()}}}get host(){return o(this)}static get watchers(){return{color:["validateColor"]}}};export{u as gov_toast};
|
|
2
|
+
//# sourceMappingURL=p-5c3f4cfe.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,d as i,h as s,a as e,g as h}from"./p-2ee042d4.js";import{g as a,l as n,m as o}from"./p-da1db6fd.js";import{g as r,c,t as d,d as l}from"./p-ea7fdd2e.js";import{v as f}from"./p-0b3574c2.js";import{c as p}from"./p-cd6c2938.js";import{A as u,a as m}from"./p-9ac55bd1.js";import{i as b}from"./p-d9a299a4.js";import{p as v}from"./p-e0e2e9c1.js";import{S as g}from"./p-92f420cb.js";import{C as y}from"./p-5aad3497.js";import"./p-7f3becc5.js";import"./p-56efd4a2.js";import"./p-7ba4daf4.js";import"./p-e8ec030e.js";var k;(function(t){t["INPUT"]="input";t["TEXTAREA"]="textarea"})(k||(k={}));const j=class{constructor(s){t(this,s);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govKeyUp=i(this,"gov-keyup",7);this.govHydrated=i(this,"gov-hydrated",7);this.govKeyDown=i(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.accessibleShowPasswordLabel="Zobrazit heslo";this.accessibleHidePasswordLabel="Skrýt heslo";this.focused=undefined;this.showPassword=false;this.inheritedAttributes={};this.h=r(this.host);this.inputId=p("GovInput");this.f=a(this.h)}validateSize(t){f(o,t,n.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",c(this.success));this.f.passAttrToControl("disabled",c(this.disabled));this.f.passAttrToControl("invalid",c(this.invalid));this.f.passAttrToControl("type",this.multiline?k.TEXTAREA:k.INPUT)}componentDidLoad(){this.attributeObserver=new u(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(m);this.govHydrated.emit()}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}disconnectedCallback(){this.attributeObserver.stopObserving()}render(){const t=this.multiline?k.TEXTAREA:k.INPUT;return s(e,{key:"8b60864f0792fe1946d4b7cb6489cff0ffc767e1",class:n.root,size:this.size,type:this.type},this.h.hasSlot("prefix")&&s("slot",{key:"4d5d0bb755acbb42033f572633e4969c8e6e8b36",name:"prefix"}),s("span",{key:"eaac4a690052077ca631ae1e9c69a65518a1902f",class:"element"},this.h.hasSlot("icon-start")&&!this.multiline&&s("div",{key:"e8be567c923c023bce7d0ebf0cccff592ac15c5a",class:n.icons,onClick:()=>this.inputRef.focus()},s("slot",{key:"4c76013e8a7db99b43e7b8f426f3907d89708b5a",name:"icon-start"})),s(t,Object.assign({key:"22e1714e66085290e7fe984a4672512324143397",type:this.inputType==="password"&&this.showPassword?"text":this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:t=>this.inputRef=t,placeholder:this.placeholder,spellcheck:d(this.spellcheck),lang:this.inputLang,readonly:d(this.readonly),autocomplete:l(this.autocomplete),autocorrect:l(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,value:this.value},this.inheritedAttributes,{"aria-required":d(this.required),"aria-invalid":d(this.invalid),"aria-disabled":d(this.disabled)})),(this.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&s("div",{key:"19ab7fe83fcecde7a506f21611fae64126464b88",class:n.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&s("gov-icon",{key:"9dd7b8413b351d957a63f7df09aee8b6e3e0ac53",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&s("gov-icon",{key:"06540c7f7cf3c0fbdab8b5a63aba35cf7a78df3a",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&s("slot",{key:"8cb1103f101fa9bd5719f1657ae1a404fc3882f4",name:"icon-end"}),this.inputType==="password"?s("gov-button",{color:"primary",type:"base",size:this.size,"aria-label":this.showPassword?this.accessibleHidePasswordLabel:this.accessibleShowPasswordLabel,"on-gov-click":()=>this.showPassword=!this.showPassword},s("gov-icon",{slot:"icon-start",name:"eye",type:"components"})):null)),this.h.hasSlot("sufix")&&s("slot",{key:"78308cfef71f34839d86af88df5dadb28c01adf1",name:"sufix"}))}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:n.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.focused=false;this.govBlur.emit({component:n.root,value:this.value,originalEvent:t})}onKeyUpHandler(t){t.stopPropagation();this.govKeyUp.emit({component:n.root,value:this.value,originalEvent:t})}onKeyDownHandler(t){t.stopPropagation();this.govKeyDown.emit({component:n.root,value:this.value,originalEvent:t})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:n.root,value:this.value,originalEvent:t})}async setFocus(t){return this.inputRef.focus(t)}async setValue(t){this.value=t}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}get host(){return h(this)}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}};const w=v(g,["_XS","_S","_M","_L","_XL"]);v(y,["PRIMARY","NEUTRAL"]);var A;(function(t){t["CIRCLE"]="circle";t["LINE"]="line"})(A||(A={}));var x;(function(t){t["PULSE"]="pulse";t["PROGRESS"]="progress";t["FALSE"]="false"})(x||(x={}));const C={root:"gov-skeleton"};const z=class{constructor(i){t(this,i);this.items=[];this.size="m";this.color="neutral";this.shape="line";this.width=null;this.height=null;this.animation="progress";this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){f(w,t,C.root)}validateShape(t){f(A,t,C.root)}validateAnimation(t){f(x,t,C.root)}componentDidLoad(){this.attributeObserver=new u(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(m)}componentWillLoad(){this.validateSize(this.size);this.validateShape(this.shape);this.validateAnimation(this.animation);this.init();this.inheritedAttributes=b(this.host)}componentWillUpdate(){this.init()}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}init(){this.items.fill(1)}get style(){const t={width:null,height:null};if(this.width){t.width=this.width}if(this.height){t.height=this.height}return Object.assign({},t)}render(){return s(e,Object.assign({key:"175dad78f57ee2e44fe3097e0595f59254e1003b",size:this.size,color:this.color,class:{[C.root]:true,circle:this.shape==="circle",line:this.shape==="line",progress:this.animation==="progress",pulse:this.animation==="pulse"}},this.inheritedAttributes,{"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100",role:"progressbar",tabindex:"0",style:this.style}))}get host(){return h(this)}static get watchers(){return{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}}};export{j as gov_form_input,z as gov_skeleton};
|
|
2
|
+
//# sourceMappingURL=p-6b7c3a96.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Tags","GovFormInput","constructor","hostRef","this","h","govHost","host","inputId","createID","f","govForm","validateSize","newValue","validateProp","FormInputSizes","FormInputClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","multiline","TEXTAREA","INPUT","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","govHydrated","emit","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","removeAttribute","Object","assign","disconnectedCallback","stopObserving","render","Tag","Host","key","class","type","hasSlot","name","icons","onClick","inputRef","focus","inputType","showPassword","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","placeholder","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","value","color","accessibleHidePasswordLabel","accessibleShowPasswordLabel","slot","e","stopPropagation","focused","govFocus","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","setValue","clearValue","getRef","SkeletonSizes","pick","Sizes","Colors","SkeletonShapes","SkeletonAnimation","SkeletonClass","GovSkeleton","items","validateShape","validateAnimation","shape","animation","init","componentWillUpdate","fill","style","dimenssionsStyles","width","height","circle","line","progress","pulse","tabindex"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.tsx","../../../packages/core/src/components/gov-loading/skeleton/constants.ts","../../../packages/core/src/components/gov-loading/skeleton/gov-skeleton.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormInputClass, FormInputSizes, FormInputSizesType, InputType, Type,} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop({reflect:true}) readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t */\n\t@Prop({reflect:true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({attribute: \"input-type\"}) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly invalid: boolean\n\t/**\n\t * Accessible text for password display\n\t */\n\t@Prop({attribute: \"accessible-show-password-label\"}) readonly accessibleShowPasswordLabel = 'Zobrazit heslo'\n\t/**\n\t * Accessible text to hide the password\n\t */\n\t@Prop({attribute: \"accessible-hide-password-label\"}) readonly accessibleHidePasswordLabel = 'Skrýt heslo'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keyup\"}) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-hydrated\"}) govHydrated: EventEmitter<void>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keydown\"}) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\t@State() showPassword: boolean = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t\tthis.govHydrated.emit();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{(this.h.hasSlot(\"icon-start\") && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t<slot name=\"icon-start\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType === 'password' && this.showPassword ? 'text' : this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t\t{((this.success || this.invalid || this.h.hasSlot(\"icon-end\") || this.inputType === 'password') && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && this.inputType !== 'password' && <slot name=\"icon-end\"/>}\n\t\t\t\t\t\t\t{this.inputType === 'password' ? (\n\t\t\t\t\t\t\t\t<gov-button color={'primary'}\n\t\t\t\t\t\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\taria-label={this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.showPassword = !this.showPassword}>\n\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"eye\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t</gov-button>) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n","import { pick } from \"../../../utils/utils\"\nimport { ValueOf } from \"../../../types/interfaces\"\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {Colors} from \"../../../core/constants/colors\";\n\nexport const SkeletonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type SkeletonSizesType = `${ValueOf<typeof SkeletonSizes>}`\n\nexport const SkeletonColors = pick(Colors, [\"PRIMARY\", \"NEUTRAL\"])\nexport type SkeletonColorType = `${ValueOf<typeof SkeletonColors>}`\n\nexport enum SkeletonShapes {\n\tCIRCLE = 'circle',\n\tLINE = 'line'\n}\nexport type SkeletonShapesType = `${ValueOf<typeof SkeletonShapes>}`\n\nexport enum SkeletonAnimation {\n\tPULSE = 'pulse',\n\tPROGRESS = 'progress',\n\tFALSE = 'false'\n}\nexport type SkeletonAnimationType = `${ValueOf<typeof SkeletonAnimation>}`\n\nexport const SkeletonClass = {\n\troot: 'gov-skeleton',\n}\n","import {Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {\n\tSkeletonAnimation,\n\tSkeletonAnimationType,\n\tSkeletonClass,\n\tSkeletonColorType,\n\tSkeletonShapes,\n\tSkeletonShapesType,\n\tSkeletonSizes,\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormInputSizesType} from \"../../gov-form/input/constants\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-skeleton\",\n})\nexport class GovSkeleton {\n\th: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovSkeletonElement\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Style variation of the skeleton.\n\t */\n\t@Prop() readonly color?: SkeletonColorType = \"neutral\"\n\t/**\n\t * Shape of the skeleton\n\t */\n\t@Prop() shape?: SkeletonShapesType = \"line\"\n\t/**\n\t * Width of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop() width: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop() height: string = null\n\t/**\n\t * Animation type\n\t */\n\t@Prop() animation?: SkeletonAnimationType = \"progress\"\n\n\titems: number[] = []\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SkeletonSizes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('shape')\n\tvalidateShape(newValue: string): void {\n\t\tvalidateProp(SkeletonShapes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('animation')\n\tvalidateAnimation(newValue: string): void {\n\t\tvalidateProp(SkeletonAnimation, newValue, SkeletonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateShape(this.shape)\n\t\tthis.validateAnimation(this.animation)\n\t\tthis.init()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tthis.init()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tinit() {\n\t\tthis.items.fill(1)\n\t}\n\n\tget style() {\n\t\tconst dimenssionsStyles: {\n\t\t\twidth?: string,\n\t\t\theight?: string,\n\t\t} = {\n\t\t\twidth: null,\n\t\t\theight: null,\n\t\t}\n\t\tif (this.width) {\n\t\t\tdimenssionsStyles.width = this.width\n\t\t}\n\n\t\tif (this.height) {\n\t\t\tdimenssionsStyles.height = this.height\n\t\t}\n\n\t\treturn {...dimenssionsStyles}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t color={this.color}\n\t\t\t\t class={{\n\t\t\t\t\t [SkeletonClass.root]: true,\n\t\t\t\t\t circle: this.shape === \"circle\",\n\t\t\t\t\t line: this.shape === \"line\",\n\t\t\t\t\t progress: this.animation === \"progress\",\n\t\t\t\t\t pulse: this.animation === \"pulse\",\n\t\t\t\t }}\n\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t aria-busy=\"true\"\n\t\t\t\t aria-valuemin=\"0\"\n\t\t\t\t aria-valuemax=\"100\"\n\t\t\t\t role=\"progressbar\"\n\t\t\t\t tabindex=\"0\"\n\t\t\t\t style={this.style}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"8gBAcA,IAAKA,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,sBACA,EAHD,CAAKA,MAAI,K,MAQIC,EAAY,MAOxB,WAAAC,CAAAC,G,0TAsB6C,I,mGAqBM,M,cAIA,M,wRAiDc,O,4EAa2B,iB,iCAIA,c,yCA0B3D,M,yBAeU,GAzJ1CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,YACxBL,KAAKM,EAAIC,EAAQP,KAAKC,E,CA2IvB,YAAAO,CAAaC,GACZC,EAAaC,EAAgBF,EAAUG,EAAeC,K,CAOvD,iBAAAC,GACCd,KAAKe,kB,CAKE,gBAAAA,GACPf,KAAKM,EAAEU,kBAAkB,OAAQhB,KAAKiB,MACtCjB,KAAKM,EAAEU,kBAAkB,UAAWE,EAAWlB,KAAKmB,UACpDnB,KAAKM,EAAEU,kBAAkB,WAAYE,EAAWlB,KAAKoB,WACrDpB,KAAKM,EAAEU,kBAAkB,UAAWE,EAAWlB,KAAKqB,UACpDrB,KAAKM,EAAEU,kBAAkB,OAAQhB,KAAKs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H,GACC9H,KAAK6H,M,CAGN,oBAAAjF,GACC5C,KAAK0B,kBAAkBmB,e,CAGxB,qBAAAhB,CAAsBD,EAAuBnB,GAC5CT,KAAKG,KAAKsC,gBAAgBb,GAC1B5B,KAAKmC,oBAAmBO,OAAAC,OAAAD,OAAAC,OAAA,GAAO3C,KAAKmC,qBAAmB,CAAEP,CAACA,GAAgBnB,G,CAG3E,IAAAoH,GACC7H,KAAKwH,MAAMO,KAAK,E,CAGjB,SAAIC,GACH,MAAMC,EAGF,CACHC,MAAO,KACPC,OAAQ,MAET,GAAInI,KAAKkI,MAAO,CACfD,EAAkBC,MAAQlI,KAAKkI,K,CAGhC,GAAIlI,KAAKmI,OAAQ,CAChBF,EAAkBE,OAASnI,KAAKmI,M,CAGjC,OAAAzF,OAAAC,OAAA,GAAWsF,E,CAGZ,MAAAnF,GACC,OACC7C,EAAC+C,EAAIN,OAAAC,OAAA,CAAAM,IAAA,2CAAChC,KAAMjB,KAAKiB,KACd2E,MAAO5F,KAAK4F,MACZ1C,MAAO,CACN,CAACoE,EAAczG,MAAO,KACtBuH,OAAQpI,KAAK2H,QAAU,SACvBU,KAAMrI,KAAK2H,QAAU,OACrBW,SAAUtI,KAAK4H,YAAc,WAC7BW,MAAOvI,KAAK4H,YAAc,UAEvB5H,KAAKmC,oBAAmB,aAClB,OAAM,gBACF,IAAG,gBACH,MACduD,KAAK,cACL8C,SAAS,IACTR,MAAOhI,KAAKgI,Q","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Tags","GovFormInput","constructor","hostRef","this","h","govHost","host","inputId","createID","f","govForm","validateSize","newValue","validateProp","FormInputSizes","FormInputClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","multiline","TEXTAREA","INPUT","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","govHydrated","emit","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","removeAttribute","Object","assign","disconnectedCallback","stopObserving","render","Tag","Host","key","class","type","hasSlot","name","icons","onClick","inputRef","focus","inputType","showPassword","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","placeholder","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","value","color","accessibleHidePasswordLabel","accessibleShowPasswordLabel","slot","e","stopPropagation","focused","govFocus","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","setValue","clearValue","getRef","SkeletonSizes","pick","Sizes","Colors","SkeletonShapes","SkeletonAnimation","SkeletonClass","GovSkeleton","items","validateShape","validateAnimation","shape","animation","init","componentWillUpdate","fill","style","dimenssionsStyles","width","height","circle","line","progress","pulse","tabindex"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.tsx","../../../packages/core/src/components/gov-loading/skeleton/constants.ts","../../../packages/core/src/components/gov-loading/skeleton/gov-skeleton.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormInputClass, FormInputSizes, FormInputSizesType, InputType, Type,} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop({reflect:true}) readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t */\n\t@Prop({reflect:true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({attribute: \"input-type\"}) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly invalid: boolean\n\t/**\n\t * Accessible text for password display\n\t */\n\t@Prop({attribute: \"accessible-show-password-label\"}) readonly accessibleShowPasswordLabel = 'Zobrazit heslo'\n\t/**\n\t * Accessible text to hide the password\n\t */\n\t@Prop({attribute: \"accessible-hide-password-label\"}) readonly accessibleHidePasswordLabel = 'Skrýt heslo'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keyup\"}) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-hydrated\"}) govHydrated: EventEmitter<void>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keydown\"}) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\t@State() showPassword: boolean = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t\tthis.govHydrated.emit();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{(this.h.hasSlot(\"icon-start\") && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t<slot name=\"icon-start\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType === 'password' && this.showPassword ? 'text' : this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t\t{((this.success || this.invalid || this.h.hasSlot(\"icon-end\") || this.inputType === 'password') && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && this.inputType !== 'password' && <slot name=\"icon-end\"/>}\n\t\t\t\t\t\t\t{this.inputType === 'password' ? (\n\t\t\t\t\t\t\t\t<gov-button color={'primary'}\n\t\t\t\t\t\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\taria-label={this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.showPassword = !this.showPassword}>\n\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"eye\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t</gov-button>) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n","import { pick } from \"../../../utils/utils\"\nimport { ValueOf } from \"../../../types/interfaces\"\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {Colors} from \"../../../core/constants/colors\";\n\nexport const SkeletonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type SkeletonSizesType = `${ValueOf<typeof SkeletonSizes>}`\n\nexport const SkeletonColors = pick(Colors, [\"PRIMARY\", \"NEUTRAL\"])\nexport type SkeletonColorType = `${ValueOf<typeof SkeletonColors>}`\n\nexport enum SkeletonShapes {\n\tCIRCLE = 'circle',\n\tLINE = 'line'\n}\nexport type SkeletonShapesType = `${ValueOf<typeof SkeletonShapes>}`\n\nexport enum SkeletonAnimation {\n\tPULSE = 'pulse',\n\tPROGRESS = 'progress',\n\tFALSE = 'false'\n}\nexport type SkeletonAnimationType = `${ValueOf<typeof SkeletonAnimation>}`\n\nexport const SkeletonClass = {\n\troot: 'gov-skeleton',\n}\n","import {Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {\n\tSkeletonAnimation,\n\tSkeletonAnimationType,\n\tSkeletonClass,\n\tSkeletonColorType,\n\tSkeletonShapes,\n\tSkeletonShapesType,\n\tSkeletonSizes,\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormInputSizesType} from \"../../gov-form/input/constants\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-skeleton\",\n})\nexport class GovSkeleton {\n\th: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovSkeletonElement\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Style variation of the skeleton.\n\t */\n\t@Prop() readonly color?: SkeletonColorType = \"neutral\"\n\t/**\n\t * Shape of the skeleton\n\t */\n\t@Prop() shape?: SkeletonShapesType = \"line\"\n\t/**\n\t * Width of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop() width: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop() height: string = null\n\t/**\n\t * Animation type\n\t */\n\t@Prop() animation?: SkeletonAnimationType = \"progress\"\n\n\titems: number[] = []\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SkeletonSizes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('shape')\n\tvalidateShape(newValue: string): void {\n\t\tvalidateProp(SkeletonShapes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('animation')\n\tvalidateAnimation(newValue: string): void {\n\t\tvalidateProp(SkeletonAnimation, newValue, SkeletonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateShape(this.shape)\n\t\tthis.validateAnimation(this.animation)\n\t\tthis.init()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tthis.init()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tinit() {\n\t\tthis.items.fill(1)\n\t}\n\n\tget style() {\n\t\tconst dimenssionsStyles: {\n\t\t\twidth?: string,\n\t\t\theight?: string,\n\t\t} = {\n\t\t\twidth: null,\n\t\t\theight: null,\n\t\t}\n\t\tif (this.width) {\n\t\t\tdimenssionsStyles.width = this.width\n\t\t}\n\n\t\tif (this.height) {\n\t\t\tdimenssionsStyles.height = this.height\n\t\t}\n\n\t\treturn {...dimenssionsStyles}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t color={this.color}\n\t\t\t\t class={{\n\t\t\t\t\t [SkeletonClass.root]: true,\n\t\t\t\t\t circle: this.shape === \"circle\",\n\t\t\t\t\t line: this.shape === \"line\",\n\t\t\t\t\t progress: this.animation === \"progress\",\n\t\t\t\t\t pulse: this.animation === \"pulse\",\n\t\t\t\t }}\n\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t aria-busy=\"true\"\n\t\t\t\t aria-valuemin=\"0\"\n\t\t\t\t aria-valuemax=\"100\"\n\t\t\t\t role=\"progressbar\"\n\t\t\t\t tabindex=\"0\"\n\t\t\t\t style={this.style}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"ygBAcA,IAAKA,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,sBACA,EAHD,CAAKA,MAAI,K,MAQIC,EAAY,MAOxB,WAAAC,CAAAC,G,0TAsB6C,I,mGAqBM,M,cAIA,M,wRAiDc,O,4EAa2B,iB,iCAIA,c,yCA0B3D,M,yBAeU,GAzJ1CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtB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mC,oBAAmB,aAClB,OAAM,gBACF,IAAG,gBACH,MACduD,KAAK,cACL8C,SAAS,IACTR,MAAOhI,KAAKgI,Q","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,h as t,a as e,g as c}from"./p-2ee042d4.js";import{L as r}from"./p-13ebd887.js";import{g as i}from"./p-ea7fdd2e.js";const o=class{constructor(t){s(this,t);this.type="stretch";this.variant=undefined;this.inverse=false;this.h=i(this.host)}typeClass(s,t,e,c){const r=t?"-"+t:"";const i=e?"-"+e:"";const o=c?"-inverse":"";return s+" "+s+r+i+o}render(){return t(e,{key:"c35fc39e07229363bdf36be5856165e7e8eb7985",type:this.type,class:this.h.classes(r.root)},t("section",{key:"dc50cf9cba8bd4e879291fddfbd41955f2d10330",class:this.typeClass(r.section,this.type,this.variant,this.inverse)},t("slot",{key:"017a329c119529d3893e187b6a8bbccfbbc76679"})))}get host(){return c(this)}};export{o as gov_layout};
|
|
2
|
+
//# sourceMappingURL=p-71f5d4ff.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GovLayout","constructor","hostRef","this","h","govHost","host","typeClass","originalClass","type","variant","inverse","isType","isVariant","isInverse","render","Host","key","class","classes","LayoutClass","root","section"],"sources":["../../../packages/core/src/components/gov-layout/gov-layout.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { LayoutClass, LayoutType, LayoutVariantType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-layout',\n})\nexport class GovLayout {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLayoutElement\n\t/**\n\t * Layout type\n\t */\n\t@Prop() readonly type?: LayoutType = 'stretch'\n\t/**\n\t * Layout align\n\t */\n\t@Prop() readonly variant?: LayoutVariantType\n\t/**\n\t * Determine if component should have inverse column order\n\t */\n\t@Prop() readonly inverse: boolean = false\n\n\tprivate typeClass(originalClass: string, type: string, variant: string, inverse: boolean) {\n\t\tconst isType = type ? '-' + type : ''\n\t\tconst isVariant = variant ? '-' + variant : ''\n\t\tconst isInverse = inverse ? '-inverse' : ''\n\t\treturn originalClass + ' ' + originalClass + isType + isVariant + isInverse\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host type={this.type} class={this.h.classes(LayoutClass.root)}>\n\t\t\t\t<section class={this.typeClass(LayoutClass.section, this.type, this.variant, this.inverse)}>\n\t\t\t\t\t<slot />\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["GovLayout","constructor","hostRef","this","h","govHost","host","typeClass","originalClass","type","variant","inverse","isType","isVariant","isInverse","render","Host","key","class","classes","LayoutClass","root","section"],"sources":["../../../packages/core/src/components/gov-layout/gov-layout.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { LayoutClass, LayoutType, LayoutVariantType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-layout',\n})\nexport class GovLayout {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLayoutElement\n\t/**\n\t * Layout type\n\t */\n\t@Prop() readonly type?: LayoutType = 'stretch'\n\t/**\n\t * Layout align\n\t */\n\t@Prop() readonly variant?: LayoutVariantType\n\t/**\n\t * Determine if component should have inverse column order\n\t */\n\t@Prop() readonly inverse: boolean = false\n\n\tprivate typeClass(originalClass: string, type: string, variant: string, inverse: boolean) {\n\t\tconst isType = type ? '-' + type : ''\n\t\tconst isVariant = variant ? '-' + variant : ''\n\t\tconst isInverse = inverse ? '-inverse' : ''\n\t\treturn originalClass + ' ' + originalClass + isType + isVariant + isInverse\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host type={this.type} class={this.h.classes(LayoutClass.root)}>\n\t\t\t\t<section class={this.typeClass(LayoutClass.section, this.type, this.variant, this.inverse)}>\n\t\t\t\t\t<slot />\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"uIAQaA,EAAS,MAGrB,WAAAC,CAAAC,G,oBAQqC,U,oCAQD,MAfnCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAiBf,SAAAC,CAAUC,EAAuBC,EAAcC,EAAiBC,GACvE,MAAMC,EAASH,EAAO,IAAMA,EAAO,GACnC,MAAMI,EAAYH,EAAU,IAAMA,EAAU,GAC5C,MAAMI,EAAYH,EAAU,WAAa,GACzC,OAAOH,EAAgB,IAAMA,EAAgBI,EAASC,EAAYC,C,CAGnE,MAAAC,GACC,OACCX,EAACY,EAAI,CAAAC,IAAA,2CAACR,KAAMN,KAAKM,KAAMS,MAAOf,KAAKC,EAAEe,QAAQC,EAAYC,OACxDjB,EAAA,WAAAa,IAAA,2CAASC,MAAOf,KAAKI,UAAUa,EAAYE,QAASnB,KAAKM,KAAMN,KAAKO,QAASP,KAAKQ,UACjFP,EAAA,QAAAa,IAAA,8C","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,d as s,h as a,a as t,g as i}from"./p-2ee042d4.js";import{v as c}from"./p-0b3574c2.js";import{a as d,A as o,b as n}from"./p-5f1000da.js";import{g as b,t as f,b as r}from"./p-ea7fdd2e.js";import{i as h}from"./p-d9a299a4.js";import{t as p}from"./p-26618322.js";import"./p-e8ec030e.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-9ac55bd1.js";const m=class{constructor(a){e(this,a);this.govChange=s(this,"gov-change",7);this.inheritedAttributes={};this.openState=undefined;this.identifier=undefined;this.size=undefined;this.disabled=false;this.open=false;this.h=b(this.host)}validateSize(e){c(n,e,o.root)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=h(this.host)}componentDidRender(){p((()=>this.getPropsFromParents()))}getPropsFromParents(){const e=this.h.getParent(d.root);if(e){this.size=e.getAttribute("size")}}render(){return a(t,{key:"1beb62527ea9274e6280ce0b64c9d52c12e4a993",class:this.h.classes([o.root,this.disabled&&o.disabled]),size:this.size,role:"listitem"},a("details",{key:"53ca7688e8f26e85cd76feb073a26d04c5505d2b",class:o.details,id:this.identifier,"aria-disabled":f(this.disabled),open:this.open},a("summary",Object.assign({key:"19fec49b0066b7a6162a6010e0ee20431c2a578b",onClick:e=>{e.stopPropagation();e.preventDefault();!this.disabled&&this.toggle().finally()},class:o.summary,tabIndex:this.disabled?-1:0,"aria-expanded":r(this.open)},this.inheritedAttributes),this.h.hasSlot("icon")&&a("span",{key:"19254947c22fa2b1a2fa4e26eacb22c0c89b40c9",class:o.icon},a("slot",{key:"262be1640f250fabf9918f4162c071bb68dc4fb3",name:"icon"})),a("span",{key:"ebb5ef762ef51921b68a8063fd09c979d7d0d32d",class:o.title},a("slot",{key:"75783345d2276f06e53c401761cb4e57d241e5e0",name:"label"}),a("slot",{key:"f2d9cdff693edbcae6293921fde7996d1b1251b6",name:"annotation"})),a("span",{key:"f7e28ea54455756c7d146c7b88be7001e80b07a8",class:o.right},a("slot",{key:"e76b31bf1c349a8a86d4b91ec1cfa650a75edf60",name:"suffix"}),a("span",{key:"87ea99c9862deb3ff9820fa383cec52956b4655a",class:o.arrow},a("slot",{key:"c8b64a90455a731f359e12550664ba5aa905abbc",name:"toggle-icon"},a("gov-icon",{key:"867406c5634d6446683529f5f647492b9b289a31",name:"chevron-down",type:"components"}))))),a("div",{key:"2adf7441dd470ae1b32a08fb374cd1d9e2d1f789",class:o.content},a("slot",{key:"8eb27d0b33689933b6e71850324c35c89d71c4c0"}))))}async toggle(){this.open=!this.open;this.govChange.emit({open:this.open,component:o.root,ref:this.host})}async currentState(){return this.open}get host(){return i(this)}static get watchers(){return{size:["validateSize"]}}};export{m as gov_accordion_item};
|
|
2
|
+
//# sourceMappingURL=p-77daba72.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,h as t,a,g as s,d as i}from"./p-2ee042d4.js";import{b as c,v as o}from"./p-29ac15d2.js";import{c as n}from"./p-e8ec030e.js";import{d as r}from"./p-e0e2e9c1.js";import{g as m}from"./p-ea7fdd2e.js";import{F as d,a as l}from"./p-7f3becc5.js";import{v as h}from"./p-0b3574c2.js";import{c as f}from"./p-cd6c2938.js";import"./p-2aedc81e.js";import"./p-5aad3497.js";import"./p-92f420cb.js";const g={root:"gov-attachments",label:"gov-attachments__label",list:"gov-attachments__list"};const b={root:"gov-attachments-item",name:"gov-attachments-item__name",file:"gov-attachments-item__file",messages:"gov-attachments-item__messages"};const p=class{constructor(t){e(this,t);this.label=undefined;this.wcagLabel=undefined;this.h=m(this.host)}async componentDidRender(){if(n()){await r(500);await this.validateWcag()}}render(){return t(a,{key:"01d6046e8da3b76924fa9c3124cec31e5b81d4c5",class:this.h.classes(g.root)},this.label?t("p",{class:g.label},this.label):null,t("div",{key:"88936d984563a5815b90cba8b1b5ee0f71ee3460",class:g.list,role:"list","aria-label":this.wcagLabel},t("slot",{key:"99c6427772c71388f027595a1fdf13ed4956a474"})))}async validateWcag(){c(this.wcagLabel,"wcag-label",g.root)}get host(){return s(this)}};const v="gov-attachments-item,.gov-attachments-item{position:relative;display:flex;width:100%;gap:var(--spacing-s)}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s)}gov-attachments-item__name,.gov-attachments-item__name{display:flex;gap:var(--spacing-s);flex-wrap:wrap;align-items:center;margin:0;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span,.gov-attachments-item__name span{font-size:var(--font-size-xs);line-height:var(--height-line-xs);letter-spacing:0.0125rem;font-weight:400;color:var(--decor-color, var(--text-secondary))}";const y=v;const _=class{constructor(t){e(this,t);this.govRemove=i(this,"gov-remove",7);this.accessibleRemoveLabel=undefined;this.accessibleRemoveLabelledBy=undefined;this.h=m(this.host)}async componentDidRender(){if(n()){await r(500);await this.validateAccessibility()}}render(){return t(a,{key:"a8fffc03fb890c1aaae5a1d63240747f5fcb013e",class:this.h.classes(b.root),role:"listitem"},t("div",{key:"0aa555d1c5b3bdf089cf020db1271e40389522f9",class:b.file},t("p",{key:"46014b9e9d9a46fea6f813ef271815be6ab6dfc4",class:b.name},t("slot",{key:"806f9dc2b2ee44248f7fe613e8362d92ed938ba8"}),t("slot",{key:"97d69e72afd5063f41ea7b41e50012893ee5027c",name:"info"})),t("gov-button",{key:"6c40ff9ae6be99cde30fde276db287a3d14dccd1",color:"primary",type:"base",size:"s","aria-label":this.accessibleRemoveLabel,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},t("gov-icon",{key:"24871273b10ca807811acd15dabb49c6a45d76d1",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&t("div",{key:"7683c6c6bfd1ca4b9660ee56ec190472970d0ac8",class:b.messages},t("slot",{key:"20b46c868809d19f9c67105a4c4774df9688a2c1",name:"message"})))}async validateAccessibility(){o(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,b.root,this.host)}get host(){return s(this)}};_.style=y;const u=class{constructor(t){e(this,t);this.color="neutral";this.size="m";this.h=m(this.host);this.messageId=f("GovFormMessage")}validateColor(e){h(l,e,d.root)}componentWillLoad(){this.validateColor(this.color)}render(){return t(a,{key:"86a59a0001123abc4ff9350657f71e4e4ac1b0c5",class:this.h.classes(d.root),color:this.color,size:this.size},this.h.hasSlot("icon")&&t("slot",{key:"94f919d5d79ab453be3cccab92e695c9a9a79276",name:"icon"}),t("span",{key:"e112ca627b1d4deef23eb1567bcbb014a82388d9",id:this.messageId,class:d.content},t("slot",{key:"1733f5e338c14f5d353a77266359033b42469eff"})))}async identifier(){return this.messageId}get host(){return s(this)}static get watchers(){return{color:["validateColor"]}}};export{p as gov_attachments,_ as gov_attachments_item,u as gov_form_message};
|
|
2
|
+
//# sourceMappingURL=p-7a21fb90.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AttachmentsClass","root","label","list","AttachmentsItemClass","name","file","messages","GovAttachments","constructor","hostRef","this","h","govHost","host","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","Host","key","class","classes","role","wcagLabel","validateWcagProp","govAttachmentsItemCss","GovAttachmentsItemStyle0","GovAttachmentsItem","validateAccessibility","color","type","size","accessibleRemoveLabel","accessibleRemoveLabelledBy","govRemove","emit","slot","hasSlot","validateAccessibleLabel","GovFormMessage","messageId","createID","validateColor","newValue","validateProp","FormMessageColors","FormMessageClass","componentWillLoad","id","content","identifier"],"sources":["../../../packages/core/src/components/gov-attachments/constants.ts","../../../packages/core/src/components/gov-attachments/gov-attachments.tsx","../../../packages/core/src/components/gov-attachments/gov-attachments-item.scss?tag=gov-attachments-item","../../../packages/core/src/components/gov-attachments/gov-attachments-item.tsx","../../../packages/core/src/components/gov-form/message/gov-form-message.tsx"],"sourcesContent":["export const AttachmentsClass = {\n\troot: 'gov-attachments',\n\tlabel: 'gov-attachments__label',\n\tlist: 'gov-attachments__list',\n}\n\nexport const AttachmentsItemClass = {\n\troot: 'gov-attachments-item',\n\tname: 'gov-attachments-item__name',\n\tfile: 'gov-attachments-item__file',\n\tmessages: 'gov-attachments-item__messages',\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core'\nimport { AttachmentsClass } from './constants'\nimport { validateWcagProp } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments',\n})\nexport class GovAttachments {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsElement\n\t/**\n\t * Label of attachments section\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Adds accessible label for the attachment section that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsClass.root)}>\n\t\t\t\t{this.label ? <p class={AttachmentsClass.label}>{this.label}</p> : null}\n\t\t\t\t<div class={AttachmentsClass.list} role=\"list\" aria-label={this.wcagLabel}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagLabel, 'wcag-label', AttachmentsClass.root)\n\t}\n}\n","/* Attachments - Item */\n\n\ngov-attachments-item, .gov-attachments-item {\n\t// VARIABLES\n\t@import \"gov-attachments-variables\";\n\n\t@include base($display: flex);\n\tgap: var(--spacing-s);\n\t&__messages {\n\t\t@include reset-last-margin();\n\t}\n\t&__file {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tmargin: 0;\n\t\tcolor: $attachments-name-color;\n\t\tspan {\n\t\t\t@include typography(\"xs\");\n\t\t\tcolor: $attachments-decor-color;\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {AttachmentsItemClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments-item',\n\tstyleUrl: 'gov-attachments-item.scss',\n})\nexport class GovAttachmentsItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsItemElement\n\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-remove-label'}) readonly accessibleRemoveLabel: string\n\t/**\n\t * Indicates the id of a component that labels the remove button.\n\t */\n\t@Prop({attribute: 'accessible-remove-labelledby'}) readonly accessibleRemoveLabelledBy: string\n\t/**\n\t * Emitted when the file is removed\n\t */\n\t@Event({eventName: 'gov-remove'}) govRemove: EventEmitter<PointerEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsItemClass.root)} role=\"listitem\">\n\t\t\t\t<div class={AttachmentsItemClass.file}>\n\t\t\t\t\t<p class={AttachmentsItemClass.name}>\n\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t<slot name=\"info\"/>\n\t\t\t\t\t</p>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\taria-label={this.accessibleRemoveLabel}\n\t\t\t\t\t\taria-labelledby={this.accessibleRemoveLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.govRemove.emit}\n\t\t\t\t\t>\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</div>\n\n\t\t\t\t{this.h.hasSlot('message') && (\n\t\t\t\t\t<div class={AttachmentsItemClass.messages}>\n\t\t\t\t\t\t<slot name=\"message\"/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleRemoveLabel, this.accessibleRemoveLabelledBy, AttachmentsItemClass.root, this.host)\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport {FormMessageClass, FormMessageSizesTypes, FormMessageColors, FormMessageColorType} from './constants'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { createID } from '../../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-form-message',\n})\nexport class GovFormMessage {\n\th: GovHost\n\tprivate readonly messageId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.messageId = createID('GovFormMessage')\n\t}\n\n\t@Element() host: HTMLGovFormMessageElement\n\t/**\n\t * Style variation of the message.\n\t */\n\t@Prop({ attribute: 'color' }) readonly color?: FormMessageColorType = 'neutral'\n\t/**\n\t * Message's size.\n\t */\n\t@Prop() readonly size?: FormMessageSizesTypes = 'm'\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(FormMessageColors, newValue, FormMessageClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormMessageClass.root)} color={this.color} size={this.size}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t)}\n\t\t\t\t<span id={this.messageId} class={FormMessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns unique identifier of message\n\t */\n\t@Method()\n\tasync identifier(): Promise<string> {\n\t\treturn this.messageId\n\t}\n}\n"],"mappings":"6YAAO,MAAMA,EAAmB,CAC/BC,KAAM,kBACNC,MAAO,yBACPC,KAAM,yBAGA,MAAMC,EAAuB,CACnCH,KAAM,uBACNI,KAAM,6BACNC,KAAM,6BACNC,SAAU,kC,MCCEC,EAAc,MAG1B,WAAAC,CAAAC,G,wDACCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAavB,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNN,KAAKO,c,EAIb,MAAAC,GACC,OACCP,EAACQ,EAAI,CAAAC,IAAA,2CAACC,MAAOX,KAAKC,EAAEW,QAAQvB,EAAiBC,OAC3CU,KAAKT,MAAQU,EAAA,KAAGU,MAAOtB,EAAiBE,OAAQS,KAAKT,OAAa,KACnEU,EAAA,OAAAS,IAAA,2CAAKC,MAAOtB,EAAiBG,KAAMqB,KAAK,OAAM,aAAab,KAAKc,WAC/Db,EAAA,QAAAS,IAAA,8C,CAUJ,kBAAMH,GACLQ,EAAiBf,KAAKc,UAAW,aAAczB,EAAiBC,K,6BCnDlE,MAAM0B,EAAwB,
|
|
1
|
+
{"version":3,"names":["AttachmentsClass","root","label","list","AttachmentsItemClass","name","file","messages","GovAttachments","constructor","hostRef","this","h","govHost","host","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","Host","key","class","classes","role","wcagLabel","validateWcagProp","govAttachmentsItemCss","GovAttachmentsItemStyle0","GovAttachmentsItem","validateAccessibility","color","type","size","accessibleRemoveLabel","accessibleRemoveLabelledBy","govRemove","emit","slot","hasSlot","validateAccessibleLabel","GovFormMessage","messageId","createID","validateColor","newValue","validateProp","FormMessageColors","FormMessageClass","componentWillLoad","id","content","identifier"],"sources":["../../../packages/core/src/components/gov-attachments/constants.ts","../../../packages/core/src/components/gov-attachments/gov-attachments.tsx","../../../packages/core/src/components/gov-attachments/gov-attachments-item.scss?tag=gov-attachments-item","../../../packages/core/src/components/gov-attachments/gov-attachments-item.tsx","../../../packages/core/src/components/gov-form/message/gov-form-message.tsx"],"sourcesContent":["export const AttachmentsClass = {\n\troot: 'gov-attachments',\n\tlabel: 'gov-attachments__label',\n\tlist: 'gov-attachments__list',\n}\n\nexport const AttachmentsItemClass = {\n\troot: 'gov-attachments-item',\n\tname: 'gov-attachments-item__name',\n\tfile: 'gov-attachments-item__file',\n\tmessages: 'gov-attachments-item__messages',\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core'\nimport { AttachmentsClass } from './constants'\nimport { validateWcagProp } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments',\n})\nexport class GovAttachments {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsElement\n\t/**\n\t * Label of attachments section\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Adds accessible label for the attachment section that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsClass.root)}>\n\t\t\t\t{this.label ? <p class={AttachmentsClass.label}>{this.label}</p> : null}\n\t\t\t\t<div class={AttachmentsClass.list} role=\"list\" aria-label={this.wcagLabel}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagLabel, 'wcag-label', AttachmentsClass.root)\n\t}\n}\n","/* Attachments - Item */\n\n\ngov-attachments-item, .gov-attachments-item {\n\t// VARIABLES\n\t@import \"gov-attachments-variables\";\n\n\t@include base($display: flex);\n\tgap: var(--spacing-s);\n\t&__messages {\n\t\t@include reset-last-margin();\n\t}\n\t&__file {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tmargin: 0;\n\t\tcolor: $attachments-name-color;\n\t\tspan {\n\t\t\t@include typography(\"xs\");\n\t\t\tcolor: $attachments-decor-color;\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {AttachmentsItemClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments-item',\n\tstyleUrl: 'gov-attachments-item.scss',\n})\nexport class GovAttachmentsItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsItemElement\n\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-remove-label'}) readonly accessibleRemoveLabel: string\n\t/**\n\t * Indicates the id of a component that labels the remove button.\n\t */\n\t@Prop({attribute: 'accessible-remove-labelledby'}) readonly accessibleRemoveLabelledBy: string\n\t/**\n\t * Emitted when the file is removed\n\t */\n\t@Event({eventName: 'gov-remove'}) govRemove: EventEmitter<PointerEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsItemClass.root)} role=\"listitem\">\n\t\t\t\t<div class={AttachmentsItemClass.file}>\n\t\t\t\t\t<p class={AttachmentsItemClass.name}>\n\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t<slot name=\"info\"/>\n\t\t\t\t\t</p>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\taria-label={this.accessibleRemoveLabel}\n\t\t\t\t\t\taria-labelledby={this.accessibleRemoveLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.govRemove.emit}\n\t\t\t\t\t>\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</div>\n\n\t\t\t\t{this.h.hasSlot('message') && (\n\t\t\t\t\t<div class={AttachmentsItemClass.messages}>\n\t\t\t\t\t\t<slot name=\"message\"/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleRemoveLabel, this.accessibleRemoveLabelledBy, AttachmentsItemClass.root, this.host)\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport {FormMessageClass, FormMessageSizesTypes, FormMessageColors, FormMessageColorType} from './constants'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { createID } from '../../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-form-message',\n})\nexport class GovFormMessage {\n\th: GovHost\n\tprivate readonly messageId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.messageId = createID('GovFormMessage')\n\t}\n\n\t@Element() host: HTMLGovFormMessageElement\n\t/**\n\t * Style variation of the message.\n\t */\n\t@Prop({ attribute: 'color' }) readonly color?: FormMessageColorType = 'neutral'\n\t/**\n\t * Message's size.\n\t */\n\t@Prop() readonly size?: FormMessageSizesTypes = 'm'\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(FormMessageColors, newValue, FormMessageClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormMessageClass.root)} color={this.color} size={this.size}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t)}\n\t\t\t\t<span id={this.messageId} class={FormMessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns unique identifier of message\n\t */\n\t@Method()\n\tasync identifier(): Promise<string> {\n\t\treturn this.messageId\n\t}\n}\n"],"mappings":"6YAAO,MAAMA,EAAmB,CAC/BC,KAAM,kBACNC,MAAO,yBACPC,KAAM,yBAGA,MAAMC,EAAuB,CACnCH,KAAM,uBACNI,KAAM,6BACNC,KAAM,6BACNC,SAAU,kC,MCCEC,EAAc,MAG1B,WAAAC,CAAAC,G,wDACCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAavB,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNN,KAAKO,c,EAIb,MAAAC,GACC,OACCP,EAACQ,EAAI,CAAAC,IAAA,2CAACC,MAAOX,KAAKC,EAAEW,QAAQvB,EAAiBC,OAC3CU,KAAKT,MAAQU,EAAA,KAAGU,MAAOtB,EAAiBE,OAAQS,KAAKT,OAAa,KACnEU,EAAA,OAAAS,IAAA,2CAAKC,MAAOtB,EAAiBG,KAAMqB,KAAK,OAAM,aAAab,KAAKc,WAC/Db,EAAA,QAAAS,IAAA,8C,CAUJ,kBAAMH,GACLQ,EAAiBf,KAAKc,UAA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AC,IAAA,2CAACC,MAAOX,KAAKC,EAAEW,QAAQyB,EAAiB/C,MAAO8B,MAAOpB,KAAKoB,MAAOE,KAAMtB,KAAKsB,MAChFtB,KAAKC,EAAE2B,QAAQ,SACf3B,EAAA,QAAAS,IAAA,2CAAMhB,KAAK,SAEZO,EAAA,QAAAS,IAAA,2CAAM6B,GAAIvC,KAAK+B,UAAWpB,MAAO0B,EAAiBG,SACjDvC,EAAA,QAAAS,IAAA,8C,CAUJ,gBAAM+B,GACL,OAAOzC,KAAK+B,S","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as s,a as i,g as e}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as s,a as i,g as e}from"./p-2ee042d4.js";import{T as o,a,b as h}from"./p-76d604c6.js";import{c as n}from"./p-ea7fdd2e.js";import"./p-5aad3497.js";import"./p-92f420cb.js";import"./p-e0e2e9c1.js";const r=class{constructor(s){t(this,s);this.color=o.PRIMARY;this.size=a._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 s(i,{key:"965998f4788ddd5dffd01b53073a001023cd9037",class:h.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!n(this.isVisible),"is-visible":this.isVisible},s("slot",{key:"fe9d1ee13a11077947492341836f8f25c1f8881f"}),this.persist?s("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},s("gov-icon",{slot:"icon-start",name:"x-lg",type:"components"})):null)}get host(){return e(this)}static get watchers(){return{isVisible:["visibleContent"]}}};export{r as gov_tooltip_content};
|
|
2
|
+
//# sourceMappingURL=p-7baee44f.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as e,a as s,g as i}from"./p-2ee042d4.js";import{v as a}from"./p-0b3574c2.js";import{S as r}from"./p-92f420cb.js";import{p as o}from"./p-e0e2e9c1.js";import{g as n}from"./p-ea7fdd2e.js";import"./p-e8ec030e.js";const p=o(r,["_2XS","_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL"]);var c;(function(t){t["NONE"]="none";t["SM"]="sm";t["MD"]="md";t["LG"]="lg";t["XL"]="xl"})(c||(c={}));const d={root:"gov-spacer"};const h=class{constructor(e){t(this,e);this.size=undefined;this.breakpoint=undefined;this.h=n(this.host)}validateSize(t){a(p,t,d.root)}validateBreakpoint(t){a(c,t,d.root)}componentWillLoad(){this.validateSize(this.size);this.validateBreakpoint(this.breakpoint)}render(){return e(s,{key:"23aedb7f3b112a356319aba076eedf9a4743e25b",class:this.h.classes(d.root),size:this.size,breakpoint:this.breakpoint})}get host(){return i(this)}static get watchers(){return{size:["validateSize"],breakpoint:["validateBreakpoint"]}}};export{h as gov_spacer};
|
|
2
|
+
//# sourceMappingURL=p-7dfb7e36.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,h as e,a as i,g as t}from"./p-2ee042d4.js";import{a}from"./p-880743a5.js";import{g as d}from"./p-ea7fdd2e.js";const r=class{constructor(e){s(this,e);this.size="12/12";this.sizeSm=undefined;this.sizeMd=undefined;this.sizeLg=undefined;this.sizeXl=undefined;this.h=d(this.host)}render(){return e(i,{key:"e1dc6e3517618361ab3b5e3ad499a5bbbaae3d6a",class:this.h.classes(a.root),role:"listitem",size:this.size,"size-sm":this.sizeSm,"size-md":this.sizeMd,"size-lg":this.sizeLg,"size-xl":this.sizeXl},e("slot",{key:"53780db95fa728f252302cb86923ad9e9fcd9b66"}))}get host(){return t(this)}};export{r as gov_grid_item};
|
|
2
|
+
//# sourceMappingURL=p-8bb6c816.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GovGridItem","constructor","hostRef","this","h","govHost","host","render","Host","key","class","classes","GridItemClass","root","role","size","sizeSm","sizeMd","sizeLg","sizeXl"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid-item.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridItemClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid-item',\n})\nexport class GovGridItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovGridItemElement\n\t/**\n\t * Cell size as a fraction of 1/12 of the grid size\n\t */\n\t@Prop() readonly size: string = '12/12'\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-sm' }) readonly sizeSm: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-md' }) readonly sizeMd: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-lg' }) readonly sizeLg: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-xl' }) readonly sizeXl: string\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(GridItemClass.root)}\n\t\t\t\trole=\"listitem\"\n\t\t\t\tsize={this.size}\n\t\t\t\tsize-sm={this.sizeSm}\n\t\t\t\tsize-md={this.sizeMd}\n\t\t\t\tsize-lg={this.sizeLg}\n\t\t\t\tsize-xl={this.sizeXl}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["GovGridItem","constructor","hostRef","this","h","govHost","host","render","Host","key","class","classes","GridItemClass","root","role","size","sizeSm","sizeMd","sizeLg","sizeXl"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid-item.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridItemClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid-item',\n})\nexport class GovGridItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovGridItemElement\n\t/**\n\t * Cell size as a fraction of 1/12 of the grid size\n\t */\n\t@Prop() readonly size: string = '12/12'\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-sm' }) readonly sizeSm: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-md' }) readonly sizeMd: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-lg' }) readonly sizeLg: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-xl' }) readonly sizeXl: string\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(GridItemClass.root)}\n\t\t\t\trole=\"listitem\"\n\t\t\t\tsize={this.size}\n\t\t\t\tsize-sm={this.sizeSm}\n\t\t\t\tsize-md={this.sizeMd}\n\t\t\t\tsize-lg={this.sizeLg}\n\t\t\t\tsize-xl={this.sizeXl}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"kIAQaA,EAAW,MAGvB,WAAAC,CAAAC,G,oBAQgC,Q,wFAP/BC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAyBvB,MAAAC,GACC,OACCH,EAACI,EAAI,CAAAC,IAAA,2CACJC,MAAOP,KAAKC,EAAEO,QAAQC,EAAcC,MACpCC,KAAK,WACLC,KAAMZ,KAAKY,KAAI,UACNZ,KAAKa,OAAM,UACXb,KAAKc,OAAM,UACXd,KAAKe,OAAM,UACXf,KAAKgB,QAEdf,EAAA,QAAAK,IAAA,6C","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,d as i,h as s,a,g as t}from"./p-2ee042d4.js";import{g as d,b as o}from"./p-ea7fdd2e.js";import{c}from"./p-cd6c2938.js";import{v as n}from"./p-29ac15d2.js";import{c as r}from"./p-e8ec030e.js";import{d as f}from"./p-e0e2e9c1.js";import"./p-2aedc81e.js";var h;(function(e){e["HORIZONTAL"]="horizontal";e["VERTICAL"]="vertical"})(h||(h={}));const l={root:"gov-card",header:"gov-card__header",arrow:"gov-card__arrow",inner:"gov-card__inner",img:"gov-card__img",icon:"gov-card__icon",content:"gov-card__content",footer:"gov-card__footer"};const b=class{constructor(s){e(this,s);this.govToggle=i(this,"gov-toggle",7);this.hydrated=false;this.direction="vertical";this.collapsible=false;this.open=true;this.accessibleTriggerLabel=undefined;this.accessibleTriggerLabelledBy=undefined;this.h=d(this.host);this.headlineId=c("GovCardHeadline");this.contentId=c("GovCardContent")}async componentDidRender(){if(r()){await f(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){return s(a,{key:"16ef4ffbb0a84bb231008f4f52a4ffe1f2f809d8",class:this.h.classes(l.root),open:this.open,collapsible:o(this.collapsible),direction:this.direction,hydrated:this.hydrated},this.collapsible?s("button",{id:this.headlineId,class:l.header,"aria-label":this.accessibleTriggerLabel,"aria-labelledby":this.accessibleTriggerLabelledBy,"aria-expanded":o(this.open),"aria-controls":this.contentId,onClick:this.onClickHandler.bind(this)},s("slot",{name:"headline"}),s("gov-icon",{class:l.arrow,name:"chevron-down",type:"components"})):this.h.hasSlot("headline")?s("div",{class:l.header},s("slot",{name:"headline"})):null,s("div",{key:"749f6e4b624f4cdda53d2e3433b451d56c742667",class:l.inner,id:this.contentId,"aria-hidden":this.collapsible?o(!this.open):undefined,hidden:this.collapsible?!this.open:undefined,"aria-labelledby":this.collapsible?this.headlineId:undefined},this.h.hasSlot("img")&&s("div",{key:"f4b953ddf9b4f59bc111b512bb3de3510b28af7f",class:l.img},s("slot",{key:"2867a29e49e67aff041ac0705527c5f76f4a019e",name:"img"})),this.h.hasSlot("icon")&&s("div",{key:"8c8e55d3faff7cfbd6abe698cd8801f7fc41dbad",class:l.icon},s("slot",{key:"4d9eaeb0b3af65e4bf5de75090f9346942069e86",name:"icon"})),s("div",{key:"77a9a065fb2803b5f39f1b5716d9810c04b6971b",class:l.content},s("slot",{key:"acec7d3d4b6ac5533e5df218fe38e26147c440d8"})),this.h.hasSlot("footer")&&s("div",{key:"1e63a0811f487e18cbbef8b045651c0e5b745f37",class:l.footer},s("slot",{key:"4bffc12bffb3e29527aad38b6edbe8c00527a843",name:"footer"}))))}onClickHandler(e){e.stopPropagation();if(this.collapsible){this.open=!this.open;this.govToggle.emit({open:this.open,element:this.host})}}async validateAccessibility(){if(this.collapsible){n(this.accessibleTriggerLabel,this.accessibleTriggerLabelledBy,l.root,this.host)}}get host(){return t(this)}};export{b as gov_card};
|
|
2
|
+
//# sourceMappingURL=p-8cc5ad01.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CardDirection","CardClass","root","header","arrow","inner","img","icon","content","footer","GovCard","constructor","hostRef","this","hydrated","h","govHost","host","headlineId","createID","contentId","componentDidRender","canValidateWcagOnRender","delay","validateAccessibility","connectedCallback","render","Host","key","class","classes","open","collapsible","booleanString","direction","id","accessibleTriggerLabel","accessibleTriggerLabelledBy","onClick","onClickHandler","bind","name","type","hasSlot","undefined","hidden","e","stopPropagation","govToggle","emit","element","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-card/constants.ts","../../../packages/core/src/components/gov-card/gov-card.tsx"],"sourcesContent":["import {ValueOf} from \"../../types/interfaces\";\n\nexport enum CardDirection {\n\tHORIZONTAL = 'horizontal',\n\tVERTICAL = 'vertical',\n}\nexport type CardDirectionType = `${ValueOf<typeof CardDirection>}`\n\nexport const CardClass = {\n\troot: 'gov-card',\n\theader: 'gov-card__header',\n\tarrow: 'gov-card__arrow',\n\tinner: 'gov-card__inner',\n\timg: 'gov-card__img',\n\ticon: 'gov-card__icon',\n\tcontent: 'gov-card__content',\n\tfooter: 'gov-card__footer',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {CardClass, CardDirectionType} from './constants'\nimport {booleanString, govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {createID} from '../../utils/string.utils'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {GovCardChangeEvent} from './interfaces'\n\n@Component({\n\ttag: 'gov-card',\n})\nexport class GovCard {\n\tprivate h: GovHost\n\tprivate readonly headlineId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.headlineId = createID('GovCardHeadline')\n\t\tthis.contentId = createID('GovCardContent')\n\t}\n\n\t@Element() host: HTMLGovCardElement\n\n\t/**\n\t * Card direction\n\t */\n\t@Prop() readonly direction: CardDirectionType = \"vertical\"\n\t/**\n\t * Defines weather the card can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the card is open or closed\n\t */\n\t@Prop({reflect: true, mutable: true}) open = true\n\t/**\n\t * Adds accessible label for the collapsible button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) accessibleTriggerLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for collapsible card\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) accessibleTriggerLabelledBy: string\n\t/**\n\t * Called when the card toggle state changes\n\t */\n\t@Event({eventName: 'gov-toggle'}) govToggle: EventEmitter<GovCardChangeEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(CardClass.root)} open={this.open}\n\t\t\t\t collapsible={booleanString(this.collapsible)} direction={this.direction} hydrated={this.hydrated}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\tid={this.headlineId}\n\t\t\t\t\t\tclass={CardClass.header}\n\t\t\t\t\t\taria-label={this.accessibleTriggerLabel}\n\t\t\t\t\t\taria-labelledby={this.accessibleTriggerLabelledBy}\n\t\t\t\t\t\taria-expanded={booleanString(this.open)}\n\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t\t<gov-icon class={CardClass.arrow} name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t\t</button>\n\t\t\t\t) : this.h.hasSlot(\"headline\") ? (\n\t\t\t\t\t<div class={CardClass.header}>\n\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t<div\n\t\t\t\t\tclass={CardClass.inner}\n\t\t\t\t\tid={this.contentId}\n\t\t\t\t\taria-hidden={this.collapsible ? booleanString(!this.open) : undefined}\n\t\t\t\t\thidden={this.collapsible ? !this.open : undefined}\n\t\t\t\t\taria-labelledby={this.collapsible ? this.headlineId : undefined}\n\t\t\t\t>\n\t\t\t\t\t{this.h.hasSlot('img') && (\n\t\t\t\t\t\t<div class={CardClass.img}>\n\t\t\t\t\t\t\t<slot name=\"img\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t<div class={CardClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class={CardClass.content}>\n\t\t\t\t\t\t<slot/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t<div class={CardClass.footer}>\n\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e) {\n\t\te.stopPropagation()\n\t\tif (this.collapsible) {\n\t\t\tthis.open = !this.open\n\t\t\tthis.govToggle.emit({open: this.open, element: this.host})\n\t\t}\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.collapsible) {\n\t\t\tvalidateAccessibleLabel(this.accessibleTriggerLabel, this.accessibleTriggerLabelledBy, CardClass.root, this.host)\n\t\t}\n\t}\n}\n"],"mappings":"yQAEA,IAAYA,GAAZ,SAAYA,GACXA,EAAA,2BACAA,EAAA,sBACA,EAHD,CAAYA,MAAa,KAMlB,MAAMC,EAAY,CACxBC,KAAM,WACNC,OAAQ,mBACRC,MAAO,kBACPC,MAAO,kBACPC,IAAK,gBACLC,KAAM,iBACNC,QAAS,oBACTC,OAAQ,oB,MCHIC,EAAO,MAMnB,WAAAC,CAAAC,G,gDAFQC,KAAAC,SAAW,M,eAa6B,W,iBAIR,M,UAIK,K,iFAlB5CD,KAAKE,EAAIC,EAAQH,KAAKI,MACtBJ,KAAKK,WAAaC,EAAS,mBAC3BN,KAAKO,UAAYD,EAAS,iB,CA8B3B,wBAAME,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNV,KAAKW,uB,EAIb,iBAAAC,GACCZ,KAAKC,SAAW,I,CAGjB,MAAAY,GACC,OACCX,EAACY,EAAI,CAAAC,IAA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AK,a,CAQT,cAAAF,CAAeO,GACtBA,EAAEC,kBACF,GAAIlC,KAAKmB,YAAa,CACrBnB,KAAKkB,MAAQlB,KAAKkB,KAClBlB,KAAKmC,UAAUC,KAAK,CAAClB,KAAMlB,KAAKkB,KAAMmB,QAASrC,KAAKI,M,EAQtD,2BAAMO,GACL,GAAIX,KAAKmB,YAAa,CACrBmB,EAAwBtC,KAAKuB,uBAAwBvB,KAAKwB,4BAA6BpC,EAAUC,KAAMW,KAAKI,K","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,d as i,h as t,a as e,g as a}from"./p-2ee042d4.js";import{v as o}from"./p-29ac15d2.js";import{c as r}from"./p-e8ec030e.js";import{g as c}from"./p-ea7fdd2e.js";import{t as d}from"./p-26618322.js";import"./p-cd6c2938.js";import"./p-2aedc81e.js";import"./p-e0e2e9c1.js";const h={root:"gov-backdrop",bg:"gov-backdrop__background"};const p=class{constructor(t){s(this,t);this.govClick=i(this,"gov-click",7);this.inverse=false;this.disabled=false;this.accessibleLabel=undefined;this.accessibleLabelledBy=undefined;this.h=c(this.host)}async componentDidRender(){if(r()){d((()=>this.validateAccessibility()))}}render(){return t(e,{key:"ee25a6a3443604253f1fa10676007aad3838f4d9",class:this.h.classes(h.root),inverse:this.inverse},t("div",{key:"fd733ec0c2f6599ce7fe360092990f4c7f0973a1",role:"button","aria-disabled":this.disabled,"aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy,onClick:s=>{if(!this.disabled){this.govClick.emit(s)}},class:h.bg}))}async validateAccessibility(){o(this.accessibleLabel,this.accessibleLabelledBy,h.root,this.host)}get host(){return a(this)}};export{p as gov_backdrop};
|
|
2
|
+
//# sourceMappingURL=p-906865d0.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BackdropClass","root","bg","GovBackdrop","constructor","hostRef","this","h","govHost","host","componentDidRender","canValidateWcagOnRender","tick","validateAccessibility","render","Host","key","class","classes","inverse","role","disabled","accessibleLabel","accessibleLabelledBy","onClick","e","govClick","emit","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__background',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {BackdropClass} from './constants'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-backdrop',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBackdropElement\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background.\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Makes the backdrop component disabled.\n\t */\n\t@Prop({reflect: true, mutable: true}) readonly disabled: boolean = false\n\t/**\n\t * Adds accessible label for the backdrop that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) readonly accessibleLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) readonly accessibleLabelledBy: string\n\t/**\n\t * Emitted when button clicks.\n\t */\n\t@Event({eventName: 'gov-click'}) govClick: EventEmitter<MouseEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BackdropClass.root)} inverse={this.inverse}>\n\t\t\t\t<div\n\t\t\t\t\trole={'button'}\n\t\t\t\t\taria-disabled={this.disabled}\n\t\t\t\t\taria-label={this.accessibleLabel}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy}\n\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\tif (!this.disabled) {\n\t\t\t\t\t\t\tthis.govClick.emit(e)\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclass={BackdropClass.bg}\n\t\t\t\t></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BackdropClass.root, this.host)\n\t}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["BackdropClass","root","bg","GovBackdrop","constructor","hostRef","this","h","govHost","host","componentDidRender","canValidateWcagOnRender","tick","validateAccessibility","render","Host","key","class","classes","inverse","role","disabled","accessibleLabel","accessibleLabelledBy","onClick","e","govClick","emit","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__background',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {BackdropClass} from './constants'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-backdrop',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBackdropElement\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background.\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Makes the backdrop component disabled.\n\t */\n\t@Prop({reflect: true, mutable: true}) readonly disabled: boolean = false\n\t/**\n\t * Adds accessible label for the backdrop that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) readonly accessibleLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) readonly accessibleLabelledBy: string\n\t/**\n\t * Emitted when button clicks.\n\t */\n\t@Event({eventName: 'gov-click'}) govClick: EventEmitter<MouseEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BackdropClass.root)} inverse={this.inverse}>\n\t\t\t\t<div\n\t\t\t\t\trole={'button'}\n\t\t\t\t\taria-disabled={this.disabled}\n\t\t\t\t\taria-label={this.accessibleLabel}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy}\n\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\tif (!this.disabled) {\n\t\t\t\t\t\t\tthis.govClick.emit(e)\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclass={BackdropClass.bg}\n\t\t\t\t></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BackdropClass.root, this.host)\n\t}\n}\n"],"mappings":"wRAAO,MAAMA,EAAgB,CAC5BC,KAAM,eACNC,GAAI,4B,MCSQC,EAAW,MAGvB,WAAAC,CAAAC,G,2DAQoC,M,cAI+B,M,mEAXlEC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAyBvB,wBAAMC,GACL,GAAIC,IAA2B,CAC9BC,GAAK,IAAMN,KAAKO,yB,EAIlB,MAAAC,GACC,OACCP,EAACQ,EAAI,CAAAC,IAAA,2CAACC,MAAOX,KAAKC,EAAEW,QAAQlB,EAAcC,MAAOkB,QAASb,KAAKa,SAC9DZ,EAAA,OAAAS,IAAA,2CACCI,KAAM,SAAQ,gBACCd,KAAKe,SAAQ,aAChBf,KAAKgB,gBAAe,kBACfhB,KAAKiB,qBACtBC,QAASC,IACR,IAAKnB,KAAKe,SAAU,CACnBf,KAAKoB,SAASC,KAAKF,E,GAGrBR,MAAOjB,EAAcE,K,CAUzB,2BAAMW,GACLe,EAAwBtB,KAAKgB,gBAAiBhB,KAAKiB,qBAAsBvB,EAAcC,KAAMK,KAAKG,K","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as s,
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as s,d as t,h as a,a as e,g as i}from"./p-2ee042d4.js";import{v as o}from"./p-0b3574c2.js";import{W as r,a as c,b as d}from"./p-c61a5830.js";import{g as p}from"./p-ea7fdd2e.js";import{v as h}from"./p-29ac15d2.js";import{c as m}from"./p-e8ec030e.js";import{d as n}from"./p-e0e2e9c1.js";import"./p-5aad3497.js";import"./p-92f420cb.js";import"./p-cd6c2938.js";import"./p-2aedc81e.js";const f=class{constructor(a){s(this,a);this.govChange=t(this,"gov-change",7);this.hydrated=false;this.size="m";this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.h=p(this.host)}validateSize(s){o(d,s,c.root)}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.host.querySelectorAll(r.root).forEach((s=>{s.setAttribute("size",this.size)}))}async componentDidRender(){if(m()){await n(500);await this.validateWcag()}}connectedCallback(){this.hydrated=true}render(){return a(e,{key:"d75ce2d5499cef41ac6b316f313b0c5c446d0b55",class:this.h.classes(c.root),role:"list",size:this.size,hydrated:this.hydrated},a("slot",{key:"ea151639d058fa4e50427a893fa167969a453d39"}))}async validateWcag(){h(this.wcagLabel,this.wcagLabelledBy,c.root)}get host(){return i(this)}static get watchers(){return{size:["validateSize"]}}};export{f as gov_wizard};
|
|
2
|
+
//# sourceMappingURL=p-927c31dd.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as i,a as s,g as e}from"./p-2ee042d4.js";import{v as h}from"./p-0b3574c2.js";import{T as o,a as n,b as a,c as r,d as f}from"./p-76d604c6.js";import{c}from"./p-cd6c2938.js";import{g as d}from"./p-ea7fdd2e.js";import{d as l}from"./p-e8ec030e.js";import{t as p}from"./p-26618322.js";import"./p-5aad3497.js";import"./p-92f420cb.js";import"./p-e0e2e9c1.js";const m=class{constructor(i){t(this,i);this.tooltipContentId=undefined;this.tooltipId=undefined;this.color=o.PRIMARY;this.size=n._M;this.position="right";this.message=undefined;this.identifier=undefined;this.icon=undefined;this.persist=false;this.h=d(this.host);this.tooltipId=c("GovTooltip");this.tooltipContentId=c("GovContentTooltip")}validateColor(t){h(o,t,f.root)}validateSize(t){h(n,t,f.root)}validatePosition(t){h(r,t,f.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 t;if(this.tooltipContent){if(this.message){this.tooltipContent.innerHTML=this.message}else if(this.insideContent){this.tooltipContent.innerHTML=this.insideContent.innerHTML}return}let i;if(this.insideContent){i=this.insideContent}else{i=l().createElement(a.root);i.innerHTML=this.message}i.setAttribute("id",(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId);i.setAttribute("parent-id",this.tooltipId);i.setAttribute("color",this.color);i.setAttribute("size",this.size);l().body.appendChild(i)}get tooltipContent(){var t;return l().body.querySelector(`#${(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId}`)}get insideContent(){return this.host.querySelector(a.root)}registerListeners(){this.host.addEventListener("click",(t=>{t.preventDefault();this.persist=true;if(this.tooltipContent){this.tooltipContent.setAttribute("persist","true")}this.showTooltip()}));this.host.addEventListener("mouseenter",(t=>{t.preventDefault();this.showTooltip()}));this.host.addEventListener("mouseleave",(t=>{t.preventDefault();if(this.persist===false){this.hideTooltip()}}))}verifyPositionSpace(){const t=12;const i=window.innerWidth-(window.innerWidth-document.documentElement.clientWidth);const s=this.host.getBoundingClientRect();const e=this.host.offsetWidth;const h=this.host.offsetHeight;const o=this.tooltipContent.offsetWidth;const n=this.tooltipContent.offsetHeight;const a={left:s.left+document.documentElement.scrollLeft,top:s.top+document.documentElement.scrollTop};const f=a.left+t+s.width+o<=i;const c=a.left>o;if(this.position===r.LEFT||this.position===r.RIGHT){this.tooltipContent.style.top=a.top-(n-h)/2+"px";if(f===false&&c===false){this.position=r.TOP;this.tooltipContent.setAttribute("position",r.TOP)}if(c&&f===false&&this.position===r.RIGHT){this.position=r.LEFT}if(f&&c===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+t+s.width+"px"}if(this.position===r.LEFT){this.tooltipContent.setAttribute("position",r.LEFT);this.tooltipContent.style.left=a.left-(o+t)+"px"}if(this.position===r.TOP||this.position===r.BOTTOM){if(o>e){let s=a.left-(o-e)/2;const h=s<0;const n=s+o>i;if(h&&n){this.tooltipContent.style.width="auto";this.tooltipContent.style.left=t+"px";this.tooltipContent.style.right=t+"px"}else{if(h){s=t}if(n){s=s-(i-(s+o+t))*-1}this.tooltipContent.style.left=s+"px"}}else{const t=a.left+(e-o)/2;this.tooltipContent.style.left=t+"px"}}if(this.position===r.TOP){this.tooltipContent.setAttribute("position",r.TOP);this.tooltipContent.style.top=a.top-(n+t)+"px"}if(this.position===r.BOTTOM){this.tooltipContent.setAttribute("position",r.BOTTOM);this.tooltipContent.style.top=a.top+(h+t)+"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 t=document.getElementById(this.tooltipContentId);if(t){t.remove()}}render(){var t;return i(s,{key:"2e96da1a9d7afd70abb4ffd2e979210cc179680e",id:this.tooltipId,class:this.h.classes(f.root),position:this.position},i("span",{key:"9c9c06d716556faa56f5ba9a952ea867c5533b2b",role:"button",tabindex:0,onKeyPress:()=>this.showTooltip(),onBlur:()=>{if(this.persist===false){this.hideTooltip()}},"aria-describedby":(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId},i("slot",{key:"29549049c0bfbe311980aa6a630ff9eff8e35f40"})))}async show(){this.showTooltip()}async hide(){this.persist=false;this.hideTooltip()}get host(){return e(this)}static get watchers(){return{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}}};export{m as gov_tooltip};
|
|
2
|
+
//# sourceMappingURL=p-967a1094.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GovTooltip","constructor","hostRef","this","tooltipContentId","undefined","tooltipId","TooltipColors","PRIMARY","TooltipSize","_M","h","govHost","host","createID","validateColor","newValue","validateProp","TooltipClass","root","validateSize","validatePosition","TooltipPosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","color","size","position","componentDidUpdate","disconnectedCallback","removeContent","tooltipContent","message","innerHTML","insideContent","content","documentNode","createElement","TooltipContentClass","setAttribute","_a","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","persist","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":"2XAsBaA,EAAU,MAKtB,WAAAC,CAAAC,G,UAHiBC,KAAAC,iBAAmBC,UACnBF,KAAAG,UAAYD,U,WAYeE,EAAcC,Q,UAIhBC,EAAYC,G,cAIC,Q,aAIpBL,U,oCAQaA,U,aAE7B,MA/BlBF,KAAKQ,EAAIC,EAAQT,KAAKU,MACtBV,KAAKG,UAAYQ,EAAS,cAC1BX,KAAKC,iBAAmBU,EAAS,oB,CAgClC,aAAAC,CAAcC,GACbC,EAAaV,EAAeS,EAAUE,EAAaC,K,CAIpD,YAAAC,CAAaJ,GACZC,EAAaR,EAAaO,EAAUE,EAAaC,K,CAIlD,gBAAAE,CAAiBL,GAChBC,EAAaK,EAAiBN,EAAUE,EAAaC,K,CAItD,eAAAI,GACCpB,KAAKqB,sB,CAGN,iBAAAC,GACCtB,KAAKqB,uBACLrB,KAAKuB,mB,CAGN,iBAAAC,GACCxB,KAAKY,cAAcZ,KAAKyB,OACxBzB,KAAKiB,aAAajB,KAAK0B,MACvB1B,KAAKkB,iBAAiBlB,KAAK2B,S,CAG5B,kBAAAC,GACC5B,KAAKqB,sB,CAGN,oBAAAQ,GACC7B,KAAK8B,e,CAGE,oBAAAT,G,MACP,GAAIrB,KAAK+B,eAAgB,CACxB,GAAI/B,KAAKgC,QAAS,CACjBhC,KAAK+B,eAAeE,UAAYjC,KAAKgC,O,MAC/B,GAAIhC,KAAKkC,cAAe,CAC9BlC,KAAK+B,eAAeE,UAAYjC,KAAKkC,cAAcD,S,CAEpD,M,CAGD,IAAIE,EACJ,GAAInC,KAAKkC,cAAe,CACvBC,EAAUnC,KAAKkC,a,KACT,CACNC,EAAUC,IAAeC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MACC,OACCnF,EAACoF,EAAI,CAAAC,IAAA,2CACJC,GAAI9F,KAAKG,UACT4F,MAAO/F,KAAKQ,EAAEwF,QAAQjF,EAAaC,MACnCW,SAAU3B,KAAK2B,UACfnB,EAAA,QAAAqF,IAAA,2CAAMI,KAAM,SACTC,SAAU,EACVC,WAAY,IAAMnG,KAAKiD,cACvBmD,OAAQ,KACP,GAAIpG,KAAKgD,UAAY,MAAO,CAC3BhD,KAAKkD,a,GAEN,oBACiBV,EAAAxC,KAAKyC,cAAU,MAAAD,SAAA,EAAAA,EAAIxC,KAAKC,kBAAkBO,EAAA,QAAAqF,IAAA,8C,CASlE,UAAMQ,GACLrG,KAAKiD,a,CAON,UAAMqD,GACLtG,KAAKgD,QAAU,MACfhD,KAAKkD,a","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["GovTooltip","constructor","hostRef","this","tooltipContentId","undefined","tooltipId","TooltipColors","PRIMARY","TooltipSize","_M","h","govHost","host","createID","validateColor","newValue","validateProp","TooltipClass","root","validateSize","validatePosition","TooltipPosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","color","size","position","componentDidUpdate","disconnectedCallback","removeContent","tooltipContent","message","innerHTML","insideContent","content","documentNode","createElement","TooltipContentClass","setAttribute","_a","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","persist","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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