@gov-design-system-ce/components 0.0.37 → 0.0.39
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/{constants-245999e7.js → constants-ff12205f.js} +1 -1
- package/dist/cjs/constants-ff12205f.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{form-8c6daa83.js → form-f68d13c6.js} +7 -7
- package/dist/cjs/form-f68d13c6.js.map +1 -0
- package/dist/cjs/gov-accordion.cjs.entry.js +2 -2
- package/dist/cjs/gov-alert.cjs.entry.js +2 -2
- package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-app.cjs.entry.js +113 -201
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +2 -2
- package/dist/cjs/gov-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/gov-badge.cjs.entry.js +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +2 -2
- package/dist/cjs/gov-button.cjs.entry.js +3 -3
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +2 -2
- package/dist/cjs/gov-control-group.cjs.entry.js +5 -25
- package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +129 -0
- package/dist/cjs/gov-dropdown.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-input.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-radio.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-select.cjs.entry.js +9 -4
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +3 -3
- package/dist/cjs/gov-icon.cjs.entry.js +2 -2
- package/dist/cjs/gov-modal.cjs.entry.js +2 -2
- package/dist/cjs/gov-nav.cjs.entry.js +2 -2
- package/dist/cjs/gov-pagination.cjs.entry.js +2 -2
- package/dist/cjs/gov-prompt.cjs.entry.js +2 -2
- package/dist/cjs/gov-side-nav.cjs.entry.js +2 -2
- package/dist/cjs/gov-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/gov-tabs.cjs.entry.js +2 -2
- package/dist/cjs/gov-wizzard.cjs.entry.js +2 -2
- package/dist/cjs/index-29ac07f6.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{wcag-6efc0ab7.js → wcag-b0321f09.js} +2 -2
- package/dist/cjs/{wcag-6efc0ab7.js.map → wcag-b0321f09.js.map} +1 -1
- package/dist/cjs/{win-84bda0aa.js → win-53f637d4.js} +3 -2
- package/dist/cjs/win-53f637d4.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.css +3 -0
- package/dist/collection/components/gov-accordion/gov-accordion.css +3 -0
- package/dist/collection/components/gov-alert/gov-alert.css +3 -0
- package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
- package/dist/collection/components/gov-app/gov-app.css +3 -0
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -0
- package/dist/collection/components/gov-attachments/gov-attachments.css +3 -0
- package/dist/collection/components/gov-backdrop/gov-backdrop.css +3 -0
- package/dist/collection/components/gov-badge/gov-badge.css +3 -0
- package/dist/collection/components/gov-badge/gov-badge.js +4 -4
- package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +3 -0
- package/dist/collection/components/gov-button/{constants.js → default/constants.js} +3 -3
- package/dist/collection/components/gov-button/default/constants.js.map +1 -0
- package/dist/collection/components/gov-button/{gov-button.css → default/gov-button.css} +3 -0
- package/dist/collection/components/gov-button/{gov-button.js → default/gov-button.js} +7 -7
- package/dist/collection/components/gov-button/default/gov-button.js.map +1 -0
- package/dist/collection/components/gov-button/default/gov-button.types.js.map +1 -0
- package/dist/collection/components/gov-button/dropdown/constants.js +10 -0
- package/dist/collection/components/gov-button/dropdown/constants.js.map +1 -0
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.css +263 -0
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +148 -0
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js.map +1 -0
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.types.js +2 -0
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.types.js.map +1 -0
- package/dist/collection/components/gov-card/gov-card.css +3 -0
- package/dist/collection/components/gov-container/gov-container.css +3 -0
- package/dist/collection/components/gov-control-group/gov-control-group.css +9 -18
- package/dist/collection/components/gov-control-group/gov-control-group.js +10 -64
- package/dist/collection/components/gov-control-group/gov-control-group.js.map +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +3 -0
- package/dist/collection/components/gov-empty/gov-empty.css +3 -0
- package/dist/collection/components/gov-error-code/gov-error-code.css +3 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +3 -0
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +3 -0
- package/dist/collection/components/gov-form/control/gov-form-control.css +3 -0
- package/dist/collection/components/gov-form/file/gov-form-file.css +3 -0
- package/dist/collection/components/gov-form/group/gov-form-group.css +3 -0
- package/dist/collection/components/gov-form/input/gov-form-input.css +3 -0
- package/dist/collection/components/gov-form/label/gov-form-label.css +3 -0
- package/dist/collection/components/gov-form/message/gov-form-message.css +3 -0
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +3 -0
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +3 -0
- package/dist/collection/components/gov-form/radio/gov-form-radio.css +3 -0
- package/dist/collection/components/gov-form/search/gov-form-search.css +3 -0
- package/dist/collection/components/gov-form/select/gov-form-select.css +3 -0
- package/dist/collection/components/gov-form/select/gov-form-select.js +6 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.css +3 -0
- package/dist/collection/components/gov-grid/gov-grid-item.css +3 -0
- package/dist/collection/components/gov-grid/gov-grid.css +3 -0
- package/dist/collection/components/gov-icon/gov-icon.css +3 -0
- package/dist/collection/components/gov-icon/list.js +10 -0
- package/dist/collection/components/gov-icon/list.js.map +1 -1
- package/dist/collection/components/gov-layout/gov-layout-column.css +3 -0
- package/dist/collection/components/gov-layout/gov-layout.css +3 -0
- package/dist/collection/components/gov-loading/loading/gov-loading.css +3 -0
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +3 -0
- package/dist/collection/components/gov-message/gov-message.css +3 -0
- package/dist/collection/components/gov-modal/gov-modal.css +3 -0
- package/dist/collection/components/gov-nav/gov-nav-item.css +3 -0
- package/dist/collection/components/gov-nav/gov-nav.css +3 -0
- package/dist/collection/components/gov-pagination/gov-pagination.css +3 -0
- package/dist/collection/components/gov-promp/gov-prompt.css +3 -0
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +3 -0
- package/dist/collection/components/gov-side-nav/gov-side-nav.css +3 -0
- package/dist/collection/components/gov-spacer/gov-spacer.css +3 -0
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +3 -0
- package/dist/collection/components/gov-statsbar/gov-statsbar.css +3 -0
- package/dist/collection/components/gov-stepper/gov-stepper-item.css +3 -0
- package/dist/collection/components/gov-stepper/gov-stepper.css +3 -0
- package/dist/collection/components/gov-tabs/gov-tabs-item.css +3 -0
- package/dist/collection/components/gov-tabs/gov-tabs.css +3 -0
- package/dist/collection/components/gov-tile/container/gov-tiles.css +3 -0
- package/dist/collection/components/gov-tile/gov-tile.css +3 -0
- package/dist/collection/components/gov-toast/gov-toast.css +3 -0
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +3 -0
- package/dist/collection/components/gov-tooltip/gov-tooltip.css +3 -0
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +3 -0
- package/dist/collection/components/gov-wizzard/gov-wizzard.css +3 -0
- package/dist/collection/helpers/Dom/win.js +2 -1
- package/dist/collection/helpers/Dom/win.js.map +1 -1
- package/dist/collection/pages/Alert.js +1 -1
- package/dist/collection/pages/Alert.js.map +1 -1
- package/dist/collection/pages/Button.js +65 -41
- package/dist/collection/pages/Button.js.map +1 -1
- package/dist/collection/pages/ControlGroup.js +33 -151
- package/dist/collection/pages/ControlGroup.js.map +1 -1
- package/dist/collection/pages/Spacer.js +14 -8
- package/dist/collection/pages/Spacer.js.map +1 -1
- package/dist/components/constants3.js +1 -1
- package/dist/components/constants3.js.map +1 -1
- package/dist/components/form.js +10 -10
- package/dist/components/form.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -0
- package/dist/components/gov-accordion-item.js.map +1 -1
- package/dist/components/gov-accordion.js +1 -0
- package/dist/components/gov-accordion.js.map +1 -1
- package/dist/components/gov-alert.js +1 -0
- package/dist/components/gov-alert.js.map +1 -1
- package/dist/components/gov-app.js +114 -201
- package/dist/components/gov-app.js.map +1 -1
- package/dist/components/gov-attachments-item2.js +1 -0
- package/dist/components/gov-attachments-item2.js.map +1 -1
- package/dist/components/gov-attachments2.js +1 -0
- package/dist/components/gov-attachments2.js.map +1 -1
- package/dist/components/gov-backdrop2.js +1 -0
- package/dist/components/gov-backdrop2.js.map +1 -1
- package/dist/components/gov-badge2.js +2 -1
- package/dist/components/gov-badge2.js.map +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -0
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button2.js +2 -1
- package/dist/components/gov-button2.js.map +1 -1
- package/dist/components/gov-card.js +1 -0
- package/dist/components/gov-card.js.map +1 -1
- package/dist/components/gov-container.js +1 -0
- package/dist/components/gov-container.js.map +1 -1
- package/dist/components/gov-control-group.js +8 -25
- package/dist/components/gov-control-group.js.map +1 -1
- package/dist/components/gov-cookiebar.js +1 -0
- package/dist/components/gov-cookiebar.js.map +1 -1
- package/dist/components/gov-dropdown.d.ts +11 -0
- package/dist/components/gov-dropdown.js +144 -0
- package/dist/components/gov-dropdown.js.map +1 -0
- package/dist/components/gov-empty.js +1 -0
- package/dist/components/gov-empty.js.map +1 -1
- package/dist/components/gov-error-code.js +1 -0
- package/dist/components/gov-error-code.js.map +1 -1
- package/dist/components/gov-form-autocomplete2.js +1 -0
- package/dist/components/gov-form-autocomplete2.js.map +1 -1
- package/dist/components/gov-form-checkbox.js +1 -0
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-control.js +1 -0
- package/dist/components/gov-form-control.js.map +1 -1
- package/dist/components/gov-form-file.js +1 -0
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -0
- package/dist/components/gov-form-group.js.map +1 -1
- package/dist/components/gov-form-input2.js +1 -0
- package/dist/components/gov-form-input2.js.map +1 -1
- package/dist/components/gov-form-label.js +1 -0
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-message2.js +1 -0
- package/dist/components/gov-form-message2.js.map +1 -1
- package/dist/components/gov-form-multi-select.js +1 -0
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-password-power.js +1 -0
- package/dist/components/gov-form-password-power.js.map +1 -1
- package/dist/components/gov-form-radio.js +1 -0
- package/dist/components/gov-form-radio.js.map +1 -1
- package/dist/components/gov-form-search.js +1 -0
- package/dist/components/gov-form-search.js.map +1 -1
- package/dist/components/gov-form-select2.js +7 -1
- package/dist/components/gov-form-select2.js.map +1 -1
- package/dist/components/gov-form-switch.js +1 -0
- package/dist/components/gov-form-switch.js.map +1 -1
- package/dist/components/gov-grid-item.js +1 -0
- package/dist/components/gov-grid-item.js.map +1 -1
- package/dist/components/gov-grid.js +1 -0
- package/dist/components/gov-grid.js.map +1 -1
- package/dist/components/gov-icon2.js +2 -1
- package/dist/components/gov-icon2.js.map +1 -1
- package/dist/components/gov-layout-column.js +1 -0
- package/dist/components/gov-layout-column.js.map +1 -1
- package/dist/components/gov-layout.js +1 -0
- package/dist/components/gov-layout.js.map +1 -1
- package/dist/components/gov-loading.js +1 -0
- package/dist/components/gov-loading.js.map +1 -1
- package/dist/components/gov-message.js +1 -0
- package/dist/components/gov-message.js.map +1 -1
- package/dist/components/gov-modal.js +1 -0
- package/dist/components/gov-modal.js.map +1 -1
- package/dist/components/gov-nav-item.js +1 -0
- package/dist/components/gov-nav-item.js.map +1 -1
- package/dist/components/gov-nav.js +1 -0
- package/dist/components/gov-nav.js.map +1 -1
- package/dist/components/gov-pagination.js +1 -0
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-prompt.js +1 -0
- package/dist/components/gov-prompt.js.map +1 -1
- package/dist/components/gov-side-nav-item.js +1 -0
- package/dist/components/gov-side-nav-item.js.map +1 -1
- package/dist/components/gov-side-nav.js +1 -0
- package/dist/components/gov-side-nav.js.map +1 -1
- package/dist/components/gov-skeleton.js +1 -0
- package/dist/components/gov-skeleton.js.map +1 -1
- package/dist/components/gov-spacer.js +1 -0
- package/dist/components/gov-spacer.js.map +1 -1
- package/dist/components/gov-statsbar-item.js +1 -0
- package/dist/components/gov-statsbar-item.js.map +1 -1
- package/dist/components/gov-statsbar.js +1 -0
- package/dist/components/gov-statsbar.js.map +1 -1
- package/dist/components/gov-stepper-item.js +1 -0
- package/dist/components/gov-stepper-item.js.map +1 -1
- package/dist/components/gov-stepper.js +1 -0
- package/dist/components/gov-stepper.js.map +1 -1
- package/dist/components/gov-tabs-item.js +1 -0
- package/dist/components/gov-tabs-item.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -0
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tile.js +1 -0
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-tiles.js +1 -0
- package/dist/components/gov-tiles.js.map +1 -1
- package/dist/components/gov-toast.js +1 -0
- package/dist/components/gov-toast.js.map +1 -1
- package/dist/components/gov-tooltip-content.js +1 -0
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +1 -0
- package/dist/components/gov-tooltip.js.map +1 -1
- package/dist/components/gov-wizzard-item.js +1 -0
- package/dist/components/gov-wizzard-item.js.map +1 -1
- package/dist/components/gov-wizzard.js +1 -0
- package/dist/components/gov-wizzard.js.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/win.js +2 -1
- package/dist/components/win.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-6044a1e7.entry.js → p-02fb27e8.entry.js} +2 -2
- package/dist/core/p-0574a26a.entry.js +2 -0
- package/dist/core/{p-cc9e9a31.entry.js.map → p-0574a26a.entry.js.map} +1 -1
- package/dist/core/{p-a9c57f72.entry.js → p-070f9684.entry.js} +2 -2
- package/dist/core/p-09cda4ea.entry.js +2 -0
- package/dist/core/p-09cda4ea.entry.js.map +1 -0
- package/dist/core/p-0f5e2b0a.js +2 -0
- package/dist/core/{p-1bdec1f4.entry.js → p-14a475a8.entry.js} +2 -2
- package/dist/core/{p-fd555dce.entry.js → p-1c4ad772.entry.js} +2 -2
- package/dist/core/p-1c4ad772.entry.js.map +1 -0
- package/dist/core/{p-227a9e9b.entry.js → p-20cb0742.entry.js} +2 -2
- package/dist/core/{p-3e1a1bd4.entry.js → p-22222994.entry.js} +2 -2
- package/dist/core/{p-54b17f4d.entry.js → p-2e2be66b.entry.js} +2 -2
- package/dist/core/{p-ef7a1780.entry.js → p-2e94d2d3.entry.js} +2 -2
- package/dist/core/p-2f0f56fc.entry.js +2 -0
- package/dist/core/p-2f0f56fc.entry.js.map +1 -0
- package/dist/core/{p-3a69322b.entry.js → p-304f2d62.entry.js} +2 -2
- package/dist/core/p-304f2d62.entry.js.map +1 -0
- package/dist/core/p-34152b51.js +2 -0
- package/dist/core/p-34152b51.js.map +1 -0
- package/dist/core/p-34ed07f6.js +2 -0
- package/dist/core/p-34ed07f6.js.map +1 -0
- package/dist/core/{p-005bfb42.entry.js → p-3d7ea15c.entry.js} +2 -2
- package/dist/core/{p-cd869237.js → p-3dbf7f49.js} +2 -2
- package/dist/core/p-3dbf7f49.js.map +1 -0
- package/dist/core/{p-5e865538.entry.js → p-4c6d7b65.entry.js} +2 -2
- package/dist/core/{p-bbbc4e43.entry.js → p-529363af.entry.js} +2 -2
- package/dist/core/p-58047fab.entry.js +2 -0
- package/dist/core/p-58047fab.entry.js.map +1 -0
- package/dist/core/p-60ff8457.entry.js +2 -0
- package/dist/core/{p-acfd00a2.entry.js.map → p-60ff8457.entry.js.map} +1 -1
- package/dist/core/{p-42db4603.entry.js → p-65aa3b0c.entry.js} +2 -2
- package/dist/core/{p-75a4c838.entry.js → p-683fc65e.entry.js} +2 -2
- package/dist/core/{p-75a4c838.entry.js.map → p-683fc65e.entry.js.map} +1 -1
- package/dist/core/{p-c69cd34e.entry.js → p-70a7e7f6.entry.js} +2 -2
- package/dist/core/{p-3da88ddb.entry.js → p-7cde4bc8.entry.js} +2 -2
- package/dist/core/{p-9584f413.entry.js → p-90330543.entry.js} +2 -2
- package/dist/core/{p-6dc65816.entry.js → p-bfc5e0f7.entry.js} +2 -2
- package/dist/core/{p-41f07da7.entry.js → p-ce59c2ee.entry.js} +2 -2
- package/dist/core/{p-207ba616.entry.js → p-d9e28400.entry.js} +2 -2
- package/dist/core/{p-f7275b59.entry.js → p-ec63daab.entry.js} +2 -2
- package/dist/core/{p-c289af04.entry.js → p-ed1e9d01.entry.js} +2 -2
- package/dist/core/{p-c39004f5.entry.js → p-f5d42069.entry.js} +2 -2
- package/dist/core/p-f5d42069.entry.js.map +1 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +1 -1
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/{constants-45f6db4c.js → constants-5708696f.js} +2 -2
- package/dist/esm/constants-5708696f.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{form-cd65d95e.js → form-2d9f68d9.js} +7 -7
- package/dist/esm/form-2d9f68d9.js.map +1 -0
- package/dist/esm/gov-accordion.entry.js +2 -2
- package/dist/esm/gov-alert.entry.js +2 -2
- package/dist/esm/gov-alert.entry.js.map +1 -1
- package/dist/esm/gov-app.entry.js +113 -201
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +2 -2
- package/dist/esm/gov-backdrop.entry.js +2 -2
- package/dist/esm/gov-badge.entry.js +1 -1
- package/dist/esm/gov-badge.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +2 -2
- package/dist/esm/gov-button.entry.js +3 -3
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +2 -2
- package/dist/esm/gov-control-group.entry.js +6 -26
- package/dist/esm/gov-control-group.entry.js.map +1 -1
- package/dist/esm/gov-dropdown.entry.js +125 -0
- package/dist/esm/gov-dropdown.entry.js.map +1 -0
- package/dist/esm/gov-form-checkbox.entry.js +3 -3
- package/dist/esm/gov-form-control.entry.js +1 -1
- package/dist/esm/gov-form-file.entry.js +3 -3
- package/dist/esm/gov-form-input.entry.js +3 -3
- package/dist/esm/gov-form-multi-select.entry.js +3 -3
- package/dist/esm/gov-form-radio.entry.js +3 -3
- package/dist/esm/gov-form-select.entry.js +9 -4
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +3 -3
- package/dist/esm/gov-icon.entry.js +2 -2
- package/dist/esm/gov-modal.entry.js +2 -2
- package/dist/esm/gov-nav.entry.js +2 -2
- package/dist/esm/gov-pagination.entry.js +2 -2
- package/dist/esm/gov-prompt.entry.js +2 -2
- package/dist/esm/gov-side-nav.entry.js +2 -2
- package/dist/esm/gov-skeleton.entry.js +2 -2
- package/dist/esm/gov-tabs.entry.js +2 -2
- package/dist/esm/gov-wizzard.entry.js +2 -2
- package/dist/esm/index-b010bfb4.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{wcag-d588d144.js → wcag-afdfdddb.js} +2 -2
- package/dist/esm/{wcag-d588d144.js.map → wcag-afdfdddb.js.map} +1 -1
- package/dist/esm/{win-9c8460bb.js → win-7a1a8ac8.js} +3 -2
- package/dist/esm/win-7a1a8ac8.js.map +1 -0
- package/dist/hydrate/index.js +410 -382
- package/dist/types/components/gov-alert/gov-alert.d.ts +1 -1
- package/dist/types/components/gov-badge/gov-badge.d.ts +1 -1
- package/dist/types/components/gov-button/{constants.d.ts → default/constants.d.ts} +3 -3
- package/dist/types/components/gov-button/{gov-button.d.ts → default/gov-button.d.ts} +1 -1
- package/dist/types/components/gov-button/{gov-button.types.d.ts → default/gov-button.types.d.ts} +1 -1
- package/dist/types/components/gov-button/dropdown/constants.d.ts +10 -0
- package/dist/types/components/gov-button/dropdown/gov-dropdown.d.ts +30 -0
- package/dist/types/components/gov-button/dropdown/gov-dropdown.types.d.ts +4 -0
- package/dist/types/components/gov-control-group/gov-control-group.d.ts +3 -16
- package/dist/types/components.d.ts +47 -20
- package/dist/types/helpers/Dom/win.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/constants-245999e7.js.map +0 -1
- package/dist/cjs/form-8c6daa83.js.map +0 -1
- package/dist/cjs/win-84bda0aa.js.map +0 -1
- package/dist/collection/components/gov-button/constants.js.map +0 -1
- package/dist/collection/components/gov-button/gov-button.js.map +0 -1
- package/dist/collection/components/gov-button/gov-button.types.js.map +0 -1
- package/dist/core/p-06e938d7.entry.js +0 -2
- package/dist/core/p-06e938d7.entry.js.map +0 -1
- package/dist/core/p-3a69322b.entry.js.map +0 -1
- package/dist/core/p-61af5a2c.js +0 -2
- package/dist/core/p-61af5a2c.js.map +0 -1
- package/dist/core/p-670b4f93.js +0 -2
- package/dist/core/p-9bd90cc4.entry.js +0 -2
- package/dist/core/p-9bd90cc4.entry.js.map +0 -1
- package/dist/core/p-acfd00a2.entry.js +0 -2
- package/dist/core/p-c20102ff.js +0 -2
- package/dist/core/p-c20102ff.js.map +0 -1
- package/dist/core/p-c39004f5.entry.js.map +0 -1
- package/dist/core/p-cc9e9a31.entry.js +0 -2
- package/dist/core/p-cd869237.js.map +0 -1
- package/dist/core/p-fd555dce.entry.js.map +0 -1
- package/dist/esm/constants-45f6db4c.js.map +0 -1
- package/dist/esm/form-cd65d95e.js.map +0 -1
- package/dist/esm/win-9c8460bb.js.map +0 -1
- /package/dist/collection/components/gov-button/{gov-button.types.js → default/gov-button.types.js} +0 -0
- /package/dist/core/{p-6044a1e7.entry.js.map → p-02fb27e8.entry.js.map} +0 -0
- /package/dist/core/{p-a9c57f72.entry.js.map → p-070f9684.entry.js.map} +0 -0
- /package/dist/core/{p-670b4f93.js.map → p-0f5e2b0a.js.map} +0 -0
- /package/dist/core/{p-1bdec1f4.entry.js.map → p-14a475a8.entry.js.map} +0 -0
- /package/dist/core/{p-227a9e9b.entry.js.map → p-20cb0742.entry.js.map} +0 -0
- /package/dist/core/{p-3e1a1bd4.entry.js.map → p-22222994.entry.js.map} +0 -0
- /package/dist/core/{p-54b17f4d.entry.js.map → p-2e2be66b.entry.js.map} +0 -0
- /package/dist/core/{p-ef7a1780.entry.js.map → p-2e94d2d3.entry.js.map} +0 -0
- /package/dist/core/{p-005bfb42.entry.js.map → p-3d7ea15c.entry.js.map} +0 -0
- /package/dist/core/{p-5e865538.entry.js.map → p-4c6d7b65.entry.js.map} +0 -0
- /package/dist/core/{p-bbbc4e43.entry.js.map → p-529363af.entry.js.map} +0 -0
- /package/dist/core/{p-42db4603.entry.js.map → p-65aa3b0c.entry.js.map} +0 -0
- /package/dist/core/{p-c69cd34e.entry.js.map → p-70a7e7f6.entry.js.map} +0 -0
- /package/dist/core/{p-3da88ddb.entry.js.map → p-7cde4bc8.entry.js.map} +0 -0
- /package/dist/core/{p-9584f413.entry.js.map → p-90330543.entry.js.map} +0 -0
- /package/dist/core/{p-6dc65816.entry.js.map → p-bfc5e0f7.entry.js.map} +0 -0
- /package/dist/core/{p-41f07da7.entry.js.map → p-ce59c2ee.entry.js.map} +0 -0
- /package/dist/core/{p-207ba616.entry.js.map → p-d9e28400.entry.js.map} +0 -0
- /package/dist/core/{p-f7275b59.entry.js.map → p-ec63daab.entry.js.map} +0 -0
- /package/dist/core/{p-c289af04.entry.js.map → p-ed1e9d01.entry.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Sizes } from '
|
|
2
|
-
import { Variants } from '
|
|
3
|
-
import { pick } from '
|
|
1
|
+
import { Sizes } from '../../../core/constants/sizes';
|
|
2
|
+
import { Variants } from '../../../core/constants/variants';
|
|
3
|
+
import { pick } from '../../../utils/utils';
|
|
4
4
|
export const ButtonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL']);
|
|
5
5
|
export const ButtonVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'SUCCESS', 'ERROR', 'WARNING']);
|
|
6
6
|
export var Type;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-button/default/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;AAGxE,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAGrG,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;EACf,uBAAe,CAAA;EACf,6BAAqB,CAAA;EACrB,qBAAa,CAAA;EACb,qBAAa,CAAA;AACd,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAID,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;EACrB,+BAAiB,CAAA;EACjB,+BAAiB,CAAA;EACjB,6BAAe,CAAA;AAChB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAID,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;EACvB,gCAAgB,CAAA;EAChB,8BAAc,CAAA;EACd,4BAAY,CAAA;AACb,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAGD,MAAM,CAAC,MAAM,WAAW,GAAG;EAC1B,IAAI,EAAE,YAAY;EAClB,YAAY,EAAE,oBAAoB;CAClC,CAAA","sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { Variants } from '../../../core/constants/variants'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\n\nexport const ButtonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type ButtonSizesType = `${ValueOf<typeof ButtonSizes>}`\n\nexport const ButtonVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'SUCCESS', 'ERROR', 'WARNING'])\nexport type ButtonVariantType = `${ValueOf<typeof ButtonVariants>}`\n\nexport enum Type {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n\tBASE = 'base',\n\tLINK = 'link',\n}\n\nexport type TypesType = `${ValueOf<typeof Type>}`\n\nexport enum NativeType {\n\tSUBMIT = 'submit',\n\tBUTTON = 'button',\n\tRESET = 'reset',\n}\n\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport enum ButtonTarget {\n\tBLANK = '_blank',\n\tSELF = '_self',\n\tNEW = '_new',\n}\nexport type ButtonTargetType = `${ValueOf<typeof ButtonTarget>}`\n\nexport const ButtonClass = {\n\troot: 'gov-button',\n\trootWithIcon: 'gov-button--w-icon',\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { validateProp } from "
|
|
2
|
+
import { validateProp } from "../../../helpers/Validate/props";
|
|
3
3
|
import { ButtonVariants, ButtonClass, Type, NativeType, } from "./constants";
|
|
4
|
-
import { govHost, toBoolAttr, toBoolAttrIfDefined, prepareClasses } from "
|
|
5
|
-
import { toBool } from "
|
|
6
|
-
import { Sizes } from "
|
|
7
|
-
import { validateWcagLabel, validateWcagRef } from "
|
|
8
|
-
import { canValidateWcagOnRender } from "
|
|
9
|
-
import { delay } from "
|
|
4
|
+
import { govHost, toBoolAttr, toBoolAttrIfDefined, prepareClasses } from "../../../helpers/Dom/template";
|
|
5
|
+
import { toBool } from "../../../utils/bool.utils";
|
|
6
|
+
import { Sizes } from "../../../core/constants/sizes";
|
|
7
|
+
import { validateWcagLabel, validateWcagRef } from "../../../helpers/Validate/wcag";
|
|
8
|
+
import { canValidateWcagOnRender } from "../../../helpers/Dom/win";
|
|
9
|
+
import { delay } from "../../../utils/utils";
|
|
10
10
|
var Tags;
|
|
11
11
|
(function (Tags) {
|
|
12
12
|
Tags["A"] = "a";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-button.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-button/default/gov-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC5G,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAIN,cAAc,EAEd,WAAW,EACX,IAAI,EACJ,UAAU,GAEV,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport {\n\tButtonSizesType,\n\tNativeTypesType,\n\tTypesType,\n\tButtonVariants,\n\tButtonVariantType,\n\tButtonClass,\n\tType,\n\tNativeType,\n\tButtonTargetType,\n} from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, prepareClasses } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { toBool } from \"../../../utils/bool.utils\"\nimport { Sizes } from \"../../../core/constants/sizes\"\nimport { validateWcagLabel, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { delay } from \"../../../utils/utils\"\nimport { ButtonEvent } from \"./gov-button.types\"\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n\tstyleUrl: \"gov-button.scss\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({ reflect: true }) readonly variant?: ButtonVariantType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({ reflect: true }) readonly size?: ButtonSizesType = \"m\"\n\t/**\n\t * Button's type\n\t */\n\t@Prop({ reflect: true }) readonly type?: TypesType = \"solid\"\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Determine if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({ reflect: true }) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = \"button\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parametr\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the id of a related component’s visually focused element\n\t */\n\t@Prop({ attribute: \"wcag-active-descendant\" }) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this property to add an aria-controls attribute to the button. Use the attribute to point to the unique id of the content that the button manages\n\t */\n\t@Prop({ attribute: \"wcag-controls\" }) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the button\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Aria description the button\n\t */\n\t@Prop({ attribute: \"wcag-description\" }) readonly wcagDescription: string\n\t/**\n\t * Details of the component\n\t */\n\t@Prop({ attribute: \"wcag-details\" }) readonly wcagDetails: string\n\t/**\n\t * If a button expands or collapses adjacent content, then use the ariaExpanded prop to add the aria-expanded attribute to the button\n\t * Set the value to convey the current expanded (true) or collapsed (false) state of the content\n\t */\n\t@Prop({ attribute: \"wcag-expanded\" }) readonly wcagExpanded: boolean\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology\n\t */\n\t@Prop({ attribute: \"wcag-label\" }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component owned by the button\n\t */\n\t@Prop({ attribute: \"wcag-owns\" }) readonly wcagOwns: string\n\t/**\n\t * \tUse this property to add an aria-haspopup attribute to a button, if you are using it as a menu button\n\t */\n\t@Prop({ attribute: \"wcag-has-popup\" }) readonly wcagHasPopup: string\n\t/**\n\t * Tells screen reader the element is pressed\n\t */\n\t@Prop({ attribute: \"wcag-pressed\" }) readonly wcagPressed: string\n\t/**\n\t * Indicates the current item within a container or set of related elements\n\t */\n\t@Prop({ attribute: \"wcag-current\" }) readonly wcagCurrent: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({ eventName: \"gov-click\" }) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(Type, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"nativeType\")\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() isPressed = false\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t}\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\tget classNames(): string {\n\t\tconst { h } = this\n\n\t\treturn prepareClasses([ButtonClass.root, h.hasSlot(\"left-icon\") && ButtonClass.rootWithIcon, h.hasSlot(\"right-icon\") && ButtonClass.rootWithIcon])\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host hoverable={true} size={this.size} variant={this.variant} class={this.h.classes(this.classNames)} type={this.type} inverse={this.inverse}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLButtonElement | HTMLLinkElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tonMouseDown={() => (this.isPressed = true)}\n\t\t\t\t\tonMouseUp={() => (this.isPressed = false)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.focusable ? \"0\" : \"-1\"}\n\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\taria-describedby={this.wcagActiveDescendant}\n\t\t\t\t\taria-description={this.wcagDescription}\n\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\taria-details={this.wcagDetails}\n\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\taria-haspopup={toBoolAttrIfDefined(this.wcagHasPopup)}\n\t\t\t\t\taria-pressed={toBoolAttr(this.isPressed)}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\taria-current={this.wcagCurrent}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"right-icon\") &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"right-icon\") &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getTriggerRef() {\n\t\treturn this.triggerRef\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\tif (this.focusable) {\n\t\t\tvalidateWcagRef(this.wcagActiveDescendant, \"aria-activedescendant\", ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagControls, \"aria-controls\", ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagDetails, \"aria-details\", ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagOwns, \"aria-owns\", ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagHasPopup, \"aria-haspopup\", ButtonClass.root)\n\t\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, ButtonClass.root)\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-button.types.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-button/default/gov-button.types.ts"],"names":[],"mappings":"","sourcesContent":["import { GovBaseEvent } from \"../../../types/event.types\"\n\nexport interface ButtonEvent extends GovBaseEvent {\n\tref: HTMLGovButtonElement\n}\n\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var Position;
|
|
2
|
+
(function (Position) {
|
|
3
|
+
Position["LEFT"] = "left";
|
|
4
|
+
Position["RIGHT"] = "right";
|
|
5
|
+
})(Position || (Position = {}));
|
|
6
|
+
export const DropdownClass = {
|
|
7
|
+
root: 'gov-dropdown',
|
|
8
|
+
list: 'gov-dropdown__list'
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-button/dropdown/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;EACnB,yBAAa,CAAA;EACb,2BAAe,CAAA;AAChB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAID,MAAM,CAAC,MAAM,aAAa,GAAG;EAC5B,IAAI,EAAE,cAAc;EACpB,IAAI,EAAE,oBAAoB;CAC1B,CAAA","sourcesContent":["import { ValueOf } from \"../../../types/interfaces\"\n\nexport enum Position {\n\tLEFT = 'left',\n\tRIGHT = 'right',\n}\n\nexport type PositionType = `${ValueOf<typeof Position>}`\n\nexport const DropdownClass = {\n\troot: 'gov-dropdown',\n\tlist: 'gov-dropdown__list'\n}\n"]}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/* stylelint-disable */
|
|
2
|
+
/* stylelint-enable */
|
|
3
|
+
/* stylelint-disable */
|
|
4
|
+
/* stylelint-enable */
|
|
5
|
+
/* stylelint-disable */
|
|
6
|
+
/* stylelint-enable */
|
|
7
|
+
/* stylelint-disable */
|
|
8
|
+
/* stylelint-enable */
|
|
9
|
+
/* [Core] - Buttons
|
|
10
|
+
------------------------------------------------------------------ */
|
|
11
|
+
/*
|
|
12
|
+
* Gets color from theme-colors or from palette-colors
|
|
13
|
+
*/
|
|
14
|
+
/*
|
|
15
|
+
* Converts hex value to rgb colors value
|
|
16
|
+
*/
|
|
17
|
+
/* stylelint-disable order/order */
|
|
18
|
+
/* stylelint-enable order/order */
|
|
19
|
+
/*
|
|
20
|
+
* Generates list of utility classes for margin, padding
|
|
21
|
+
*
|
|
22
|
+
* Make sure $list of definitions is sorted so that last item is defined last
|
|
23
|
+
* So largest views are mentioned last.
|
|
24
|
+
*/
|
|
25
|
+
/*
|
|
26
|
+
- Variables - Sizes
|
|
27
|
+
*/
|
|
28
|
+
/* "Constants" for general usage */
|
|
29
|
+
/*
|
|
30
|
+
- Variables - Layout
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Utilities - Offset
|
|
34
|
+
*/
|
|
35
|
+
/* stylelint-disable order/order */
|
|
36
|
+
/* stylelint-enable order/order */
|
|
37
|
+
/* stylelint-disable order/order */
|
|
38
|
+
/* stylelint-enable order/order */
|
|
39
|
+
/* stylelint-disable order/order */
|
|
40
|
+
/* stylelint-enable order/order */
|
|
41
|
+
/**
|
|
42
|
+
* Generates CSS3 var with default value
|
|
43
|
+
*/
|
|
44
|
+
/*
|
|
45
|
+
- Variables - General
|
|
46
|
+
*/
|
|
47
|
+
/*
|
|
48
|
+
- Variables - Typography
|
|
49
|
+
*/
|
|
50
|
+
/*
|
|
51
|
+
- Variables - Variants
|
|
52
|
+
*/
|
|
53
|
+
/*
|
|
54
|
+
- Variables - Container
|
|
55
|
+
*/
|
|
56
|
+
/*
|
|
57
|
+
- Variables - Sizes
|
|
58
|
+
*/
|
|
59
|
+
/* "Constants" for general usage */
|
|
60
|
+
/*
|
|
61
|
+
- Variables - Accordion
|
|
62
|
+
*/
|
|
63
|
+
/*
|
|
64
|
+
- Variables - Attachments
|
|
65
|
+
*/
|
|
66
|
+
/*
|
|
67
|
+
- Variables - Alert
|
|
68
|
+
*/
|
|
69
|
+
/*
|
|
70
|
+
- Variables - Backdrop
|
|
71
|
+
*/
|
|
72
|
+
/*
|
|
73
|
+
- Variables - Buttons (&& Badges)
|
|
74
|
+
*/
|
|
75
|
+
/*
|
|
76
|
+
- Variables - Breadcrumbs
|
|
77
|
+
*/
|
|
78
|
+
/*
|
|
79
|
+
- Variables - Classes
|
|
80
|
+
*/
|
|
81
|
+
/*
|
|
82
|
+
- Variables - Colors
|
|
83
|
+
*/
|
|
84
|
+
/*
|
|
85
|
+
- Variables - Control Group
|
|
86
|
+
*/
|
|
87
|
+
/*
|
|
88
|
+
- Variables - Cookiebar
|
|
89
|
+
*/
|
|
90
|
+
/*
|
|
91
|
+
- Variables - Dropdown
|
|
92
|
+
*/
|
|
93
|
+
/*
|
|
94
|
+
- Variables - Card
|
|
95
|
+
*/
|
|
96
|
+
/*
|
|
97
|
+
- Variables - Message
|
|
98
|
+
*/
|
|
99
|
+
/*
|
|
100
|
+
- Variables - Empty
|
|
101
|
+
*/
|
|
102
|
+
/*
|
|
103
|
+
- Variables - Error code
|
|
104
|
+
*/
|
|
105
|
+
/*
|
|
106
|
+
- Variables - Grid
|
|
107
|
+
*/
|
|
108
|
+
/*
|
|
109
|
+
- Variables - Tiles
|
|
110
|
+
*/
|
|
111
|
+
/*
|
|
112
|
+
- Variables - Modal & Prompt
|
|
113
|
+
*/
|
|
114
|
+
/**
|
|
115
|
+
* Utilities - Offset
|
|
116
|
+
*/
|
|
117
|
+
/*
|
|
118
|
+
- Variables - shadows
|
|
119
|
+
*/
|
|
120
|
+
/* "Constants" for general usage */
|
|
121
|
+
/*
|
|
122
|
+
- Variables - Statsbar
|
|
123
|
+
*/
|
|
124
|
+
/*
|
|
125
|
+
- Variables - Tabs
|
|
126
|
+
*/
|
|
127
|
+
/*
|
|
128
|
+
- Variables - Tooltip
|
|
129
|
+
*/
|
|
130
|
+
/*
|
|
131
|
+
- Variables - Loading
|
|
132
|
+
*/
|
|
133
|
+
/*
|
|
134
|
+
- Variables - Forms
|
|
135
|
+
*/
|
|
136
|
+
/*
|
|
137
|
+
- Variables - Form Autocomplete
|
|
138
|
+
*/
|
|
139
|
+
/*
|
|
140
|
+
- Variables - Form Message
|
|
141
|
+
*/
|
|
142
|
+
/*
|
|
143
|
+
- Variables - Form label
|
|
144
|
+
*/
|
|
145
|
+
/*
|
|
146
|
+
- Variables - Form switch
|
|
147
|
+
*/
|
|
148
|
+
/*
|
|
149
|
+
- Variables - Form select
|
|
150
|
+
*/
|
|
151
|
+
/*
|
|
152
|
+
- Variables - Form input
|
|
153
|
+
*/
|
|
154
|
+
/*
|
|
155
|
+
- Variables - Form multiselect
|
|
156
|
+
*/
|
|
157
|
+
/*
|
|
158
|
+
- Variables - Form password power
|
|
159
|
+
*/
|
|
160
|
+
/*
|
|
161
|
+
- Variables - Form checkbox & radio
|
|
162
|
+
*/
|
|
163
|
+
/*
|
|
164
|
+
- Variables - Form group
|
|
165
|
+
*/
|
|
166
|
+
/*
|
|
167
|
+
- Variables - Form file
|
|
168
|
+
*/
|
|
169
|
+
/*
|
|
170
|
+
- Variables - Toast Message
|
|
171
|
+
*/
|
|
172
|
+
/*
|
|
173
|
+
- Variables - Wizzard
|
|
174
|
+
*/
|
|
175
|
+
/*
|
|
176
|
+
- Variables - Stepper
|
|
177
|
+
*/
|
|
178
|
+
/*
|
|
179
|
+
- Variables - Side nav
|
|
180
|
+
*/
|
|
181
|
+
/*
|
|
182
|
+
- Variables - Grid & Tile
|
|
183
|
+
*/
|
|
184
|
+
/*
|
|
185
|
+
- Variables - Pagination
|
|
186
|
+
*/
|
|
187
|
+
/*
|
|
188
|
+
- Variables - Nav
|
|
189
|
+
*/
|
|
190
|
+
/*
|
|
191
|
+
- Variables - Layout
|
|
192
|
+
*/
|
|
193
|
+
.gov-spin-animation,
|
|
194
|
+
.gov-pseudo-spin-animation::before {
|
|
195
|
+
animation: spin 4s linear infinite;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@keyframes spin {
|
|
199
|
+
100% {
|
|
200
|
+
transform: rotate(360deg);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
@keyframes countdown {
|
|
204
|
+
to {
|
|
205
|
+
transform: scaleX(0);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
@keyframes progress {
|
|
209
|
+
0% {
|
|
210
|
+
background-position: -200px 0;
|
|
211
|
+
}
|
|
212
|
+
100% {
|
|
213
|
+
background-position: calc(200px + 100%) 0;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
@keyframes pulse {
|
|
217
|
+
0% {
|
|
218
|
+
opacity: 1;
|
|
219
|
+
}
|
|
220
|
+
50% {
|
|
221
|
+
opacity: 0.4;
|
|
222
|
+
}
|
|
223
|
+
100% {
|
|
224
|
+
opacity: 1;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/*
|
|
228
|
+
* Dropdown
|
|
229
|
+
*/
|
|
230
|
+
.gov-dropdown {
|
|
231
|
+
position: relative;
|
|
232
|
+
}
|
|
233
|
+
.gov-dropdown__list {
|
|
234
|
+
position: absolute;
|
|
235
|
+
left: 0;
|
|
236
|
+
z-index: 100;
|
|
237
|
+
}
|
|
238
|
+
.gov-dropdown ul {
|
|
239
|
+
padding: 0.25rem;
|
|
240
|
+
border-radius: var(--gov-border-radius, 0.1875rem);
|
|
241
|
+
background-color: var(--gov-dropdown-bg-color, var(--gov-color-neutral-white));
|
|
242
|
+
box-shadow: var(--gov-dropdown-box-shadow, 0 0.25rem 1.25rem rgba(0, 0, 0, 0.1));
|
|
243
|
+
}
|
|
244
|
+
.gov-dropdown li {
|
|
245
|
+
margin: 0;
|
|
246
|
+
white-space: nowrap;
|
|
247
|
+
}
|
|
248
|
+
.gov-dropdown li::before {
|
|
249
|
+
content: none;
|
|
250
|
+
}
|
|
251
|
+
.gov-dropdown li > * {
|
|
252
|
+
width: 100%;
|
|
253
|
+
}
|
|
254
|
+
.gov-dropdown li > * .element {
|
|
255
|
+
justify-content: space-between;
|
|
256
|
+
width: 100%;
|
|
257
|
+
padding: 0.5rem !important;
|
|
258
|
+
font-weight: 400 !important;
|
|
259
|
+
}
|
|
260
|
+
.gov-dropdown[position=right] .gov-dropdown__list {
|
|
261
|
+
right: 0;
|
|
262
|
+
left: initial;
|
|
263
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { registerClickOutside } from 'stencil-click-outside';
|
|
3
|
+
import { govHost, toBoolAttr } from "../../../helpers/Dom/template";
|
|
4
|
+
import { createID } from "../../../utils/string.utils";
|
|
5
|
+
import { ButtonClass } from "../default/constants";
|
|
6
|
+
import { DropdownClass, Position } from "./constants";
|
|
7
|
+
export class GovDropdown {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.open = false;
|
|
10
|
+
this.position = Position.LEFT;
|
|
11
|
+
this.h = govHost(this.host);
|
|
12
|
+
this.listId = createID("GovDropdownList");
|
|
13
|
+
this.controlId = createID("GovDropdownControl");
|
|
14
|
+
}
|
|
15
|
+
componentWillLoad() {
|
|
16
|
+
if (this.trigger) {
|
|
17
|
+
this.trigger.setAttribute("wcag-controls", this.listId);
|
|
18
|
+
this.trigger.setAttribute("wcag-has-popup", toBoolAttr(!!this.list));
|
|
19
|
+
this.trigger.setAttribute("identifier", this.controlId);
|
|
20
|
+
this.trigger.addEventListener("gov-click", (e) => {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
e.stopPropagation();
|
|
23
|
+
this.open = !this.open;
|
|
24
|
+
this.govChange.emit({
|
|
25
|
+
component: DropdownClass.root,
|
|
26
|
+
originalEvent: e,
|
|
27
|
+
open: this.open,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
get trigger() {
|
|
33
|
+
return this.host.querySelector(`* > ${ButtonClass.root}`);
|
|
34
|
+
}
|
|
35
|
+
get list() {
|
|
36
|
+
return this.h.getSlot("list");
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
return (h(Host, { class: this.h.classes([DropdownClass.root]), open: this.open, position: this.position }, h("slot", null), h("div", { ref: el => registerClickOutside(this, el, () => this.open = false), class: DropdownClass.list, id: this.listId, "aria-labelledby": this.controlId, "aria-hidden": toBoolAttr(!this.open), hidden: !this.open }, h("slot", { name: "list" }))));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns a clickable element instance
|
|
43
|
+
*/
|
|
44
|
+
async getState() {
|
|
45
|
+
return this.open;
|
|
46
|
+
}
|
|
47
|
+
static get is() { return "gov-dropdown"; }
|
|
48
|
+
static get originalStyleUrls() {
|
|
49
|
+
return {
|
|
50
|
+
"$": ["gov-dropdown.scss"]
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
static get styleUrls() {
|
|
54
|
+
return {
|
|
55
|
+
"$": ["gov-dropdown.css"]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static get properties() {
|
|
59
|
+
return {
|
|
60
|
+
"open": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"mutable": true,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "boolean",
|
|
65
|
+
"resolved": "boolean",
|
|
66
|
+
"references": {}
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"optional": false,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": "Dropdown open state"
|
|
73
|
+
},
|
|
74
|
+
"attribute": "open",
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"defaultValue": "false"
|
|
77
|
+
},
|
|
78
|
+
"position": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "PositionType",
|
|
83
|
+
"resolved": "\"left\" | \"right\"",
|
|
84
|
+
"references": {
|
|
85
|
+
"PositionType": {
|
|
86
|
+
"location": "import",
|
|
87
|
+
"path": "./constants"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": "Menu display position"
|
|
96
|
+
},
|
|
97
|
+
"attribute": "position",
|
|
98
|
+
"reflect": false,
|
|
99
|
+
"defaultValue": "Position.LEFT"
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get events() {
|
|
104
|
+
return [{
|
|
105
|
+
"method": "govChange",
|
|
106
|
+
"name": "gov-change",
|
|
107
|
+
"bubbles": true,
|
|
108
|
+
"cancelable": true,
|
|
109
|
+
"composed": true,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "Emitted when the dropdown change state"
|
|
113
|
+
},
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "DropdownEvent",
|
|
116
|
+
"resolved": "DropdownEvent",
|
|
117
|
+
"references": {
|
|
118
|
+
"DropdownEvent": {
|
|
119
|
+
"location": "import",
|
|
120
|
+
"path": "./gov-dropdown.types"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}];
|
|
125
|
+
}
|
|
126
|
+
static get methods() {
|
|
127
|
+
return {
|
|
128
|
+
"getState": {
|
|
129
|
+
"complexType": {
|
|
130
|
+
"signature": "() => Promise<boolean>",
|
|
131
|
+
"parameters": [],
|
|
132
|
+
"references": {
|
|
133
|
+
"Promise": {
|
|
134
|
+
"location": "global"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"return": "Promise<boolean>"
|
|
138
|
+
},
|
|
139
|
+
"docs": {
|
|
140
|
+
"text": "Returns a clickable element instance",
|
|
141
|
+
"tags": []
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
static get elementRef() { return "host"; }
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=gov-dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-dropdown.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-button/dropdown/gov-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAGnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAgB,MAAM,aAAa,CAAA;AAOnE,MAAM,OAAO,WAAW;EAKvB;gBAUgC,KAAK;oBAIK,QAAQ,CAAC,IAAI;IAbtD,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IACzC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAA;GAC/C;EAgBD,iBAAiB;IAChB,IAAI,IAAI,CAAC,OAAO,EAAE;MACjB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,C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E,EAAE,IAAI,CAAC,MAAM,qBACE,IAAI,CAAC,SAAS,iBAClB,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EACnC,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI;QAClB,YAAM,IAAI,EAAC,MAAM,GAAQ,CACpB,CACA,CACP,CAAA;EACF,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,QAAQ;IACb,OAAO,IAAI,CAAC,IAAI,CAAA;EACjB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from \"@stencil/core\"\nimport { registerClickOutside } from 'stencil-click-outside'\nimport { govHost, toBoolAttr } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { Nullable } from \"../../../types/interfaces\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { ButtonClass } from \"../default/constants\"\nimport { DropdownClass, Position, PositionType } from \"./constants\"\nimport { DropdownEvent } from \"./gov-dropdown.types\"\n\n@Component({\n\ttag: \"gov-dropdown\",\n\tstyleUrl: \"gov-dropdown.scss\",\n})\nexport class GovDropdown {\n\tprivate h: GovHost\n\tprivate readonly listId: string\n\tprivate readonly controlId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.listId = createID(\"GovDropdownList\")\n\t\tthis.controlId = createID(\"GovDropdownControl\")\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\t/**\n\t * Dropdown open state\n\t */\n\t@Prop({ mutable: true }) open = false\n\t/**\n\t * Menu display position\n\t */\n\t@Prop() readonly position: PositionType = Position.LEFT\n\t/**\n\t * Emitted when the dropdown change state\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<DropdownEvent>\n\n\tcomponentWillLoad() {\n\t\tif (this.trigger) {\n\t\t\tthis.trigger.setAttribute(\"wcag-controls\", this.listId)\n\t\t\tthis.trigger.setAttribute(\"wcag-has-popup\", toBoolAttr(!!this.list))\n\t\t\tthis.trigger.setAttribute(\"identifier\", this.controlId)\n\n\t\t\tthis.trigger.addEventListener(\"gov-click\", (e) => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.open = !this.open\n\n\t\t\t\tthis.govChange.emit({\n\t\t\t\t\tcomponent: DropdownClass.root,\n\t\t\t\t\toriginalEvent: e,\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t}\n\n\tget trigger() {\n\t\treturn this.host.querySelector(`* > ${ButtonClass.root}`) as HTMLGovButtonElement\n\t}\n\n\tget list() {\n\t\treturn this.h.getSlot(\"list\") as Nullable<HTMLUListElement>\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes([DropdownClass.root])} open={this.open} position={this.position}>\n\t\t\t\t<slot></slot>\n\t\t\t\t<div\n\t\t\t\t\tref={el => registerClickOutside(this, el, () => this.open = false)}\n\t\t\t\t\tclass={DropdownClass.list}\n\t\t\t\t\tid={this.listId}\n\t\t\t\t\taria-labelledby={this.controlId}\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\thidden={!this.open}>\n\t\t\t\t\t<slot name=\"list\"></slot>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getState() {\n\t\treturn this.open\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-dropdown.types.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-button/dropdown/gov-dropdown.types.ts"],"names":[],"mappings":"","sourcesContent":["import { GovBaseEvent } from \"../../../types/event.types\"\n\nexport interface DropdownEvent extends GovBaseEvent {\n\topen: boolean\n}\n"]}
|
|
@@ -87,6 +87,9 @@
|
|
|
87
87
|
/*
|
|
88
88
|
- Variables - Cookiebar
|
|
89
89
|
*/
|
|
90
|
+
/*
|
|
91
|
+
- Variables - Dropdown
|
|
92
|
+
*/
|
|
90
93
|
/*
|
|
91
94
|
- Variables - Card
|
|
92
95
|
*/
|
|
@@ -230,39 +233,27 @@
|
|
|
230
233
|
width: 100%;
|
|
231
234
|
align-items: center;
|
|
232
235
|
border-radius: var(--gov-control-group-border-radius, 0.25rem);
|
|
233
|
-
overflow: hidden;
|
|
234
236
|
}
|
|
235
237
|
.gov-control-group .element *,
|
|
236
238
|
.gov-control-group .gov-button .element {
|
|
237
239
|
border: none !important;
|
|
238
240
|
border-radius: 0;
|
|
239
241
|
}
|
|
240
|
-
.gov-control-group.bordered > *:last-child {
|
|
241
|
-
border-right: none !important;
|
|
242
|
-
}
|
|
243
242
|
.gov-control-group[variant=primary] {
|
|
244
243
|
border: var(--gov-control-group-border-primary, 0.0625rem solid var(--gov-color-primary-600));
|
|
245
244
|
}
|
|
246
|
-
.gov-control-group[variant=primary]
|
|
245
|
+
.gov-control-group[variant=primary] > * {
|
|
247
246
|
border-right: var(--gov-control-group-border-primary, 0.0625rem solid var(--gov-color-primary-600));
|
|
248
247
|
}
|
|
249
248
|
.gov-control-group[variant=secondary] {
|
|
250
249
|
border: var(--gov-control-group-border-secondary, 0.0625rem solid var(--gov-color-secondary-700));
|
|
251
250
|
}
|
|
252
|
-
.gov-control-group[variant=secondary]
|
|
251
|
+
.gov-control-group[variant=secondary] > * {
|
|
253
252
|
border-right: var(--gov-control-group-border-secondary, 0.0625rem solid var(--gov-color-secondary-700));
|
|
254
253
|
}
|
|
255
|
-
.gov-control-group
|
|
256
|
-
border:
|
|
257
|
-
}
|
|
258
|
-
.gov-control-group[disabled=""], .gov-control-group[disabled=true i], .gov-control-group[disabled="1"] {
|
|
259
|
-
border: var(--gov-control-group-border-disabled, 0.0625rem solid var(--gov-color-secondary-600));
|
|
260
|
-
pointer-events: none;
|
|
261
|
-
}
|
|
262
|
-
.gov-control-group[disabled=""] *, .gov-control-group[disabled=true i] *, .gov-control-group[disabled="1"] * {
|
|
263
|
-
background-color: var(--gov-control-group-background-disabled, var(--gov-color-secondary-300));
|
|
264
|
-
color: var(--gov-control-group-color-disabled, var(--gov-color-secondary-600)) !important;
|
|
254
|
+
.gov-control-group > *:last-child {
|
|
255
|
+
border-right: none;
|
|
265
256
|
}
|
|
266
|
-
.gov-control-group
|
|
267
|
-
border-right:
|
|
257
|
+
.gov-control-group.no-border > * {
|
|
258
|
+
border-right: none;
|
|
268
259
|
}
|