@six-group/ui-library 0.0.0-insider.8359b17 → 0.0.0-insider.86d3063
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/{form-control-73ff961d.js → form-control-de259450.js} +2 -2
- package/dist/cjs/{form-control-73ff961d.js.map → form-control-de259450.js.map} +1 -1
- package/dist/cjs/{index-b288f7d9.js → index-1f707a55.js} +455 -9
- package/dist/cjs/index-1f707a55.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/six-alert.cjs.entry.js +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +2 -2
- package/dist/cjs/six-badge.cjs.entry.js +3 -3
- package/dist/cjs/six-button.cjs.entry.js +5 -4
- package/dist/cjs/six-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-card.cjs.entry.js +2 -2
- package/dist/cjs/six-checkbox_2.cjs.entry.js +6 -6
- package/dist/cjs/six-datepicker.cjs.entry.js +13 -11
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +4 -4
- package/dist/cjs/six-dialog.cjs.entry.js +3 -3
- package/dist/cjs/six-drawer.cjs.entry.js +3 -3
- package/dist/cjs/six-dropdown_2.cjs.entry.js +14 -5
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error-page.cjs.entry.js +2 -2
- package/dist/cjs/six-error.cjs.entry.js +3 -3
- package/dist/cjs/six-error.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list.cjs.entry.js +2 -2
- package/dist/cjs/six-file-upload.cjs.entry.js +27 -6
- package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/six-footer.cjs.entry.js +2 -2
- package/dist/cjs/six-group-label.cjs.entry.js +3 -3
- package/dist/cjs/six-header.cjs.entry.js +22 -15
- package/dist/cjs/six-header.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +4 -4
- package/dist/cjs/six-icon.cjs.entry.js +3 -3
- package/dist/cjs/six-input.cjs.entry.js +14 -5
- package/dist/cjs/six-input.cjs.entry.js.map +1 -1
- package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js +2 -2
- package/dist/cjs/six-layout-grid.cjs.entry.js +2 -2
- package/dist/cjs/six-main-container.cjs.entry.js +2 -2
- package/dist/cjs/six-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/six-menu-label.cjs.entry.js +2 -2
- package/dist/cjs/six-picto.cjs.entry.js +2 -2
- package/dist/cjs/six-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/six-progress-ring.cjs.entry.js +2 -2
- package/dist/cjs/six-radio.cjs.entry.js +3 -3
- package/dist/cjs/six-range.cjs.entry.js +4 -4
- package/dist/cjs/six-root.cjs.entry.js +2 -2
- package/dist/cjs/six-search-field.cjs.entry.js +2 -2
- package/dist/cjs/six-select.cjs.entry.js +68 -43
- package/dist/cjs/six-select.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +1 -1
- package/dist/cjs/six-sidebar-item.cjs.entry.js +3 -3
- package/dist/cjs/six-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/six-spinner.cjs.entry.js +1 -1
- package/dist/cjs/six-stage-indicator.cjs.entry.js +1 -1
- package/dist/cjs/six-switch.cjs.entry.js +4 -4
- package/dist/cjs/six-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/six-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/six-tab.cjs.entry.js +3 -3
- package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +3 -3
- package/dist/cjs/six-textarea.cjs.entry.js +4 -4
- package/dist/cjs/six-tile.cjs.entry.js +4 -4
- package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/ui-library.cjs.js +2 -2
- package/dist/collection/assets/TRADEMARKS.md +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/six-avatar/six-avatar.js +1 -1
- package/dist/collection/components/six-badge/six-badge.js +2 -2
- package/dist/collection/components/six-button/six-button.css +17 -0
- package/dist/collection/components/six-button/six-button.js +5 -4
- package/dist/collection/components/six-button/six-button.js.map +1 -1
- package/dist/collection/components/six-card/six-card.js +1 -1
- package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
- package/dist/collection/components/six-datepicker/six-datepicker.js +12 -10
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
- package/dist/collection/components/six-details/six-details.js +3 -3
- package/dist/collection/components/six-dialog/six-dialog.js +2 -2
- package/dist/collection/components/six-drawer/six-drawer.js +2 -2
- package/dist/collection/components/six-error/six-error.css +1 -0
- package/dist/collection/components/six-error/six-error.js +1 -1
- package/dist/collection/components/six-error-page/six-error-page.js +1 -1
- package/dist/collection/components/six-file-list/six-file-list.js +1 -1
- package/dist/collection/components/six-file-upload/six-file-upload.css +3 -0
- package/dist/collection/components/six-file-upload/six-file-upload.js +64 -5
- package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
- package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +114 -6
- package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -1
- package/dist/collection/components/six-footer/six-footer.js +1 -1
- package/dist/collection/components/six-group-label/six-group-label.js +1 -1
- package/dist/collection/components/six-header/six-header.css +9 -0
- package/dist/collection/components/six-header/six-header.js +38 -13
- package/dist/collection/components/six-header/six-header.js.map +1 -1
- package/dist/collection/components/six-icon/six-icon.js +2 -2
- package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
- package/dist/collection/components/six-input/six-input.js +40 -4
- package/dist/collection/components/six-input/six-input.js.map +1 -1
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +1 -1
- package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
- package/dist/collection/components/six-main-container/six-main-container.js +1 -1
- package/dist/collection/components/six-menu/six-menu.js +13 -4
- package/dist/collection/components/six-menu/six-menu.js.map +1 -1
- package/dist/collection/components/six-menu/test/six-menu.spec.js +1 -1
- package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
- package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
- package/dist/collection/components/six-menu-item/six-menu-item.js +2 -2
- package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
- package/dist/collection/components/six-picto/six-picto.js +1 -1
- package/dist/collection/components/six-progress-bar/six-progress-bar.js +2 -2
- package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
- package/dist/collection/components/six-radio/six-radio.js +2 -2
- package/dist/collection/components/six-range/six-range.js +2 -2
- package/dist/collection/components/six-root/six-root.js +1 -1
- package/dist/collection/components/six-search-field/six-search-field.js +1 -1
- package/dist/collection/components/six-select/six-select.js +33 -41
- package/dist/collection/components/six-select/six-select.js.map +1 -1
- package/dist/collection/components/six-select/test/util.spec.js +23 -1
- package/dist/collection/components/six-select/test/util.spec.js.map +1 -1
- package/dist/collection/components/six-select/util.js +24 -0
- package/dist/collection/components/six-select/util.js.map +1 -1
- package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
- package/dist/collection/components/six-switch/six-switch.js +2 -2
- package/dist/collection/components/six-tab/six-tab.js +2 -2
- package/dist/collection/components/six-tab/six-tab.js.map +1 -1
- package/dist/collection/components/six-tab-group/six-tab-group.js +2 -2
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
- package/dist/collection/components/six-tag/six-tag.js +2 -2
- package/dist/collection/components/six-textarea/six-textarea.js +2 -2
- package/dist/collection/components/six-tile/six-tile.js +3 -3
- package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
- package/dist/components/six-avatar.js +1 -1
- package/dist/components/six-badge.js +2 -2
- package/dist/components/six-button2.js +4 -3
- package/dist/components/six-button2.js.map +1 -1
- package/dist/components/six-card.js +1 -1
- package/dist/components/six-checkbox2.js +2 -2
- package/dist/components/six-datepicker.js +12 -10
- package/dist/components/six-datepicker.js.map +1 -1
- package/dist/components/six-details2.js +3 -3
- package/dist/components/six-dialog.js +2 -2
- package/dist/components/six-drawer.js +2 -2
- package/dist/components/six-error-page.js +1 -1
- package/dist/components/six-error2.js +2 -2
- package/dist/components/six-error2.js.map +1 -1
- package/dist/components/six-file-list.js +1 -1
- package/dist/components/six-file-upload.js +38 -8
- package/dist/components/six-file-upload.js.map +1 -1
- package/dist/components/six-footer.js +1 -1
- package/dist/components/six-group-label.js +1 -1
- package/dist/components/six-header.js +22 -14
- package/dist/components/six-header.js.map +1 -1
- package/dist/components/six-icon-button2.js +3 -3
- package/dist/components/six-icon2.js +2 -2
- package/dist/components/six-input2.js +13 -3
- package/dist/components/six-input2.js.map +1 -1
- package/dist/components/six-language-switcher.js +1 -1
- package/dist/components/six-layout-grid.js +1 -1
- package/dist/components/six-main-container.js +1 -1
- package/dist/components/six-menu-divider.js +1 -1
- package/dist/components/six-menu-item2.js +2 -2
- package/dist/components/six-menu-label.js +1 -1
- package/dist/components/six-menu2.js +13 -4
- package/dist/components/six-menu2.js.map +1 -1
- package/dist/components/six-picto2.js +1 -1
- package/dist/components/six-progress-bar.js +2 -2
- package/dist/components/six-progress-ring.js +1 -1
- package/dist/components/six-radio.js +2 -2
- package/dist/components/six-range.js +2 -2
- package/dist/components/six-root.js +1 -1
- package/dist/components/six-search-field.js +1 -1
- package/dist/components/six-select.js +66 -41
- package/dist/components/six-select.js.map +1 -1
- package/dist/components/six-sidebar-item.js +2 -2
- package/dist/components/six-sidebar.js +2 -2
- package/dist/components/six-switch.js +2 -2
- package/dist/components/six-tab-group.js +2 -2
- package/dist/components/six-tab-panel.js +1 -1
- package/dist/components/six-tab.js +2 -2
- package/dist/components/six-tab.js.map +1 -1
- package/dist/components/six-tag.js +2 -2
- package/dist/components/six-textarea.js +2 -2
- package/dist/components/six-tile.js +3 -3
- package/dist/components/six-tooltip2.js +2 -2
- package/dist/components.json +152 -12
- package/dist/esm/{form-control-40c37714.js → form-control-30c5bd8b.js} +2 -2
- package/dist/esm/{form-control-40c37714.js.map → form-control-30c5bd8b.js.map} +1 -1
- package/dist/esm/{index-52a755dc.js → index-5390c1d6.js} +455 -9
- package/dist/esm/index-5390c1d6.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/six-alert.entry.js +1 -1
- package/dist/esm/six-avatar.entry.js +2 -2
- package/dist/esm/six-badge.entry.js +3 -3
- package/dist/esm/six-button.entry.js +5 -4
- package/dist/esm/six-button.entry.js.map +1 -1
- package/dist/esm/six-card.entry.js +2 -2
- package/dist/esm/six-checkbox_2.entry.js +6 -6
- package/dist/esm/six-datepicker.entry.js +13 -11
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +4 -4
- package/dist/esm/six-dialog.entry.js +3 -3
- package/dist/esm/six-drawer.entry.js +3 -3
- package/dist/esm/six-dropdown_2.entry.js +14 -5
- package/dist/esm/six-dropdown_2.entry.js.map +1 -1
- package/dist/esm/six-error-page.entry.js +2 -2
- package/dist/esm/six-error.entry.js +3 -3
- package/dist/esm/six-error.entry.js.map +1 -1
- package/dist/esm/six-file-list-item.entry.js +1 -1
- package/dist/esm/six-file-list.entry.js +2 -2
- package/dist/esm/six-file-upload.entry.js +27 -6
- package/dist/esm/six-file-upload.entry.js.map +1 -1
- package/dist/esm/six-footer.entry.js +2 -2
- package/dist/esm/six-group-label.entry.js +3 -3
- package/dist/esm/six-header.entry.js +22 -15
- package/dist/esm/six-header.entry.js.map +1 -1
- package/dist/esm/six-icon-button.entry.js +4 -4
- package/dist/esm/six-icon.entry.js +3 -3
- package/dist/esm/six-input.entry.js +14 -5
- package/dist/esm/six-input.entry.js.map +1 -1
- package/dist/esm/six-item-picker.entry.js +1 -1
- package/dist/esm/six-language-switcher.entry.js +2 -2
- package/dist/esm/six-layout-grid.entry.js +2 -2
- package/dist/esm/six-main-container.entry.js +2 -2
- package/dist/esm/six-menu-divider.entry.js +2 -2
- package/dist/esm/six-menu-label.entry.js +2 -2
- package/dist/esm/six-picto.entry.js +2 -2
- package/dist/esm/six-progress-bar.entry.js +3 -3
- package/dist/esm/six-progress-ring.entry.js +2 -2
- package/dist/esm/six-radio.entry.js +3 -3
- package/dist/esm/six-range.entry.js +4 -4
- package/dist/esm/six-root.entry.js +2 -2
- package/dist/esm/six-search-field.entry.js +2 -2
- package/dist/esm/six-select.entry.js +68 -43
- package/dist/esm/six-select.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item-group.entry.js +1 -1
- package/dist/esm/six-sidebar-item.entry.js +3 -3
- package/dist/esm/six-sidebar.entry.js +3 -3
- package/dist/esm/six-spinner.entry.js +1 -1
- package/dist/esm/six-stage-indicator.entry.js +1 -1
- package/dist/esm/six-switch.entry.js +4 -4
- package/dist/esm/six-tab-group.entry.js +3 -3
- package/dist/esm/six-tab-panel.entry.js +2 -2
- package/dist/esm/six-tab.entry.js +3 -3
- package/dist/esm/six-tab.entry.js.map +1 -1
- package/dist/esm/six-tag.entry.js +3 -3
- package/dist/esm/six-textarea.entry.js +4 -4
- package/dist/esm/six-tile.entry.js +4 -4
- package/dist/esm/six-timepicker.entry.js +1 -1
- package/dist/esm/six-tooltip.entry.js +3 -3
- package/dist/esm/ui-library.js +3 -3
- package/dist/types/components/six-button/six-button.d.ts +1 -1
- package/dist/types/components/six-file-upload/six-file-upload.d.ts +8 -0
- package/dist/types/components/six-header/six-header.d.ts +3 -1
- package/dist/types/components/six-input/six-input.d.ts +9 -1
- package/dist/types/components/six-menu/six-menu.d.ts +1 -1
- package/dist/types/components/six-select/six-select.d.ts +0 -2
- package/dist/types/components/six-select/util.d.ts +2 -0
- package/dist/types/components.d.ts +47 -3
- package/dist/ui-library/assets/TRADEMARKS.md +3 -3
- package/dist/ui-library/p-030fa1fa.entry.js +2 -0
- package/dist/ui-library/p-037afc74.entry.js +2 -0
- package/dist/ui-library/p-037afc74.entry.js.map +1 -0
- package/dist/ui-library/{p-45960b56.entry.js → p-047d02ad.entry.js} +2 -2
- package/dist/ui-library/p-049c8910.entry.js +2 -0
- package/dist/ui-library/p-049c8910.entry.js.map +1 -0
- package/dist/ui-library/p-05eb1bab.js +3 -0
- package/dist/ui-library/p-05eb1bab.js.map +1 -0
- package/dist/ui-library/{p-3827f9e0.entry.js → p-06ba653e.entry.js} +2 -2
- package/dist/ui-library/{p-3e9324c8.entry.js → p-07c8de65.entry.js} +2 -2
- package/dist/ui-library/{p-1d4cb6e9.entry.js → p-0c129b61.entry.js} +2 -2
- package/dist/ui-library/p-11344bb8.entry.js +2 -0
- package/dist/ui-library/{p-ab8f9503.entry.js → p-14e5fccc.entry.js} +2 -2
- package/dist/ui-library/p-189602e4.entry.js +2 -0
- package/dist/ui-library/{p-8938e9bd.entry.js → p-2386627e.entry.js} +2 -2
- package/dist/ui-library/{p-756f4acf.entry.js → p-32e421a3.entry.js} +2 -2
- package/dist/ui-library/p-32e421a3.entry.js.map +1 -0
- package/dist/ui-library/p-347e568f.entry.js +2 -0
- package/dist/ui-library/p-36d5f98a.entry.js +2 -0
- package/dist/ui-library/p-36d5f98a.entry.js.map +1 -0
- package/dist/ui-library/{p-7c2255b5.entry.js → p-37433242.entry.js} +2 -2
- package/dist/ui-library/{p-5f810571.entry.js → p-3b5a76ea.entry.js} +2 -2
- package/dist/ui-library/{p-7fc0bf6b.entry.js → p-416b0439.entry.js} +2 -2
- package/dist/ui-library/{p-724d0458.entry.js → p-419ed003.entry.js} +2 -2
- package/dist/ui-library/{p-93ab2efc.entry.js → p-4963f03c.entry.js} +2 -2
- package/dist/ui-library/{p-29b75db4.entry.js → p-4bc7bbdb.entry.js} +2 -2
- package/dist/ui-library/{p-03900e17.entry.js → p-4d89932f.entry.js} +2 -2
- package/dist/ui-library/{p-aa99a393.js → p-605bdd81.js} +2 -2
- package/dist/ui-library/p-63acceb6.entry.js +2 -0
- package/dist/ui-library/{p-80476b0f.entry.js.map → p-63acceb6.entry.js.map} +1 -1
- package/dist/ui-library/{p-803915da.entry.js → p-63ee5e7e.entry.js} +2 -2
- package/dist/ui-library/{p-e798314b.entry.js → p-6b40c40c.entry.js} +2 -2
- package/dist/ui-library/p-6b40c40c.entry.js.map +1 -0
- package/dist/ui-library/{p-8644f970.entry.js → p-6f9153be.entry.js} +2 -2
- package/dist/ui-library/{p-50dbe99f.entry.js → p-790614b9.entry.js} +2 -2
- package/dist/ui-library/p-790614b9.entry.js.map +1 -0
- package/dist/ui-library/{p-52c04973.entry.js → p-7bdd1116.entry.js} +2 -2
- package/dist/ui-library/p-7c18b8ca.entry.js +2 -0
- package/dist/ui-library/{p-7a9dcb16.entry.js → p-8f1d3461.entry.js} +2 -2
- package/dist/ui-library/p-96d441e9.entry.js +2 -0
- package/dist/ui-library/p-96d441e9.entry.js.map +1 -0
- package/dist/ui-library/{p-d55db23a.entry.js → p-99f6fe01.entry.js} +2 -2
- package/dist/ui-library/p-9cb83369.entry.js +2 -0
- package/dist/ui-library/{p-d717a2f2.entry.js → p-a398e3eb.entry.js} +2 -2
- package/dist/ui-library/{p-19a1d34c.entry.js → p-a7e2f511.entry.js} +2 -2
- package/dist/ui-library/{p-9426a37b.entry.js → p-a9e009af.entry.js} +2 -2
- package/dist/ui-library/{p-8f307b55.entry.js → p-b335ed9c.entry.js} +2 -2
- package/dist/ui-library/{p-7562d5f5.entry.js → p-b5acf54d.entry.js} +2 -2
- package/dist/ui-library/{p-acc487ec.entry.js → p-b60c20aa.entry.js} +2 -2
- package/dist/ui-library/{p-a2a6aaea.entry.js → p-b7c68f74.entry.js} +2 -2
- package/dist/ui-library/{p-e43e5e45.entry.js → p-c62893e5.entry.js} +2 -2
- package/dist/ui-library/{p-f8572492.entry.js → p-c6464bfe.entry.js} +2 -2
- package/dist/ui-library/{p-f8572492.entry.js.map → p-c6464bfe.entry.js.map} +1 -1
- package/dist/ui-library/{p-49e5d8bb.entry.js → p-cf109cbf.entry.js} +2 -2
- package/dist/ui-library/{p-21002de1.entry.js → p-d1a2f84b.entry.js} +2 -2
- package/dist/ui-library/{p-7a722a13.entry.js → p-d42f1ea9.entry.js} +2 -2
- package/dist/ui-library/{p-6c96b62e.entry.js → p-d88b9c16.entry.js} +2 -2
- package/dist/ui-library/p-d9586999.entry.js +2 -0
- package/dist/ui-library/p-e14d78e9.entry.js +2 -0
- package/dist/ui-library/p-e14d78e9.entry.js.map +1 -0
- package/dist/ui-library/{p-c948cf70.entry.js → p-e9b8ad98.entry.js} +2 -2
- package/dist/ui-library/{p-01853739.entry.js → p-ebbe9bdc.entry.js} +2 -2
- package/dist/ui-library/{p-38a9a590.entry.js → p-fe89a7c4.entry.js} +2 -2
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/index-b288f7d9.js.map +0 -1
- package/dist/collection/components/six-header/assets/six-logo.svg +0 -1
- package/dist/collection/components/six-header/test/six-header.spec.js +0 -177
- package/dist/collection/components/six-header/test/six-header.spec.js.map +0 -1
- package/dist/esm/index-52a755dc.js.map +0 -1
- package/dist/ui-library/assets/six-logo.svg +0 -1
- package/dist/ui-library/p-0a094514.entry.js +0 -2
- package/dist/ui-library/p-19ca3bd1.entry.js +0 -2
- package/dist/ui-library/p-19ca3bd1.entry.js.map +0 -1
- package/dist/ui-library/p-1f1224ae.entry.js +0 -2
- package/dist/ui-library/p-338205f4.entry.js +0 -2
- package/dist/ui-library/p-338205f4.entry.js.map +0 -1
- package/dist/ui-library/p-3eed2287.entry.js +0 -2
- package/dist/ui-library/p-4af73ea9.entry.js +0 -2
- package/dist/ui-library/p-4af73ea9.entry.js.map +0 -1
- package/dist/ui-library/p-50dbe99f.entry.js.map +0 -1
- package/dist/ui-library/p-756f4acf.entry.js.map +0 -1
- package/dist/ui-library/p-80476b0f.entry.js +0 -2
- package/dist/ui-library/p-8dff4dcb.entry.js +0 -2
- package/dist/ui-library/p-8dff4dcb.entry.js.map +0 -1
- package/dist/ui-library/p-a2b8aca7.entry.js +0 -2
- package/dist/ui-library/p-ba7424b3.entry.js +0 -2
- package/dist/ui-library/p-d7739200.entry.js +0 -2
- package/dist/ui-library/p-e3766acb.entry.js +0 -2
- package/dist/ui-library/p-e798314b.entry.js.map +0 -1
- package/dist/ui-library/p-f1bb5648.entry.js +0 -2
- package/dist/ui-library/p-f1bb5648.entry.js.map +0 -1
- package/dist/ui-library/p-f93d8a4e.js +0 -3
- package/dist/ui-library/p-f93d8a4e.js.map +0 -1
- /package/dist/ui-library/{p-3eed2287.entry.js.map → p-030fa1fa.entry.js.map} +0 -0
- /package/dist/ui-library/{p-45960b56.entry.js.map → p-047d02ad.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3827f9e0.entry.js.map → p-06ba653e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3e9324c8.entry.js.map → p-07c8de65.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1d4cb6e9.entry.js.map → p-0c129b61.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1f1224ae.entry.js.map → p-11344bb8.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ab8f9503.entry.js.map → p-14e5fccc.entry.js.map} +0 -0
- /package/dist/ui-library/{p-d7739200.entry.js.map → p-189602e4.entry.js.map} +0 -0
- /package/dist/ui-library/{p-8938e9bd.entry.js.map → p-2386627e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ba7424b3.entry.js.map → p-347e568f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-7c2255b5.entry.js.map → p-37433242.entry.js.map} +0 -0
- /package/dist/ui-library/{p-5f810571.entry.js.map → p-3b5a76ea.entry.js.map} +0 -0
- /package/dist/ui-library/{p-7fc0bf6b.entry.js.map → p-416b0439.entry.js.map} +0 -0
- /package/dist/ui-library/{p-724d0458.entry.js.map → p-419ed003.entry.js.map} +0 -0
- /package/dist/ui-library/{p-93ab2efc.entry.js.map → p-4963f03c.entry.js.map} +0 -0
- /package/dist/ui-library/{p-29b75db4.entry.js.map → p-4bc7bbdb.entry.js.map} +0 -0
- /package/dist/ui-library/{p-03900e17.entry.js.map → p-4d89932f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-aa99a393.js.map → p-605bdd81.js.map} +0 -0
- /package/dist/ui-library/{p-803915da.entry.js.map → p-63ee5e7e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-8644f970.entry.js.map → p-6f9153be.entry.js.map} +0 -0
- /package/dist/ui-library/{p-52c04973.entry.js.map → p-7bdd1116.entry.js.map} +0 -0
- /package/dist/ui-library/{p-e3766acb.entry.js.map → p-7c18b8ca.entry.js.map} +0 -0
- /package/dist/ui-library/{p-7a9dcb16.entry.js.map → p-8f1d3461.entry.js.map} +0 -0
- /package/dist/ui-library/{p-d55db23a.entry.js.map → p-99f6fe01.entry.js.map} +0 -0
- /package/dist/ui-library/{p-0a094514.entry.js.map → p-9cb83369.entry.js.map} +0 -0
- /package/dist/ui-library/{p-d717a2f2.entry.js.map → p-a398e3eb.entry.js.map} +0 -0
- /package/dist/ui-library/{p-19a1d34c.entry.js.map → p-a7e2f511.entry.js.map} +0 -0
- /package/dist/ui-library/{p-9426a37b.entry.js.map → p-a9e009af.entry.js.map} +0 -0
- /package/dist/ui-library/{p-8f307b55.entry.js.map → p-b335ed9c.entry.js.map} +0 -0
- /package/dist/ui-library/{p-7562d5f5.entry.js.map → p-b5acf54d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-acc487ec.entry.js.map → p-b60c20aa.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a2a6aaea.entry.js.map → p-b7c68f74.entry.js.map} +0 -0
- /package/dist/ui-library/{p-e43e5e45.entry.js.map → p-c62893e5.entry.js.map} +0 -0
- /package/dist/ui-library/{p-49e5d8bb.entry.js.map → p-cf109cbf.entry.js.map} +0 -0
- /package/dist/ui-library/{p-21002de1.entry.js.map → p-d1a2f84b.entry.js.map} +0 -0
- /package/dist/ui-library/{p-7a722a13.entry.js.map → p-d42f1ea9.entry.js.map} +0 -0
- /package/dist/ui-library/{p-6c96b62e.entry.js.map → p-d88b9c16.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a2b8aca7.entry.js.map → p-d9586999.entry.js.map} +0 -0
- /package/dist/ui-library/{p-c948cf70.entry.js.map → p-e9b8ad98.entry.js.map} +0 -0
- /package/dist/ui-library/{p-01853739.entry.js.map → p-ebbe9bdc.entry.js.map} +0 -0
- /package/dist/ui-library/{p-38a9a590.entry.js.map → p-fe89a7c4.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["isString","value","isNil","i18nDate","en","months","monthsShort","monthsShortGrouped","weekdays","weekdaysShort","weekdaysMin","de","fr","it","es","now","Date","removeTime","date","getFullYear","getMonth","getDate","isValidDate","isNaN","getTime","toString","year","Error","month","day","hours","getHours","minutes","getMinutes","seconds","getSeconds","getFirstDayOfTheWeek","weekdayDiff","setDate","getDay","isSameYear","a","b","isSameMonth","isSameDay","isSameWeek","isValidDateString","datestring","format","length","getDateParts","toDate","isInRange","minDate","maxDate","lookAhead","iFormat","match","increment","followingCharacterMatches","charAt","hasProperLength","formatNumber","len","num","String","formatDate","output","FORMATTING_TOKENS","TWO_NUMERICS_REGEX","FOUR_NUMERICS_REGEX","NON_NUMERIC_REGEX","YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","parseFlags","addParseFlag","token","regex","callback","tokens","Array","isArray","func","input","parseInt","forEach","key","cent","Math","floor","getFullInputArray","backupDate","result","backupArr","useBackup","i","undefined","createDate","hour","minute","second","isFinite","setFullYear","makeParser","dateString","mark","parseTo","word","replace","indexOf","substr","parser","exec","obj","Object","assign","getCleanDateString","dirtyDateString","separator","split","map","s","join","inputArray","e","NaN","createCalendarGrid","calendarGridArguments","firstDateOfBox","allowedDates","dateFormat","selectedDate","pointerDate","weekDatePointer","dayDatePointer","calendar","row","display","label","isToday","isSelected","isDisabled","isOutdated","rangeAround","number","range","itemsPerGroup","keys","n","reduce","curr","item","index","push","SixDateFormats","MonthSelection","monthSelectionParams","locale","isSelectedMonth","_a","findIndex","m","h","class","part","onClick","onClickMonthCell","DaySelection","daySelectionParams","weekday","calendarGrid","cell","onClickDateCell","YearSelection","yearSelectionParams","yearSelection","onClickYearCell","sixDatepickerCss","SixDatepickerStyle0","NUMBER_OF_YEARS_SHOWN","MIN_POPUP_HEIGHT","SelectionMode","SixDatepicker","this","eventListeners","EventListeners","previousUnit","selectionMode","previousMonth","previousYear","previousYearGroup","nextUnit","nextMonth","nextYear","nextYearGroup","handleDocumentKeyDown","event","keyboardEvent","open","stopPropagation","closePopup","inputElement","setFocus","handleDocumentMouseDown","path","composedPath","includes","container","handleClearClick","async","select","sixClear","emit","onTimepickerChange","sixTimepickerChange","time","detail","newDate","setHours","updateValue","updatePointerDates","selectedMonth","monthShort","handleInputChange","inputValue","inputValueDate","updateIfChanged","datesOnly","dateAsString","handleOnBlur","sixSelect","_b","formattedDate","sixBlur","getCurrentDateAsPointer","type","DDMMYYY_DOT","DEFAULT_DEBOUNCE_FAST","debounceChanged","debounceEvent","debounce","valueChanged","console","warn","resizeHandler","updateDropdownDirection","moveOpenHoistedPopup","adjustPopupPosition","scrollHandler","movePopup","hoist","popup","wrapper","containingElement","host","options","min","max","isDropDownContentUp","calcIsDropDownContentUp","getMonthStringForIndex","openCalendar","disabled","setupEventListenersForOpenPopup","add","document","inline","remove","getPointerDate","differsFromPointerDate","defaultDate","closeOnSelect","componentWillLoad","componentDidLoad","componentDidRender","renderHeader","viewBox","width","height","d","points","renderBody","renderCustomIcon","icon","hasSlot","name","size","slot","prefix","iconPosition","renderClearable","clearable","tabindex","render","ref","el","placeholder","readonly","required","errorText","errorTextCount","invalid","datepicker__popup","placement","_c","adjustPopupForHoisting","isUp","adjustPopupForSmallScreens","connectedCallback","forward","disconnectedCallback","removeAll"],"sources":["src/utils/type-check.ts","src/utils/date-util.ts","src/components/six-datepicker/six-date-formats.tsx","src/components/six-datepicker/components/month-selection.tsx","src/components/six-datepicker/components/day-selection.tsx","src/components/six-datepicker/components/year-selection.tsx","src/components/six-datepicker/six-datepicker.scss?tag=six-datepicker&encapsulation=shadow","src/components/six-datepicker/six-datepicker.tsx"],"sourcesContent":["export const isString = (value: unknown): value is string => typeof value === 'string';\n\n// only use '==' instead of '===' to also catch undefined and void\nexport const isNil = (value: unknown): value is undefined | null => value == null;\n\nexport const isDate = (value: unknown): value is Date => value instanceof Date;\n","/* eslint-disable */\n// @ts-nocheck\n\nimport { isDate, isNil, isString } from './type-check';\nimport { SixDateFormats } from '../components/six-datepicker/six-date-formats';\nimport { CalendarCell } from '../components/six-datepicker/six-datepicker';\n\nexport type DateLocale = typeof i18nDate.en;\nexport const i18nDate = {\n en: {\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n monthsShortGrouped: [\n ['Jan', 'Feb', 'Mar', 'Apr'],\n ['May', 'Jun', 'Jul', 'Aug'],\n ['Sep', 'Oct', 'Nov', 'Dec'],\n ],\n weekdays: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],\n weekdaysShort: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n weekdaysMin: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],\n },\n de: {\n months: [\n 'Januar',\n 'Februar',\n 'März',\n 'April',\n 'Mai',\n 'Juni',\n 'Juli',\n 'August',\n 'September',\n 'Oktober',\n 'November',\n 'Dezember',\n ],\n monthsShort: ['Jan.', 'Feb.', 'März', 'Apr.', 'Mai', 'Juni', 'Juli', 'Aug.', 'Sep.', 'Okt.', 'Nov.', 'Dez.'],\n monthsShortGrouped: [\n ['Jan.', 'Feb.', 'März', 'Apr.'],\n ['Mai', 'Juni', 'Juli', 'Aug.'],\n ['Sep.', 'Okt.', 'Nov.', 'Dez.'],\n ],\n weekdays: ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'],\n weekdaysShort: ['Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.', 'So.'],\n weekdaysMin: ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],\n },\n fr: {\n months: [\n 'janvier',\n 'février',\n 'mars',\n 'avril',\n 'mai',\n 'juin',\n 'juillet',\n 'août',\n 'septembre',\n 'octobre',\n 'novembre',\n 'décembre',\n ],\n monthsShort: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],\n monthsShortGrouped: [\n ['janv.', 'févr.', 'mars', 'avr.'],\n ['mai', 'juin', 'juil.', 'août'],\n ['sept.', 'oct.', 'nov.', 'déc.'],\n ],\n weekdays: ['lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche'],\n weekdaysShort: ['lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.', 'dim.'],\n weekdaysMin: ['lu', 'ma', 'me', 'je', 've', 'sa', 'di'],\n },\n it: {\n months: [\n 'gennaio',\n 'febbraio',\n 'marzo',\n 'aprile',\n 'maggio',\n 'giugno',\n 'luglio',\n 'agosto',\n 'settembre',\n 'ottobre',\n 'novembre',\n 'dicembre',\n ],\n monthsShort: ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'],\n monthsShortGrouped: [\n ['gen', 'feb', 'mar', 'apr'],\n ['mag', 'giu', 'lug', 'ago'],\n ['set', 'ott', 'nov', 'dic'],\n ],\n weekdays: ['lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato', 'domenica'],\n weekdaysShort: ['lun', 'mar', 'mer', 'gio', 'ven', 'sab', 'dom'],\n weekdaysMin: ['lu', 'ma', 'me', 'gi', 've', 'sa', 'do'],\n },\n es: {\n months: [\n 'enero',\n 'febrero',\n 'marzo',\n 'abril',\n 'mayo',\n 'junio',\n 'julio',\n 'agosto',\n 'septiembre',\n 'octubre',\n 'noviembre',\n 'diciembre',\n ],\n monthsShort: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'],\n monthsShortGrouped: [\n ['ene', 'feb', 'mar', 'abr'],\n ['may', 'jun', 'jul', 'ago'],\n ['sep', 'oct', 'nov', 'dic'],\n ],\n weekdays: ['lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado', 'domingo'],\n weekdaysShort: ['lun', 'mar', 'mié', 'jue', 'vie', 'sáb', 'dom'],\n weekdaysMin: ['lu', 'ma', 'mi', 'ju', 'vi', 'sa', 'do'],\n },\n};\n\n/**\n * Returns a JS Date instance of the exact moment\n *\n * ```typescript\n * const date = now()\n * // Wed Mar 10 2021 20:30:32 GMT+0100 (Central European Standard Time)\n * ```\n */\nexport const now = () => new Date();\n\nexport const removeTime = (date: Date) => new Date(date.getFullYear(), date.getMonth(), date.getDate());\n\nexport const pad = (value: number) => String(value).padStart(2, '0');\n\n/**\n * Returns `true` if the given date is valid\n */\nexport const isValidDate = (value: unknown): boolean => {\n return value instanceof Date && !isNaN(value.getTime()) && new Date(value).toString() !== 'Invalid Date';\n};\n\n/**\n * Returns the year number of the given date\n *\n * ```typescript\n * year(new Date(2020, 0, 1)) // 2020\n * ```\n */\nexport const year = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getFullYear();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the month number of the given date\n *\n * ```typescript\n * month(new Date(2020, 0, 1)) // 0\n * ```\n */\nexport const month = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getMonth();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the day number of the given date\n *\n * ```typescript\n * day(new Date(2020, 0, 1)) // 1\n * ```\n */\nexport const day = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getDate();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the hours of the given date\n */\nexport const hours = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getHours();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the minutes of the given date\n */\nexport const minutes = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getMinutes();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the seconds of the given date\n */\nexport const seconds = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getSeconds();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the first day of the week of the given date.\n */\nexport const getFirstDayOfTheWeek = (date: Date) => {\n const weekdayDiff = [6, 0, 1, 2, 3, 4, 5];\n const day = new Date(date);\n day.setDate(day.getDate() - weekdayDiff[day.getDay()]);\n return day;\n};\n\n/**\n * Returns `true` when the year of the dates are the same\n */\nexport const isSameYear = (a: Date | undefined, b: Date | undefined) => a?.getFullYear() === b?.getFullYear();\n\n/**\n * Returns `true` when the month of the dates are the same\n */\nexport const isSameMonth = (a: Date | undefined, b: Date | undefined) =>\n isSameYear(a, b) && a?.getMonth() === b?.getMonth();\n\n/**\n * Returns `true` when the day of the dates are the same\n */\nexport const isSameDay = (a: Date | undefined, b: Date | undefined) =>\n isSameMonth(a, b) && a?.getDate() === b?.getDate();\n\n/**\n * Returns `true` when the week of the dates are the same\n */\nexport const isSameWeek = (a: Date, b: Date) => isSameDay(getFirstDayOfTheWeek(a), getFirstDayOfTheWeek(b));\n\nconst localDatetime = (date: Date) => new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\n\n/**\n * Returns the ISO string `yyyy-mm-dd` of the given date\n *\n * ```typescript\n * isoString(new Date(2020, 0, 13)) // '2020-01-13'\n * ```\n */\nexport const isoString = (date: Date | undefined): string => {\n if (isNil(date) || Date.toString() === 'Invalid Date') {\n return '';\n }\n\n return `${year(date)}-${pad(month(date) + 1)}-${pad(day(date))}`;\n};\n\n/**\n * Returns the ISO string `yyyy-mm-dd` of the given parameters year, month and day\n *\n * ```typescript\n * newDateString(2020, 0, 13) // '2020-01-13'\n * or\n * newDateString(new Date(2020, 0, 13)) // '2020-01-13'\n * ```\n */\nexport const newDateString = (yearOrDate: Date | number, month?: number, day?: number): string => {\n let date;\n if (isDate(yearOrDate)) {\n date = localDatetime(yearOrDate);\n } else {\n date = new Date(Date.UTC(yearOrDate, (month as number) - 1, day as number));\n }\n\n return isoString(date);\n};\n\n/**\n * Returns `true` if the given datestring is valid\n */\nexport const isValidDateString = (datestring: string | undefined, format: string) => {\n if (!isString(datestring) || !isString(format)) {\n return false;\n }\n\n if (datestring.length < 6 || format.length < 6) {\n return false;\n }\n\n const { day, month } = getDateParts(datestring, format);\n\n if (day > 31 || month > 11 || day <= 0 || month < 0) {\n return false;\n }\n\n const date = toDate(datestring, format);\n\n if (isNil(date)) {\n return false;\n }\n\n return date.toString() !== 'Invalid Date';\n};\n\n/**\n * Returns `true` when the given date is not smaller than the minDate and not bigger than the maxDate.\n *\n * ```typescript\n * isInRange(new Date(2020, 1, 1), new Date(2020, 0, 1), new Date(2020, 2, 1)) // true\n * ```\n */\nexport const isInRange = (date: Date | undefined, minDate: Date | undefined, maxDate: Date | undefined): boolean => {\n if (!date) {\n return true;\n }\n\n if (minDate && date < minDate) {\n return false;\n }\n\n if (maxDate && maxDate < date) {\n return false;\n }\n\n return true;\n};\n\nconst validateTwoDates = (\n first: any,\n second: Date | string | undefined,\n validateFn: (irst: Date, second: Date) => boolean\n) => {\n if (isNil(first) && isNil(second)) {\n return false;\n }\n\n const _first: Date = new Date(first as string | Date);\n const _second: Date = new Date(second as string | Date);\n\n if (!isValidDate(_first) || !isValidDate(_second)) {\n return false;\n }\n\n return validateFn(_first, _second);\n};\n\n/**\n * Returns `true` when the given date is not smaller than the before date.\n *\n * ```typescript\n * isBefore(new Date(2020, 1, 1), new Date(2020, 3, 1)) // true\n * ```\n */\nexport const isBefore = (date: any, beforeDate: Date | string | undefined): boolean =>\n validateTwoDates(date, beforeDate, (first, second) => first < second);\n\n/**\n * Returns `true` when the given date is not smaller than the before date.\n *\n * ```typescript\n * isAfter(new Date(2020, 5, 1), new Date(2020, 3, 1)) // true\n * ```\n */\nexport const isAfter = (date: any, afterDate: Date | string | undefined): boolean =>\n validateTwoDates(date, afterDate, (first, second) => first > second);\n\n/**\n * Increases the year of a date and retunrs the result\n *\n * ```typescript\n * increaseYear(new Date(2020, 0, 1), 1) // 2021\n * ```\n */\nexport const increaseYear = (date: Date, years: number): number => year(date) + years;\n\n/**\n * Decreases the year of a date and retunrs the result\n *\n * ```typescript\n * decreaseYear(new Date(2020, 0, 1), 1) // 2019\n * ```\n */\nexport const decreaseYear = (date: Date, years: number): number => year(date) - years;\n\nconst lookAhead = (iFormat: number, format: string, match: string, length = 2) => {\n const increment = length - 1;\n const followingCharacterMatches = format.charAt(iFormat + increment) === match;\n const hasProperLength = iFormat + increment < format.length;\n return hasProperLength && followingCharacterMatches;\n};\n\nconst formatNumber = (value, len) => {\n let num = String(value);\n\n while (num.length < len) {\n num = '0' + num;\n }\n\n return num;\n};\n\nexport const formatDate = (date: Date | undefined | null, format: string): string => {\n if (date == null) {\n return '';\n }\n\n let output = '';\n\n for (let iFormat = 0; iFormat < format.length; iFormat++) {\n switch (format.charAt(iFormat)) {\n case 'd':\n if (lookAhead(iFormat, format, 'd')) {\n output += formatNumber(date.getDate(), 2);\n iFormat++;\n } else {\n output += String(date.getDate());\n }\n break;\n case 'm':\n if (lookAhead(iFormat, format, 'm')) {\n output += formatNumber(date.getMonth() + 1, 2);\n iFormat++;\n } else {\n output += String(date.getMonth() + 1);\n }\n break;\n case 'y':\n if (lookAhead(iFormat, format, 'y', 4)) {\n iFormat += 3;\n output += date.getFullYear();\n } else {\n output += (date.getFullYear() % 100 < 10 ? '0' : '') + (date.getFullYear() % 100);\n iFormat++;\n }\n break;\n case 'h':\n if (lookAhead(iFormat, format, 'h')) {\n output += formatNumber(date.getHours(), 2);\n iFormat++;\n } else {\n output += String(date.getHours());\n }\n break;\n case 'M':\n if (lookAhead(iFormat, format, 'M')) {\n output += formatNumber(date.getMinutes(), 2);\n iFormat++;\n } else {\n output += String(date.getMinutes());\n }\n break;\n case 's':\n if (lookAhead(iFormat, format, 's')) {\n output += formatNumber(date.getSeconds(), 2);\n iFormat++;\n } else {\n output += String(date.getSeconds());\n }\n break;\n default:\n output += format.charAt(iFormat);\n }\n }\n return output;\n};\n\nconst daylightSavingAdjust = (date): Date => {\n if (!date) {\n return null;\n }\n\n date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n\n return date;\n};\n\nconst getDaysCountInMonth = (month: number, year: number) =>\n 32 - daylightSavingAdjust(new Date(year, month, 32)).getDate();\n\nexport const parseDate = (value: any, format: string, locale: string): Date => {\n if (format == null || value == null) {\n throw 'Invalid arguments';\n }\n\n value = typeof value === 'object' ? value.toString() : value + '';\n if (value === '') {\n return null;\n }\n\n let iFormat;\n let dim;\n let extra;\n let iValue = 0;\n let shortYearCutoff = 100;\n let year = -1;\n let month = -1;\n let day = -1;\n let doy = -1;\n let literal = false;\n let date: Date;\n let lookAhead = (match: string, len = 2) => {\n const increment = len - 1;\n let matches = iFormat + increment < format.length && format.charAt(iFormat + increment) === match;\n if (matches) {\n iFormat += increment;\n }\n return matches;\n };\n let getNumber = (match, len = 2) => {\n let isDoubled = lookAhead(match, len),\n size = match === '@' ? 14 : match === '!' ? 20 : match === 'y' && isDoubled ? 4 : match === 'o' ? 3 : 2,\n minSize = match === 'y' ? size : 1,\n digits = new RegExp('^\\\\d{' + minSize + ',' + size + '}'),\n num = value.substring(iValue).match(digits);\n if (!num) {\n throw 'Missing number at position ' + iValue;\n }\n iValue += num[0].length;\n return parseInt(num[0], 10);\n };\n let getName = (match, shortNames, longNames) => {\n let index = -1;\n let arr = lookAhead(match) ? longNames : shortNames;\n let names = [];\n\n for (let i = 0; i < arr.length; i++) {\n names.push([i, arr[i]]);\n }\n names.sort((a, b) => {\n return -(a[1].length - b[1].length);\n });\n\n for (let i = 0; i < names.length; i++) {\n let name = names[i][1];\n if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n index = names[i][0];\n iValue += name.length;\n break;\n }\n }\n\n if (index !== -1) {\n return index + 1;\n } else {\n throw 'Unknown name at position ' + iValue;\n }\n };\n let checkLiteral = () => {\n if (value.charAt(iValue) !== format.charAt(iFormat)) {\n throw 'Unexpected literal at position ' + iValue;\n }\n iValue++;\n };\n\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n literal = false;\n } else {\n checkLiteral();\n }\n } else {\n switch (format.charAt(iFormat)) {\n case 'd':\n day = getNumber('d');\n break;\n case 'D':\n getName('D', i18nDate[locale].weekdaysShort, i18nDate[locale].weekdays);\n break;\n case 'm':\n month = getNumber('m');\n break;\n case 'M':\n month = getName('M', i18nDate[locale].monthsShort, i18nDate[locale].months);\n break;\n case 'y':\n year = getNumber('y', 4);\n break;\n default:\n checkLiteral();\n }\n }\n }\n\n if (iValue < value.length) {\n extra = value.substr(iValue);\n if (!/^\\s+/.test(extra)) {\n throw 'Extra/unparsed characters found in date: ' + extra;\n }\n }\n\n if (year === -1) {\n year = new Date().getFullYear();\n } else if (year < 100) {\n year += new Date().getFullYear() - (new Date().getFullYear() % 100) + (year <= shortYearCutoff ? 0 : -100);\n }\n\n if (doy > -1) {\n month = 1;\n day = doy;\n do {\n dim = getDaysCountInMonth(year, month - 1);\n if (day <= dim) {\n break;\n }\n month++;\n day -= dim;\n } while (true);\n }\n\n date = daylightSavingAdjust(new Date(year, month - 1, day));\n if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n throw 'Invalid date'; // E.g. 31/02/00\n }\n\n return date;\n};\n\nconst FORMATTING_TOKENS = /(\\[[^\\[]*\\])|(mm|dd|yyyy|yy|hh|MM|ss|.)/g;\n\nconst TWO_NUMERICS_REGEX = /\\d\\d/; // 00 - 99\nconst FOUR_NUMERICS_REGEX = /\\d{4}/; // 0000 - 9999\nconst NON_NUMERIC_REGEX = /[^0-9]/g;\n\nconst YEAR = 'year';\nconst MONTH = 'month';\nconst DAY = 'day';\nconst HOUR = 'hour';\nconst MINUTE = 'minute';\nconst SECOND = 'second';\n\ninterface ParseFlagMark {\n year: number;\n month: number;\n day: number;\n hour: number;\n minute: number;\n second: number;\n date: Date;\n}\n\ntype ParseFlagCallBackReturn = any;\n\ntype ParseFlagRegExp = RegExp | ((locale: any) => RegExp);\ntype ParseFlagCallBack = (input: string) => ParseFlagCallBackReturn;\n\ninterface ParseFlag {\n [key: string]: [ParseFlagRegExp, ParseFlagCallBack];\n}\n\nconst parseFlags: ParseFlag = {};\n\nconst addParseFlag = (token: string | string[], regex: ParseFlagRegExp, callback) => {\n const tokens = Array.isArray(token) ? token : [token];\n let func: ParseFlagCallBack;\n if (typeof callback === 'string') {\n func = (input) => {\n const value = parseInt(input, 10);\n return { [callback]: value };\n };\n } else {\n func = callback;\n }\n tokens.forEach((key) => {\n parseFlags[key] = [regex, func];\n });\n};\n\naddParseFlag('yy', TWO_NUMERICS_REGEX, (input) => {\n const year = new Date().getFullYear();\n const cent = Math.floor(year / 100);\n let value = parseInt(input, 10);\n value = (value > 68 ? cent - 1 : cent) * 100 + value;\n return { [YEAR]: value };\n});\naddParseFlag('yyyy', FOUR_NUMERICS_REGEX, YEAR);\naddParseFlag('mm', TWO_NUMERICS_REGEX, (input) => ({ [MONTH]: parseInt(input, 10) - 1 }));\naddParseFlag('dd', TWO_NUMERICS_REGEX, DAY);\naddParseFlag('hh', TWO_NUMERICS_REGEX, HOUR);\naddParseFlag('MM', TWO_NUMERICS_REGEX, MINUTE);\naddParseFlag('ss', TWO_NUMERICS_REGEX, SECOND);\n\ntype DateArgs = [number, number, number, number, number, number];\n\nconst getFullInputArray = (input: Array<number | undefined>, backupDate = new Date()) => {\n const result: DateArgs = [0, 0, 1, 0, 0, 0];\n const backupArr = [\n backupDate.getFullYear(),\n backupDate.getMonth(),\n backupDate.getDate(),\n backupDate.getHours(),\n backupDate.getMinutes(),\n backupDate.getSeconds(),\n ];\n\n let useBackup = true;\n for (let i = 0; i < 7; i++) {\n if (input[i] === undefined) {\n result[i] = useBackup ? backupArr[i] : result[i];\n } else {\n result[i] = input[i]!;\n useBackup = false;\n }\n }\n return result;\n};\n\nconst createDate = (year: number, month: number, day: number, hour: number, minute: number, second: number): Date => {\n if (!(year < 100 && year >= 0)) {\n return new Date(year, month, day, hour, minute, second);\n }\n\n const date = new Date(year + 400, month, day, hour, minute, second);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(year);\n }\n return date;\n};\n\nconst makeParser = (dateString: string, format: string) => {\n const tokens = format.match(FORMATTING_TOKENS);\n if (!tokens) {\n throw new Error();\n }\n const { length } = tokens;\n let mark: Partial<ParseFlagMark> = {};\n for (let i = 0; i < length; i += 1) {\n const token = tokens[i];\n const parseTo = parseFlags[token];\n if (!parseTo) {\n const word = token.replace(/^\\[|\\]$/g, '');\n if (dateString.indexOf(word) === 0) {\n dateString = dateString.substr(word.length);\n } else {\n throw new Error('not match');\n }\n } else {\n const regex = parseTo[0] as RegExp;\n const parser = parseTo[1];\n const value = (regex.exec(dateString) || [])[0];\n const obj = parser(value);\n mark = { ...mark, ...obj };\n dateString = dateString.replace(value, '');\n }\n }\n return mark;\n};\n\nconst getCleanDateString = (dirtyDateString: string, format: string) => {\n if (dirtyDateString.length === format.length) {\n return dirtyDateString;\n }\n\n const separator = dirtyDateString.match(NON_NUMERIC_REGEX)[0];\n\n // pad signle digits to follow supported dateformats\n return dirtyDateString\n .split(separator)\n .map((s) => (s.length === 1 ? '0' + s : s))\n .join(separator);\n};\n\nconst getDateParts: (dirtyDateString: string, format: string) => Partial<ParseFlagMark> = (\n dirtyDateString: string,\n format: string\n) => {\n const dateString = getCleanDateString(dirtyDateString, format);\n\n return makeParser(dateString, format);\n};\n\nexport const toDate = (dirtyDateString: string | undefined, format: string): Date | undefined => {\n try {\n const { backupDate = new Date() } = {};\n const { year, month, day, hour, minute, second, date } = getDateParts(dirtyDateString, format);\n if (date != null) {\n return date;\n }\n const inputArray = [year, month, day, hour, minute, second];\n const result = getFullInputArray(inputArray, backupDate);\n return createDate(...result);\n } catch (e) {\n return new Date(NaN);\n }\n};\n\nexport interface PointerDate {\n year: number;\n month: number;\n day: number;\n hours: number;\n minutes: number;\n seconds: number;\n}\n\nexport interface CalendarGridArgs {\n firstDateOfBox: Date;\n minDate?: Date;\n maxDate?: Date;\n dateFormat: SixDateFormats;\n pointerDate: { month: number; year: number; day: number };\n allowedDates: (date: Date) => boolean;\n locale: 'en' | 'de' | 'fr' | 'it' | 'es';\n selectedDate?: Date;\n}\n\nexport const createCalendarGrid: (calendarGridArguments: CalendarGridArgs) => CalendarCell[][] = (\n calendarGridArguments: CalendarGridArgs\n) => {\n const { firstDateOfBox, allowedDates, dateFormat, selectedDate, minDate, maxDate, pointerDate } =\n calendarGridArguments;\n\n const weekDatePointer = new Date(firstDateOfBox);\n const dayDatePointer = new Date(firstDateOfBox);\n\n let calendar: CalendarCell[][] = [];\n\n do {\n let row: CalendarCell[] = [];\n do {\n row = [\n ...row,\n {\n date: new Date(dayDatePointer),\n display: formatDate(dayDatePointer, dateFormat),\n dateString: formatDate(dayDatePointer, dateFormat),\n label: day(dayDatePointer).toString(),\n isToday: isSameDay(dayDatePointer, now()),\n isSelected: selectedDate && isSameDay(dayDatePointer, selectedDate),\n isDisabled: !allowedDates(dayDatePointer) || !isInRange(dayDatePointer, minDate, maxDate),\n isOutdated: pointerDate.month !== dayDatePointer.getMonth() || !isInRange(dayDatePointer, minDate, maxDate),\n },\n ];\n dayDatePointer.setDate(dayDatePointer.getDate() + 1);\n } while (isSameWeek(dayDatePointer, weekDatePointer));\n calendar = [...calendar, row];\n weekDatePointer.setDate(weekDatePointer.getDate() + 7);\n } while (isSameMonth(new Date(pointerDate.year, pointerDate.month, pointerDate.day), dayDatePointer));\n return calendar;\n};\n\n/**\n * Returns a range of numbers around the given number grouped into buckets of 5.\n * @param number the given number around which you want to get the other numbers\n * @param range range of numbers to include in the result\n */\nexport function rangeAround(number: number, range: number): number[][] {\n const itemsPerGroup = 5;\n return [...Array(range).keys()]\n .map((n) => n + number - Math.floor(range / 2))\n .reduce((curr, item, index) => {\n if (index % itemsPerGroup === 0) {\n curr.push([]);\n }\n curr[curr.length - 1].push(item);\n return curr;\n }, [] as number[][]);\n}\n","// eslint-disable-next-line @stencil-community/ban-exported-const-enums\nexport enum SixDateFormats {\n DDMMYYY_DOT = 'dd.mm.yyyy',\n YYYYMMDD_DASH = 'yyyy-mm-dd',\n DDMMYYYY_DASH = 'dd-mm-yyyy',\n DDMMYYYY_SLASH = 'dd/mm/yyyy',\n YYYYMMDD_SLASH = 'yyyy/mm/dd',\n DDMMYY_DOT = 'dd.mm.yy',\n YYMMDD_DASH = 'yy-mm-dd',\n DDMMYY_DASH = 'dd-mm-yy',\n DDMMYY_SLASH = 'dd/mm/yy',\n YYMMDD_SLASH = 'yy/mm/dd',\n\n DDMMYYY_DOT_TIME = 'dd.mm.yyyy hh:MM:ss',\n YYYYMMDD_DASH_TIME = 'yyyy-mm-dd hh:MM:ss',\n DDMMYYYY_DASH_TIME = 'dd-mm-yyyy hh:MM:ss',\n DDMMYYYY_SLASH_TIME = 'dd/mm/yyyy hh:MM:ss',\n YYYYMMDD_SLASH_TIME = 'yyyy/mm/dd hh:MM:ss',\n DDMMYY_DOT_TIME = 'dd.mm.yy hh:MM:ss',\n YYMMDD_DASH_TIME = 'yy-mm-dd hh:MM:ss',\n DDMMYY_DASH_TIME = 'dd-mm-yy hh:MM:ss',\n DDMMYY_SLASH_TIME = 'dd/mm/yy hh:MM:ss',\n YYMMDD_SLASH_TIME = 'yy/mm/dd hh:MM:ss',\n}\n","import { h } from '@stencil/core';\nimport { DateLocale, now } from '../../../utils/date-util';\n\ninterface MonthSelectionParams {\n locale: DateLocale;\n selectedDate?: Date;\n onClickMonthCell: (month: string) => void;\n}\nexport const MonthSelection = (monthSelectionParams: MonthSelectionParams) => {\n const locale = monthSelectionParams.locale;\n const isToday = (value: string) => locale.monthsShort[now().getMonth()] === value;\n\n const isSelectedMonth = (value: string) =>\n monthSelectionParams.selectedDate?.getMonth() === locale.monthsShort.findIndex((m) => m === value);\n\n return (\n <table class=\"datepicker-table\" part=\"month-selection\">\n <tbody>\n {locale.monthsShortGrouped.map((row: string[]) => (\n <tr class=\"datepicker-table__row\">\n {row.map((month) => (\n <td\n onClick={() => monthSelectionParams.onClickMonthCell(month)}\n class={{\n 'datepicker-table__cell': true,\n 'datepicker-table__cell--is-today': isToday(month),\n 'datepicker-table__cell--is-selected': isSelectedMonth(month),\n }}\n >\n {month}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n","import { h } from '@stencil/core';\nimport { DateLocale } from '../../../utils/date-util';\nimport { CalendarCell } from '../six-datepicker';\n\ninterface DaySelectionParams {\n locale: DateLocale;\n calendarGrid: CalendarCell[][];\n onClickDateCell: (cell: CalendarCell) => void;\n}\nexport const DaySelection = (daySelectionParams: DaySelectionParams) => {\n return (\n <table class=\"datepicker-table\" part=\"day-selection\">\n <thead part=\"weekday-header\">\n {daySelectionParams.locale.weekdaysMin.map((weekday) => (\n <th class=\"datepicker__cell\">{weekday}</th>\n ))}\n </thead>\n <tbody>\n {daySelectionParams.calendarGrid.map((row) => (\n <tr class=\"datepicker-table__row\">\n {row.map((cell) => (\n <td\n data-date={cell.dateString}\n onClick={() => daySelectionParams.onClickDateCell(cell)}\n class={{\n 'datepicker-table__cell': true,\n 'datepicker-table__cell--is-today': cell.isToday,\n 'datepicker-table__cell--is-selected': cell.isSelected,\n 'datepicker-table__cell--is-outdated': cell.isOutdated,\n 'datepicker-table__cell--is-disabled': cell.isDisabled,\n 'datepicker-table__cell--is-selectable': !cell.isDisabled,\n }}\n >\n {cell.label}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n","import { now } from '../../../utils/date-util';\nimport { h } from '@stencil/core';\n\ninterface YearSelectionParams {\n selectedDate?: Date;\n yearSelection: number[][];\n onClickYearCell: (year: number) => void;\n}\nexport const YearSelection = (yearSelectionParams: YearSelectionParams) => {\n return (\n <table class=\"datepicker-table\" part=\"year-selection\">\n <tbody>\n {yearSelectionParams.yearSelection.map((row) => (\n <tr class=\"datepicker-table__row\">\n {row.map((year) => (\n <td\n onClick={() => yearSelectionParams.onClickYearCell(year)}\n class={{\n 'datepicker-table__cell': true,\n 'datepicker-table__cell--is-today': now().getFullYear() === year,\n 'datepicker-table__cell--is-selected': yearSelectionParams.selectedDate?.getFullYear() === year,\n }}\n >\n {year}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n","@import 'src/global/component';\n\n:host {\n display: block;\n font-family: var(--six-font-family);\n}\n\n.datepicker {\n &__container {\n position: relative;\n }\n\n &__popup {\n min-width: 400px;\n background-color: white;\n padding: 0.5em 0.5em 1.5em;\n box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%);\n user-select: none;\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n right: 0;\n left: 0;\n\n &--is-up {\n bottom: 100%;\n // fix problem where you would need to jump around with the cursor when switching months and\n // its a dropup since not all months have the same height\n min-height: 382px;\n }\n\n &--is-inline {\n position: initial;\n box-shadow: none;\n border: 1px solid var(--six-color-web-rock-400);\n }\n }\n}\n\n.datepicker-header {\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid var(--six-color-web-rock-400);\n padding: 0.5em;\n margin-bottom: 1em;\n\n & svg {\n fill: var(--six-color-web-rock-900);\n stroke: none;\n }\n\n &__btn {\n cursor: pointer;\n width: 2.5em;\n height: 2.5em;\n display: flex;\n vertical-align: middle;\n align-items: center;\n justify-content: center;\n\n &:hover {\n background-color: var(--six-color-web-rock-100);\n border-radius: 100%;\n }\n }\n\n &__label {\n display: flex;\n\n & > div {\n cursor: pointer;\n padding: 0.5em;\n display: flex;\n vertical-align: middle;\n align-items: center;\n justify-content: center;\n\n &:hover {\n background-color: var(--six-color-web-rock-100);\n }\n }\n }\n}\n\n.datepicker-table {\n width: 100%;\n\n &__cell {\n text-align: center;\n width: 2.5rem;\n height: 2.5rem;\n cursor: pointer;\n\n &:hover {\n background-color: var(--six-color-web-rock-100);\n }\n\n &--is-today {\n border: 1px solid var(--six-color-web-rock-400);\n }\n\n &--is-selected {\n background-color: var(--six-color-red);\n color: var(--six-color-white);\n }\n\n &--is-disabled {\n background-color: var(--six-color-web-rock-200);\n cursor: initial;\n\n &:hover {\n background-color: var(--six-color-web-rock-200);\n }\n }\n\n &--is-outdated {\n color: var(--six-color-web-rock-400);\n }\n }\n}\n\n// Clearable\n.datepicker-clear {\n display: inline-flex;\n align-items: center;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n padding: 0;\n transition: var(--six-transition-fast) color;\n cursor: pointer;\n\n &:hover {\n color: var(--six-input-icon-color-hover);\n }\n\n &:focus {\n outline: none;\n }\n\n &--right {\n right: 0;\n position: absolute;\n }\n\n &--left {\n right: 35px;\n position: absolute;\n }\n}\n\n.input--empty .datepicker-clear {\n visibility: hidden;\n}\n\n// Icon position\n.prefix {\n cursor: pointer;\n\n &--right {\n right: 0;\n display: inline-flex;\n position: absolute;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n margin-right: var(--six-input-spacing-medium);\n transition: var(--six-transition-fast) color;\n }\n}\n\n// time-picker\nsix-timepicker::part(popup) {\n border: none;\n padding: 0.5em 0.5em 0;\n min-height: 0;\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport {\n createCalendarGrid,\n day,\n formatDate,\n getFirstDayOfTheWeek,\n hours,\n i18nDate,\n isValidDate,\n isValidDateString,\n minutes,\n month,\n now,\n PointerDate,\n rangeAround,\n removeTime,\n seconds,\n toDate,\n year,\n} from '../../utils/date-util';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce, debounceEvent, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixDateFormats } from './six-date-formats';\nimport { MonthSelection } from './components/month-selection';\nimport { DaySelection } from './components/day-selection';\nimport { YearSelection } from './components/year-selection';\nimport { SixTimepickerChange } from '../six-timepicker/six-timepicker';\nimport {\n adjustPopupForHoisting,\n adjustPopupForSmallScreens,\n calcIsDropDownContentUp,\n movePopup,\n} from '../../utils/popup';\n\nconst NUMBER_OF_YEARS_SHOWN = 25;\n\nconst MIN_POPUP_HEIGHT = 400;\n\nexport type SixDatepickerSelectPayload = Date | undefined | null;\n\nexport interface CalendarCell {\n date: Date;\n dateString: string;\n display: string;\n isDisabled: boolean;\n isOutdated: boolean;\n isSelected: boolean;\n isToday: boolean;\n label: string;\n}\n\nenum SelectionMode {\n DAY = 'day',\n MONTH = 'month',\n YEAR = 'year',\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define a footer for the date picker.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n */\n@Component({\n tag: 'six-datepicker',\n styleUrl: 'six-datepicker.scss',\n shadow: true,\n})\nexport class SixDatepicker {\n private eventListeners = new EventListeners();\n private inputElement?: HTMLSixInputElement;\n private popup?: HTMLElement;\n private wrapper?: HTMLElement;\n private selectedDate?: Date;\n\n @Element() host!: HTMLSixDatepickerElement;\n\n @State() private pointerDate = SixDatepicker.getCurrentDateAsPointer();\n @State() selectionMode: SelectionMode = SelectionMode.DAY;\n @State() isDropDownContentUp = false;\n\n /**\n * Set the type.\n */\n @Prop() type: 'date' | 'date-time' = 'date';\n\n /**\n * The language used to render the weekdays and months.\n */\n @Prop() locale: 'en' | 'de' | 'fr' | 'it' | 'es' = 'en';\n\n /** Indicates whether or not the calendar dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether or not the calendar should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a date via the component in the popup, but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Callback to determine which date in the datepicker should be selectable.\n * the callback function will get a datestring as an argument, e.g. '2021-07-04'\n *\n * Usage e.g.:\n * const datepicker = document.getElementById('allowed-date-picker');\n * datepicker.allowedDates = datestring => parseInt(datestring.split('-')[2], 10) % 2 === 0;\n */\n @Prop() allowedDates: (date: Date) => boolean = () => true;\n\n /**\n * The minimum datetime allowed. Value must be a date object\n */\n @Prop() min?: Date;\n\n /**\n * The maximum datetime allowed. Value must be a date object\n */\n @Prop() max?: Date;\n\n /**\n * Closes the datepicker dropdown after selection\n */\n @Prop() closeOnSelect = this.type === 'date';\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement?: 'top' | 'bottom';\n\n /** Datepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /**\n * The date to defines where the datepicker popup starts. The prop accepts ISO 8601 date strings (YYYY-MM-DD).\n */\n @Prop() defaultDate?: string;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string;\n\n /**\n * The value of the form field, which accepts a date object.\n */\n @Prop({ mutable: true }) value?: Date;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement?: HTMLElement;\n\n /** Define the dateFormat. Valid formats are:\n * 'dd.mm.yyyy'\n * 'yyyy-mm-dd'\n * 'dd-mm-yyyy'\n * 'dd/mm/yyyy'\n * 'yyyy/mm/dd'\n * 'dd.mm.yy'\n * 'yy-mm-dd'\n * 'dd-mm-yy'\n * 'dd/mm/yy'\n * 'yy/mm/dd'\n * */\n @Prop() dateFormat: SixDateFormats = SixDateFormats.DDMMYYY_DOT;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `dateChange` event after each keystroke.\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.sixSelect = debounceEvent(this.sixSelect, this.debounce);\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n if (this.value != null && !isValidDate(this.value)) {\n console.warn('invalid date value: ', this.value);\n this.value = undefined;\n this.sixSelect.emit(this.value);\n }\n this.selectedDate = this.value;\n this.updatePointerDates();\n }\n\n /**\n * Emitted when a option got selected.\n */\n @Event({ eventName: 'six-datepicker-select' }) sixSelect!: EventEmitter<SixDatepickerSelectPayload>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-datepicker-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when a option got selected.\n */\n @Event({ eventName: 'six-datepicker-blur' }) sixBlur!: EventEmitter<SixDatepickerSelectPayload>;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.updateDropdownDirection();\n this.moveOpenHoistedPopup();\n this.adjustPopupPosition();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.updateDropdownDirection();\n this.moveOpenHoistedPopup();\n }\n\n private moveOpenHoistedPopup() {\n movePopup(this.hoist, this.open, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n get container() {\n return this.containingElement || this.host;\n }\n\n get firstDateOfBox(): Date {\n const date = new Date(this.pointerDate.year, this.pointerDate.month, 1);\n return getFirstDayOfTheWeek(date);\n }\n\n /** Sets focus on the datepickers input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n get calendarGrid() {\n return createCalendarGrid({\n firstDateOfBox: this.firstDateOfBox,\n allowedDates: this.allowedDates,\n dateFormat: this.dateFormat,\n locale: this.locale,\n selectedDate: this.selectedDate,\n minDate: this.min,\n maxDate: this.max,\n pointerDate: this.pointerDate,\n });\n }\n\n private updateDropdownDirection() {\n if (this.inputElement == null || this.wrapper == null) {\n return;\n }\n this.isDropDownContentUp = calcIsDropDownContentUp(this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n private getMonthStringForIndex(index: number) {\n return i18nDate[this.locale].months[index];\n }\n\n private previousUnit = () => {\n if (this.selectionMode === SelectionMode.DAY) {\n this.previousMonth();\n } else if (this.selectionMode === SelectionMode.MONTH) {\n this.previousYear();\n } else if (this.selectionMode === SelectionMode.YEAR) {\n this.previousYearGroup();\n }\n };\n\n private previousYear() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - 1 };\n }\n\n private previousYearGroup() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - NUMBER_OF_YEARS_SHOWN };\n }\n\n private previousMonth() {\n if (this.pointerDate.month === 0) {\n this.pointerDate = { year: this.pointerDate.year - 1, month: 11, day: 1, hours: 0, minutes: 0, seconds: 0 };\n } else {\n this.pointerDate = {\n year: this.pointerDate.year,\n month: this.pointerDate.month - 1,\n day: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n };\n }\n }\n\n private nextUnit = () => {\n if (this.selectionMode === SelectionMode.DAY) {\n this.nextMonth();\n } else if (this.selectionMode === SelectionMode.MONTH) {\n this.nextYear();\n } else if (this.selectionMode === SelectionMode.YEAR) {\n this.nextYearGroup();\n }\n };\n\n private nextMonth() {\n if (this.pointerDate.month === 11) {\n this.pointerDate = { year: this.pointerDate.year + 1, month: 0, day: 1, hours: 0, minutes: 0, seconds: 0 };\n } else {\n this.pointerDate = {\n year: this.pointerDate.year,\n month: this.pointerDate.month + 1,\n day: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n };\n }\n }\n\n private nextYear() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + 1 };\n }\n\n private nextYearGroup() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + NUMBER_OF_YEARS_SHOWN };\n }\n\n private openCalendar() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.setupEventListenersForOpenPopup();\n }\n }\n\n private setupEventListenersForOpenPopup() {\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Close when escape is pressed\n if (this.open && keyboardEvent.key === 'Escape') {\n keyboardEvent.stopPropagation();\n this.closePopup();\n void this.inputElement?.setFocus();\n }\n\n // Handle tabbing\n if (keyboardEvent.key === 'Tab') {\n this.closePopup();\n }\n };\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.container)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = async (event: MouseEvent) => {\n event.stopPropagation();\n await this.select(undefined);\n this.sixClear.emit();\n };\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n this.selectionMode = SelectionMode.DAY;\n }\n\n private updatePointerDates() {\n const date = this.getPointerDate();\n if (this.differsFromPointerDate(date)) {\n this.pointerDate = {\n year: year(date),\n month: month(date),\n day: day(date),\n hours: hours(date),\n minutes: minutes(date),\n seconds: seconds(date),\n };\n }\n }\n\n private differsFromPointerDate(date?: Date): boolean {\n return (\n this.pointerDate.day !== day(date) ||\n this.pointerDate.month !== month(date) ||\n this.pointerDate.year !== year(date) ||\n this.pointerDate.hours !== hours(date) ||\n this.pointerDate.minutes !== minutes(date) ||\n this.pointerDate.seconds !== seconds(date)\n );\n }\n\n private getPointerDate(): Date | undefined {\n if (this.selectedDate !== undefined && this.selectedDate !== null) {\n return this.selectedDate;\n }\n if (this.defaultDate == null) {\n return this.type === 'date' ? removeTime(now()) : now();\n } else {\n return toDate(this.defaultDate, this.dateFormat);\n }\n }\n\n private updateValue(newDate?: Date) {\n this.updateIfChanged(newDate);\n }\n\n private updateIfChanged(newDate?: Date) {\n if (this.value?.getTime() === newDate?.getTime()) {\n return;\n }\n this.value = newDate;\n this.sixSelect.emit(this.value);\n }\n\n /**\n * Selects an option\n */\n @Method()\n async select(datestring?: string) {\n if (datestring == null) {\n this.updateValue(undefined);\n } else {\n const newDate = toDate(datestring, this.dateFormat);\n newDate?.setHours(this.pointerDate.hours, this.pointerDate.minutes, this.pointerDate.seconds);\n this.updateValue(newDate);\n }\n\n this.updatePointerDates();\n\n if (this.closeOnSelect) {\n this.closePopup();\n }\n }\n\n private onTimepickerChange = (sixTimepickerChange: CustomEvent<SixTimepickerChange>) => {\n const time = sixTimepickerChange.detail.value;\n const newDate = new Date();\n\n if (this.selectedDate != null) {\n newDate.setFullYear(this.selectedDate.getFullYear(), this.selectedDate.getMonth(), this.selectedDate.getDate());\n }\n\n if (time != null) {\n const hours = time.hours;\n const minutes = time.minutes;\n const seconds = time.seconds;\n if (hours != null) {\n newDate.setHours(hours, minutes, seconds);\n }\n }\n\n this.updateValue(newDate);\n this.updatePointerDates();\n };\n\n private onClickDateCell = (cell: CalendarCell) => {\n if (!cell.isDisabled) {\n void this.select(cell.dateString);\n }\n };\n\n private onClickMonthCell = (selectedMonth: string) => {\n const month = i18nDate[this.locale].monthsShort.findIndex((monthShort) => monthShort === selectedMonth);\n this.pointerDate = { ...this.pointerDate, month };\n this.selectionMode = SelectionMode.DAY;\n };\n\n private onClickYearCell = (year: number) => {\n this.pointerDate = { ...this.pointerDate, year };\n this.selectionMode = SelectionMode.DAY;\n };\n\n private handleInputChange = (event: Event) => {\n if (this.inputElement == null) {\n return;\n }\n event.stopPropagation();\n\n const inputValue = this.inputElement.value;\n if (!isValidDateString(inputValue, this.dateFormat)) {\n return;\n }\n\n const inputValueDate = toDate(inputValue, this.dateFormat);\n\n if (inputValueDate === undefined) {\n return;\n }\n\n this.updateIfChanged(inputValueDate);\n const datesOnly = inputValue.replace(/[^\\d]/g, '');\n if (datesOnly.length >= 6) {\n const date = toDate(inputValue, this.dateFormat);\n const dateAsString = formatDate(date, this.dateFormat);\n if (isValidDateString(dateAsString, this.dateFormat)) {\n this.selectedDate = toDate(dateAsString, this.dateFormat);\n this.updatePointerDates();\n this.updateValue(this.selectedDate);\n }\n }\n };\n\n private handleOnBlur = (event: Event) => {\n // clear the value if the user deleted the date\n if (this.inputElement?.value === '' && isValidDate(this.value)) {\n this.value = undefined;\n this.sixSelect.emit(this.value);\n }\n\n event.stopPropagation();\n const inputValue = this.inputElement?.value;\n const inputValueDate = toDate(inputValue, this.dateFormat);\n const formattedDate = formatDate(this.value, this.dateFormat);\n\n if (this.inputElement != null && inputValueDate != null && inputValue !== formattedDate) {\n // properly format date if necessary\n this.inputElement.value = formattedDate;\n }\n\n this.sixBlur.emit(this.value);\n };\n\n componentWillLoad() {\n this.selectedDate = this.value;\n this.updatePointerDates();\n this.updateValue(this.value);\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.setupEventListenersForOpenPopup();\n }\n }\n\n componentDidLoad() {\n if (this.inputElement != null) {\n this.eventListeners.add(this.inputElement, 'six-input-input', debounce(this.handleInputChange, this.debounce));\n this.eventListeners.add(this.inputElement, 'six-input-blur', this.handleOnBlur);\n }\n }\n\n componentDidRender() {\n this.adjustPopupPosition();\n }\n\n private renderHeader() {\n return (\n <header class=\"datepicker-header\" part=\"header\">\n <div class=\"datepicker-header__btn prev\" onClick={this.previousUnit}>\n <svg viewBox=\"0 5 13 13\" width=\"14\" height=\"23\">\n <path d=\"M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z\" />\n </svg>\n </div>\n\n <div class=\"datepicker-header__label\">\n {this.selectionMode === SelectionMode.DAY && (\n <div onClick={() => (this.selectionMode = SelectionMode.MONTH)}>\n <span class=\"datepicker-header__label-month\">{this.getMonthStringForIndex(this.pointerDate.month)}</span>\n <span>\n <svg viewBox=\"-3 -4 24 24\" width=\"20\" height=\"20\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </div>\n )}\n\n {this.selectionMode !== SelectionMode.YEAR && (\n <div onClick={() => (this.selectionMode = SelectionMode.YEAR)}>\n <span class=\"datepicker-header__label-year\">{this.pointerDate.year}</span>\n <span>\n <svg viewBox=\"-3 -4 24 24\" width=\"20\" height=\"20\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </div>\n )}\n\n {this.selectionMode === SelectionMode.YEAR && (\n <div>\n {this.pointerDate.year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2)} –{' '}\n {this.pointerDate.year + Math.floor(NUMBER_OF_YEARS_SHOWN / 2)}\n </div>\n )}\n </div>\n\n <div class=\"datepicker-header__btn next\" onClick={this.nextUnit}>\n <svg viewBox=\"5 5 13 13\" width=\"14\" height=\"23\">\n <path d=\"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z\" />\n </svg>\n </div>\n </header>\n );\n }\n\n private renderBody() {\n switch (this.selectionMode) {\n case SelectionMode.DAY:\n return (\n <DaySelection\n locale={i18nDate[this.locale]}\n calendarGrid={this.calendarGrid}\n onClickDateCell={this.onClickDateCell}\n />\n );\n case SelectionMode.MONTH:\n return (\n <MonthSelection\n locale={i18nDate[this.locale]}\n selectedDate={this.selectedDate}\n onClickMonthCell={this.onClickMonthCell}\n />\n );\n case SelectionMode.YEAR:\n return (\n <YearSelection\n selectedDate={this.selectedDate}\n yearSelection={rangeAround(this.pointerDate.year, NUMBER_OF_YEARS_SHOWN)}\n onClickYearCell={this.onClickYearCell}\n />\n );\n }\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>today</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n 'datepicker-clear': true,\n 'datepicker-clear--right': this.iconPosition === 'left',\n 'datepicker-clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n render() {\n this.adjustPopupPosition();\n\n return (\n <div ref={(el) => (this.wrapper = el)} class=\"datepicker__container\">\n <six-input\n part=\"base\"\n value={formatDate(this.value, this.dateFormat)}\n ref={(el) => (this.inputElement = el)}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n name={this.name}\n label={this.label}\n required={this.required}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n invalid={this.invalid}\n onClick={() => this.openCalendar()}\n size={this.size}\n class={{ 'input--empty': this.value == null }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n {hasSlot(this.host, 'error-text') ? (\n <span slot=\"error-text\">\n <slot name=\"error-text\"></slot>\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n part=\"popup\"\n ref={(el) => (this.popup = el)}\n class={{\n datepicker__popup: true,\n 'datepicker__popup--is-up': this.placement != null ? this.placement === 'top' : this.isDropDownContentUp,\n 'datepicker__popup--is-inline': this.inline,\n }}\n >\n {this.renderHeader()}\n {this.renderBody()}\n {this.type === 'date-time' && (\n <six-timepicker\n inline={true}\n onSix-timepicker-change-debounced={(event) => this.onTimepickerChange(event)}\n value={\n this.selectedDate?.getHours() +\n ':' +\n this.selectedDate?.getMinutes() +\n ':' +\n this.selectedDate?.getSeconds()\n }\n ></six-timepicker>\n )}\n <div class=\"datepicker__footer\">\n <slot />\n </div>\n </div>\n )}\n </div>\n );\n }\n\n private adjustPopupPosition() {\n adjustPopupForHoisting(\n this.hoist,\n this.popup,\n this.inputElement,\n this.wrapper,\n MIN_POPUP_HEIGHT,\n (isUp) => (this.isDropDownContentUp = isUp)\n );\n adjustPopupForSmallScreens(this.popup);\n }\n\n connectedCallback() {\n this.eventListeners.forward('six-datepicker-select', 'change', this.host);\n this.eventListeners.forward('six-datepicker-blur', 'blur', this.host);\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n private static getCurrentDateAsPointer(): PointerDate {\n return {\n year: year(now()),\n month: month(now()),\n day: day(now()),\n hours: hours(now()),\n minutes: minutes(now()),\n seconds: seconds(now()),\n };\n }\n}\n"],"mappings":"kOAAO,MAAMA,EAAYC,UAA2CA,IAAU,SAGvE,MAAMC,EAASD,GAA8CA,GAAS,KCKtE,MAAME,EAAW,CACtBC,GAAI,CACFC,OAAQ,CACN,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,YAEFC,YAAa,CAAC,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,OAC3FC,mB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5F,KAAKkG,aACLlG,KAAKoD,OAAS,aACbzE,EAAA,kBACEwG,OAAQ,KAAI,oCACwBtE,GAAUb,KAAK8B,mBAAmBjB,GACtEvM,QACEkK,EAAAwB,KAAKpD,gBAAY,MAAA4B,SAAA,SAAAA,EAAEpI,YACnB,MACA4M,EAAAhD,KAAKpD,gBAAY,MAAAoG,SAAA,SAAAA,EAAE1M,cACnB,MACAmR,EAAAzH,KAAKpD,gBAAY,MAAA6K,SAAA,SAAAA,EAAEjR,gBAIzBmI,EAAA,OAAKC,MAAM,sBACTD,EAAA,e,CAQJ,mBAAAqF,GACN0D,EACE1H,KAAKmE,MACLnE,KAAKoE,MACLpE,KAAKkB,aACLlB,KAAKqE,QACLxE,IACC8H,GAAU3H,KAAK2E,oBAAsBgD,IAExCC,EAA2B5H,KAAKoE,M,CAGlC,iBAAAyD,GACE7H,KAAKC,eAAe6H,QAAQ,wBAAyB,SAAU9H,KAAKuE,MACpEvE,KAAKC,eAAe6H,QAAQ,sBAAuB,OAAQ9H,KAAKuE,K,CAGlE,oBAAAwD,GACE/H,KAAKC,eAAe+H,W,CAGd,8BAAO7E,GACb,MAAO,CACLpN,KAAMA,EAAKX,KACXa,MAAOA,EAAMb,KACbc,IAAKA,EAAId,KACTe,MAAOA,EAAMf,KACbiB,QAASA,EAAQjB,KACjBmB,QAASA,EAAQnB,K"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,h as s}from"./p-f93d8a4e.js";const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--track-color:var(--six-progress-track-color);--indicator-color:var(--six-progress-indicator-color);display:inline-flex}.progress-ring{display:inline-flex;align-items:center;justify-content:center;position:relative}.progress-ring__image{transform:rotate(-90deg);transform-origin:50% 50%}.progress-ring__track{stroke:var(--track-color)}.progress-ring__indicator{stroke:var(--indicator-color);transition:0.35s stroke-dashoffset, 0.35s stroke}.progress-ring__label{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;user-select:none;font-family:var(--six-font-family)}";const t=e;const i=class{constructor(s){r(this,s);this.size=128;this.strokeWidth=4;this.percentage=0}handlePercentageChange(){this.updateProgress()}componentDidLoad(){this.updateProgress()}updateProgress(){var r;if(((r=this.indicator)===null||r===void 0?void 0:r.r)==null)return;const s=this.indicator.r.baseVal.value;const e=s*2*Math.PI;const t=e-this.percentage/100*e;this.indicator.style.strokeDasharray=`${e} ${e}`;this.indicator.style.strokeDashoffset=`${t}`}render(){return s("div",{key:"fcfdeaf3f113028f9368d6c26323ed3680daf1dc",part:"base",class:"progress-ring"},s("svg",{key:"55048e767285e998ed5bf34ada821abc7d3eae58",class:"progress-ring__image",width:this.size,height:this.size},s("circle",{key:"63f9d87a8d310c1ea3dd40801eeb3232c0b4bb3d",class:"progress-ring__track","stroke-width":this.strokeWidth,"stroke-linecap":"round",fill:"transparent",r:this.size/2-this.strokeWidth*2,cx:this.size/2,cy:this.size/2}),s("circle",{key:"34a46dadccdb2498bff8196a232570a761d6a468",ref:r=>this.indicator=r,class:"progress-ring__indicator","stroke-width":this.strokeWidth,"stroke-linecap":"round",fill:"transparent",r:this.size/2-this.strokeWidth*2,cx:this.size/2,cy:this.size/2})),s("span",{key:"55077cbe1488ae88aa86e06c97ae4948f7d5726a",part:"label",class:"progress-ring__label"},s("slot",{key:"3e43561a4838f5f34f7196d713c2d6ddd4688965"})))}static get watchers(){return{percentage:["handlePercentageChange"]}}};i.style=t;export{i as six_progress_ring};
|
|
2
|
-
//# sourceMappingURL=p-80476b0f.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,h as e}from"./p-f93d8a4e.js";const c=".six-error-container{text-align:left;color:var(--six-color-danger-800);width:100%}";const o=c;const s=class{constructor(e){r(this,e)}render(){return e("div",{key:"b0a1e9d3d8a88fdcb4d08577ca972785f6deb159",class:"six-error-container"},e("slot",{key:"ea6806c05290c1c9bce2484c7a64ed4cd5d37413"}))}};s.style=o;export{s as six_error};
|
|
2
|
-
//# sourceMappingURL=p-8dff4dcb.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sixErrorCss","SixErrorStyle0","SixError","render","h","key","class"],"sources":["src/components/six-error/six-error.scss?tag=six-error&encapsulation=shadow","src/components/six-error/six-error.tsx"],"sourcesContent":[".six-error-container {\n text-align: left;\n color: var(--six-color-danger-800);\n width: 100%;\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * @since 4.0\n * @status beta\n *\n * @slot default - The error's message content\n */\n\n@Component({\n tag: 'six-error',\n styleUrl: 'six-error.scss',\n shadow: true,\n})\nexport class SixError {\n render() {\n return (\n <div class=\"six-error-container\">\n <slot />\n </div>\n );\n }\n}\n"],"mappings":"sCAAA,MAAMA,EAAc,qFACpB,MAAAC,EAAeD,E,MCaFE,EAAQ,M,yBACnB,MAAAC,GACE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,MAAM,uBACTF,EAAA,QAAAC,IAAA,6C"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r}from"./p-f93d8a4e.js";const s=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.six-footer{color:var(--six-color-web-rock-900);padding:var(--six-spacing-x-small) 0;text-align:center;width:100%;background-color:var(--six-footer-background-color);box-shadow:var(--six-shadow-medium-top)}";const t=s;const e=class{constructor(r){o(this,r)}render(){return r("footer",{key:"9b6b9933b76044dd048161ab084af325cc6d181d",class:"six-footer"},r("slot",{key:"f8f0b32271d472da8175d2fc92ca8aef319345fe"}))}};e.style=t;export{e as six_footer};
|
|
2
|
-
//# sourceMappingURL=p-a2b8aca7.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,h as s,H as r}from"./p-f93d8a4e.js";const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;box-shadow:var(--six-shadow-medium);border:1px solid var(--six-color-web-rock-100);padding:var(--six-spacing-medium)}";const a=e;const i=class{constructor(s){o(this,s)}render(){return s(r,{key:"ccbbf6bcbd5de13bb440629e16bfa95b9715a0d5"},s("slot",{key:"70c3d1760568a36077ae8ed8ff74ce59f19a8843"}))}};i.style=a;export{i as six_card};
|
|
2
|
-
//# sourceMappingURL=p-ba7424b3.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as a,h as s,H as t,g as e}from"./p-f93d8a4e.js";const o=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block;font-family:var(--six-font-family)}.tab-panel{border:solid 1px transparent;padding:20px 20px}";const i=o;let r=0;const d=class{constructor(s){a(this,s);this.componentId=`tab-panel-${++r}`;this.name="";this.active=false}render(){return s(t,{key:"6b8958e2148c21062d9d871ffe7a016b2fa8a1c5",id:this.host.id||this.componentId,style:{display:this.active?"block":"none"}},s("div",{key:"a35fd74db0e878943ccc49d7f33746ac1f5fc221",part:"base",class:"tab-panel",role:"tabpanel","aria-selected":this.active?"true":"false","aria-hidden":this.active?"false":"true"},s("slot",{key:"6de9b87d93c055a9c4de931139c7da3a366a2aa1"})))}get host(){return e(this)}};d.style=i;export{d as six_tab_panel};
|
|
2
|
-
//# sourceMappingURL=p-d7739200.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,g as a}from"./p-f93d8a4e.js";const d=":host{display:block;overflow:hidden;height:inherit}.six-root{display:grid;grid-template:auto 1fr auto/auto 1fr auto;height:100%}.six-root__container--padded{padding:var(--six-spacing-xxx-large)}.six-root__left-sidebar{height:100%;overflow:scroll;grid-column:1/2}.six-root__right-sidebar{height:100%;overflow:scroll;grid-column:3/4}.six-root nav{overflow:hidden}header{grid-column:1/4;position:sticky;top:0;z-index:var(--six-z-index-header);margin-right:2px}main{height:100%;display:flex;flex-direction:column;justify-content:space-between;grid-column:2/3;overflow:auto}footer{grid-column:1/4}";const i=d;const o=class{constructor(t){e(this,t);this.padded=true;this.stage=null;this.version=""}render(){return t("host",{key:"d004ad641b82d656ccbb7b788a04d8befab64b47",class:"six-root"},t("header",{key:"cce9488ed3c0778120fb1c0ce040a74b8c3b18d6",part:"header"},this.stage&&t("six-stage-indicator",{stage:this.stage},this.version),t("slot",{key:"b5810a66f91e003d83ee9196e0c955b52773794a",name:"header"})),t("nav",{key:"8d7aa97373ddb660d7a6e5ab1b860736726b9ee7",class:"six-root__left-sidebar",part:"left-sidebar"},t("slot",{key:"ab612b588dedf3e3098cd6f423078ef2fdc83bed",name:"left-sidebar"})),t("main",{key:"2c6e91c192a5346302d6d0be19a4e43d190cf5d4",part:"main"},t("div",{key:"bb52732ddf5462b1d536444f0f584fa48ba5ee55",class:{"six-root__container":true,"six-root__container--padded":this.padded},part:"container"},t("slot",{key:"23db6d1c2426497e40e91ef7d7898f37e1977465",name:"main"})),t("div",{key:"f083d6d754ff7a502efe8f20663a423075f85e9f",class:"six-root__footer"},t("slot",{key:"d902e6b083181958e12f8f808b2dc98e2bb99dfd",name:"footer"}))),t("nav",{key:"05b158597d15d8536e8eb8ccc66f0ff971ebdc92",class:"six-root__right-sidebar",part:"right-sidebar"},t("slot",{key:"3a9168dbd5039344e948c22c822ca7f65648cb1f",name:"right-sidebar"})))}get host(){return a(this)}};o.style=i;export{o as six_root};
|
|
2
|
-
//# sourceMappingURL=p-e3766acb.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["isTabbable","el","tabIndex","getNearestTabbableElement","shadowRoot","tabbableShadowChild","children","find","e","map","at","undefined","sixDropdownCss","SixDropdownStyle0","id","SixDropdown","this","componentId","isVisible","resizeObserver","ResizeObserver","debounce","updatePanelPosition","eventListeners","EventListeners","getMenuItems","options","length","sixMenuItems","renderedOptions","option","h","value","label","selectionContainerItems","panel","selectionContainer","_a","panelSlot","assignedElements","flatten","filter","isSelectionContainer","sixMenuElement","_b","isSixMenu","querySelectorAll","_c","querySelector","isSixMenuItem","Array","from","_d","handleDocumentKeyDown","event","keyboardEvent","key","hide","focusOnTrigger","filterInputElement","host","activeElement","item","style","display","setFocus","open","document","preventDefault","setTimeout","container","getRootNode","ShadowRoot","closest","tagName","toLowerCase","handleDocumentMouseDown","path","composedPath","includes","handlePanelSelect","target","closeOnSelect","handleTriggerClick","show","handleTriggerKeyDown","disableHideOnEnterAndSpace","menu","getMenu","menuItems","firstMenuItem","lastMenuItem","ignoredKeys","typeToSelect","handleTriggerKeyUp","handleTriggerSlotChange","updateAccessibleTrigger","handleDropdownScroll","scrollPanel","sixScroll","emit","scrollHeight","scrollTop","scrollbarHeight","offsetHeight","scrollRatio","clientHeight","filterEnabled","asyncFilter","containingElement","handleOpenChange","handlePopoverOptionsChange","popover","setOptions","strategy","hoist","placement","distance","skidding","handleOptionsChange","validateOptions","isArray","virtualScroll","console","error","componentWillLoad","filterDebounce","DEFAULT_DEBOUNCE_FAST","componentDidLoad","init","connectedCallback","initPopover","add","filterValue","applyFilter","emitFilterEvents","filterTerm","lowerCaseFilterTerm","trim","String","selectionContainerValues","s","forEach","async","menuItem","containsFilterTerm","resetFilter","sixAutoFilter","sixAsyncFilterFired","trigger","positioner","Popover","transitionElement","onAfterHide","sixAfterHide","onAfterShow","sixAfterShow","onTransitionEnd","disconnectedCallback","disconnect","removeAll","destroy","sixShow","defaultPrevented","observe","autofocusFilter","requestAnimationFrame","matchTriggerWidth","width","getBoundingClientRect","minWidth","reposition","sixHide","remove","triggerSlot","focus","accessibleTrigger","setAttribute","render","part","class","dropdown","ref","onClick","onKeyDown","onKeyUp","name","onSlotchange","dropdown__positioner","dropdown__positioner__filtered","role","placeholder","filterPlaceholder","slot","size","dropdown__panel__scroll","onScroll","items","getAttribute","getTextLabel","sixMenuCss","SixMenuStyle0","isFocusedMenuItem","classList","contains","isSIXMenuItemElement","mapToMenuItem","DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING","DEFAULT_SIX_MENU_ITEM_HEIGHT","SixMenu","typeToSelectString","handleScrolling","menuWrapper","scrollingIndex","Math","floor","sixMenuItemHeight","handleClick","bind","handleKeyDown","setupForVirtualScrollingAfterRendering","clearTimeout","typeToSelectTimeout","getItems","getTextContent","substring","getItemsShown","defaultItemsShown","itemsShown","scrollingDebounce","menuItemHeight","disabled","getActiveItemIndex","selectedItem","getActiveItem","itemIndex","indexOf","extractItemsFromDOM","findIndex","i","setActiveItem","clickedItem","sixMenuItemSelected","disableKeyboardHandling","activeItem","indexOfActiveItem","getMenuWrapperStyle","styles","height","Object","assign","getMenuContainerStyle","transform","getScrollbarGhostStyle","itemSize","renderItems","slice","min","checkType","removeBoxShadow"],"sources":["src/utils/tabbable.ts","src/components/six-dropdown/six-dropdown.scss?tag=six-dropdown&encapsulation=shadow","src/components/six-dropdown/six-dropdown.tsx","src/components/six-menu/six-menu.scss?tag=six-menu&encapsulation=shadow","src/components/six-menu/six-menu.tsx"],"sourcesContent":["export function isTabbable(el: HTMLElement) {\n const tabIndex = el.tabIndex;\n return tabIndex > -1;\n}\n\nexport function getNearestTabbableElement(el: HTMLElement): HTMLElement | undefined {\n // Check the element\n if (isTabbable(el)) {\n return el;\n }\n\n // Check the element's shadow root\n if (el.shadowRoot != null) {\n const tabbableShadowChild = [...el.shadowRoot.children].find((e) => isTabbable(e as HTMLElement)) as HTMLElement;\n if (tabbableShadowChild != null) {\n return tabbableShadowChild;\n }\n }\n\n // Check the element's children\n if (el.children != null) {\n return [...el.children].map((e) => getNearestTabbableElement(e as HTMLElement)).at(0);\n }\n\n return undefined;\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: inline-block;\n}\n\n.dropdown {\n position: relative;\n}\n\n.dropdown__trigger {\n display: block;\n}\n\n.dropdown__positioner {\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n\n &__filtered {\n width: 100%;\n }\n}\n\n.dropdown__panel {\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n color: var(--color);\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n border: 1px solid var(--six-color-web-rock-300);\n box-shadow: var(--six-shadow-small);\n opacity: 0;\n pointer-events: none;\n transform: scale(0.9);\n transition: var(--six-transition-fast) opacity, var(--six-transition-fast) transform;\n max-width: 90vw;\n}\n\n.dropdown__panel__scroll {\n max-height: 18.75rem;\n overflow-y: auto;\n overflow-x: hidden;\n overscroll-behavior: none;\n\n &--virtual {\n overflow-y: hidden;\n overflow-x: hidden;\n }\n}\n\n.filter-hidden {\n display: none;\n}\n\n.dropdown__positioner {\n &[data-popper-placement^='top'] .dropdown__panel {\n transform-origin: bottom;\n }\n\n &[data-popper-placement^='bottom'] .dropdown__panel {\n transform-origin: top;\n }\n\n &[data-popper-placement^='left'] .dropdown__panel {\n transform-origin: right;\n }\n\n &[data-popper-placement^='right'] .dropdown__panel {\n transform-origin: left;\n }\n\n &.popover-visible .dropdown__panel {\n opacity: 1;\n transform: none;\n pointer-events: all;\n }\n}\n\n.filter {\n border-bottom: 1px solid var(--six-color-web-rock-300);\n\n &__icon {\n color: var(--six-color-web-rock-600);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { getNearestTabbableElement } from '../../utils/tabbable';\nimport Popover from '../../utils/popover';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixMenuItemData } from '../six-menu/six-menu';\n\nexport interface SixDropdownAutoFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownAsyncFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownScrollPayload {\n scrollHeight: number;\n scrollTop: number;\n scrollbarHeight: number;\n scrollRatio: number;\n}\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot trigger - The dropdown's trigger, usually a `<six-button>` element.\n * @slot dropdown-footer - The dropdown's footer area.\n * @slot - The dropdown's content.\n *\n * @part base - The component's base wrapper.\n * @part trigger - The container that wraps the trigger.\n * @part panel - The panel that gets shown when the dropdown is open.\n */\n\n@Component({\n tag: 'six-dropdown',\n styleUrl: 'six-dropdown.scss',\n shadow: true,\n})\nexport class SixDropdown {\n private componentId = `dropdown-${++id}`;\n private isVisible = false;\n private panel?: HTMLElement;\n private scrollPanel?: HTMLElement;\n private panelSlot?: HTMLSlotElement;\n private positioner?: HTMLElement;\n private popover?: Popover;\n private trigger?: HTMLElement;\n private triggerSlot?: HTMLSlotElement;\n private resizeObserver = new ResizeObserver(debounce(() => this.updatePanelPosition(), 100));\n\n // the input element shown in the dropdown when filter is set to true\n private filterInputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixDropdownElement;\n\n /** Indicates whether the dropdown is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /**\n * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * inside the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'bottom-start';\n\n /** Determines whether the dropdown should hide when a menu item is selected. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() closeOnSelect = true;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @Prop() distance = 4;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @Prop() skidding = 0;\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement?: HTMLElement;\n\n /**\n * Set to true to allow auto filtering for entries in the dropdown.\n * With this flag the dropdown will automatically filter itsel.\n * If you need to coordinate the shown elements yourself,\n * e.g. because you need to call an endpoint use asyncFilter instead\n */\n @Prop() filter = false;\n\n /**\n * Set to true to allow async filtering.\n * When you enter something in the search field the component will only emit an event but not filter any elements itself.\n * You can then simply listen to the 'six-async-filter-fired' event to manage the shown menu-items yourself\n */\n @Prop() asyncFilter = false;\n\n /** The filter's placeholder text. */\n @Prop() filterPlaceholder = 'Filter...';\n\n /** By default the search field will be focused when opening a dropdown with filtering enabled. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() autofocusFilter = true;\n\n get filterEnabled() {\n return this.filter || this.asyncFilter;\n }\n\n /** The debounce for the filter callbacks. */\n @Prop({ mutable: true }) filterDebounce = 0;\n\n /** The panel can be opend/closed by pressing the spacebar or the enter key. In some cases you might want to avoid this */\n @Prop() disableHideOnEnterAndSpace = false;\n\n /** Set the options to be shown in the dropdown (alternative to setting the elements via html)*/\n @Prop({ mutable: true }) options: SixMenuItemData[] = [];\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n /**\n * Determines if the dropdown panel's width should match the width of the trigger element.\n *\n * If set to `true`, the panel will resize its width to align with the trigger's width.\n * If `false` or omitted, the panel will maintain its default width.\n */\n @Prop() matchTriggerWidth = false;\n\n get container() {\n return this.containingElement || this.host;\n }\n\n /** Emitted when the dropdown opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dropdown-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown opens and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dropdown closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dropdown-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown closes and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the auto filter is triggered */\n @Event({ eventName: 'six-dropdown-auto-filter-fired' }) sixAutoFilter!: EventEmitter<SixDropdownAutoFilterPayload>;\n\n /** Emitted when the async filter is triggered */\n @Event({ eventName: 'six-async-filter-fired' }) sixAsyncFilterFired!: EventEmitter<SixDropdownAsyncFilterPayload>;\n\n /** Emitted when the user scrolls inside dropdown panel.*/\n @Event({ eventName: 'six-dropdown-scroll' }) sixScroll!: EventEmitter<SixDropdownScrollPayload>;\n\n private eventListeners = new EventListeners();\n\n // internal representation of options, so we don't have to make options mutable\n @State() renderedOptions: SixMenuItemData[] = [];\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n this.updateAccessibleTrigger();\n }\n\n @Watch('distance')\n @Watch('hoist')\n @Watch('placement')\n @Watch('skidding')\n handlePopoverOptionsChange() {\n if (this.popover == null) return;\n\n this.popover.setOptions({\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n });\n }\n\n @Watch('options')\n @Watch('virtualScroll')\n handleOptionsChange() {\n this.validateOptions();\n }\n\n private validateOptions() {\n if (!Array.isArray(this.options)) {\n this.options = [];\n }\n if (this.virtualScroll && this.options.length === 0) {\n console.error('Options must be defined when using virtual scrolling');\n }\n this.renderedOptions = [...this.options];\n }\n\n componentWillLoad() {\n this.validateOptions();\n if (this.asyncFilter) {\n this.filterDebounce = DEFAULT_DEBOUNCE_FAST;\n }\n }\n\n componentDidLoad() {\n this.init();\n if (this.open) {\n void this.show();\n }\n }\n\n connectedCallback() {\n this.init();\n }\n\n private init() {\n this.initPopover();\n\n // listen to filter\n const filterInputElement = this.filterInputElement;\n if (filterInputElement != null) {\n this.eventListeners.add(\n filterInputElement,\n 'six-input-input',\n debounce(() => {\n const filterValue = filterInputElement.value ?? '';\n if (this.filter) {\n this.applyFilter(filterValue);\n }\n this.emitFilterEvents(filterValue);\n }, this.filterDebounce)\n );\n }\n }\n\n private applyFilter(filterTerm: string) {\n const lowerCaseFilterTerm = filterTerm.toLowerCase()?.trim() || '';\n if (this.options.length > 0) {\n this.renderedOptions = this.options.filter(\n (option) =>\n (option.label && String(option.label)?.toLowerCase()?.includes(lowerCaseFilterTerm)) ||\n (option.value && String(option.value)?.toLowerCase()?.includes(lowerCaseFilterTerm))\n );\n } else {\n const { selectionContainerItems, sixMenuItems } = this.getMenuItems();\n const selectionContainerValues = selectionContainerItems.map((s) => s.value);\n\n // Filter items in selection container\n selectionContainerItems.forEach(async (menuItem) => {\n menuItem.style.display = (await containsFilterTerm(menuItem, lowerCaseFilterTerm)) ? 'unset' : 'none';\n });\n\n // Filter other items. Always hide items which contained in the selection container.\n sixMenuItems.forEach(async (menuItem) => {\n menuItem.style.display =\n (await containsFilterTerm(menuItem, lowerCaseFilterTerm)) &&\n !selectionContainerValues.includes(menuItem.value)\n ? 'unset'\n : 'none';\n });\n }\n }\n\n private resetFilter() {\n if (this.filterInputElement != null) {\n this.filterInputElement.value = '';\n this.emitFilterEvents('');\n }\n if (this.options.length > 0) {\n this.renderedOptions = [...this.options];\n } else {\n const { selectionContainerItems, sixMenuItems } = this.getMenuItems();\n [...selectionContainerItems, ...sixMenuItems].forEach((item) => (item.style.display = 'unset'));\n }\n }\n\n private emitFilterEvents(filterValue: string) {\n if (this.filter) {\n this.sixAutoFilter.emit({ filterValue });\n } else if (this.asyncFilter) {\n this.sixAsyncFilterFired.emit({ filterValue });\n }\n }\n\n private initPopover() {\n if (this.trigger == null || this.positioner == null) return;\n this.popover = new Popover(this.trigger, this.positioner, {\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.panel,\n onAfterHide: () => {\n if (this.filterEnabled) {\n this.resetFilter();\n }\n this.sixAfterHide.emit();\n },\n onAfterShow: async () => {\n this.sixAfterShow.emit();\n },\n onTransitionEnd: () => {\n if (!this.open && this.scrollPanel != null) {\n this.scrollPanel.scrollTop = 0;\n }\n },\n });\n }\n\n private getMenuItems = (): {\n selectionContainerItems: HTMLSixMenuItemElement[];\n sixMenuItems: HTMLSixMenuItemElement[];\n } => {\n if (this.options.length > 0) {\n return {\n sixMenuItems: this.renderedOptions.map((option) => (\n <six-menu-item value={option.value}>{option.label}</six-menu-item>\n )),\n selectionContainerItems: [],\n };\n }\n if (this.panel == null) return { sixMenuItems: [], selectionContainerItems: [] };\n\n // Relies on the implementation of six-select. Its dropdown slot contains two elements,\n // one for the selected menu items, and one for the other items.\n const selectionContainer = this.panelSlot?.assignedElements({ flatten: true }).filter(isSelectionContainer).at(0);\n const sixMenuElement = this.panelSlot?.assignedElements({ flatten: true }).filter(isSixMenu).at(0) as\n | HTMLSixMenuElement\n | undefined;\n const selectionContainerItems = selectionContainer?.querySelectorAll('six-menu-item') || [];\n let sixMenuItems: HTMLSixMenuItemElement[] =\n sixMenuElement\n ?.querySelector('slot')\n ?.assignedElements()\n .filter((el): el is HTMLSixMenuItemElement => isSixMenuItem(el)) || [];\n\n if (sixMenuItems.length === 0) {\n sixMenuItems = Array.from(sixMenuElement?.shadowRoot?.querySelectorAll('six-menu-item') || []);\n }\n\n if (selectionContainerItems.length > 0 || sixMenuItems.length > 0) {\n return { sixMenuItems, selectionContainerItems: [...selectionContainerItems] };\n } else {\n return {\n sixMenuItems: sixMenuElement ? Array.from(sixMenuElement.querySelectorAll('six-menu-item')) : [],\n selectionContainerItems: [],\n };\n }\n };\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n this.eventListeners.removeAll();\n void this.hide();\n this.popover?.destroy();\n this.popover = undefined;\n }\n\n /** Shows the dropdown panel */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.popover == null || this.panel == null) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.eventListeners.add(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = true;\n this.open = true;\n\n if (this.trigger != null) {\n this.resizeObserver.observe(this.trigger);\n }\n this.updatePanelPosition();\n this.popover.show();\n\n if (this.filterEnabled && this.autofocusFilter) {\n requestAnimationFrame(() => {\n this.filterInputElement?.setFocus();\n });\n }\n }\n\n /**\n * Set min width of dropdown panel to the width of the trigger element\n */\n private updatePanelPosition() {\n if (!this.open) {\n return;\n }\n\n if (this.matchTriggerWidth && this.trigger != null && this.panel != null) {\n const width = this.trigger.getBoundingClientRect().width;\n this.panel.style.minWidth = `${width}px`;\n }\n\n if (this.popover != null) {\n this.popover.reposition();\n }\n }\n\n /** Hides the dropdown panel */\n @Method()\n async hide() {\n this.resizeObserver.disconnect();\n\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.panel == null || this.popover == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.eventListeners.remove(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = false;\n this.open = false;\n this.popover.hide();\n }\n\n private focusOnTrigger() {\n if (this.trigger == null) return;\n const trigger = this.triggerSlot?.assignedElements({ flatten: true }).at(0) as HTMLSixButtonElement | undefined;\n if (trigger != null) {\n if (typeof trigger.setFocus === 'function') {\n trigger.setFocus();\n } else if (typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n }\n\n private getMenu(): HTMLSixMenuElement | undefined {\n return this.panelSlot?.assignedElements({ flatten: true }).filter(isSixMenu).at(0) as\n | HTMLSixMenuElement\n | undefined;\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n *\n * @deprecated: use the property `matchTriggerWidth` instead.\n */\n @Method()\n async reposition() {\n if (this.open && this.popover != null) {\n this.popover.reposition();\n }\n }\n\n private handleDocumentKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Close when escape is pressed\n if (keyboardEvent.key === 'Escape') {\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n if (this.filterInputElement === this.host.shadowRoot?.activeElement) {\n if (keyboardEvent.key === 'ArrowDown') {\n const { sixMenuItems, selectionContainerItems } = this.getMenuItems();\n const item = [...selectionContainerItems, ...sixMenuItems].find((item) => item.style.display !== 'none');\n if (item != null) {\n item.setFocus();\n }\n }\n }\n\n // Handle tabbing\n if (keyboardEvent.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement != null && isSixMenuItem(document.activeElement)) {\n keyboardEvent.preventDefault();\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.container.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (activeElement?.closest(this.container.tagName.toLowerCase()) !== this.container) {\n void this.hide();\n return;\n }\n });\n }\n };\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.container)) {\n void this.hide();\n return;\n }\n };\n\n private handlePanelSelect = (event: Event) => {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (this.closeOnSelect && isSixMenu(target)) {\n void this.hide();\n this.focusOnTrigger();\n }\n };\n\n private handleTriggerClick = () => {\n this.open ? this.hide() : this.show();\n };\n\n private handleTriggerKeyDown = (event: KeyboardEvent) => {\n // Close when escape or tab is pressed\n if (event.key === 'Escape') {\n this.focusOnTrigger();\n void this.hide();\n return;\n }\n\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n if (!this.disableHideOnEnterAndSpace && [' ', 'Enter'].includes(event.key)) {\n event.preventDefault();\n this.open ? void this.hide() : void this.show();\n return;\n }\n\n const menu = this.getMenu();\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n void this.show();\n }\n\n if (menu == null) {\n return;\n }\n const menuItems = [...menu.querySelectorAll('six-menu-item')];\n const firstMenuItem = menuItems.at(0);\n const lastMenuItem = menuItems.at(menuItems.length - 1);\n\n // Focus on a menu item\n if (event.key === 'ArrowDown' && firstMenuItem != null) {\n firstMenuItem.setFocus();\n return;\n }\n\n if (event.key === 'ArrowUp' && lastMenuItem != null) {\n lastMenuItem.setFocus();\n return;\n }\n }\n\n // Other keys bring focus to the menu and initiate type-to-select behavior\n const ignoredKeys = ['Tab', 'Shift', 'Meta', 'Ctrl', 'Alt'];\n if (this.open && menu != null && !ignoredKeys.includes(event.key)) {\n void menu.typeToSelect(event.key);\n return;\n }\n };\n\n private handleTriggerKeyUp = (event: KeyboardEvent) => {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n };\n\n private handleTriggerSlotChange = () => {\n this.updateAccessibleTrigger();\n };\n\n private handleDropdownScroll = () => {\n if (this.scrollPanel == null) return;\n\n this.sixScroll.emit({\n scrollHeight: this.scrollPanel.scrollHeight,\n scrollTop: this.scrollPanel.scrollTop,\n scrollbarHeight: this.scrollPanel.offsetHeight * (this.scrollPanel.offsetHeight / this.scrollPanel.scrollHeight),\n scrollRatio: this.scrollPanel.scrollTop / (this.scrollPanel.scrollHeight - this.scrollPanel.clientHeight),\n });\n };\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <sl-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n private updateAccessibleTrigger() {\n if (this.trigger == null) return;\n const assignedElements = (this.triggerSlot?.assignedElements({ flatten: true }) || []) as HTMLElement[];\n const accessibleTrigger = assignedElements.map(getNearestTabbableElement).at(0);\n if (accessibleTrigger != null) {\n accessibleTrigger.setAttribute('aria-haspopup', 'true');\n accessibleTrigger.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n render() {\n return (\n <div\n part=\"base\"\n id={this.componentId}\n class={{\n dropdown: true,\n 'dropdown--open': this.open,\n }}\n >\n <span\n part=\"trigger\"\n class=\"dropdown__trigger\"\n ref={(el) => (this.trigger = el)}\n onClick={this.handleTriggerClick}\n onKeyDown={this.handleTriggerKeyDown}\n onKeyUp={this.handleTriggerKeyUp}\n >\n <slot\n name=\"trigger\"\n ref={(el) => (this.triggerSlot = el as HTMLSlotElement)}\n onSlotchange={this.handleTriggerSlotChange}\n />\n </span>\n\n {/* Position the panel with a wrapper since the popover makes use of `translate`. This let's us add transitions\n on the panel without interfering with the position. */}\n <div\n ref={(el) => (this.positioner = el)}\n class={{\n dropdown__positioner: true,\n dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,\n }}\n >\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dropdown__panel\"\n role=\"menu\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-labelledby={this.componentId}\n >\n {this.filterEnabled && (\n <six-input\n class={{\n filter: true,\n 'filter-hidden': !this.open,\n }}\n dropdown-search\n aria-hidden={this.open ? 'false' : 'true'}\n ref={(el) => (this.filterInputElement = el)}\n placeholder={this.filterPlaceholder}\n >\n <six-icon class=\"filter__icon\" slot=\"suffix\" size=\"small\">\n search\n </six-icon>\n </six-input>\n )}\n <div\n class={{\n dropdown__panel__scroll: true,\n 'dropdown__panel__scroll--virtual': this.virtualScroll,\n }}\n onScroll={this.handleDropdownScroll}\n ref={(el) => (this.scrollPanel = el)}\n >\n <slot ref={(el) => (this.panelSlot = el as HTMLSlotElement)} />\n {this.options.length > 0 && (\n <six-menu part=\"menu\" items={this.renderedOptions} virtualScroll={this.virtualScroll}></six-menu>\n )}\n </div>\n <slot name=\"dropdown-footer\"></slot>\n </div>\n </div>\n </div>\n );\n }\n}\n\nfunction isSixMenu(el?: Element): boolean {\n return el?.tagName.toLowerCase() === 'six-menu';\n}\nfunction isSixMenuItem(el?: Element): boolean {\n return el?.tagName.toLowerCase() === 'six-menu-item';\n}\nfunction isSelectionContainer(el?: Element): boolean {\n return el?.getAttribute('class')?.includes('selection-container') || false;\n}\nasync function containsFilterTerm(menuItem: HTMLSixMenuItemElement, lowerCaseFilterTerm: string): Promise<boolean> {\n return (\n menuItem.value.toLowerCase().includes(lowerCaseFilterTerm) ||\n (await menuItem.getTextLabel()).toLowerCase().includes(lowerCaseFilterTerm)\n );\n}\n","@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu {\n padding: var(--six-spacing-xx-small) 0;\n border: none;\n box-shadow: var(--six-shadow-small);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.menu:focus {\n outline: none;\n}\n\n.no-shadow {\n box-shadow: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\nimport { StyleDeclaration } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce } from '../../utils/execution-control';\n\nexport interface SixMenuItemData {\n label: string;\n value: string;\n}\n\nexport interface SixMenuItemSelectedPayload {\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nconst isFocusedMenuItem = (menuItem: HTMLSixMenuItemElement) =>\n menuItem?.shadowRoot?.querySelector('.menu-item')?.classList?.contains('menu-item--focused');\n\nconst isSIXMenuItemElement = (el?: Element): el is HTMLSixMenuItemElement =>\n el?.tagName.toLowerCase() === 'six-menu-item';\n\nconst mapToMenuItem = ({ value, label }: SixMenuItemData) => (\n <six-menu-item key={value} value={value}>\n {label}\n </six-menu-item>\n);\n\nconst DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING = 5;\n\nconst DEFAULT_SIX_MENU_ITEM_HEIGHT = 64;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu's content, including menu items, menu dividers, and menu labels.\n *\n * @part base - The component's base wrapper.\n */\n@Component({\n tag: 'six-menu',\n styleUrl: 'six-menu.scss',\n shadow: true,\n})\nexport class SixMenu {\n private readonly eventListeners = new EventListeners();\n\n private menu?: HTMLElement;\n private menuWrapper?: HTMLElement;\n private typeToSelectString = '';\n private typeToSelectTimeout?: number;\n\n @Element() host!: HTMLSixMenuElement;\n\n /** Emitted when a menu item is selected. */\n @Event({ eventName: 'six-menu-item-selected' }) sixMenuItemSelected!: EventEmitter<SixMenuItemSelectedPayload>;\n\n /** Set to true to remove the box-shadow */\n @Prop() removeBoxShadow = false;\n\n /** Set the options to be shown in the dropdown */\n @Prop() items: SixMenuItemData[] | null = null;\n\n /** Defines how many items should be shown. If the number of items is larger than this property a scrollbar will be shown */\n @Prop() itemsShown?: number;\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n /**\n * Used for virtual scrolling\n * Define how many items should be rendered in the DOM when using virtual scrolling\n */\n @Prop() itemSize = 10;\n\n /**\n * Used for virtual scrolling\n * Define the debounce for listening on scrolling changes in milliseconds.\n * The lower the number the more sensitive the component reacts to scrolling changes.\n */\n @Prop() scrollingDebounce = 15;\n\n /**\n * Internal: Disables handling of key presses.\n */\n @Prop() disableKeyboardHandling = false;\n\n /**\n * Used to calculate which items should be rendered in the DOM\n */\n @State()\n private scrollingIndex = 0;\n\n // set a default item height, this variable will be updated with the real value after the first render.\n // However, it's necessary to have a default value because we can only fetch the proper height after the first render\n @State()\n sixMenuItemHeight = DEFAULT_SIX_MENU_ITEM_HEIGHT;\n\n connectedCallback() {\n this.handleClick = this.handleClick.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n }\n\n componentWillLoad() {\n if (this.items === null) {\n return;\n }\n }\n\n private handleScrolling = () => {\n if (this.menuWrapper == null) return;\n // for performance improvements we only update the DOM if the scrollRatio change \"enough\"\n this.scrollingIndex = Math.floor(this.menuWrapper.scrollTop / this.sixMenuItemHeight);\n };\n\n componentDidLoad() {\n this.setupForVirtualScrollingAfterRendering();\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n /**\n * Initiates type-to-select logic, which automatically selects an option based on what the user is currently typing.\n * The key passed will be appended to the internal query and the selection will be updated. After a brief period, the\n * internal query is cleared automatically. This method is intended to be used with the keydown event. Useful for\n * enabling type-to-select when the menu doesn't have focus.\n */\n @Method()\n async typeToSelect(key: string) {\n clearTimeout(this.typeToSelectTimeout);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.typeToSelectTimeout = setTimeout(() => (this.typeToSelectString = ''), 750);\n this.typeToSelectString += key.toLowerCase();\n const items = this.getItems();\n for (const item of items) {\n const slot = item.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement;\n const label = getTextContent(slot).toLowerCase().trim();\n if (label.substring(0, this.typeToSelectString.length) === this.typeToSelectString) {\n item.setFocus();\n break;\n }\n }\n }\n\n private getItemsShown(): number {\n const defaultItemsShown = this.virtualScroll ? DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING : 0;\n return this.itemsShown ?? defaultItemsShown;\n }\n\n private setupForVirtualScrollingAfterRendering() {\n if (!this.virtualScroll || this.menuWrapper == null) return;\n\n this.eventListeners.add(this.menuWrapper, 'scroll', debounce(this.handleScrolling, this.scrollingDebounce));\n\n // set menu height to proper height once the item is rendered.\n const menuItemHeight = this.menu?.querySelector('six-menu-item')?.clientHeight;\n if (menuItemHeight != null && menuItemHeight > 0) {\n this.sixMenuItemHeight = menuItemHeight;\n }\n }\n\n private getItems(): HTMLSixMenuItemElement[] {\n if (this.menu == null) return [];\n\n if (this.items != null) {\n return this.items.map(mapToMenuItem);\n }\n\n const slot = this.menu.querySelector('slot');\n if (slot == null) return [];\n return [...slot.assignedElements({ flatten: true })].filter(\n (el): el is HTMLSixMenuItemElement => isSIXMenuItemElement(el) && !el.disabled\n );\n }\n\n private getActiveItemIndex() {\n const items = this.getItems();\n const selectedItem = this.getActiveItem();\n if (selectedItem != null) {\n const itemIndex = items.indexOf(selectedItem);\n if (itemIndex > -1) {\n return itemIndex;\n }\n }\n const sixMenuItems = this.extractItemsFromDOM();\n return sixMenuItems.findIndex(isFocusedMenuItem);\n }\n\n private getActiveItem(): HTMLSixMenuItemElement | undefined {\n const activeElement = this.getItems().find((i) => i === document.activeElement);\n if (activeElement != null) {\n return activeElement;\n }\n return this.extractItemsFromDOM()?.find(isFocusedMenuItem);\n }\n\n private extractItemsFromDOM() {\n return Array.from(this.host.shadowRoot?.querySelectorAll('six-menu-item') ?? []);\n }\n\n private setActiveItem(item: HTMLSixMenuItemElement) {\n item?.setFocus();\n }\n\n private handleClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const clickedItem = target.closest('six-menu-item');\n if (clickedItem && !clickedItem.disabled) {\n this.sixMenuItemSelected.emit({ name: clickedItem.value, item: clickedItem });\n }\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this.disableKeyboardHandling) {\n return;\n }\n\n // Make a selection when pressing enter\n if (event.key === 'Enter') {\n const activeItem = this.getActiveItem();\n event.preventDefault();\n\n if (activeItem != null) {\n this.sixMenuItemSelected.emit({ name: activeItem.value, item: activeItem });\n }\n }\n\n // Prevent scrolling when space is pressed\n if (event.key === ' ') {\n event.preventDefault();\n }\n\n // Move the selection when pressing down or up\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n const items = this.items === null ? this.getItems() : this.extractItemsFromDOM();\n\n let indexOfActiveItem = this.getActiveItemIndex();\n\n if (items.length > 0) {\n event.preventDefault();\n\n if (event.key === 'ArrowDown') {\n indexOfActiveItem++;\n } else if (event.key === 'ArrowUp') {\n indexOfActiveItem--;\n } else if (event.key === 'Home') {\n indexOfActiveItem = 0;\n } else if (event.key === 'End') {\n indexOfActiveItem = items.length - 1;\n }\n\n if (indexOfActiveItem < 0) indexOfActiveItem = 0;\n if (indexOfActiveItem > items.length - 1) indexOfActiveItem = items.length - 1;\n\n this.setActiveItem(items[indexOfActiveItem]);\n\n return;\n }\n }\n\n void this.typeToSelect(event.key);\n }\n\n private getMenuWrapperStyle() {\n const styles: Partial<StyleDeclaration> = {};\n if (this.getItemsShown() > 0) {\n // calculate the proper height to show the correct number of items\n styles.height = `${(this.getItemsShown() ?? 0) * this.sixMenuItemHeight}px`;\n }\n return {\n ...styles,\n };\n }\n\n private getMenuContainerStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll) {\n // calculate height of content are if all items would be rendered so the scrollbar has the proper size\n styles.transform = `translateY(${this.sixMenuItemHeight * this.scrollingIndex}px)`;\n }\n\n return {\n ...styles,\n };\n }\n\n private getScrollbarGhostStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll && this.items !== null) {\n styles.height = `${this.items.length * this.sixMenuItemHeight - this.itemSize * this.sixMenuItemHeight}px`;\n }\n\n return {\n ...styles,\n };\n }\n\n private renderItems() {\n if (this.items === undefined || this.items === null) {\n return;\n }\n\n if (!this.virtualScroll) {\n return this.items.map(mapToMenuItem);\n }\n\n return this.items\n .slice(this.scrollingIndex, Math.min(this.items.length, this.itemSize + this.scrollingIndex))\n .map(({ value, label }: SixMenuItemData) => (\n <six-menu-item checkType=\"check\" key={value} value={value}>\n {label}\n </six-menu-item>\n ));\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.menuWrapper = el)}\n style={this.getMenuWrapperStyle()}\n part=\"wrapper\"\n class={{\n menu: true,\n '.no-shadow': this.removeBoxShadow,\n }}\n >\n <div\n ref={(el) => (this.menu = el)}\n part=\"base\"\n role=\"menu\"\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n tabIndex={0}\n style={this.getMenuContainerStyle()}\n >\n <slot />\n {this.renderItems()}\n </div>\n {this.virtualScroll && <div style={this.getScrollbarGhostStyle()} />}\n </div>\n );\n }\n}\n"],"mappings":"yNAAgBA,EAAWC,GACzB,MAAMC,EAAWD,EAAGC,SACpB,OAAOA,GAAY,CACrB,C,SAEgBC,EAA0BF,GAExC,GAAID,EAAWC,GAAK,CAClB,OAAOA,C,CAIT,GAAIA,EAAGG,YAAc,KAAM,CACzB,MAAMC,EAAsB,IAAIJ,EAAGG,WAAWE,UAAUC,MAAMC,GAAMR,EAAWQ,KAC/E,GAAIH,GAAuB,KAAM,CAC/B,OAAOA,C,EAKX,GAAIJ,EAAGK,UAAY,KAAM,CACvB,MAAO,IAAIL,EAAGK,UAAUG,KAAKD,GAAML,EAA0BK,KAAmBE,GAAG,E,CAGrF,OAAOC,SACT,CCzBA,MAAMC,EAAiB,iiDACvB,MAAAC,EAAeD,ECsBf,IAAIE,EAAK,E,MAsBIC,EAAW,M,oYACdC,KAAAC,YAAc,cAAcH,IAC5BE,KAAAE,UAAY,MAQZF,KAAAG,eAAiB,IAAIC,eAAeC,GAAS,IAAML,KAAKM,uBAAuB,MAuH/EN,KAAAO,eAAiB,IAAIC,EA0JrBR,KAAAS,aAAe,K,YAIrB,GAAIT,KAAKU,QAAQC,OAAS,EAAG,CAC3B,MAAO,CACLC,aA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qM,eAAgBC,KAAK2C,IAAIjP,KAAKqL,MAAM1K,OAAQX,KAAK8O,SAAW9O,KAAKqM,iBAC5E5M,KAAI,EAAGuB,QAAOC,WACbF,EAAA,iBAAemO,UAAU,QAAQ1M,IAAKxB,EAAOA,MAAOA,GACjDC,I,CAKT,MAAAiJ,GACE,OACEnJ,EAAA,OAAAyB,IAAA,2CACE8H,IAAMrL,GAAQe,KAAKoM,YAAcnN,EACjC8D,MAAO/C,KAAKsO,sBACZnE,KAAK,UACLC,MAAO,CACL7F,KAAM,KACN,aAAcvE,KAAKmP,kBAGrBpO,EAAA,OAAAyB,IAAA,2CACE8H,IAAMrL,GAAQe,KAAKuE,KAAOtF,EAC1BkL,KAAK,OACLW,KAAK,OACLP,QAASvK,KAAKyM,YACdjC,UAAWxK,KAAK2M,cAChBzN,SAAU,EACV6D,MAAO/C,KAAK2O,yBAEZ5N,EAAA,QAAAyB,IAAA,6CACCxC,KAAK+O,eAEP/O,KAAK0G,eAAiB3F,EAAA,OAAKgC,MAAO/C,KAAK6O,2B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as i,h as s,H as t,g as a}from"./p-f93d8a4e.js";import{E as r}from"./p-8bfb4bfc.js";import{g as h,h as c}from"./p-0cebf1d2.js";const d=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block;user-select:none;--search-border-width:1px}::slotted(six-search-field){position:absolute;margin-left:var(--search-border-width);width:calc(100% - 2 * var(--search-border-width))}.six-header{display:flex;width:100%;height:3.75rem;background-color:var(--six-header-background-color);align-items:center;flex-wrap:wrap;box-shadow:var(--six-shadow-medium);border-bottom:var(--six-header-border-with) solid var(--six-header-border-color)}.six-header__logo{width:6rem;margin-top:0.15rem}.six-header__logo--clickable{cursor:pointer}.six-header__placeholder{flex:1}.six-header__menu,.six-header__logo,.six-header__custom,.six-header__search,.six-header__notification,.six-header__app-switcher,.six-header__profile{height:calc(100% - 0.25rem - 1px);padding:0 1.25rem;display:flex;align-items:center;border-bottom:solid 0.25rem transparent}.six-header__menu--open,.six-header__logo--open,.six-header__custom--open,.six-header__search--open,.six-header__notification--open,.six-header__app-switcher--open,.six-header__profile--open{border-bottom:solid 0.25rem var(--six-header-border-color-open)}.six-header__app-switcher-dropdown{display:flex;align-items:center}.six-header__selected-app{cursor:pointer;font-size:0.9rem;font-weight:600;padding-right:0;padding-left:0.3rem}.six-header__selected-app:hover{color:var(--six-header-selected-app-color-hover)}.six-header__search-field{opacity:0;transform:scale(0.9);transition:var(--six-transition-fast) opacity, var(--six-transition-fast) transform;display:none}.six-header__search-field--visible{opacity:1;transform:none;display:block}.six-header__search-field--shift-content.six-header__search-field--visible{height:2.65rem;transition:var(--six-transition-fast) height}.six-header__search-field--shift-content:not(.six-header__search-field--visible){height:0;transition:var(--six-transition-fast) height}";const o=d;var n;(function(e){e[e["None"]=0]="None";e[e["Search"]=1]="Search";e[e["AppSwitcher"]=2]="AppSwitcher";e[e["Profile"]=3]="Profile"})(n||(n={}));var l;(function(e){e["Search"]="search-field";e["Notifications"]="notifications";e["AppSwitcher"]="app-switcher-menu";e["Profile"]="profile-menu";e["Logo"]="logo"})(l||(l={}));const f=class{constructor(s){e(this,s);this.sixAppNameClicked=i(this,"six-header-app-name-clicked",7);this.sixAppSwitcherSelect=i(this,"six-header-app-switcher-select",7);this.sixProfileSelect=i(this,"six-header-profile-select",7);this.sixHamburgerClick=i(this,"six-header-hamburger-menu-clicked",7);this.sixLogoClick=i(this,"six-header-logo-clicked",7);this.sixSearchFieldToggle=i(this,"six-header-search-field-toggle",7);this.eventListeners=new r;this.setupMenu=e=>{if(e==null)return;this.eventListeners.add(e,"click",(()=>this.sixHamburgerClick.emit()))};this.setupLogo=e=>{if(!this.clickableLogo||e==null)return;this.eventListeners.add(e,"click",(()=>this.sixLogoClick.emit()))};this.setupProfile=e=>{if(e==null)return;this.eventListeners.add(e,"six-dropdown-show",this.selectSection(n.Profile));this.eventListeners.add(e,"six-dropdown-hide",this.selectSection(n.None));this.eventListeners.add(e,"six-menu-item-selected",(e=>{const{name:i,item:s}=e.detail;this.sixProfileSelect.emit({selectedLabel:s.innerText,name:i,item:s})}))};this.setupAppSwitcher=e=>{if(e==null)return;this.eventListeners.add(e,"six-dropdown-show",this.selectSection(n.AppSwitcher));this.eventListeners.add(e,"six-dropdown-hide",this.selectSection(n.None));this.eventListeners.add(e,"six-menu-item-selected",(e=>{const{name:i,item:s}=e.detail;this.selectedApp=s.innerText;this.sixAppSwitcherSelect.emit({selectedLabel:s.innerText,name:i,item:s})}))};this.appNameClicked=()=>this.sixAppNameClicked.emit();this.computeSearchOpenState=()=>{this.selectedSection=this.openSearch?n.Search:n.None};this.shiftContent=false;this.hideHamburgerMenu=false;this.openHamburgerMenu=false;this.openSearch=false;this.clickableLogo=false;this.selectedApp=undefined;this.selectedSection=undefined}handleOpenSearchChange(){this.computeSearchOpenState()}async setSearchOpenState(e){if(this.selectedSection===n.Search&&!e){this.selectedSection=n.None}else if(e&&this.selectedSection!==n.Search){this.selectedSection=n.Search}}async getIsSearchOpen(){return this.selectedSection===n.Search}hasSlot(e){if(this.slots==null){return false}return this.slots[e]}isSectionSelected(e){return e===this.selectedSection}selectSection(e){return()=>this.selectedSection=e}toggleSearch(){const e=this.selectedSection!==n.Search;this.selectedSection=this.selectedSection===n.Search?n.None:n.Search;this.sixSearchFieldToggle.emit({visible:e});if(this.selectedSection===n.Search){setTimeout((async()=>{var e,i;const s=h(this.host,l.Search);(i=(e=s===null||s===void 0?void 0:s.shadowRoot)===null||e===void 0?void 0:e.querySelector("six-input"))===null||i===void 0?void 0:i.setFocus()}),50)}}componentWillLoad(){this.slots={[l.Search]:c(this.host,l.Search),[l.Notifications]:c(this.host,l.Notifications),[l.AppSwitcher]:c(this.host,l.AppSwitcher),[l.Profile]:c(this.host,l.Profile),[l.Logo]:c(this.host,l.Logo)};if(this.hasSlot(l.AppSwitcher)){this.updateSelectedApp()}if(this.hasSlot(l.Search)){this.computeSearchOpenState()}}connectedCallback(){const e=h(this.host,l.AppSwitcher);if(e){this.mutationObserver=new MutationObserver((e=>{if(e.some((e=>e.type==="childList"||e.type==="attributes"))){this.updateSelectedApp()}}));this.mutationObserver.observe(e,{attributes:true,childList:true,subtree:true})}}updateSelectedApp(){var e;const i=h(this.host,l.AppSwitcher);if(i==null){return undefined}const s=Array.from(i.querySelectorAll("six-menu-item"));const t=s.find((e=>e.hasAttribute("checked")&&e.getAttribute("checked")!=="false"));this.selectedApp=(e=t===null||t===void 0?void 0:t.textContent)!==null&&e!==void 0?e:undefined}disconnectedCallback(){var e;this.eventListeners.removeAll();(e=this.mutationObserver)===null||e===void 0?void 0:e.disconnect()}render(){const e=!this.hideHamburgerMenu&&s("section",{key:"4bdfb040919e63d80c73907e4ab99f81f41ed962",class:"six-header__menu"},s("six-icon-button",{key:"65979bc405df9ede5ff51ba6671a20c89dcc07db",name:this.openHamburgerMenu?"menu_open":"menu",ref:this.setupMenu}));const i=this.hasSlot(l.Search)&&s("section",{key:"dea31e61c8c3abdd62bbfdb427c0d5c994ca005b",class:{"six-header__search":true,"six-header__search--open":this.isSectionSelected(n.Search)}},s("six-icon-button",{key:"36411dc4797c5c14f54be612422b2b8a651dc042",name:"search",onClick:()=>this.toggleSearch(),"data-testid":"search-trigger"}));const a=this.hasSlot(l.Notifications)&&s("section",{key:"42703240d867b07571e2cae5b1475c4b40d5cab9",class:"six-header__notification"},s("slot",{key:"17ab8c5a38463636bb485ced2bb7ff04917e2a99",name:l.Notifications}));const r=this.hasSlot(l.AppSwitcher)&&s("section",{key:"1663cb55a4a112cfee5b0bd1b4162c7425b8e25c",class:{"six-header__app-switcher":true,"six-header__app-switcher--open":this.isSectionSelected(n.AppSwitcher)}},s("six-dropdown",{key:"e0b0599707152e3514dc9216a4d3b6256631377e",distance:13,skidding:20,placement:"bottom-end",ref:this.setupAppSwitcher},s("div",{key:"89a8ee9eb2af751a681256f40b66930ca7a6e6dc",slot:"trigger",class:"six-header__app-switcher-dropdown"},s("a",{key:"bcf7e1f1249cf0def1d2575d0e2e9a2a5543f808",onClick:this.appNameClicked,class:"six-header__selected-app"},this.selectedApp),s("six-icon-button",{key:"f5996669051d290c957e9a0417b77d7a424e3dab",name:"apps"})),s("slot",{key:"a55a8cd1cf35bb4b229199d86fb119678fc79617",name:l.AppSwitcher})));const h=this.hasSlot(l.Profile)&&s("section",{key:"70840d293a70fb869c6de4c70353b1f47b995e5d",class:{"six-header__profile":true,"six-header__profile--open":this.isSectionSelected(n.Profile)}},s("six-dropdown",{key:"50463552c655c87b793cee909810475c418abddf",distance:17,skidding:20,placement:"bottom-end",ref:this.setupProfile},s("slot",{key:"fae7475c62c9a0c273398a77f344dfde87c85b7c",name:"profile-avatar",slot:"trigger"}),s("slot",{key:"147b4944e080330652d02e0e6680277b910f31b9",name:"profile-menu"})));const c=this.hasSlot(l.Logo)?s("section",null,s("slot",{name:"logo"})):s("section",{class:{"six-header__logo":true,"six-header__logo--clickable":this.clickableLogo},ref:this.setupLogo},s("svg",{height:"20",viewBox:"0 0 90 26",xmlns:"http://www.w3.org/2000/svg"},s("title",null,"SIX"),s("g",{fill:"#DE3919","fill-rule":"nonzero"},s("path",{d:"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525"}),s("path",{d:"m42.16.324h5.21v24.806h-5.21z"}),s("path",{d:"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545"}))));return s(t,{key:"fe3df0b60941b770dc1a4a876fea67648103feeb"},s("header",{key:"297d9e50c392a86028d4a982262bb292abe9720c",class:"six-header"},e,c,s("section",{key:"b2f2c0a98b8bfae711ad941986c98e616c55073c",class:"six-header__placeholder"}),s("section",{key:"6d6800f2abb6986304588dda3e9a8d8905f98266",class:"six-header__custom"},s("slot",{key:"4a8d385406e6e878c620be5945affd4e77cf7d9f"})),i,a,r,h),s("div",{key:"1d2f6aa7a0842212e556f01cbaf31d04a65ec6d5",class:{"six-header__search-field":true,"six-header__search-field--visible":this.isSectionSelected(n.Search),"six-header__search-field--shift-content":this.shiftContent}},s("slot",{key:"02619aaa886ecdee27f31a9687deab5fb1ec254c",name:l.Search})))}static get assetsDirs(){return["assets"]}get host(){return a(this)}static get watchers(){return{openSearch:["handleOpenSearchChange"]}}};f.style=o;export{f as six_header};
|
|
2
|
-
//# sourceMappingURL=p-f1bb5648.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sixHeaderCss","SixHeaderStyle0","Section","Slot","SixHeader","this","eventListeners","EventListeners","setupMenu","el","add","sixHamburgerClick","emit","setupLogo","clickableLogo","sixLogoClick","setupProfile","selectSection","Profile","None","event","name","item","detail","sixProfileSelect","selectedLabel","innerText","setupAppSwitcher","AppSwitcher","selectedApp","sixAppSwitcherSelect","appNameClicked","sixAppNameClicked","computeSearchOpenState","selectedSection","openSearch","Search","handleOpenSearchChange","setSearchOpenState","openState","getIsSearchOpen","hasSlot","slot","slots","isSectionSelected","value","section","toggleSearch","visible","sixSearchFieldToggle","setTimeout","async","getSlot","host","_b","_a","shadowRoot","querySelector","setFocus","componentWillLoad","Notifications","Logo","updateSelectedApp","connectedCallback","appSwitcherSlot","mutationObserver","MutationObserver","mutations","some","mutation","type","observe","attributes","childList","subtree","element","undefined","items","Array","from","querySelectorAll","firstCheckedMenuItem","find","hasAttribute","getAttribute","textContent","disconnectedCallback","removeAll","disconnect","render","hamburgerMenu","hideHamburgerMenu","h","key","class","openHamburgerMenu","ref","search","onClick","notifications","appSwitcher","distance","skidding","placement","profile","logo","height","viewBox","xmlns","fill","d","Host","shiftContent"],"sources":["src/components/six-header/six-header.scss?tag=six-header&encapsulation=shadow","src/components/six-header/six-header.tsx"],"sourcesContent":["@import 'src/global/component';\n\n$header-height: 3.75rem;\n$border-height: 0.25rem;\n\n:host {\n display: block;\n user-select: none;\n --search-border-width: 1px;\n}\n\n::slotted(six-search-field) {\n position: absolute;\n margin-left: var(--search-border-width);\n width: calc(100% - 2 * var(--search-border-width));\n}\n\n.six-header {\n display: flex;\n width: 100%;\n height: $header-height;\n background-color: var(--six-header-background-color);\n align-items: center;\n flex-wrap: wrap;\n box-shadow: var(--six-shadow-medium);\n border-bottom: var(--six-header-border-with) solid var(--six-header-border-color);\n\n &__logo {\n width: 6rem;\n margin-top: 0.15rem;\n\n &--clickable {\n cursor: pointer;\n }\n }\n\n &__placeholder {\n flex: 1;\n }\n\n &__menu,\n &__logo,\n &__custom,\n &__search,\n &__notification,\n &__app-switcher,\n &__profile {\n height: calc(100% - #{$border-height} - 1px);\n padding: 0 1.25rem;\n display: flex;\n align-items: center;\n border-bottom: solid $border-height transparent;\n\n &--open {\n border-bottom: solid $border-height var(--six-header-border-color-open);\n }\n }\n\n &__app-switcher-dropdown {\n display: flex;\n align-items: center;\n }\n\n &__selected-app {\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n padding-right: 0;\n padding-left: 0.3rem;\n &:hover {\n color: var(--six-header-selected-app-color-hover);\n }\n }\n\n &__search-field {\n opacity: 0;\n transform: scale(0.9);\n transition: var(--six-transition-fast) opacity, var(--six-transition-fast) transform;\n display: none;\n\n &--visible {\n opacity: 1;\n transform: none;\n display: block;\n }\n\n &--shift-content.six-header__search-field--visible {\n height: 2.65rem;\n transition: var(--six-transition-fast) height;\n }\n\n &--shift-content:not(.six-header__search-field--visible) {\n height: 0;\n transition: var(--six-transition-fast) height;\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { getSlot, hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\n\nexport interface SixHeaderAppSwitcherSelectPayload {\n selectedLabel: string;\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nexport interface SixHeaderProfileSelectPayload {\n selectedLabel: string;\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nexport interface SixHeaderSearchFieldToggle {\n visible: boolean;\n}\n\nenum Section {\n None,\n Search,\n AppSwitcher,\n Profile,\n}\n\nenum Slot {\n Search = 'search-field',\n Notifications = 'notifications',\n AppSwitcher = 'app-switcher-menu',\n Profile = 'profile-menu',\n Logo = 'logo',\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define a custom component that is included in the header.\n * @slot search-field - Used to define the search field component in the header.\n * @slot notifications - Used to define the notification component in the header.\n * @slot app-switcher-menu - Used to define the application switcher menu in the header.\n * @slot profile-menu - Used to define the profile menu in the header.\n * @slot profile-avatar - Used to define the avator in the header.\n */\n\n@Component({\n tag: 'six-header',\n styleUrl: 'six-header.scss',\n shadow: true,\n assetsDirs: ['assets'],\n})\nexport class SixHeader {\n /** Indicates if content should be shifted down when search field is visible. */\n @Prop() shiftContent = false;\n\n /** Set whether the hamburger menu should be visible or not */\n @Prop() hideHamburgerMenu = false;\n\n /** Set the hamburger menu icon to open or closed state */\n @Prop() openHamburgerMenu = false;\n\n /** Set the header search to be in an open or closed state */\n @Prop() openSearch = false;\n\n /** Set whether the logo should be clickable */\n @Prop() clickableLogo = false;\n\n @Watch('openSearch')\n handleOpenSearchChange() {\n this.computeSearchOpenState();\n }\n\n /** Sets open state for search */\n @Method()\n async setSearchOpenState(openState: boolean) {\n if (this.selectedSection === Section.Search && !openState) {\n this.selectedSection = Section.None;\n } else if (openState && this.selectedSection !== Section.Search) {\n this.selectedSection = Section.Search;\n }\n }\n\n /** Get open state for search */\n @Method()\n async getIsSearchOpen() {\n return this.selectedSection === Section.Search;\n }\n\n /** Emitted when the name of the selected app is clicked. */\n @Event({ eventName: 'six-header-app-name-clicked' }) sixAppNameClicked!: EventEmitter<EmptyPayload>;\n\n /** Emitted when a menu item is in the app switcher menu is selected. */\n @Event({ eventName: 'six-header-app-switcher-select' })\n sixAppSwitcherSelect!: EventEmitter<SixHeaderAppSwitcherSelectPayload>;\n\n /** Emitted when a menu item is in the profile menu is selected. */\n @Event({ eventName: 'six-header-profile-select' }) sixProfileSelect!: EventEmitter<SixHeaderProfileSelectPayload>;\n\n /** Emitted when the hamburger menu is clicked. */\n @Event({ eventName: 'six-header-hamburger-menu-clicked' }) sixHamburgerClick!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the header logo is clicked. */\n @Event({ eventName: 'six-header-logo-clicked' }) sixLogoClick!: EventEmitter<EmptyPayload>;\n\n /** Emitted when search field is toggled. */\n @Event({ eventName: 'six-header-search-field-toggle' })\n sixSearchFieldToggle!: EventEmitter<SixHeaderSearchFieldToggle>;\n\n @Element() host!: HTMLSixHeaderElement;\n\n private eventListeners = new EventListeners();\n\n private slots?: Record<Slot, boolean>;\n\n private mutationObserver?: MutationObserver;\n\n @State() selectedApp?: string;\n @State() selectedSection?: Section;\n\n private hasSlot(slot: Slot): boolean {\n if (this.slots == null) {\n return false;\n }\n return this.slots[slot];\n }\n\n private isSectionSelected(value: Section) {\n return value === this.selectedSection;\n }\n\n private selectSection(section: Section) {\n return () => (this.selectedSection = section);\n }\n\n private toggleSearch() {\n const visible = this.selectedSection !== Section.Search;\n this.selectedSection = this.selectedSection === Section.Search ? Section.None : Section.Search;\n this.sixSearchFieldToggle.emit({ visible });\n if (this.selectedSection === Section.Search) {\n // setFocus deferred due to https://github.com/ionic-team/stencil/issues/3772\n setTimeout(async () => {\n const slot = getSlot(this.host, Slot.Search);\n slot?.shadowRoot?.querySelector('six-input')?.setFocus();\n }, 50);\n }\n }\n\n private setupMenu = (el?: HTMLSixIconButtonElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'click', () => this.sixHamburgerClick.emit());\n };\n\n private setupLogo = (el?: HTMLElement) => {\n if (!this.clickableLogo || el == null) return;\n\n this.eventListeners.add(el, 'click', () => this.sixLogoClick.emit());\n };\n\n private setupProfile = (el?: HTMLSixDropdownElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'six-dropdown-show', this.selectSection(Section.Profile));\n this.eventListeners.add(el, 'six-dropdown-hide', this.selectSection(Section.None));\n this.eventListeners.add(el, 'six-menu-item-selected', (event: Event) => {\n const { name, item } = (event as CustomEvent).detail;\n this.sixProfileSelect.emit({ selectedLabel: item.innerText, name, item });\n });\n };\n\n private setupAppSwitcher = (el?: HTMLSixDropdownElement) => {\n if (el == null) return;\n\n this.eventListeners.add(el, 'six-dropdown-show', this.selectSection(Section.AppSwitcher));\n this.eventListeners.add(el, 'six-dropdown-hide', this.selectSection(Section.None));\n this.eventListeners.add(el, 'six-menu-item-selected', (event: Event) => {\n const { name, item } = (event as CustomEvent).detail;\n this.selectedApp = item.innerText;\n this.sixAppSwitcherSelect.emit({ selectedLabel: item.innerText, name, item });\n });\n };\n\n private appNameClicked = () => this.sixAppNameClicked.emit();\n\n private computeSearchOpenState = () => {\n this.selectedSection = this.openSearch ? Section.Search : Section.None;\n };\n\n componentWillLoad() {\n this.slots = {\n [Slot.Search]: hasSlot(this.host, Slot.Search),\n [Slot.Notifications]: hasSlot(this.host, Slot.Notifications),\n [Slot.AppSwitcher]: hasSlot(this.host, Slot.AppSwitcher),\n [Slot.Profile]: hasSlot(this.host, Slot.Profile),\n [Slot.Logo]: hasSlot(this.host, Slot.Logo),\n };\n\n if (this.hasSlot(Slot.AppSwitcher)) {\n this.updateSelectedApp();\n }\n\n if (this.hasSlot(Slot.Search)) {\n this.computeSearchOpenState();\n }\n }\n\n connectedCallback() {\n const appSwitcherSlot = getSlot(this.host, Slot.AppSwitcher);\n if (appSwitcherSlot) {\n this.mutationObserver = new MutationObserver((mutations) => {\n if (mutations.some((mutation) => mutation.type === 'childList' || mutation.type === 'attributes')) {\n this.updateSelectedApp();\n }\n });\n this.mutationObserver.observe(appSwitcherSlot, { attributes: true, childList: true, subtree: true });\n }\n }\n\n private updateSelectedApp() {\n // there are more concise ways to select the first checked menu item, but this is one that works for jest\n const element = getSlot(this.host, Slot.AppSwitcher);\n if (element == null) {\n return undefined;\n }\n const items = Array.from(element.querySelectorAll('six-menu-item'));\n const firstCheckedMenuItem = items.find(\n (item) => item.hasAttribute('checked') && item.getAttribute('checked') !== 'false'\n );\n this.selectedApp = firstCheckedMenuItem?.textContent ?? undefined;\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n this.mutationObserver?.disconnect();\n }\n\n render() {\n const hamburgerMenu = !this.hideHamburgerMenu && (\n <section class=\"six-header__menu\">\n <six-icon-button name={this.openHamburgerMenu ? 'menu_open' : 'menu'} ref={this.setupMenu} />\n </section>\n );\n\n const search = this.hasSlot(Slot.Search) && (\n <section\n class={{\n 'six-header__search': true,\n 'six-header__search--open': this.isSectionSelected(Section.Search),\n }}\n >\n <six-icon-button name=\"search\" onClick={() => this.toggleSearch()} data-testid=\"search-trigger\" />\n </section>\n );\n\n const notifications = this.hasSlot(Slot.Notifications) && (\n <section class=\"six-header__notification\">\n <slot name={Slot.Notifications} />\n </section>\n );\n\n const appSwitcher = this.hasSlot(Slot.AppSwitcher) && (\n <section\n class={{\n 'six-header__app-switcher': true,\n 'six-header__app-switcher--open': this.isSectionSelected(Section.AppSwitcher),\n }}\n >\n <six-dropdown distance={13} skidding={20} placement=\"bottom-end\" ref={this.setupAppSwitcher}>\n <div slot=\"trigger\" class=\"six-header__app-switcher-dropdown\">\n <a onClick={this.appNameClicked} class=\"six-header__selected-app\">\n {this.selectedApp}\n </a>\n <six-icon-button name=\"apps\" />\n </div>\n <slot name={Slot.AppSwitcher} />\n </six-dropdown>\n </section>\n );\n\n const profile = this.hasSlot(Slot.Profile) && (\n <section\n class={{\n 'six-header__profile': true,\n 'six-header__profile--open': this.isSectionSelected(Section.Profile),\n }}\n >\n <six-dropdown distance={17} skidding={20} placement=\"bottom-end\" ref={this.setupProfile}>\n <slot name=\"profile-avatar\" slot=\"trigger\" />\n <slot name=\"profile-menu\" />\n </six-dropdown>\n </section>\n );\n\n const logo = this.hasSlot(Slot.Logo) ? (\n <section>\n <slot name=\"logo\" />\n </section>\n ) : (\n <section\n class={{\n 'six-header__logo': true,\n 'six-header__logo--clickable': this.clickableLogo,\n }}\n ref={this.setupLogo}\n >\n <svg height=\"20\" viewBox=\"0 0 90 26\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>SIX</title>\n <g fill=\"#DE3919\" fill-rule=\"nonzero\">\n <path d=\"m22.798 3.869c1.82-2.168 4.549-3.545 7.6-3.545h6.807v4.961h-6.807c-1.526 0-2.89.689-3.8 1.771l-12.19 14.526c-1.82 2.166-4.549 3.545-7.6 3.545h-6.808v-4.961h6.808c1.525 0 2.889-.689 3.799-1.773l12.191-14.525\" />\n <path d=\"m42.16.324h5.21v24.806h-5.21z\" />\n <path d=\"m66.743 3.869l4.195 4.999 4.195-4.999c1.819-2.168 4.549-3.545 7.6-3.545h6.806v4.961h-6.806c-1.526 0-2.89.689-3.8 1.771l-4.758 5.669 4.758 5.669c.91 1.084 2.274 1.773 3.8 1.773h6.806v4.961h-6.806c-3.051 0-5.781-1.379-7.6-3.545l-4.195-4.999-4.195 4.999c-1.82 2.166-4.55 3.545-7.6 3.545h-6.807v-4.961h6.807c1.525 0 2.889-.689 3.799-1.773l4.758-5.669-4.758-5.669c-.91-1.083-2.274-1.771-3.799-1.771h-6.807v-4.961h6.807c3.05 0 5.78 1.378 7.6 3.545\" />\n </g>\n </svg>\n </section>\n );\n\n return (\n <Host>\n <header class=\"six-header\">\n {hamburgerMenu}\n\n {logo}\n\n <section class=\"six-header__placeholder\" />\n\n <section class=\"six-header__custom\">\n <slot />\n </section>\n\n {search}\n\n {notifications}\n\n {appSwitcher}\n\n {profile}\n </header>\n\n <div\n class={{\n 'six-header__search-field': true,\n 'six-header__search-field--visible': this.isSectionSelected(Section.Search),\n 'six-header__search-field--shift-content': this.shiftContent,\n }}\n >\n <slot name={Slot.Search} />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"+IAAA,MAAMA,EAAe,g7DACrB,MAAAC,EAAeD,ECoBf,IAAKE,GAAL,SAAKA,GACHA,IAAA,kBACAA,IAAA,sBACAA,IAAA,gCACAA,IAAA,uBACD,EALD,CAAKA,MAAO,KAOZ,IAAKC,GAAL,SAAKA,GACHA,EAAA,yBACAA,EAAA,iCACAA,EAAA,mCACAA,EAAA,0BACAA,EAAA,cACD,EAND,CAAKA,MAAI,K,MA0BIC,EAAS,M,yZA2DZC,KAAAC,eAAiB,IAAIC,EAqCrBF,KAAAG,UAAaC,IACnB,GAAIA,GAAM,KAAM,OAEhBJ,KAAKC,eAAeI,IAAID,EAAI,SAAS,IAAMJ,KAAKM,kBAAkBC,QAAO,EAGnEP,KAAAQ,UAAaJ,IACnB,IAAKJ,KAAKS,eAAiBL,GAAM,KAAM,OAEvCJ,KAAKC,eAAeI,IAAID,EAAI,SAAS,IAAMJ,KAAKU,aAAaH,QAAO,EAG9DP,KAAAW,aAAgBP,IACtB,GAAIA,GAAM,KAAM,OAEhBJ,KAAKC,eAAeI,IAAID,EAAI,oBAAqBJ,KAAKY,cAAcf,EAAQgB,UAC5Eb,KAAKC,eAAeI,IAAID,EAAI,oBAAqBJ,KAAKY,cAAcf,EAAQiB,OAC5Ed,KAAKC,eAAeI,IAAID,EAAI,0BAA2BW,IACrD,MAAMC,KAAEA,EAAIC,KAAEA,GAAUF,EAAsBG,OAC9ClB,KAAKmB,iBAAiBZ,KAAK,CAAEa,cAAeH,EAAKI,UAAWL,OAAMC,QAAO,GACzE,EAGIjB,KAAAsB,iBAAoBlB,IA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oCAAqCzF,KAAKuC,kBAAkB1C,EAAQkC,QACpE,0CAA2C/B,KAAK2G,eAGlDpB,EAAA,QAAAC,IAAA,2CAAMxE,KAAMlB,EAAKiC,U"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const t="ui-library";let e;let n;let s=false;let o=false;let l=false;const c=(t,e="")=>{{return()=>{}}};const i=(t,e)=>{{return()=>{}}};const f="{visibility:hidden}.hydrated{visibility:inherit}";const r="slot-fb{display:contents}slot-fb[hidden]{display:none}";const u={};const a="http://www.w3.org/2000/svg";const d="http://www.w3.org/1999/xhtml";const v=t=>t!=null;const p=t=>{t=typeof t;return t==="object"||t==="function"};function y(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const h=(t,e,...n)=>{let s=null;let o=null;let l=false;let c=false;const i=[];const f=e=>{for(let n=0;n<e.length;n++){s=e[n];if(Array.isArray(s)){f(s)}else if(s!=null&&typeof s!=="boolean"){if(l=typeof t!=="function"&&!p(s)){s=String(s)}if(l&&c){i[i.length-1].t+=s}else{i.push(l?m(null,s):s)}c=l}}};f(n);if(e){if(e.key){o=e.key}{const t=e.className||e.class;if(t){e.class=typeof t!=="object"?t:Object.keys(t).filter((e=>t[e])).join(" ")}}}if(typeof t==="function"){return t(e===null?{}:e,i,$)}const r=m(t,null);r.o=e;if(i.length>0){r.l=i}{r.i=o}return r};const m=(t,e)=>{const n={u:0,v:t,t:e,p:null,l:null};{n.o=null}{n.i=null}return n};const b={};const w=t=>t&&t.v===b;const $={forEach:(t,e)=>t.map(g).forEach(e),map:(t,e)=>t.map(g).map(e).map(S)};const g=t=>({vattrs:t.o,vchildren:t.l,vkey:t.i,vname:t.h,vtag:t.v,vtext:t.t});const S=t=>{if(typeof t.vtag==="function"){const e=Object.assign({},t.vattrs);if(t.vkey){e.key=t.vkey}if(t.vname){e.name=t.vname}return h(t.vtag,e,...t.vchildren||[])}const e=m(t.vtag,t.vtext);e.o=t.vattrs;e.l=t.vchildren;e.i=t.vkey;e.h=t.vname;return e};const j=(t,e)=>{if(t!=null&&!p(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const O=t=>bt(t).$hostElement$;const k=(t,e,n)=>{const s=O(t);return{emit:t=>C(s,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:t})}};const C=(t,e,n)=>{const s=xt.ce(e,n);t.dispatchEvent(s);return s};const M=new WeakMap;const x=(t,e,n)=>{let s=kt.get(t);if(Ut&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}kt.set(t,s)};const E=(t,e,n)=>{var s;const o=U(e);const l=kt.get(o);t=t.nodeType===11?t:Mt;if(l){if(typeof l==="string"){t=t.head||t;let n=M.get(t);let c;if(!n){M.set(t,n=new Set)}if(!n.has(o)){{c=Mt.createElement("style");c.innerHTML=l;const e=(s=xt.m)!==null&&s!==void 0?s:y(Mt);if(e!=null){c.setAttribute("nonce",e)}t.insertBefore(c,t.querySelector("link"))}if(e.u&4){c.innerHTML+=r}if(n){n.add(o)}}}else if(!t.adoptedStyleSheets.includes(l)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]}}return o};const P=t=>{const e=t.$;const n=t.$hostElement$;const s=e.u;const o=c("attachStyles",e.S);const l=E(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(s&10){n["s-sc"]=l;n.classList.add(l+"-h");if(s&2){n.classList.add(l+"-s")}}o()};const U=(t,e)=>"sc-"+t.S;const L=(t,e,n,s,o,l)=>{if(n!==s){let c=gt(t,e);let i=e.toLowerCase();if(e==="class"){const e=t.classList;const o=A(n);const l=A(s);e.remove(...o.filter((t=>t&&!l.includes(t))));e.add(...l.filter((t=>t&&!o.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="key");else if(e==="ref"){if(s){s(t)}}else if(!c&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(gt(Ct,i)){e=i.slice(2)}else{e=i[2]+e.slice(3)}if(n||s){const o=e.endsWith(D);e=e.replace(N,"");if(n){xt.rel(t,e,n,o)}if(s){xt.ael(t,e,s,o)}}}else{const i=p(s);if((c||i&&s!==null)&&!o){try{if(!t.tagName.includes("-")){const o=s==null?"":s;if(e==="list"){c=false}else if(n==null||t[e]!=o){t[e]=o}}else{t[e]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){{t.removeAttribute(e)}}}else if((!c||l&4||o)&&!i){s=s===true?"":s;{t.setAttribute(e,s)}}}}};const R=/\s/;const A=t=>!t?[]:t.split(R);const D="Capture";const N=new RegExp(D+"$");const T=(t,e,n,s)=>{const o=e.p.nodeType===11&&e.p.host?e.p.host:e.p;const l=t&&t.o||u;const c=e.o||u;{for(s in l){if(!(s in c)){L(o,s,l[s],undefined,n,e.u)}}}for(s in c){L(o,s,l[s],c[s],n,e.u)}};const W=(t,s,l,c)=>{const i=s.l[l];let f=0;let r;let u;if(i.t!==null){r=i.p=Mt.createTextNode(i.t)}else{if(!o){o=i.v==="svg"}r=i.p=Mt.createElementNS(o?a:d,i.v);if(o&&i.v==="foreignObject"){o=false}{T(null,i,o)}if(v(e)&&r["s-si"]!==e){r.classList.add(r["s-si"]=e)}if(i.l){for(f=0;f<i.l.length;++f){u=W(t,i,f);if(u){r.appendChild(u)}}}{if(i.v==="svg"){o=false}else if(r.tagName==="foreignObject"){o=true}}}r["s-hn"]=n;return r};const F=(t,e,s,o,l,c)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===n){i=i.shadowRoot}for(;l<=c;++l){if(o[l]){f=W(null,s,l);if(f){o[l].p=f;i.insertBefore(f,e)}}}};const H=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.p;_(e);if(t){t.remove()}}}};const q=(t,e,n,s,o=false)=>{let l=0;let c=0;let i=0;let f=0;let r=e.length-1;let u=e[0];let a=e[r];let d=s.length-1;let v=s[0];let p=s[d];let y;let h;while(l<=r&&c<=d){if(u==null){u=e[++l]}else if(a==null){a=e[--r]}else if(v==null){v=s[++c]}else if(p==null){p=s[--d]}else if(I(u,v,o)){V(u,v,o);u=e[++l];v=s[++c]}else if(I(a,p,o)){V(a,p,o);a=e[--r];p=s[--d]}else if(I(u,p,o)){V(u,p,o);t.insertBefore(u.p,a.p.nextSibling);u=e[++l];p=s[--d]}else if(I(a,v,o)){V(a,v,o);t.insertBefore(a.p,u.p);a=e[--r];v=s[++c]}else{i=-1;{for(f=l;f<=r;++f){if(e[f]&&e[f].i!==null&&e[f].i===v.i){i=f;break}}}if(i>=0){h=e[i];if(h.v!==v.v){y=W(e&&e[c],n,i)}else{V(h,v,o);e[i]=undefined;y=h.p}v=s[++c]}else{y=W(e&&e[c],n,c);v=s[++c]}if(y){{u.p.parentNode.insertBefore(y,u.p)}}}}if(l>r){F(t,s[d+1]==null?null:s[d+1].p,n,s,c,d)}else if(c>d){H(e,l,r)}};const I=(t,e,n=false)=>{if(t.v===e.v){if(!n){return t.i===e.i}return true}return false};const V=(t,e,n=false)=>{const l=e.p=t.p;const c=t.l;const i=e.l;const f=e.v;const r=e.t;if(r===null){{o=f==="svg"?true:f==="foreignObject"?false:o}{if(f==="slot"&&!s);else{T(t,e,o)}}if(c!==null&&i!==null){q(l,c,e,i,n)}else if(i!==null){if(t.t!==null){l.textContent=""}F(l,null,e,i,0,i.length-1)}else if(c!==null){H(c,0,c.length-1)}if(o&&f==="svg"){o=false}}else if(t.t!==r){l.data=r}};const _=t=>{{t.o&&t.o.ref&&t.o.ref(null);t.l&&t.l.map(_)}};const z=(t,o,l=false)=>{const c=t.$hostElement$;const i=t.$;const f=t.j||m(null,null);const r=w(o)?o:h(null,null,o);n=c.tagName;if(i.O){r.o=r.o||{};i.O.map((([t,e])=>r.o[e]=c[t]))}if(l&&r.o){for(const t of Object.keys(r.o)){if(c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)){r.o[t]=c[t]}}}r.v=null;r.u|=4;t.j=r;r.p=f.p=c.shadowRoot||c;{e=c["s-sc"]}s=(i.u&1)!==0;V(f,r,l)};const B=(t,e)=>{if(e&&!t.k&&e["s-p"]){e["s-p"].push(new Promise((e=>t.k=e)))}};const G=(t,e)=>{{t.u|=16}if(t.u&4){t.u|=512;return}B(t,t.C);const n=()=>J(t,e);return Wt(n)};const J=(t,e)=>{const n=c("scheduleUpdate",t.$.S);const s=t.M;let o;if(e){{t.u|=256;if(t.P){t.P.map((([t,e])=>et(s,t,e)));t.P=undefined}}{o=et(s,"componentWillLoad")}}n();return K(o,(()=>X(t,s,e)))};const K=(t,e)=>Q(t)?t.then(e):e();const Q=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const X=async(t,e,n)=>{var s;const o=t.$hostElement$;const l=c("update",t.$.S);const i=o["s-rc"];if(n){P(t)}const f=c("render",t.$.S);{Y(t,e,o,n)}if(i){i.map((t=>t()));o["s-rc"]=undefined}f();l();{const e=(s=o["s-p"])!==null&&s!==void 0?s:[];const n=()=>Z(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.u|=4;e.length=0}}};const Y=(t,e,n,s)=>{try{e=e.render();{t.u&=~16}{t.u|=2}{{{z(t,e,s)}}}}catch(e){St(e,t.$hostElement$)}return null};const Z=t=>{const e=t.$.S;const n=t.$hostElement$;const s=c("postUpdate",e);const o=t.M;const l=t.C;{et(o,"componentDidRender")}if(!(t.u&64)){t.u|=64;{nt(n)}{et(o,"componentDidLoad")}s();{t.U(n);if(!l){tt()}}}else{{et(o,"componentDidUpdate")}s()}{t.L(n)}{if(t.k){t.k();t.k=undefined}if(t.u&512){Tt((()=>G(t,false)))}t.u&=~(4|512)}};const tt=e=>{{nt(Mt.documentElement)}Tt((()=>C(Ct,"appload",{detail:{namespace:t}})))};const et=(t,e,n)=>{if(t&&t[e]){try{return t[e](n)}catch(t){St(t)}}return undefined};const nt=t=>t.classList.add("hydrated");const st=(t,e)=>bt(t).R.get(e);const ot=(t,e,n,s)=>{const o=bt(t);const l=o.$hostElement$;const c=o.R.get(e);const i=o.u;const f=o.M;n=j(n,s.A[e][0]);const r=Number.isNaN(c)&&Number.isNaN(n);const u=n!==c&&!r;if((!(i&8)||c===undefined)&&u){o.R.set(e,n);if(f){if(s.D&&i&128){const t=s.D[e];if(t){t.map((t=>{try{f[t](n,c,e)}catch(t){St(t,l)}}))}}if((i&(2|16))===2){G(o,false)}}}};const lt=(t,e,n)=>{var s;const o=t.prototype;if(e.A){if(t.watchers){e.D=t.watchers}const l=Object.entries(e.A);l.map((([t,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(o,t,{get(){return st(this,t)},set(n){ot(this,t,n,e)},configurable:true,enumerable:true})}else if(n&1&&s&64){Object.defineProperty(o,t,{value(...e){var n;const s=bt(this);return(n=s===null||s===void 0?void 0:s.N)===null||n===void 0?void 0:n.then((()=>{var n;return(n=s.M)===null||n===void 0?void 0:n[t](...e)}))}})}}));if(n&1){const n=new Map;o.attributeChangedCallback=function(t,s,l){xt.jmp((()=>{var c;const i=n.get(t);if(this.hasOwnProperty(i)){l=this[i];delete this[i]}else if(o.hasOwnProperty(i)&&typeof this[i]==="number"&&this[i]==l){return}else if(i==null){const n=bt(this);const o=n===null||n===void 0?void 0:n.u;if(o&&!(o&8)&&o&128&&l!==s){const o=n.M;const i=(c=e.D)===null||c===void 0?void 0:c[t];i===null||i===void 0?void 0:i.forEach((e=>{if(o[e]!=null){o[e].call(o,l,s,t)}}))}return}this[i]=l===null&&typeof this[i]==="boolean"?false:l}))};t.observedAttributes=Array.from(new Set([...Object.keys((s=e.D)!==null&&s!==void 0?s:{}),...l.filter((([t,e])=>e[0]&15)).map((([t,s])=>{var o;const l=s[1]||t;n.set(l,t);if(s[0]&512){(o=e.O)===null||o===void 0?void 0:o.push([t,l])}return l}))]))}}return t};const ct=async(t,e,n,s)=>{let o;if((e.u&32)===0){e.u|=32;const s=n.T;if(s){o=Ot(n);if(o.then){const t=i();o=await o;t()}if(!o.isProxied){{n.D=o.watchers}lt(o,n,2);o.isProxied=true}const t=c("createInstance",n.S);{e.u|=8}try{new o(e)}catch(t){St(t)}{e.u&=~8}{e.u|=128}t();it(e.M)}else{o=t.constructor;customElements.whenDefined(n.S).then((()=>e.u|=128))}if(o.style){let t=o.style;const e=U(n);if(!kt.has(e)){const s=c("registerStyles",n.S);x(e,t,!!(n.u&1));s()}}}const l=e.C;const f=()=>G(e,true);if(l&&l["s-rc"]){l["s-rc"].push(f)}else{f()}};const it=t=>{{et(t,"connectedCallback")}};const ft=t=>{if((xt.u&1)===0){const e=bt(t);const n=e.$;const s=c("connectedCallback",n.S);if(!(e.u&1)){e.u|=1;{let n=t;while(n=n.parentNode||n.host){if(n["s-p"]){B(e,e.C=n);break}}}if(n.A){Object.entries(n.A).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{ct(t,e,n)}}else{dt(t,e,n.W);if(e===null||e===void 0?void 0:e.M){it(e.M)}else if(e===null||e===void 0?void 0:e.F){e.F.then((()=>it(e.M)))}}s()}};const rt=t=>{{et(t,"disconnectedCallback")}};const ut=async t=>{if((xt.u&1)===0){const e=bt(t);{if(e.H){e.H.map((t=>t()));e.H=undefined}}if(e===null||e===void 0?void 0:e.M){rt(e.M)}else if(e===null||e===void 0?void 0:e.F){e.F.then((()=>rt(e.M)))}}};const at=(t,e={})=>{var n;const s=c();const o=[];const l=e.exclude||[];const i=Ct.customElements;const u=Mt.head;const a=u.querySelector("meta[charset]");const d=Mt.createElement("style");const v=[];let p;let h=true;Object.assign(xt,e);xt.q=new URL(e.resourcesUrl||"./",Mt.baseURI).href;let m=false;t.map((t=>{t[1].map((e=>{var n;const s={u:e[0],S:e[1],A:e[2],W:e[3]};if(s.u&4){m=true}{s.A=e[2]}{s.W=e[3]}{s.O=[]}{s.D=(n=e[4])!==null&&n!==void 0?n:{}}const c=s.S;const f=class extends HTMLElement{constructor(t){super(t);t=this;$t(t,s);if(s.u&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(p){clearTimeout(p);p=null}if(h){v.push(this)}else{xt.jmp((()=>ft(this)))}}disconnectedCallback(){xt.jmp((()=>ut(this)))}componentOnReady(){return bt(this).F}};s.T=t[0];if(!l.includes(c)&&!i.get(c)){o.push(c);i.define(c,lt(f,s,1))}}))}));if(o.length>0){if(m){d.textContent+=r}{d.textContent+=o+f}if(d.innerHTML.length){d.setAttribute("data-styles","");const t=(n=xt.m)!==null&&n!==void 0?n:y(Mt);if(t!=null){d.setAttribute("nonce",t)}u.insertBefore(d,a?a.nextSibling:u.firstChild)}}h=false;if(v.length){v.map((t=>t.connectedCallback()))}else{{xt.jmp((()=>p=setTimeout(tt,30)))}}s()};const dt=(t,e,n,s)=>{if(n){n.map((([n,s,o])=>{const l=pt(t,n);const c=vt(e,o);const i=yt(n);xt.ael(l,s,c,i);(e.H=e.H||[]).push((()=>xt.rel(l,s,c,i)))}))}};const vt=(t,e)=>n=>{try{{if(t.u&256){t.M[e](n)}else{(t.P=t.P||[]).push([e,n])}}}catch(t){St(t)}};const pt=(t,e)=>{if(e&8)return Ct;return t};const yt=t=>Et?{passive:(t&1)!==0,capture:(t&2)!==0}:(t&2)!==0;const ht=t=>xt.m=t;const mt=new WeakMap;const bt=t=>mt.get(t);const wt=(t,e)=>mt.set(e.M=t,e);const $t=(t,e)=>{const n={u:0,$hostElement$:t,$:e,R:new Map};{n.N=new Promise((t=>n.L=t))}{n.F=new Promise((t=>n.U=t));t["s-p"]=[];t["s-rc"]=[]}dt(t,n,e.W);return mt.set(t,n)};const gt=(t,e)=>e in t;const St=(t,e)=>(0,console.error)(t,e);const jt=new Map;const Ot=(t,e,n)=>{const s=t.S.replace(/-/g,"_");const o=t.T;const l=jt.get(o);if(l){return l[s]}
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${o}.entry.js${""}`).then((t=>{{jt.set(o,t)}return t[s]}),St)};const kt=new Map;const Ct=typeof window!=="undefined"?window:{};const Mt=Ct.document||{head:{}};const xt={u:0,q:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const Et=(()=>{let t=false;try{Mt.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=true}}))}catch(t){}return t})();const Pt=t=>Promise.resolve(t);const Ut=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Lt=[];const Rt=[];const At=(t,e)=>n=>{t.push(n);if(!l){l=true;if(e&&xt.u&4){Tt(Nt)}else{xt.raf(Nt)}}};const Dt=t=>{for(let e=0;e<t.length;e++){try{t[e](performance.now())}catch(t){St(t)}}t.length=0};const Nt=()=>{Dt(Lt);{Dt(Rt);if(l=Lt.length>0){xt.raf(Nt)}}};const Tt=t=>Pt().then(t);const Wt=At(Rt,true);export{b as H,at as b,k as c,O as g,h,Pt as p,wt as r,ht as s};
|
|
3
|
-
//# sourceMappingURL=p-f93d8a4e.js.map
|