@six-group/ui-library 3.0.0-beta.1.7 → 4.0.0-beta.0
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/{event-listeners-4a8d66d5.js → event-listeners-74715e62.js} +40 -38
- package/dist/cjs/event-listeners-74715e62.js.map +1 -0
- package/dist/cjs/{execution-control-3bc9c7c4.js → execution-control-46f388e0.js} +37 -35
- package/dist/cjs/execution-control-46f388e0.js.map +1 -0
- package/dist/cjs/{focus-visible-b08d956f.js → focus-visible-0b352c74.js} +42 -40
- package/dist/cjs/focus-visible-0b352c74.js.map +1 -0
- package/dist/cjs/{form-control-9e4dffd1.js → form-control-8e2ae807.js} +28 -26
- package/dist/cjs/form-control-8e2ae807.js.map +1 -0
- package/dist/cjs/{index-341df120.js → index-b3257a77.js} +603 -279
- package/dist/cjs/index-b3257a77.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +6 -3
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/{modal-a9679ddf.js → modal-48d42228.js} +43 -41
- package/dist/cjs/modal-48d42228.js.map +1 -0
- package/dist/cjs/{popover-e3781f5a.js → popover-f743f62b.js} +100 -99
- package/dist/cjs/popover-f743f62b.js.map +1 -0
- package/dist/cjs/{scroll-5b8676ba.js → scroll-76e6f5d7.js} +59 -57
- package/dist/cjs/scroll-76e6f5d7.js.map +1 -0
- package/dist/cjs/set-attributes_2.cjs.entry.js +58 -58
- package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -0
- package/dist/cjs/six-alert.cjs.entry.js +127 -132
- package/dist/cjs/six-alert.cjs.entry.js.map +1 -0
- package/dist/cjs/six-avatar.cjs.entry.js +27 -29
- package/dist/cjs/six-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/six-badge.cjs.entry.js +26 -27
- package/dist/cjs/six-badge.cjs.entry.js.map +1 -0
- package/dist/cjs/six-button.cjs.entry.js +96 -98
- package/dist/cjs/six-button.cjs.entry.js.map +1 -0
- package/dist/cjs/six-card.cjs.entry.js +11 -9
- package/dist/cjs/six-card.cjs.entry.js.map +1 -0
- package/dist/cjs/six-checkbox.cjs.entry.js +149 -153
- package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/six-datepicker.cjs.entry.js +1137 -1190
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -0
- package/dist/cjs/six-details.cjs.entry.js +137 -140
- package/dist/cjs/six-details.cjs.entry.js.map +1 -0
- package/dist/cjs/six-dialog.cjs.entry.js +146 -153
- package/dist/cjs/six-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/six-drawer.cjs.entry.js +163 -175
- package/dist/cjs/six-drawer.cjs.entry.js.map +1 -0
- package/dist/cjs/six-dropdown_3.cjs.entry.js +682 -729
- package/dist/cjs/six-dropdown_3.cjs.entry.js.map +1 -0
- package/dist/cjs/six-error-page.cjs.entry.js +98 -95
- package/dist/cjs/six-error-page.cjs.entry.js.map +1 -0
- package/dist/cjs/six-file-list-item.cjs.entry.js +37 -39
- package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -0
- package/dist/cjs/six-file-list.cjs.entry.js +11 -9
- package/dist/cjs/six-file-list.cjs.entry.js.map +1 -0
- package/dist/cjs/six-file-upload.cjs.entry.js +110 -97
- package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -0
- package/dist/cjs/six-footer.cjs.entry.js +11 -9
- package/dist/cjs/six-footer.cjs.entry.js.map +1 -0
- package/dist/cjs/six-form.cjs.entry.js +221 -220
- package/dist/cjs/six-form.cjs.entry.js.map +1 -0
- package/dist/cjs/six-group-label.cjs.entry.js +46 -47
- package/dist/cjs/six-group-label.cjs.entry.js.map +1 -0
- package/dist/cjs/six-header.cjs.entry.js +150 -150
- package/dist/cjs/six-header.cjs.entry.js.map +1 -0
- package/dist/cjs/six-icon-button.cjs.entry.js +37 -34
- package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -0
- package/dist/cjs/six-icon.cjs.entry.js +25 -25
- package/dist/cjs/six-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/six-input.cjs.entry.js +229 -231
- package/dist/cjs/six-input.cjs.entry.js.map +1 -0
- package/dist/cjs/six-item-picker.cjs.entry.js +347 -362
- package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -0
- package/dist/cjs/six-language-switcher.cjs.entry.js +55 -53
- package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -0
- package/dist/cjs/six-layout-grid.cjs.entry.js +23 -20
- package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -0
- package/dist/cjs/six-main-container.cjs.entry.js +13 -12
- package/dist/cjs/six-main-container.cjs.entry.js.map +1 -0
- package/dist/cjs/six-menu-divider.cjs.entry.js +11 -9
- package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -0
- package/dist/cjs/six-menu-label.cjs.entry.js +11 -9
- package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -0
- package/dist/cjs/six-picto.cjs.entry.js +15 -16
- package/dist/cjs/six-picto.cjs.entry.js.map +1 -0
- package/dist/cjs/six-progress-bar.cjs.entry.js +18 -18
- package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/six-progress-ring.cjs.entry.js +33 -32
- package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -0
- package/dist/cjs/six-radio.cjs.entry.js +120 -122
- package/dist/cjs/six-radio.cjs.entry.js.map +1 -0
- package/dist/cjs/six-range.cjs.entry.js +188 -199
- package/dist/cjs/six-range.cjs.entry.js.map +1 -0
- package/dist/cjs/six-root.cjs.entry.js +34 -35
- package/dist/cjs/six-root.cjs.entry.js.map +1 -0
- package/dist/cjs/six-search-field.cjs.entry.js +43 -44
- package/dist/cjs/six-search-field.cjs.entry.js.map +1 -0
- package/dist/cjs/six-select.cjs.entry.js +422 -448
- package/dist/cjs/six-select.cjs.entry.js.map +1 -0
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +44 -43
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -0
- package/dist/cjs/six-sidebar-item.cjs.entry.js +18 -19
- package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -0
- package/dist/cjs/six-sidebar.cjs.entry.js +170 -172
- package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -0
- package/dist/cjs/six-spinner.cjs.entry.js +18 -17
- package/dist/cjs/six-spinner.cjs.entry.js.map +1 -0
- package/dist/cjs/six-switch.cjs.entry.js +101 -101
- package/dist/cjs/six-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/six-tab-group.cjs.entry.js +227 -227
- package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -0
- package/dist/cjs/six-tab-panel.cjs.entry.js +18 -18
- package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -0
- package/dist/cjs/six-tab.cjs.entry.js +41 -43
- package/dist/cjs/six-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/six-table-cell_4.cjs.entry.js +77 -72
- package/dist/cjs/six-table-cell_4.cjs.entry.js.map +1 -0
- package/dist/cjs/six-table.cjs.entry.js +145 -146
- package/dist/cjs/six-table.cjs.entry.js.map +1 -0
- package/dist/cjs/six-tag.cjs.entry.js +39 -41
- package/dist/cjs/six-tag.cjs.entry.js.map +1 -0
- package/dist/cjs/six-textarea.cjs.entry.js +209 -212
- package/dist/cjs/six-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/six-tile.cjs.entry.js +87 -90
- package/dist/cjs/six-tile.cjs.entry.js.map +1 -0
- package/dist/cjs/six-timepicker.cjs.entry.js +441 -490
- package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -0
- package/dist/cjs/{six-timepicker.types-c58cc88b.js → six-timepicker.types-c19ebff3.js} +45 -43
- package/dist/cjs/six-timepicker.types-c19ebff3.js.map +1 -0
- package/dist/cjs/six-tooltip.cjs.entry.js +163 -173
- package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/{slot-8abe833c.js → slot-ad537f24.js} +44 -42
- package/dist/cjs/slot-ad537f24.js.map +1 -0
- package/dist/cjs/{types-0c28e484.js → types-64878648.js} +14 -12
- package/dist/cjs/types-64878648.js.map +1 -0
- package/dist/cjs/ui-library.cjs.js +12 -3
- package/dist/cjs/ui-library.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/six-alert/six-alert.js +368 -366
- package/dist/collection/components/six-alert/six-alert.js.map +1 -0
- package/dist/collection/components/six-avatar/six-avatar.js +131 -131
- package/dist/collection/components/six-avatar/six-avatar.js.map +1 -0
- package/dist/collection/components/six-badge/six-badge.js +104 -101
- package/dist/collection/components/six-badge/six-badge.js.map +1 -0
- package/dist/collection/components/six-button/six-button.js +464 -466
- package/dist/collection/components/six-button/six-button.js.map +1 -0
- package/dist/collection/components/six-card/six-card.js +25 -21
- package/dist/collection/components/six-card/six-card.js.map +1 -0
- package/dist/collection/components/six-checkbox/six-checkbox.js +541 -550
- package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -0
- package/dist/collection/components/six-datepicker/components/day-selection.js +12 -13
- package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -0
- package/dist/collection/components/six-datepicker/components/month-selection.js +12 -12
- package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -0
- package/dist/collection/components/six-datepicker/components/year-selection.js +10 -10
- package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -0
- package/dist/collection/components/six-datepicker/six-date-formats.js +24 -23
- package/dist/collection/components/six-datepicker/six-date-formats.js.map +1 -0
- package/dist/collection/components/six-datepicker/six-datepicker.js +1271 -1343
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -0
- package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js +17 -16
- package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js.map +1 -0
- package/dist/collection/components/six-details/six-details.js +434 -432
- package/dist/collection/components/six-details/six-details.js.map +1 -0
- package/dist/collection/components/six-dialog/six-dialog.js +397 -401
- package/dist/collection/components/six-dialog/six-dialog.js.map +1 -0
- package/dist/collection/components/six-drawer/six-drawer.js +449 -458
- package/dist/collection/components/six-drawer/six-drawer.js.map +1 -0
- package/dist/collection/components/six-dropdown/six-dropdown.js +919 -939
- package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -0
- package/dist/collection/components/six-error-page/six-error-page.js +203 -199
- package/dist/collection/components/six-error-page/six-error-page.js.map +1 -0
- package/dist/collection/components/six-file-list/six-file-list.js +24 -20
- package/dist/collection/components/six-file-list/six-file-list.js.map +1 -0
- package/dist/collection/components/six-file-list-item/six-file-list-item.js +204 -203
- package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -0
- package/dist/collection/components/six-file-upload/six-file-upload.js +307 -272
- package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -0
- package/dist/collection/components/six-footer/six-footer.js +25 -21
- package/dist/collection/components/six-footer/six-footer.js.map +1 -0
- package/dist/collection/components/six-form/six-form.js +419 -408
- package/dist/collection/components/six-form/six-form.js.map +1 -0
- package/dist/collection/components/six-group-label/six-group-label.js +173 -166
- package/dist/collection/components/six-group-label/six-group-label.js.map +1 -0
- package/dist/collection/components/six-header/six-header.js +412 -420
- package/dist/collection/components/six-header/six-header.js.map +1 -0
- package/dist/collection/components/six-icon/six-icon.js +81 -77
- package/dist/collection/components/six-icon/six-icon.js.map +1 -0
- package/dist/collection/components/six-icon-button/six-icon-button.js +146 -142
- package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -0
- package/dist/collection/components/six-input/six-input.js +1140 -1141
- package/dist/collection/components/six-input/six-input.js.map +1 -0
- package/dist/collection/components/six-item-picker/six-item-picker.js +681 -688
- package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -0
- package/dist/collection/components/six-item-picker/types.js +14 -13
- package/dist/collection/components/six-item-picker/types.js.map +1 -0
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +139 -128
- package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -0
- package/dist/collection/components/six-layout-grid/six-layout-grid.js +63 -52
- package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -0
- package/dist/collection/components/six-main-container/six-main-container.js +55 -53
- package/dist/collection/components/six-main-container/six-main-container.js.map +1 -0
- package/dist/collection/components/six-menu/six-menu.js +398 -406
- package/dist/collection/components/six-menu/six-menu.js.map +1 -0
- package/dist/collection/components/six-menu-divider/six-menu-divider.js +27 -22
- package/dist/collection/components/six-menu-divider/six-menu-divider.js.map +1 -0
- package/dist/collection/components/six-menu-item/six-menu-item.js +198 -177
- package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -0
- package/dist/collection/components/six-menu-label/six-menu-label.js +29 -25
- package/dist/collection/components/six-menu-label/six-menu-label.js.map +1 -0
- package/dist/collection/components/six-picto/six-picto.js +53 -50
- package/dist/collection/components/six-picto/six-picto.js.map +1 -0
- package/dist/collection/components/six-progress-bar/six-progress-bar.js +80 -77
- package/dist/collection/components/six-progress-bar/six-progress-bar.js.map +1 -0
- package/dist/collection/components/six-progress-ring/six-progress-ring.js +114 -111
- package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -0
- package/dist/collection/components/six-radio/six-radio.js +412 -410
- package/dist/collection/components/six-radio/six-radio.js.map +1 -0
- package/dist/collection/components/six-range/six-range.js +619 -620
- package/dist/collection/components/six-range/six-range.js.map +1 -0
- package/dist/collection/components/six-root/six-root.js +165 -167
- package/dist/collection/components/six-root/six-root.js.map +1 -0
- package/dist/collection/components/six-search-field/six-search-field.js +177 -171
- package/dist/collection/components/six-search-field/six-search-field.js.map +1 -0
- package/dist/collection/components/six-select/six-select.css +1 -2
- package/dist/collection/components/six-select/six-select.js +1081 -1105
- package/dist/collection/components/six-select/six-select.js.map +1 -0
- package/dist/collection/components/six-sidebar/six-sidebar.js +464 -455
- package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -0
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +92 -89
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -0
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +159 -158
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -0
- package/dist/collection/components/six-spinner/six-spinner.js +58 -55
- package/dist/collection/components/six-spinner/six-spinner.js.map +1 -0
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +49 -46
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js.map +1 -0
- package/dist/collection/components/six-switch/six-switch.js +401 -393
- package/dist/collection/components/six-switch/six-switch.js.map +1 -0
- package/dist/collection/components/six-tab/six-tab.js +202 -198
- package/dist/collection/components/six-tab/six-tab.js.map +1 -0
- package/dist/collection/components/six-tab-group/six-tab-group.js +368 -362
- package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -0
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +78 -75
- package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -0
- package/dist/collection/components/six-table/six-table.js +219 -209
- package/dist/collection/components/six-table/six-table.js.map +1 -0
- package/dist/collection/components/six-table/test/helpers.js +14 -13
- package/dist/collection/components/six-table/test/helpers.js.map +1 -0
- package/dist/collection/components/six-table/types.js +9 -8
- package/dist/collection/components/six-table/types.js.map +1 -0
- package/dist/collection/components/six-table/util/filter-by.js +34 -34
- package/dist/collection/components/six-table/util/filter-by.js.map +1 -0
- package/dist/collection/components/six-table/util/from-data.js +32 -33
- package/dist/collection/components/six-table/util/from-data.js.map +1 -0
- package/dist/collection/components/six-table/util/is.js +4 -3
- package/dist/collection/components/six-table/util/is.js.map +1 -0
- package/dist/collection/components/six-table/util/quick-filter-by.js +14 -13
- package/dist/collection/components/six-table/util/quick-filter-by.js.map +1 -0
- package/dist/collection/components/six-table/util/sort-by.js +25 -25
- package/dist/collection/components/six-table/util/sort-by.js.map +1 -0
- package/dist/collection/components/six-table-cell/six-table-cell.js +25 -21
- package/dist/collection/components/six-table-cell/six-table-cell.js.map +1 -0
- package/dist/collection/components/six-table-header/six-table-header.js +25 -21
- package/dist/collection/components/six-table-header/six-table-header.js.map +1 -0
- package/dist/collection/components/six-table-header-cell/get-next-state.js +7 -7
- package/dist/collection/components/six-table-header-cell/get-next-state.js.map +1 -0
- package/dist/collection/components/six-table-header-cell/icons.js +12 -12
- package/dist/collection/components/six-table-header-cell/icons.js.map +1 -0
- package/dist/collection/components/six-table-header-cell/six-table-header-cell.js +179 -174
- package/dist/collection/components/six-table-header-cell/six-table-header-cell.js.map +1 -0
- package/dist/collection/components/six-table-header-cell/types.js +2 -13
- package/dist/collection/components/six-table-header-cell/types.js.map +1 -0
- package/dist/collection/components/six-table-header-cell/util/create-model.js +7 -6
- package/dist/collection/components/six-table-header-cell/util/create-model.js.map +1 -0
- package/dist/collection/components/six-table-header-cell/util/get-next-state.js +7 -7
- package/dist/collection/components/six-table-header-cell/util/get-next-state.js.map +1 -0
- package/dist/collection/components/six-table-row/six-table-row.js +25 -21
- package/dist/collection/components/six-table-row/six-table-row.js.map +1 -0
- package/dist/collection/components/six-tag/six-tag.js +159 -157
- package/dist/collection/components/six-tag/six-tag.js.map +1 -0
- package/dist/collection/components/six-textarea/six-textarea.js +920 -912
- package/dist/collection/components/six-textarea/six-textarea.js.map +1 -0
- package/dist/collection/components/six-tile/six-tile.js +314 -315
- package/dist/collection/components/six-tile/six-tile.js.map +1 -0
- package/dist/collection/components/six-timepicker/six-time-format.js +15 -14
- package/dist/collection/components/six-timepicker/six-time-format.js.map +1 -0
- package/dist/collection/components/six-timepicker/six-timepicker.js +936 -980
- package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -0
- package/dist/collection/components/six-timepicker/six-timepicker.types.js +41 -40
- package/dist/collection/components/six-timepicker/six-timepicker.types.js.map +1 -0
- package/dist/collection/components/six-tooltip/six-tooltip.js +432 -435
- package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -0
- package/dist/collection/functional-components/form-control/form-control.js +23 -28
- package/dist/collection/functional-components/form-control/form-control.js.map +1 -0
- package/dist/collection/index.js +2 -1
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/testUtil/delay.js +4 -3
- package/dist/collection/testUtil/delay.js.map +1 -0
- package/dist/collection/utils/as-array.js +2 -1
- package/dist/collection/utils/as-array.js.map +1 -0
- package/dist/collection/utils/date-util.js +713 -712
- package/dist/collection/utils/date-util.js.map +1 -0
- package/dist/collection/utils/event-listeners.js +40 -39
- package/dist/collection/utils/event-listeners.js.map +1 -0
- package/dist/collection/utils/execution-control.js +39 -38
- package/dist/collection/utils/execution-control.js.map +1 -0
- package/dist/collection/utils/focus-visible.js +42 -41
- package/dist/collection/utils/focus-visible.js.map +1 -0
- package/dist/collection/utils/matchers.js +3 -2
- package/dist/collection/utils/matchers.js.map +1 -0
- package/dist/collection/utils/modal.js +29 -28
- package/dist/collection/utils/modal.js.map +1 -0
- package/dist/collection/utils/offset.js +14 -13
- package/dist/collection/utils/offset.js.map +1 -0
- package/dist/collection/utils/popover.js +114 -113
- package/dist/collection/utils/popover.js.map +1 -0
- package/dist/collection/utils/scroll.js +48 -47
- package/dist/collection/utils/scroll.js.map +1 -0
- package/dist/collection/utils/slot.js +60 -59
- package/dist/collection/utils/slot.js.map +1 -0
- package/dist/collection/utils/support.js +16 -15
- package/dist/collection/utils/support.js.map +1 -0
- package/dist/collection/utils/tabbable.js +23 -22
- package/dist/collection/utils/tabbable.js.map +1 -0
- package/dist/collection/utils/testing.js +39 -38
- package/dist/collection/utils/testing.js.map +1 -0
- package/dist/collection/utils/time.util.js +75 -74
- package/dist/collection/utils/time.util.js.map +1 -0
- package/dist/collection/utils/type-check.js +6 -5
- package/dist/collection/utils/type-check.js.map +1 -0
- package/dist/collection/utils/types.js +2 -1
- package/dist/collection/utils/types.js.map +1 -0
- package/dist/collection/wrappers/set-attributes/set-attributes.js +72 -68
- package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -0
- package/dist/{esm/event-listeners-1bef934e.js → components/event-listeners.js} +40 -38
- package/dist/components/event-listeners.js.map +1 -0
- package/dist/{esm/execution-control-235f5126.js → components/execution-control.js} +37 -35
- package/dist/components/execution-control.js.map +1 -0
- package/dist/{esm/focus-visible-4b7946aa.js → components/focus-visible.js} +42 -40
- package/dist/components/focus-visible.js.map +1 -0
- package/dist/components/form-control.js +32 -0
- package/dist/components/form-control.js.map +1 -0
- package/dist/components/index.d.ts +39 -0
- package/dist/components/index.js +132 -0
- package/dist/components/index.js.map +1 -0
- package/dist/{esm/modal-e5709f6b.js → components/modal.js} +43 -41
- package/dist/components/modal.js.map +1 -0
- package/dist/{esm/popover-5a51f84d.js → components/popover.js} +100 -99
- package/dist/components/popover.js.map +1 -0
- package/dist/{esm/scroll-99b214c2.js → components/scroll.js} +59 -57
- package/dist/components/scroll.js.map +1 -0
- package/dist/components/set-attributes.d.ts +11 -0
- package/dist/components/set-attributes.js +8 -0
- package/dist/components/set-attributes.js.map +1 -0
- package/dist/components/set-attributes2.js +69 -0
- package/dist/components/set-attributes2.js.map +1 -0
- package/dist/components/six-alert.d.ts +11 -0
- package/dist/components/six-alert.js +172 -0
- package/dist/components/six-alert.js.map +1 -0
- package/dist/components/six-avatar.d.ts +11 -0
- package/dist/components/six-avatar.js +63 -0
- package/dist/components/six-avatar.js.map +1 -0
- package/dist/components/six-badge.d.ts +11 -0
- package/dist/components/six-badge.js +54 -0
- package/dist/components/six-badge.js.map +1 -0
- package/dist/components/six-button.d.ts +11 -0
- package/dist/components/six-button.js +147 -0
- package/dist/components/six-button.js.map +1 -0
- package/dist/components/six-card.d.ts +11 -0
- package/dist/components/six-card.js +35 -0
- package/dist/components/six-card.js.map +1 -0
- package/dist/components/six-checkbox.d.ts +11 -0
- package/dist/components/six-checkbox.js +193 -0
- package/dist/components/six-checkbox.js.map +1 -0
- package/dist/components/six-datepicker.d.ts +11 -0
- package/dist/components/six-datepicker.js +1229 -0
- package/dist/components/six-datepicker.js.map +1 -0
- package/dist/components/six-details.d.ts +11 -0
- package/dist/components/six-details.js +8 -0
- package/dist/components/six-details.js.map +1 -0
- package/dist/components/six-details2.js +176 -0
- package/dist/components/six-details2.js.map +1 -0
- package/dist/components/six-dialog.d.ts +11 -0
- package/dist/components/six-dialog.js +190 -0
- package/dist/components/six-dialog.js.map +1 -0
- package/dist/components/six-drawer.d.ts +11 -0
- package/dist/components/six-drawer.js +209 -0
- package/dist/components/six-drawer.js.map +1 -0
- package/dist/components/six-dropdown.d.ts +11 -0
- package/dist/components/six-dropdown.js +8 -0
- package/dist/components/six-dropdown.js.map +1 -0
- package/dist/components/six-dropdown2.js +499 -0
- package/dist/components/six-dropdown2.js.map +1 -0
- package/dist/components/six-error-page.d.ts +11 -0
- package/dist/components/six-error-page.js +134 -0
- package/dist/components/six-error-page.js.map +1 -0
- package/dist/components/six-file-list-item.d.ts +11 -0
- package/dist/components/six-file-list-item.js +74 -0
- package/dist/components/six-file-list-item.js.map +1 -0
- package/dist/components/six-file-list.d.ts +11 -0
- package/dist/components/six-file-list.js +35 -0
- package/dist/components/six-file-list.js.map +1 -0
- package/dist/components/six-file-upload.d.ts +11 -0
- package/dist/components/six-file-upload.js +147 -0
- package/dist/components/six-file-upload.js.map +1 -0
- package/dist/components/six-footer.d.ts +11 -0
- package/dist/components/six-footer.js +35 -0
- package/dist/components/six-footer.js.map +1 -0
- package/dist/components/six-form.d.ts +11 -0
- package/dist/components/six-form.js +252 -0
- package/dist/components/six-form.js.map +1 -0
- package/dist/components/six-group-label.d.ts +11 -0
- package/dist/components/six-group-label.js +78 -0
- package/dist/components/six-group-label.js.map +1 -0
- package/dist/components/six-header.d.ts +11 -0
- package/dist/components/six-header.js +219 -0
- package/dist/components/six-header.js.map +1 -0
- package/dist/components/six-icon-button.d.ts +11 -0
- package/dist/components/six-icon-button.js +8 -0
- package/dist/components/six-icon-button.js.map +1 -0
- package/dist/components/six-icon-button2.js +70 -0
- package/dist/components/six-icon-button2.js.map +1 -0
- package/dist/components/six-icon.d.ts +11 -0
- package/dist/components/six-icon.js +8 -0
- package/dist/components/six-icon.js.map +1 -0
- package/dist/components/six-icon2.js +49 -0
- package/dist/components/six-icon2.js.map +1 -0
- package/dist/components/six-input.d.ts +11 -0
- package/dist/components/six-input.js +8 -0
- package/dist/components/six-input.js.map +1 -0
- package/dist/components/six-input2.js +303 -0
- package/dist/components/six-input2.js.map +1 -0
- package/dist/components/six-item-picker.d.ts +11 -0
- package/dist/components/six-item-picker.js +8 -0
- package/dist/components/six-item-picker.js.map +1 -0
- package/dist/components/six-item-picker2.js +404 -0
- package/dist/components/six-item-picker2.js.map +1 -0
- package/dist/components/six-language-switcher.d.ts +11 -0
- package/dist/components/six-language-switcher.js +82 -0
- package/dist/components/six-language-switcher.js.map +1 -0
- package/dist/components/six-layout-grid.d.ts +11 -0
- package/dist/components/six-layout-grid.js +49 -0
- package/dist/components/six-layout-grid.js.map +1 -0
- package/dist/components/six-main-container.d.ts +11 -0
- package/dist/components/six-main-container.js +39 -0
- package/dist/components/six-main-container.js.map +1 -0
- package/dist/components/six-menu-divider.d.ts +11 -0
- package/dist/components/six-menu-divider.js +35 -0
- package/dist/components/six-menu-divider.js.map +1 -0
- package/dist/components/six-menu-item.d.ts +11 -0
- package/dist/components/six-menu-item.js +8 -0
- package/dist/components/six-menu-item.js.map +1 -0
- package/dist/components/six-menu-item2.js +86 -0
- package/dist/components/six-menu-item2.js.map +1 -0
- package/dist/components/six-menu-label.d.ts +11 -0
- package/dist/components/six-menu-label.js +35 -0
- package/dist/components/six-menu-label.js.map +1 -0
- package/dist/components/six-menu.d.ts +11 -0
- package/dist/components/six-menu.js +8 -0
- package/dist/components/six-menu.js.map +1 -0
- package/dist/components/six-menu2.js +252 -0
- package/dist/components/six-menu2.js.map +1 -0
- package/dist/components/six-picto.d.ts +11 -0
- package/dist/components/six-picto.js +8 -0
- package/dist/components/six-picto.js.map +1 -0
- package/dist/{custom-elements/index.js → components/six-picto2.js} +30 -9749
- package/dist/components/six-picto2.js.map +1 -0
- package/dist/components/six-progress-bar.d.ts +11 -0
- package/dist/components/six-progress-bar.js +45 -0
- package/dist/components/six-progress-bar.js.map +1 -0
- package/dist/components/six-progress-ring.d.ts +11 -0
- package/dist/components/six-progress-ring.js +61 -0
- package/dist/components/six-progress-ring.js.map +1 -0
- package/dist/components/six-radio.d.ts +11 -0
- package/dist/components/six-radio.js +157 -0
- package/dist/components/six-radio.js.map +1 -0
- package/dist/components/six-range.d.ts +11 -0
- package/dist/components/six-range.js +236 -0
- package/dist/components/six-range.js.map +1 -0
- package/dist/components/six-root.d.ts +11 -0
- package/dist/components/six-root.js +82 -0
- package/dist/components/six-root.js.map +1 -0
- package/dist/components/six-search-field.d.ts +11 -0
- package/dist/components/six-search-field.js +85 -0
- package/dist/components/six-search-field.js.map +1 -0
- package/dist/components/six-select.d.ts +11 -0
- package/dist/components/six-select.js +526 -0
- package/dist/components/six-select.js.map +1 -0
- package/dist/components/six-sidebar-item-group.d.ts +11 -0
- package/dist/components/six-sidebar-item-group.js +88 -0
- package/dist/components/six-sidebar-item-group.js.map +1 -0
- package/dist/components/six-sidebar-item.d.ts +11 -0
- package/dist/components/six-sidebar-item.js +46 -0
- package/dist/components/six-sidebar-item.js.map +1 -0
- package/dist/components/six-sidebar.d.ts +11 -0
- package/dist/components/six-sidebar.js +205 -0
- package/dist/components/six-sidebar.js.map +1 -0
- package/dist/components/six-spinner.d.ts +11 -0
- package/dist/components/six-spinner.js +8 -0
- package/dist/components/six-spinner.js.map +1 -0
- package/dist/components/six-spinner2.js +41 -0
- package/dist/components/six-spinner2.js.map +1 -0
- package/dist/components/six-stage-indicator.d.ts +11 -0
- package/dist/components/six-stage-indicator.js +8 -0
- package/dist/components/six-stage-indicator.js.map +1 -0
- package/dist/components/six-stage-indicator2.js +41 -0
- package/dist/components/six-stage-indicator2.js.map +1 -0
- package/dist/components/six-switch.d.ts +11 -0
- package/dist/components/six-switch.js +139 -0
- package/dist/components/six-switch.js.map +1 -0
- package/dist/components/six-tab-group.d.ts +11 -0
- package/dist/components/six-tab-group.js +268 -0
- package/dist/components/six-tab-group.js.map +1 -0
- package/dist/components/six-tab-panel.d.ts +11 -0
- package/dist/components/six-tab-panel.js +45 -0
- package/dist/components/six-tab-panel.js.map +1 -0
- package/dist/components/six-tab.d.ts +11 -0
- package/dist/components/six-tab.js +84 -0
- package/dist/components/six-tab.js.map +1 -0
- package/dist/components/six-table-cell.d.ts +11 -0
- package/dist/components/six-table-cell.js +8 -0
- package/dist/components/six-table-cell.js.map +1 -0
- package/dist/components/six-table-cell2.js +32 -0
- package/dist/components/six-table-cell2.js.map +1 -0
- package/dist/components/six-table-header-cell.d.ts +11 -0
- package/dist/components/six-table-header-cell.js +8 -0
- package/dist/components/six-table-header-cell.js.map +1 -0
- package/dist/components/six-table-header-cell2.js +120 -0
- package/dist/components/six-table-header-cell2.js.map +1 -0
- package/dist/components/six-table-header.d.ts +11 -0
- package/dist/components/six-table-header.js +8 -0
- package/dist/components/six-table-header.js.map +1 -0
- package/dist/components/six-table-header2.js +32 -0
- package/dist/components/six-table-header2.js.map +1 -0
- package/dist/components/six-table-row.d.ts +11 -0
- package/dist/components/six-table-row.js +8 -0
- package/dist/components/six-table-row.js.map +1 -0
- package/dist/components/six-table-row2.js +32 -0
- package/dist/components/six-table-row2.js.map +1 -0
- package/dist/components/six-table.d.ts +11 -0
- package/dist/components/six-table.js +252 -0
- package/dist/components/six-table.js.map +1 -0
- package/dist/components/six-tag.d.ts +11 -0
- package/dist/components/six-tag.js +8 -0
- package/dist/components/six-tag.js.map +1 -0
- package/dist/components/six-tag2.js +77 -0
- package/dist/components/six-tag2.js.map +1 -0
- package/dist/components/six-textarea.d.ts +11 -0
- package/dist/components/six-textarea.js +269 -0
- package/dist/components/six-textarea.js.map +1 -0
- package/dist/components/six-tile.d.ts +11 -0
- package/dist/components/six-tile.js +142 -0
- package/dist/components/six-tile.js.map +1 -0
- package/dist/components/six-timepicker.d.ts +11 -0
- package/dist/components/six-timepicker.js +8 -0
- package/dist/components/six-timepicker.js.map +1 -0
- package/dist/components/six-timepicker2.js +559 -0
- package/dist/components/six-timepicker2.js.map +1 -0
- package/dist/components/six-tooltip.d.ts +11 -0
- package/dist/components/six-tooltip.js +8 -0
- package/dist/components/six-tooltip.js.map +1 -0
- package/dist/components/six-tooltip2.js +194 -0
- package/dist/components/six-tooltip2.js.map +1 -0
- package/dist/{esm/slot-5253e199.js → components/slot.js} +44 -42
- package/dist/components/slot.js.map +1 -0
- package/dist/components.d.ts +27 -0
- package/dist/components.json +61 -28
- package/dist/esm/event-listeners-570a24ea.js +43 -0
- package/dist/esm/event-listeners-570a24ea.js.map +1 -0
- package/dist/esm/execution-control-1a60d709.js +40 -0
- package/dist/esm/execution-control-1a60d709.js.map +1 -0
- package/dist/esm/focus-visible-97933ea9.js +45 -0
- package/dist/esm/focus-visible-97933ea9.js.map +1 -0
- package/dist/esm/{form-control-17478ad2.js → form-control-bdd1478a.js} +28 -26
- package/dist/esm/form-control-bdd1478a.js.map +1 -0
- package/dist/esm/{index-a2605a62.js → index-96b1af5d.js} +603 -279
- package/dist/esm/index-96b1af5d.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +6 -3
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/modal-5ebdc320.js +48 -0
- package/dist/esm/modal-5ebdc320.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/popover-bd2c2fca.js +1897 -0
- package/dist/esm/popover-bd2c2fca.js.map +1 -0
- package/dist/esm/scroll-180b53fd.js +64 -0
- package/dist/esm/scroll-180b53fd.js.map +1 -0
- package/dist/esm/set-attributes_2.entry.js +58 -58
- package/dist/esm/set-attributes_2.entry.js.map +1 -0
- package/dist/esm/six-alert.entry.js +127 -132
- package/dist/esm/six-alert.entry.js.map +1 -0
- package/dist/esm/six-avatar.entry.js +27 -29
- package/dist/esm/six-avatar.entry.js.map +1 -0
- package/dist/esm/six-badge.entry.js +26 -27
- package/dist/esm/six-badge.entry.js.map +1 -0
- package/dist/esm/six-button.entry.js +96 -98
- package/dist/esm/six-button.entry.js.map +1 -0
- package/dist/esm/six-card.entry.js +11 -9
- package/dist/esm/six-card.entry.js.map +1 -0
- package/dist/esm/six-checkbox.entry.js +149 -153
- package/dist/esm/six-checkbox.entry.js.map +1 -0
- package/dist/esm/six-datepicker.entry.js +1137 -1190
- package/dist/esm/six-datepicker.entry.js.map +1 -0
- package/dist/esm/six-details.entry.js +137 -140
- package/dist/esm/six-details.entry.js.map +1 -0
- package/dist/esm/six-dialog.entry.js +146 -153
- package/dist/esm/six-dialog.entry.js.map +1 -0
- package/dist/esm/six-drawer.entry.js +163 -175
- package/dist/esm/six-drawer.entry.js.map +1 -0
- package/dist/esm/six-dropdown_3.entry.js +682 -729
- package/dist/esm/six-dropdown_3.entry.js.map +1 -0
- package/dist/esm/six-error-page.entry.js +98 -95
- package/dist/esm/six-error-page.entry.js.map +1 -0
- package/dist/esm/six-file-list-item.entry.js +37 -39
- package/dist/esm/six-file-list-item.entry.js.map +1 -0
- package/dist/esm/six-file-list.entry.js +11 -9
- package/dist/esm/six-file-list.entry.js.map +1 -0
- package/dist/esm/six-file-upload.entry.js +110 -97
- package/dist/esm/six-file-upload.entry.js.map +1 -0
- package/dist/esm/six-footer.entry.js +11 -9
- package/dist/esm/six-footer.entry.js.map +1 -0
- package/dist/esm/six-form.entry.js +221 -220
- package/dist/esm/six-form.entry.js.map +1 -0
- package/dist/esm/six-group-label.entry.js +46 -47
- package/dist/esm/six-group-label.entry.js.map +1 -0
- package/dist/esm/six-header.entry.js +150 -150
- package/dist/esm/six-header.entry.js.map +1 -0
- package/dist/esm/six-icon-button.entry.js +37 -34
- package/dist/esm/six-icon-button.entry.js.map +1 -0
- package/dist/esm/six-icon.entry.js +25 -25
- package/dist/esm/six-icon.entry.js.map +1 -0
- package/dist/esm/six-input.entry.js +229 -231
- package/dist/esm/six-input.entry.js.map +1 -0
- package/dist/esm/six-item-picker.entry.js +347 -362
- package/dist/esm/six-item-picker.entry.js.map +1 -0
- package/dist/esm/six-language-switcher.entry.js +55 -53
- package/dist/esm/six-language-switcher.entry.js.map +1 -0
- package/dist/esm/six-layout-grid.entry.js +23 -20
- package/dist/esm/six-layout-grid.entry.js.map +1 -0
- package/dist/esm/six-main-container.entry.js +13 -12
- package/dist/esm/six-main-container.entry.js.map +1 -0
- package/dist/esm/six-menu-divider.entry.js +11 -9
- package/dist/esm/six-menu-divider.entry.js.map +1 -0
- package/dist/esm/six-menu-label.entry.js +11 -9
- package/dist/esm/six-menu-label.entry.js.map +1 -0
- package/dist/esm/six-picto.entry.js +15 -16
- package/dist/esm/six-picto.entry.js.map +1 -0
- package/dist/esm/six-progress-bar.entry.js +18 -18
- package/dist/esm/six-progress-bar.entry.js.map +1 -0
- package/dist/esm/six-progress-ring.entry.js +33 -32
- package/dist/esm/six-progress-ring.entry.js.map +1 -0
- package/dist/esm/six-radio.entry.js +120 -122
- package/dist/esm/six-radio.entry.js.map +1 -0
- package/dist/esm/six-range.entry.js +188 -199
- package/dist/esm/six-range.entry.js.map +1 -0
- package/dist/esm/six-root.entry.js +34 -35
- package/dist/esm/six-root.entry.js.map +1 -0
- package/dist/esm/six-search-field.entry.js +43 -44
- package/dist/esm/six-search-field.entry.js.map +1 -0
- package/dist/esm/six-select.entry.js +422 -448
- package/dist/esm/six-select.entry.js.map +1 -0
- package/dist/esm/six-sidebar-item-group.entry.js +44 -43
- package/dist/esm/six-sidebar-item-group.entry.js.map +1 -0
- package/dist/esm/six-sidebar-item.entry.js +18 -19
- package/dist/esm/six-sidebar-item.entry.js.map +1 -0
- package/dist/esm/six-sidebar.entry.js +170 -172
- package/dist/esm/six-sidebar.entry.js.map +1 -0
- package/dist/esm/six-spinner.entry.js +18 -17
- package/dist/esm/six-spinner.entry.js.map +1 -0
- package/dist/esm/six-switch.entry.js +101 -101
- package/dist/esm/six-switch.entry.js.map +1 -0
- package/dist/esm/six-tab-group.entry.js +227 -227
- package/dist/esm/six-tab-group.entry.js.map +1 -0
- package/dist/esm/six-tab-panel.entry.js +18 -18
- package/dist/esm/six-tab-panel.entry.js.map +1 -0
- package/dist/esm/six-tab.entry.js +41 -43
- package/dist/esm/six-tab.entry.js.map +1 -0
- package/dist/esm/six-table-cell_4.entry.js +77 -72
- package/dist/esm/six-table-cell_4.entry.js.map +1 -0
- package/dist/esm/six-table.entry.js +145 -146
- package/dist/esm/six-table.entry.js.map +1 -0
- package/dist/esm/six-tag.entry.js +39 -41
- package/dist/esm/six-tag.entry.js.map +1 -0
- package/dist/esm/six-textarea.entry.js +209 -212
- package/dist/esm/six-textarea.entry.js.map +1 -0
- package/dist/esm/six-tile.entry.js +87 -90
- package/dist/esm/six-tile.entry.js.map +1 -0
- package/dist/esm/six-timepicker.entry.js +441 -490
- package/dist/esm/six-timepicker.entry.js.map +1 -0
- package/dist/esm/{six-timepicker.types-cd6bac03.js → six-timepicker.types-e161a447.js} +45 -43
- package/dist/esm/six-timepicker.types-e161a447.js.map +1 -0
- package/dist/esm/six-tooltip.entry.js +163 -173
- package/dist/esm/six-tooltip.entry.js.map +1 -0
- package/dist/esm/slot-6f3984c7.js +47 -0
- package/dist/esm/slot-6f3984c7.js.map +1 -0
- package/dist/esm/{types-a37c1695.js → types-4b10b413.js} +14 -12
- package/dist/esm/types-4b10b413.js.map +1 -0
- package/dist/esm/ui-library.js +9 -3
- package/dist/esm/ui-library.js.map +1 -0
- package/dist/types/components/six-alert/six-alert.d.ts +60 -60
- package/dist/types/components/six-avatar/six-avatar.d.ts +27 -27
- package/dist/types/components/six-badge/six-badge.d.ts +20 -20
- package/dist/types/components/six-button/six-button.d.ts +69 -69
- package/dist/types/components/six-card/six-card.d.ts +9 -9
- package/dist/types/components/six-checkbox/six-checkbox.d.ts +86 -86
- package/dist/types/components/six-datepicker/components/day-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/components/month-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/components/year-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/six-date-formats.d.ts +22 -22
- package/dist/types/components/six-datepicker/six-datepicker.d.ts +214 -214
- package/dist/types/components/six-datepicker/test/six-datepicker.test-helpers.d.ts +1 -1
- package/dist/types/components/six-details/six-details.d.ts +61 -61
- package/dist/types/components/six-dialog/six-dialog.d.ts +75 -75
- package/dist/types/components/six-drawer/six-drawer.d.ts +82 -82
- package/dist/types/components/six-dropdown/six-dropdown.d.ts +140 -140
- package/dist/types/components/six-error-page/six-error-page.d.ts +27 -27
- package/dist/types/components/six-file-list/six-file-list.d.ts +8 -8
- package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +35 -35
- package/dist/types/components/six-file-upload/six-file-upload.d.ts +49 -42
- package/dist/types/components/six-footer/six-footer.d.ts +9 -9
- package/dist/types/components/six-form/six-form.d.ts +69 -69
- package/dist/types/components/six-group-label/six-group-label.d.ts +37 -37
- package/dist/types/components/six-header/six-header.d.ts +90 -90
- package/dist/types/components/six-icon/six-icon.d.ts +13 -13
- package/dist/types/components/six-icon-button/six-icon-button.d.ts +28 -28
- package/dist/types/components/six-input/six-input.d.ts +165 -165
- package/dist/types/components/six-item-picker/six-item-picker.d.ts +106 -106
- package/dist/types/components/six-item-picker/types.d.ts +11 -11
- package/dist/types/components/six-language-switcher/six-language-switcher.d.ts +25 -25
- package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +14 -14
- package/dist/types/components/six-main-container/six-main-container.d.ts +16 -16
- package/dist/types/components/six-menu/six-menu.d.ts +81 -81
- package/dist/types/components/six-menu-divider/six-menu-divider.d.ts +11 -11
- package/dist/types/components/six-menu-item/six-menu-item.d.ts +39 -36
- package/dist/types/components/six-menu-label/six-menu-label.d.ts +13 -13
- package/dist/types/components/six-picto/six-picto.d.ts +14 -14
- package/dist/types/components/six-progress-bar/six-progress-bar.d.ts +19 -19
- package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +24 -24
- package/dist/types/components/six-radio/six-radio.d.ts +66 -66
- package/dist/types/components/six-range/six-range.d.ts +101 -101
- package/dist/types/components/six-root/six-root.d.ts +34 -34
- package/dist/types/components/six-search-field/six-search-field.d.ts +32 -32
- package/dist/types/components/six-select/six-select.d.ts +164 -163
- package/dist/types/components/six-sidebar/six-sidebar.d.ts +55 -55
- package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +15 -15
- package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +26 -26
- package/dist/types/components/six-spinner/six-spinner.d.ts +15 -15
- package/dist/types/components/six-stage-indicator/six-stage-indicator.d.ts +6 -6
- package/dist/types/components/six-switch/six-switch.d.ts +62 -62
- package/dist/types/components/six-tab/six-tab.d.ts +35 -35
- package/dist/types/components/six-tab-group/six-tab-group.d.ts +62 -62
- package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +19 -19
- package/dist/types/components/six-table/six-table.d.ts +30 -30
- package/dist/types/components/six-table/test/helpers.d.ts +2 -2
- package/dist/types/components/six-table/types.d.ts +33 -33
- package/dist/types/components/six-table/util/filter-by.d.ts +2 -2
- package/dist/types/components/six-table/util/from-data.d.ts +8 -8
- package/dist/types/components/six-table/util/is.d.ts +3 -3
- package/dist/types/components/six-table/util/quick-filter-by.d.ts +2 -2
- package/dist/types/components/six-table/util/sort-by.d.ts +2 -2
- package/dist/types/components/six-table-cell/six-table-cell.d.ts +9 -9
- package/dist/types/components/six-table-header/six-table-header.d.ts +9 -9
- package/dist/types/components/six-table-header-cell/get-next-state.d.ts +2 -2
- package/dist/types/components/six-table-header-cell/icons.d.ts +3 -3
- package/dist/types/components/six-table-header-cell/six-table-header-cell.d.ts +32 -32
- package/dist/types/components/six-table-header-cell/types.d.ts +2 -11
- package/dist/types/components/six-table-header-cell/util/create-model.d.ts +4 -4
- package/dist/types/components/six-table-header-cell/util/get-next-state.d.ts +3 -3
- package/dist/types/components/six-table-row/six-table-row.d.ts +9 -9
- package/dist/types/components/six-tag/six-tag.d.ts +30 -30
- package/dist/types/components/six-textarea/six-textarea.d.ts +134 -134
- package/dist/types/components/six-tile/six-tile.d.ts +40 -40
- package/dist/types/components/six-timepicker/six-time-format.d.ts +13 -13
- package/dist/types/components/six-timepicker/six-timepicker.d.ts +184 -184
- package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +36 -36
- package/dist/types/components/six-tooltip/six-tooltip.d.ts +72 -72
- package/dist/types/components.d.ts +1254 -106
- package/dist/types/functional-components/form-control/form-control.d.ts +34 -34
- package/dist/types/index.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +91 -19
- package/dist/types/testUtil/delay.d.ts +1 -1
- package/dist/types/utils/as-array.d.ts +1 -1
- package/dist/types/utils/date-util.d.ts +194 -194
- package/dist/types/utils/event-listeners.d.ts +15 -15
- package/dist/types/utils/execution-control.d.ts +26 -26
- package/dist/types/utils/focus-visible.d.ts +6 -6
- package/dist/types/utils/matchers.d.ts +2 -2
- package/dist/types/utils/modal.d.ts +13 -13
- package/dist/types/utils/offset.d.ts +4 -4
- package/dist/types/utils/popover.d.ts +27 -27
- package/dist/types/utils/scroll.d.ts +3 -3
- package/dist/types/utils/slot.d.ts +9 -9
- package/dist/types/utils/support.d.ts +1 -1
- package/dist/types/utils/tabbable.d.ts +2 -2
- package/dist/types/utils/testing.d.ts +2 -2
- package/dist/types/utils/time.util.d.ts +10 -10
- package/dist/types/utils/type-check.d.ts +4 -4
- package/dist/types/utils/types.d.ts +4 -4
- package/dist/types/wrappers/set-attributes/set-attributes.d.ts +9 -9
- package/dist/ui-library/index.esm.js +2 -0
- package/dist/ui-library/index.esm.js.map +1 -0
- package/dist/ui-library/p-00507165.entry.js +2 -0
- package/dist/ui-library/p-00507165.entry.js.map +1 -0
- package/dist/ui-library/p-028a2c54.entry.js +2 -0
- package/dist/ui-library/p-028a2c54.entry.js.map +1 -0
- package/dist/ui-library/p-028a2f77.entry.js +2 -0
- package/dist/ui-library/p-028a2f77.entry.js.map +1 -0
- package/dist/ui-library/p-0786fa7c.js +2 -0
- package/dist/ui-library/p-0786fa7c.js.map +1 -0
- package/dist/ui-library/p-0c89817e.entry.js +2 -0
- package/dist/ui-library/p-0c89817e.entry.js.map +1 -0
- package/dist/ui-library/p-0d1fdc4e.entry.js +2 -0
- package/dist/ui-library/p-0d1fdc4e.entry.js.map +1 -0
- package/dist/ui-library/p-0d9cbb51.entry.js +2 -0
- package/dist/ui-library/p-0d9cbb51.entry.js.map +1 -0
- package/dist/ui-library/p-12000282.entry.js +2 -0
- package/dist/ui-library/p-12000282.entry.js.map +1 -0
- package/dist/ui-library/p-1414a242.entry.js +2 -0
- package/dist/ui-library/p-1414a242.entry.js.map +1 -0
- package/dist/ui-library/p-14db57aa.entry.js +2 -0
- package/dist/ui-library/p-14db57aa.entry.js.map +1 -0
- package/dist/ui-library/p-16732ac1.entry.js +2 -0
- package/dist/ui-library/p-16732ac1.entry.js.map +1 -0
- package/dist/ui-library/p-16b99232.js +3 -0
- package/dist/ui-library/p-16b99232.js.map +1 -0
- package/dist/ui-library/p-18ea0c56.js +2 -0
- package/dist/ui-library/p-18ea0c56.js.map +1 -0
- package/dist/ui-library/p-232d43a6.entry.js +2 -0
- package/dist/ui-library/p-232d43a6.entry.js.map +1 -0
- package/dist/ui-library/p-25a3bf57.js +2 -0
- package/dist/ui-library/p-25a3bf57.js.map +1 -0
- package/dist/ui-library/p-28e6c2eb.entry.js +2 -0
- package/dist/ui-library/p-28e6c2eb.entry.js.map +1 -0
- package/dist/ui-library/p-2a02734a.entry.js +2 -0
- package/dist/ui-library/p-2a02734a.entry.js.map +1 -0
- package/dist/ui-library/p-2a61cc66.entry.js +2 -0
- package/dist/ui-library/p-2a61cc66.entry.js.map +1 -0
- package/dist/ui-library/p-3c100309.js +2 -0
- package/dist/ui-library/p-3c100309.js.map +1 -0
- package/dist/ui-library/p-3d5cad2d.entry.js +2 -0
- package/dist/ui-library/p-3d5cad2d.entry.js.map +1 -0
- package/dist/ui-library/p-3e3edcbc.entry.js +2 -0
- package/dist/ui-library/p-3e3edcbc.entry.js.map +1 -0
- package/dist/ui-library/p-3efe46cf.entry.js +2 -0
- package/dist/ui-library/p-3efe46cf.entry.js.map +1 -0
- package/dist/ui-library/p-4b44fa83.entry.js +2 -0
- package/dist/ui-library/p-4b44fa83.entry.js.map +1 -0
- package/dist/ui-library/p-4bcebd5a.entry.js +2 -0
- package/dist/ui-library/p-4bcebd5a.entry.js.map +1 -0
- package/dist/ui-library/p-4d4829db.entry.js +2 -0
- package/dist/ui-library/p-4d4829db.entry.js.map +1 -0
- package/dist/ui-library/p-4f8394d7.js +2 -0
- package/dist/ui-library/p-4f8394d7.js.map +1 -0
- package/dist/ui-library/p-524e5804.entry.js +2 -0
- package/dist/ui-library/p-524e5804.entry.js.map +1 -0
- package/dist/ui-library/p-52cb61bd.entry.js +2 -0
- package/dist/ui-library/p-52cb61bd.entry.js.map +1 -0
- package/dist/ui-library/p-55dc28ad.entry.js +2 -0
- package/dist/ui-library/p-55dc28ad.entry.js.map +1 -0
- package/dist/ui-library/p-57a84d7f.entry.js +2 -0
- package/dist/ui-library/p-57a84d7f.entry.js.map +1 -0
- package/dist/ui-library/p-5eb21538.entry.js +2 -0
- package/dist/ui-library/p-5eb21538.entry.js.map +1 -0
- package/dist/ui-library/p-60c5395c.entry.js +2 -0
- package/dist/ui-library/p-60c5395c.entry.js.map +1 -0
- package/dist/ui-library/p-694829b8.entry.js +2 -0
- package/dist/ui-library/p-694829b8.entry.js.map +1 -0
- package/dist/ui-library/p-6cc82df5.entry.js +2 -0
- package/dist/ui-library/p-6cc82df5.entry.js.map +1 -0
- package/dist/ui-library/p-7115416e.entry.js +2 -0
- package/dist/ui-library/p-7115416e.entry.js.map +1 -0
- package/dist/ui-library/p-788281d0.entry.js +2 -0
- package/dist/ui-library/p-788281d0.entry.js.map +1 -0
- package/dist/ui-library/p-7cbc261b.entry.js +2 -0
- package/dist/ui-library/p-7cbc261b.entry.js.map +1 -0
- package/dist/ui-library/p-80f32909.entry.js +2 -0
- package/dist/ui-library/p-80f32909.entry.js.map +1 -0
- package/dist/ui-library/p-8187701c.entry.js +2 -0
- package/dist/ui-library/p-8187701c.entry.js.map +1 -0
- package/dist/ui-library/p-94ab37b2.entry.js +2 -0
- package/dist/ui-library/p-94ab37b2.entry.js.map +1 -0
- package/dist/ui-library/p-9a860acc.js +2 -0
- package/dist/ui-library/p-9a860acc.js.map +1 -0
- package/dist/ui-library/p-9eba5c71.entry.js +2 -0
- package/dist/ui-library/p-9eba5c71.entry.js.map +1 -0
- package/dist/ui-library/p-9f9bef35.entry.js +2 -0
- package/dist/ui-library/p-9f9bef35.entry.js.map +1 -0
- package/dist/ui-library/p-b1683e9c.entry.js +2 -0
- package/dist/ui-library/p-b1683e9c.entry.js.map +1 -0
- package/dist/ui-library/p-b1e66136.js +2 -0
- package/dist/ui-library/p-b1e66136.js.map +1 -0
- package/dist/ui-library/p-b3974ad4.entry.js +2 -0
- package/dist/ui-library/p-b3974ad4.entry.js.map +1 -0
- package/dist/ui-library/p-b4dfb7cf.js +2 -0
- package/dist/ui-library/p-b4dfb7cf.js.map +1 -0
- package/dist/ui-library/p-b66c5c48.entry.js +2 -0
- package/dist/ui-library/p-b66c5c48.entry.js.map +1 -0
- package/dist/ui-library/p-ba6e1f0e.entry.js +2 -0
- package/dist/ui-library/p-ba6e1f0e.entry.js.map +1 -0
- package/dist/ui-library/p-c799a6bf.entry.js +2 -0
- package/dist/ui-library/p-c799a6bf.entry.js.map +1 -0
- package/dist/ui-library/p-ccee090e.entry.js +2 -0
- package/dist/ui-library/p-ccee090e.entry.js.map +1 -0
- package/dist/ui-library/p-cf2bdd34.entry.js +2 -0
- package/dist/ui-library/p-cf2bdd34.entry.js.map +1 -0
- package/dist/ui-library/p-d12c6092.js +2 -0
- package/dist/ui-library/p-d12c6092.js.map +1 -0
- package/dist/ui-library/p-dd0ac344.entry.js +2 -0
- package/dist/ui-library/p-dd0ac344.entry.js.map +1 -0
- package/dist/ui-library/p-def4a925.entry.js +2 -0
- package/dist/ui-library/p-def4a925.entry.js.map +1 -0
- package/dist/ui-library/p-e0bda772.entry.js +2 -0
- package/dist/ui-library/p-e0bda772.entry.js.map +1 -0
- package/dist/ui-library/p-e1aed7ed.entry.js +2 -0
- package/dist/ui-library/p-e1aed7ed.entry.js.map +1 -0
- package/dist/ui-library/p-e4b6264b.entry.js +2 -0
- package/dist/ui-library/p-e4b6264b.entry.js.map +1 -0
- package/dist/ui-library/p-eb1ec1b7.entry.js +2 -0
- package/dist/ui-library/p-eb1ec1b7.entry.js.map +1 -0
- package/dist/ui-library/p-eb8f05a9.js +2 -0
- package/dist/ui-library/p-eb8f05a9.js.map +1 -0
- package/dist/ui-library/p-f65aa796.entry.js +2 -0
- package/dist/ui-library/p-f65aa796.entry.js.map +1 -0
- package/dist/ui-library/p-f68b5c54.entry.js +2 -0
- package/dist/ui-library/p-f68b5c54.entry.js.map +1 -0
- package/dist/ui-library/p-f9c50f81.entry.js +2 -0
- package/dist/ui-library/p-f9c50f81.entry.js.map +1 -0
- package/dist/ui-library/ui-library.esm.js +2 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -0
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +8 -12
- package/readme.md +41 -39
- package/dist/cjs/types-65e5c95b.js +0 -15
- package/dist/custom-elements/index.d.ts +0 -387
- package/dist/esm/types-33d15673.js +0 -15
- package/dist/ui-library/p-044c6bf9.js +0 -1
- package/dist/ui-library/p-0493c926.entry.js +0 -1
- package/dist/ui-library/p-1005d1a8.entry.js +0 -1
- package/dist/ui-library/p-12cc24c3.js +0 -1
- package/dist/ui-library/p-191f958b.js +0 -1
- package/dist/ui-library/p-19543c96.entry.js +0 -1
- package/dist/ui-library/p-19ff1079.entry.js +0 -1
- package/dist/ui-library/p-1b92cc7a.entry.js +0 -1
- package/dist/ui-library/p-1c9f0dc6.js +0 -1
- package/dist/ui-library/p-2053c61a.entry.js +0 -1
- package/dist/ui-library/p-2ff97cdf.entry.js +0 -1
- package/dist/ui-library/p-30ebc1e7.js +0 -1
- package/dist/ui-library/p-34e6d8e8.js +0 -1
- package/dist/ui-library/p-354704e5.entry.js +0 -1
- package/dist/ui-library/p-376b8f30.entry.js +0 -1
- package/dist/ui-library/p-3a7daff8.entry.js +0 -1
- package/dist/ui-library/p-3f577392.entry.js +0 -1
- package/dist/ui-library/p-48ea4419.entry.js +0 -1
- package/dist/ui-library/p-4cc01afc.entry.js +0 -1
- package/dist/ui-library/p-572e3690.js +0 -1
- package/dist/ui-library/p-5ead7b2f.entry.js +0 -1
- package/dist/ui-library/p-60491176.entry.js +0 -1
- package/dist/ui-library/p-6494e92d.entry.js +0 -1
- package/dist/ui-library/p-66601906.entry.js +0 -1
- package/dist/ui-library/p-68d31736.js +0 -1
- package/dist/ui-library/p-6a4f0542.entry.js +0 -1
- package/dist/ui-library/p-6f67f986.entry.js +0 -1
- package/dist/ui-library/p-76bfa55f.entry.js +0 -1
- package/dist/ui-library/p-7735d99f.js +0 -1
- package/dist/ui-library/p-7fe09462.entry.js +0 -1
- package/dist/ui-library/p-88e1e390.entry.js +0 -1
- package/dist/ui-library/p-89f68e76.entry.js +0 -1
- package/dist/ui-library/p-8bd0873f.entry.js +0 -1
- package/dist/ui-library/p-8e8e922b.entry.js +0 -1
- package/dist/ui-library/p-968c5169.entry.js +0 -1
- package/dist/ui-library/p-9f2dc381.entry.js +0 -1
- package/dist/ui-library/p-a77a6442.entry.js +0 -1
- package/dist/ui-library/p-a8c225f2.entry.js +0 -1
- package/dist/ui-library/p-a98198bd.entry.js +0 -1
- package/dist/ui-library/p-af3d757c.js +0 -1
- package/dist/ui-library/p-b391f704.entry.js +0 -1
- package/dist/ui-library/p-b9377445.entry.js +0 -1
- package/dist/ui-library/p-b9fb8455.entry.js +0 -1
- package/dist/ui-library/p-bf110ea9.entry.js +0 -1
- package/dist/ui-library/p-c09dc3a9.js +0 -1
- package/dist/ui-library/p-c4b22513.entry.js +0 -1
- package/dist/ui-library/p-c536792e.entry.js +0 -1
- package/dist/ui-library/p-c733dead.js +0 -1
- package/dist/ui-library/p-c948d3db.entry.js +0 -1
- package/dist/ui-library/p-ce02c34f.entry.js +0 -1
- package/dist/ui-library/p-d724bbc9.entry.js +0 -1
- package/dist/ui-library/p-e96dcf96.entry.js +0 -1
- package/dist/ui-library/p-ea1fcff2.entry.js +0 -1
- package/dist/ui-library/p-ea781e94.entry.js +0 -1
- package/dist/ui-library/p-eae232c3.entry.js +0 -1
- package/dist/ui-library/p-eb0956d2.entry.js +0 -1
- package/dist/ui-library/p-ebaea182.entry.js +0 -1
- package/dist/ui-library/p-ec1ecc2a.entry.js +0 -1
- package/dist/ui-library/p-ed21cc57.entry.js +0 -1
- package/dist/ui-library/p-f00c1783.entry.js +0 -1
- package/dist/ui-library/p-f0e91e17.entry.js +0 -1
- package/dist/ui-library/p-f9c0cfb7.entry.js +0 -1
- package/dist/ui-library/p-fcd2356c.entry.js +0 -1
- package/dist/ui-library/p-fdb455d7.entry.js +0 -1
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as scrollIntoView } from './scroll.js';
|
|
3
|
+
import { P as Popover } from './popover.js';
|
|
4
|
+
import { E as EventListeners } from './event-listeners.js';
|
|
5
|
+
import { b as getSlotChildren } from './slot.js';
|
|
6
|
+
import { D as DEFAULT_DEBOUNCE_FAST, a as debounce } from './execution-control.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './six-icon2.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './six-input2.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './six-menu2.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './six-menu-item2.js';
|
|
11
|
+
|
|
12
|
+
function isTabbable(el) {
|
|
13
|
+
const tabIndex = el.tabIndex;
|
|
14
|
+
return tabIndex > -1;
|
|
15
|
+
}
|
|
16
|
+
function getNearestTabbableElement(el) {
|
|
17
|
+
// Check the element
|
|
18
|
+
if (isTabbable(el)) {
|
|
19
|
+
return el;
|
|
20
|
+
}
|
|
21
|
+
// Check the element's shadow root
|
|
22
|
+
if (el.shadowRoot) {
|
|
23
|
+
const tabbableShadowChild = [...el.shadowRoot.children].find(isTabbable);
|
|
24
|
+
if (tabbableShadowChild) {
|
|
25
|
+
return tabbableShadowChild;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// Check the element's children
|
|
29
|
+
if (el.children) {
|
|
30
|
+
return [...el.children].map(getNearestTabbableElement)[0];
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const sixDropdownCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block}.dropdown{position:relative}.dropdown__trigger{display:block}.dropdown__positioner{position:absolute;z-index:var(--six-z-index-dropdown)}.dropdown__positioner__filtered{width:100%}.dropdown__panel{max-height:50vh;font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);color:var(--color);background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);box-shadow:var(--six-elevation-2dp);opacity:0;overflow:auto;overscroll-behavior:none;pointer-events:none;transform:scale(0.9);transition:var(--six-transition-fast) opacity, var(--six-transition-fast) transform;scrollbar-width:thin}.filter-hidden{display:none}.dropdown__positioner[data-popper-placement^=top] .dropdown__panel{transform-origin:bottom}.dropdown__positioner[data-popper-placement^=bottom] .dropdown__panel{transform-origin:top}.dropdown__positioner[data-popper-placement^=left] .dropdown__panel{transform-origin:right}.dropdown__positioner[data-popper-placement^=right] .dropdown__panel{transform-origin:left}.dropdown__positioner.popover-visible .dropdown__panel{opacity:1;transform:none;pointer-events:all}";
|
|
36
|
+
|
|
37
|
+
const isTagName = (name) => (el) => (el === null || el === void 0 ? void 0 : el.tagName.toLowerCase()) === name.toLowerCase();
|
|
38
|
+
const isSixMenu = isTagName('six-menu');
|
|
39
|
+
const isSixMenuItem = isTagName('six-menu-item');
|
|
40
|
+
let id = 0;
|
|
41
|
+
const SixDropdown = /*@__PURE__*/ proxyCustomElement(class SixDropdown extends HTMLElement {
|
|
42
|
+
constructor() {
|
|
43
|
+
super();
|
|
44
|
+
this.__registerHost();
|
|
45
|
+
this.__attachShadow();
|
|
46
|
+
this.sixShow = createEvent(this, "six-dropdown-show", 7);
|
|
47
|
+
this.sixAfterShow = createEvent(this, "six-dropdown-after-show", 7);
|
|
48
|
+
this.sixHide = createEvent(this, "six-dropdown-hide", 7);
|
|
49
|
+
this.sixAfterHide = createEvent(this, "six-dropdown-after-hide", 7);
|
|
50
|
+
this.sixAutoFilterFired = createEvent(this, "six-dropdown-auto-filter-fired", 7);
|
|
51
|
+
this.sixAsyncFilterFired = createEvent(this, "six-async-filter-fired", 7);
|
|
52
|
+
this.sixScroll = createEvent(this, "six-dropdown-scroll", 7);
|
|
53
|
+
this.componentId = `dropdown-${++id}`;
|
|
54
|
+
this.isVisible = false;
|
|
55
|
+
this.hasBeenInitialized = false;
|
|
56
|
+
this.eventListeners = new EventListeners();
|
|
57
|
+
this.getMenuItems = () => {
|
|
58
|
+
if (this._options !== null) {
|
|
59
|
+
return this._options.map((option) => h("six-menu-item", { value: option.value }, option.label));
|
|
60
|
+
}
|
|
61
|
+
const [panel] = getSlotChildren(this.panel);
|
|
62
|
+
// the menu-items can be in a slot e.g. in six-select or direct children of the panel
|
|
63
|
+
return getSlotChildren(panel) || Array.from(panel.querySelectorAll('six-menu-item'));
|
|
64
|
+
};
|
|
65
|
+
this.handleFilterInputChange = () => {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
const lowerCaseFilterTerm = ((_b = (_a = this.filterInputElement.value) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.trim()) || '';
|
|
68
|
+
if (this._options) {
|
|
69
|
+
this.handleFilteringForAttributeItems(lowerCaseFilterTerm);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.handleFilteringForSlotItems(lowerCaseFilterTerm);
|
|
73
|
+
}
|
|
74
|
+
this.sixAutoFilterFired.emit({ filterValue: lowerCaseFilterTerm });
|
|
75
|
+
};
|
|
76
|
+
this.open = false;
|
|
77
|
+
this.placement = 'bottom-start';
|
|
78
|
+
this.closeOnSelect = true;
|
|
79
|
+
this.distance = 0;
|
|
80
|
+
this.skidding = 0;
|
|
81
|
+
this.hoist = false;
|
|
82
|
+
this.containingElement = undefined;
|
|
83
|
+
this.filter = false;
|
|
84
|
+
this.asyncFilter = false;
|
|
85
|
+
this.filterPlaceholder = 'Filter...';
|
|
86
|
+
this.autofocusFilter = true;
|
|
87
|
+
this.filterDebounce = DEFAULT_DEBOUNCE_FAST;
|
|
88
|
+
this.disableHideOnEnterAndSpace = false;
|
|
89
|
+
this.options = null;
|
|
90
|
+
this.virtualScroll = false;
|
|
91
|
+
this._options = null;
|
|
92
|
+
}
|
|
93
|
+
get hasFilterEnabled() {
|
|
94
|
+
return this.filter || this.asyncFilter;
|
|
95
|
+
}
|
|
96
|
+
get container() {
|
|
97
|
+
return this.containingElement || this.host;
|
|
98
|
+
}
|
|
99
|
+
handleOpenChange() {
|
|
100
|
+
this.open ? this.show() : this.hide();
|
|
101
|
+
this.updateAccessibleTrigger();
|
|
102
|
+
}
|
|
103
|
+
handlePopoverOptionsChange() {
|
|
104
|
+
this.popover.setOptions({
|
|
105
|
+
strategy: this.hoist ? 'fixed' : 'absolute',
|
|
106
|
+
placement: this.placement,
|
|
107
|
+
distance: this.distance,
|
|
108
|
+
skidding: this.skidding,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
handleOptionsChange() {
|
|
112
|
+
this._options = [...this.options];
|
|
113
|
+
}
|
|
114
|
+
connectedCallback() {
|
|
115
|
+
if (this.virtualScroll && this.options === null) {
|
|
116
|
+
console.error('Options must be defined when using virtual scrolling');
|
|
117
|
+
}
|
|
118
|
+
if (this.options !== null) {
|
|
119
|
+
this._options = [...this.options];
|
|
120
|
+
}
|
|
121
|
+
this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
|
|
122
|
+
this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
|
|
123
|
+
this.handleMenuItemActivate = this.handleMenuItemActivate.bind(this);
|
|
124
|
+
this.handlePanelSelect = this.handlePanelSelect.bind(this);
|
|
125
|
+
this.handleTriggerClick = this.handleTriggerClick.bind(this);
|
|
126
|
+
this.handleTriggerKeyDown = this.handleTriggerKeyDown.bind(this);
|
|
127
|
+
this.handleTriggerKeyUp = this.handleTriggerKeyUp.bind(this);
|
|
128
|
+
this.handleTriggerSlotChange = this.handleTriggerSlotChange.bind(this);
|
|
129
|
+
this.handleDropdownScroll = this.handleDropdownScroll.bind(this);
|
|
130
|
+
if (this.hasBeenInitialized && !this.popover) {
|
|
131
|
+
// there was a weird bug when using six-dropdown inside an ag-grid filter. When closing the ag-grid filter
|
|
132
|
+
// disconnectedCallback() is executed. However, since componentDidLoad() will not be rerendered the popover had
|
|
133
|
+
// no longer a connected transitionEnd callback to the dropdown. To fix this, we have this sanity check here,
|
|
134
|
+
// to re-initialize the popover in case the component has already been initialized but the popover is undefined.
|
|
135
|
+
this.initializePopover();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
componentDidLoad() {
|
|
139
|
+
this.hasBeenInitialized = true;
|
|
140
|
+
this.initializePopover();
|
|
141
|
+
// Show on init if open
|
|
142
|
+
if (this.open) {
|
|
143
|
+
void this.show();
|
|
144
|
+
}
|
|
145
|
+
if (this.filter) {
|
|
146
|
+
this.setupFiltering(this.handleFilterInputChange);
|
|
147
|
+
}
|
|
148
|
+
else if (this.asyncFilter) {
|
|
149
|
+
this.setupFiltering(() => this.sixAsyncFilterFired.emit({ filterValue: this.filterInputElement.value }));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
initializePopover() {
|
|
153
|
+
const onAfterHide = () => {
|
|
154
|
+
if (this.filter) {
|
|
155
|
+
this.filterInputElement.value = '';
|
|
156
|
+
if (this._options !== null) {
|
|
157
|
+
this._options = [...this.options];
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
const menuItems = this.getMenuItems();
|
|
161
|
+
menuItems.forEach((item) => (item.style.display = 'unset'));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
this.sixAfterHide.emit();
|
|
165
|
+
};
|
|
166
|
+
const onAfterShow = async () => {
|
|
167
|
+
if (this.hasFilterEnabled && this.autofocusFilter) {
|
|
168
|
+
// if dropdown filter is enabled we should autofocus the search field
|
|
169
|
+
await this.filterInputElement.setFocus();
|
|
170
|
+
}
|
|
171
|
+
this.sixAfterShow.emit();
|
|
172
|
+
};
|
|
173
|
+
const onTransitionEnd = () => {
|
|
174
|
+
if (!this.open) {
|
|
175
|
+
this.panel.scrollTop = 0;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
this.popover = new Popover(this.trigger, this.positioner, {
|
|
179
|
+
strategy: this.hoist ? 'fixed' : 'absolute',
|
|
180
|
+
placement: this.placement,
|
|
181
|
+
distance: this.distance,
|
|
182
|
+
skidding: this.skidding,
|
|
183
|
+
transitionElement: this.panel,
|
|
184
|
+
onAfterHide,
|
|
185
|
+
onAfterShow,
|
|
186
|
+
onTransitionEnd,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
setupFiltering(callback) {
|
|
190
|
+
this.eventListeners.add(this.filterInputElement, 'six-input-input', debounce(callback, this.filterDebounce));
|
|
191
|
+
}
|
|
192
|
+
handleFilteringForAttributeItems(lowerCaseFilterTerm) {
|
|
193
|
+
if (lowerCaseFilterTerm === '') {
|
|
194
|
+
this._options = [...this.options];
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
this._options = this.options.filter((option) => {
|
|
198
|
+
var _a, _b, _c, _d;
|
|
199
|
+
return (option.label && ((_b = (_a = String(option.label)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(lowerCaseFilterTerm))) ||
|
|
200
|
+
(option.value && ((_d = (_c = String(option.value)) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === null || _d === void 0 ? void 0 : _d.includes(lowerCaseFilterTerm)));
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
handleFilteringForSlotItems(lowerCaseFilterTerm) {
|
|
204
|
+
const menuItems = this.getMenuItems();
|
|
205
|
+
menuItems.forEach(async (menuItem) => {
|
|
206
|
+
var _a, _b, _c, _d;
|
|
207
|
+
// hide all elements which don't contain the entered substring
|
|
208
|
+
const elementContainsFilterTerm = ((_b = (_a = menuItem === null || menuItem === void 0 ? void 0 : menuItem.value) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(lowerCaseFilterTerm)) ||
|
|
209
|
+
((_d = (_c = (await (menuItem === null || menuItem === void 0 ? void 0 : menuItem.getTextLabel()))) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === null || _d === void 0 ? void 0 : _d.includes(lowerCaseFilterTerm));
|
|
210
|
+
menuItem.style.display = elementContainsFilterTerm ? 'unset' : 'none';
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
disconnectedCallback() {
|
|
214
|
+
this.eventListeners.removeAll();
|
|
215
|
+
void this.hide();
|
|
216
|
+
this.popover.destroy();
|
|
217
|
+
this.popover = null;
|
|
218
|
+
}
|
|
219
|
+
/** Shows the dropdown panel */
|
|
220
|
+
async show() {
|
|
221
|
+
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
|
|
222
|
+
if (this.isVisible) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const sixShow = this.sixShow.emit();
|
|
226
|
+
if (sixShow.defaultPrevented) {
|
|
227
|
+
this.open = false;
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
this.eventListeners.add(this.panel, 'six-menu-item-selected', this.handlePanelSelect);
|
|
231
|
+
this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);
|
|
232
|
+
this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);
|
|
233
|
+
this.isVisible = true;
|
|
234
|
+
this.open = true;
|
|
235
|
+
this.popover.show();
|
|
236
|
+
}
|
|
237
|
+
/** Hides the dropdown panel */
|
|
238
|
+
async hide() {
|
|
239
|
+
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
|
|
240
|
+
if (!this.isVisible) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
const sixHide = this.sixHide.emit();
|
|
244
|
+
if (sixHide.defaultPrevented) {
|
|
245
|
+
this.open = true;
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
this.eventListeners.remove(this.panel, 'six-menu-item-selected', this.handlePanelSelect);
|
|
249
|
+
this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);
|
|
250
|
+
this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);
|
|
251
|
+
this.isVisible = false;
|
|
252
|
+
this.open = false;
|
|
253
|
+
this.popover.hide();
|
|
254
|
+
}
|
|
255
|
+
focusOnTrigger() {
|
|
256
|
+
const [trigger] = getSlotChildren(this.trigger);
|
|
257
|
+
if (trigger) {
|
|
258
|
+
if (typeof trigger.setFocus === 'function') {
|
|
259
|
+
trigger.setFocus();
|
|
260
|
+
}
|
|
261
|
+
else if (typeof trigger.focus === 'function') {
|
|
262
|
+
trigger.focus();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
getMenu() {
|
|
267
|
+
const [menu] = getSlotChildren(this.panel).filter(isSixMenu);
|
|
268
|
+
return menu;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu
|
|
272
|
+
* is activated.
|
|
273
|
+
*/
|
|
274
|
+
async reposition() {
|
|
275
|
+
if (!this.open) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
this.popover.reposition();
|
|
279
|
+
}
|
|
280
|
+
handleDocumentKeyDown(event) {
|
|
281
|
+
// Close when escape is pressed
|
|
282
|
+
if (event.key === 'Escape') {
|
|
283
|
+
void this.hide();
|
|
284
|
+
this.focusOnTrigger();
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
if (this.filterInputElement === this.host.shadowRoot.activeElement) {
|
|
288
|
+
if (event.key === 'ArrowDown') {
|
|
289
|
+
const item = this.getMenuItems().find((item) => item.style.display !== 'none');
|
|
290
|
+
if (item) {
|
|
291
|
+
item.setFocus();
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
// Handle tabbing
|
|
296
|
+
if (event.key === 'Tab') {
|
|
297
|
+
// Tabbing within an open menu should close the dropdown and refocus the trigger
|
|
298
|
+
if (this.open && isSixMenuItem(document.activeElement)) {
|
|
299
|
+
event.preventDefault();
|
|
300
|
+
void this.hide();
|
|
301
|
+
this.focusOnTrigger();
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
// Tabbing outside of the containing element closes the panel
|
|
305
|
+
//
|
|
306
|
+
// If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,
|
|
307
|
+
// otherwise `document.activeElement` will only return the name of the parent shadow DOM element.
|
|
308
|
+
setTimeout(() => {
|
|
309
|
+
var _a;
|
|
310
|
+
const activeElement = this.container.getRootNode() instanceof ShadowRoot
|
|
311
|
+
? (_a = document.activeElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement
|
|
312
|
+
: document.activeElement;
|
|
313
|
+
if ((activeElement === null || activeElement === void 0 ? void 0 : activeElement.closest(this.container.tagName.toLowerCase())) !== this.container) {
|
|
314
|
+
void this.hide();
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
handleDocumentMouseDown(event) {
|
|
321
|
+
// Close when clicking outside of the containing element
|
|
322
|
+
const path = event.composedPath();
|
|
323
|
+
if (!path.includes(this.container)) {
|
|
324
|
+
void this.hide();
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
handleMenuItemActivate(event) {
|
|
329
|
+
const item = event.target;
|
|
330
|
+
scrollIntoView(item, this.panel);
|
|
331
|
+
}
|
|
332
|
+
handlePanelSelect(event) {
|
|
333
|
+
const target = event.target;
|
|
334
|
+
// Hide the dropdown when a menu item is selected
|
|
335
|
+
if (this.closeOnSelect && isSixMenu(target)) {
|
|
336
|
+
void this.hide();
|
|
337
|
+
this.focusOnTrigger();
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
handleTriggerClick() {
|
|
341
|
+
this.open ? this.hide() : this.show();
|
|
342
|
+
}
|
|
343
|
+
handleTriggerKeyDown(event) {
|
|
344
|
+
const menu = this.getMenu();
|
|
345
|
+
const menuItems = menu ? [...menu.querySelectorAll('six-menu-item')] : null;
|
|
346
|
+
const firstMenuItem = menuItems[0];
|
|
347
|
+
const lastMenuItem = menuItems[menuItems.length - 1];
|
|
348
|
+
// Close when escape or tab is pressed
|
|
349
|
+
if (event.key === 'Escape') {
|
|
350
|
+
this.focusOnTrigger();
|
|
351
|
+
void this.hide();
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
// When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same
|
|
355
|
+
// key again to hide the menu in case they don't want to make a selection.
|
|
356
|
+
if (!this.disableHideOnEnterAndSpace && [' ', 'Enter'].includes(event.key)) {
|
|
357
|
+
event.preventDefault();
|
|
358
|
+
this.open ? void this.hide() : void this.show();
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
// When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a
|
|
362
|
+
// selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for
|
|
363
|
+
// faster navigation.
|
|
364
|
+
if (['ArrowDown', 'ArrowUp'].includes(event.key)) {
|
|
365
|
+
event.preventDefault();
|
|
366
|
+
// Show the menu if it's not already open
|
|
367
|
+
if (!this.open) {
|
|
368
|
+
void this.show();
|
|
369
|
+
}
|
|
370
|
+
// Focus on a menu item
|
|
371
|
+
if (event.key === 'ArrowDown' && firstMenuItem) {
|
|
372
|
+
firstMenuItem.setFocus();
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
if (event.key === 'ArrowUp' && lastMenuItem) {
|
|
376
|
+
lastMenuItem.setFocus();
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
// Other keys bring focus to the menu and initiate type-to-select behavior
|
|
381
|
+
const ignoredKeys = ['Tab', 'Shift', 'Meta', 'Ctrl', 'Alt'];
|
|
382
|
+
if (this.open && menu && !ignoredKeys.includes(event.key)) {
|
|
383
|
+
void menu.typeToSelect(event.key);
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
handleTriggerKeyUp(event) {
|
|
388
|
+
// Prevent space from triggering a click event in Firefox
|
|
389
|
+
if (event.key === ' ') {
|
|
390
|
+
event.preventDefault();
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
handleTriggerSlotChange() {
|
|
394
|
+
this.updateAccessibleTrigger();
|
|
395
|
+
}
|
|
396
|
+
handleDropdownScroll() {
|
|
397
|
+
this.sixScroll.emit({
|
|
398
|
+
scrollHeight: this.panel.scrollHeight,
|
|
399
|
+
scrollTop: this.panel.scrollTop,
|
|
400
|
+
scrollbarHeight: this.panel.offsetHeight * (this.panel.offsetHeight / this.panel.scrollHeight),
|
|
401
|
+
scrollRatio: this.panel.scrollTop / (this.panel.scrollHeight - this.panel.clientHeight),
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
//
|
|
405
|
+
// Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and
|
|
406
|
+
// `aria-expanded`. These must be applied to the "accessible trigger" (the tabbable portion of the trigger element
|
|
407
|
+
// that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,
|
|
408
|
+
// a child of the slotted element, or an element in the slotted element's shadow root.
|
|
409
|
+
//
|
|
410
|
+
// For example, the accessible trigger of an <sl-button> is a <button> located inside its shadow root.
|
|
411
|
+
//
|
|
412
|
+
// To determine this, we assume the first tabbable element in the trigger slot is the "accessible trigger."
|
|
413
|
+
//
|
|
414
|
+
updateAccessibleTrigger() {
|
|
415
|
+
const [accessibleTrigger] = getSlotChildren(this.trigger).map(getNearestTabbableElement);
|
|
416
|
+
if (accessibleTrigger) {
|
|
417
|
+
accessibleTrigger.setAttribute('aria-haspopup', 'true');
|
|
418
|
+
accessibleTrigger.setAttribute('aria-expanded', this.open ? 'true' : 'false');
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
render() {
|
|
422
|
+
return (h("div", { part: "base", id: this.componentId, class: {
|
|
423
|
+
dropdown: true,
|
|
424
|
+
'dropdown--open': this.open,
|
|
425
|
+
} }, h("span", { part: "trigger", class: "dropdown__trigger", ref: (el) => (this.trigger = el), onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown, onKeyUp: this.handleTriggerKeyUp }, h("slot", { name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("div", { ref: (el) => (this.positioner = el), class: {
|
|
426
|
+
dropdown__positioner: true,
|
|
427
|
+
dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,
|
|
428
|
+
} }, this.hasFilterEnabled && (h("six-input", { class: {
|
|
429
|
+
'filter-hidden': !this.open,
|
|
430
|
+
}, "aria-hidden": this.open ? 'false' : 'true', ref: (el) => (this.filterInputElement = el), placeholder: this.filterPlaceholder })), h("div", { ref: (el) => (this.panel = el), part: "panel", class: "dropdown__panel", role: "menu", "aria-hidden": this.open ? 'false' : 'true', "aria-labelledby": this.componentId, onScroll: this.handleDropdownScroll }, h("slot", null), this._options && (h("six-menu", { part: "menu", items: this._options, virtualScroll: this.virtualScroll }))))));
|
|
431
|
+
}
|
|
432
|
+
get host() { return this; }
|
|
433
|
+
static get watchers() { return {
|
|
434
|
+
"open": ["handleOpenChange"],
|
|
435
|
+
"distance": ["handlePopoverOptionsChange"],
|
|
436
|
+
"hoist": ["handlePopoverOptionsChange"],
|
|
437
|
+
"placement": ["handlePopoverOptionsChange"],
|
|
438
|
+
"skidding": ["handlePopoverOptionsChange"],
|
|
439
|
+
"options": ["handleOptionsChange"]
|
|
440
|
+
}; }
|
|
441
|
+
static get style() { return sixDropdownCss; }
|
|
442
|
+
}, [1, "six-dropdown", {
|
|
443
|
+
"open": [1540],
|
|
444
|
+
"placement": [1],
|
|
445
|
+
"closeOnSelect": [4, "close-on-select"],
|
|
446
|
+
"distance": [2],
|
|
447
|
+
"skidding": [2],
|
|
448
|
+
"hoist": [4],
|
|
449
|
+
"containingElement": [16],
|
|
450
|
+
"filter": [4],
|
|
451
|
+
"asyncFilter": [4, "async-filter"],
|
|
452
|
+
"filterPlaceholder": [1, "filter-placeholder"],
|
|
453
|
+
"autofocusFilter": [4, "autofocus-filter"],
|
|
454
|
+
"filterDebounce": [2, "filter-debounce"],
|
|
455
|
+
"disableHideOnEnterAndSpace": [4, "disable-hide-on-enter-and-space"],
|
|
456
|
+
"options": [16],
|
|
457
|
+
"virtualScroll": [4, "virtual-scroll"],
|
|
458
|
+
"_options": [32],
|
|
459
|
+
"show": [64],
|
|
460
|
+
"hide": [64],
|
|
461
|
+
"reposition": [64]
|
|
462
|
+
}]);
|
|
463
|
+
function defineCustomElement() {
|
|
464
|
+
if (typeof customElements === "undefined") {
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
const components = ["six-dropdown", "six-icon", "six-input", "six-menu", "six-menu-item"];
|
|
468
|
+
components.forEach(tagName => { switch (tagName) {
|
|
469
|
+
case "six-dropdown":
|
|
470
|
+
if (!customElements.get(tagName)) {
|
|
471
|
+
customElements.define(tagName, SixDropdown);
|
|
472
|
+
}
|
|
473
|
+
break;
|
|
474
|
+
case "six-icon":
|
|
475
|
+
if (!customElements.get(tagName)) {
|
|
476
|
+
defineCustomElement$4();
|
|
477
|
+
}
|
|
478
|
+
break;
|
|
479
|
+
case "six-input":
|
|
480
|
+
if (!customElements.get(tagName)) {
|
|
481
|
+
defineCustomElement$3();
|
|
482
|
+
}
|
|
483
|
+
break;
|
|
484
|
+
case "six-menu":
|
|
485
|
+
if (!customElements.get(tagName)) {
|
|
486
|
+
defineCustomElement$2();
|
|
487
|
+
}
|
|
488
|
+
break;
|
|
489
|
+
case "six-menu-item":
|
|
490
|
+
if (!customElements.get(tagName)) {
|
|
491
|
+
defineCustomElement$1();
|
|
492
|
+
}
|
|
493
|
+
break;
|
|
494
|
+
} });
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export { SixDropdown as S, defineCustomElement as d };
|
|
498
|
+
|
|
499
|
+
//# sourceMappingURL=six-dropdown2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"six-dropdown2.js","mappings":";;;;;;;;;;;SAAgB,UAAU,CAAC,EAAe;EACxC,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;EAC7B,OAAO,QAAQ,GAAG,CAAC,CAAC,CAAC;AACvB,CAAC;SAEe,yBAAyB,CAAC,EAAe;;EAEvD,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE;IAClB,OAAO,EAAE,CAAC;GACX;;EAGD,IAAI,EAAE,CAAC,UAAU,EAAE;IACjB,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAgB,CAAC;IACxF,IAAI,mBAAmB,EAAE;MACvB,OAAO,mBAAmB,CAAC;KAC5B;GACF;;EAGD,IAAI,EAAE,CAAC,QAAQ,EAAE;IACf,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,C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,WACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,EACnC,KAAK,EAAE;QACL,oBAAoB,EAAE,IAAI;QAC1B,8BAA8B,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC,IAAI,CAAC,KAAK;OACjF,IAEA,IAAI,CAAC,gBAAgB,KACpB,iBACE,KAAK,EAAE;QACL,eAAe,EAAE,CAAC,IAAI,CAAC,IAAI;OAC5B,iBACY,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,EACzC,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,EAC3C,WAAW,EAAE,IAAI,CAAC,iBAAiB,GACnC,CACH,EACD,WACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAC9B,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,MAAM,iBACE,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,qBACxB,IAAI,CAAC,WAAW,EACjC,QAAQ,EAAE,IAAI,CAAC,oBAAoB,IAEnC,eAAQ,EACP,IAAI,CAAC,QAAQ,KACZ,gBAAU,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,GAAa,CAC3F,CACG,CACF,CACF,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/utils/tabbable.ts","./src/components/six-dropdown/six-dropdown.scss?tag=six-dropdown&encapsulation=shadow","./src/components/six-dropdown/six-dropdown.tsx"],"sourcesContent":["export function isTabbable(el: HTMLElement) {\n const tabIndex = el.tabIndex;\n return tabIndex > -1;\n}\n\nexport function getNearestTabbableElement(el: HTMLElement): HTMLElement {\n // Check the element\n if (isTabbable(el)) {\n return el;\n }\n\n // Check the element's shadow root\n if (el.shadowRoot) {\n const tabbableShadowChild = [...el.shadowRoot.children].find(isTabbable) as HTMLElement;\n if (tabbableShadowChild) {\n return tabbableShadowChild;\n }\n }\n\n // Check the element's children\n if (el.children) {\n return [...el.children].map(getNearestTabbableElement)[0];\n }\n\n return null;\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 max-height: 50vh;\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 box-shadow: var(--six-elevation-2dp);\n opacity: 0;\n overflow: auto;\n overscroll-behavior: none;\n pointer-events: none;\n transform: scale(0.9);\n transition: var(--six-transition-fast) opacity, var(--six-transition-fast) transform;\n // fix for firefox scrollbar\n scrollbar-width: thin;\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","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { scrollIntoView } from '../../utils/scroll';\nimport { getNearestTabbableElement } from '../../utils/tabbable';\nimport Popover from '../../utils/popover';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { getSlotChildren } from '../../utils/slot';\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\nconst isTagName =\n (name: string) =>\n <T extends Element>(el?: T) =>\n el?.tagName.toLowerCase() === name.toLowerCase();\nconst isSixMenu = isTagName('six-menu');\nconst isSixMenuItem = isTagName('six-menu-item');\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 - 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 accessibleTrigger: HTMLElement;\n componentId = `dropdown-${++id}`;\n isVisible = false;\n panel: HTMLElement;\n positioner: HTMLElement;\n popover: Popover;\n trigger: HTMLElement;\n hasBeenInitialized = false;\n\n // the input element shown in the dropdown when filter is set to true\n filterInputElement: HTMLSixInputElement;\n\n @Element() host: HTMLSixDropdownElement;\n\n /** Indicates whether or not 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 of 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 @Prop() closeOnSelect = true;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @Prop() distance = 0;\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 @Prop() autofocusFilter = true;\n\n get hasFilterEnabled() {\n return this.filter || this.asyncFilter;\n }\n\n /** The debounce for the filter callbacks. */\n @Prop() filterDebounce = DEFAULT_DEBOUNCE_FAST;\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() options: SixMenuItemData[] | null = null;\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 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' })\n sixAutoFilterFired: 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 readonly eventListeners = new EventListeners();\n\n // internal representation of options, so we don't have to make options mutable\n @State()\n _options: SixMenuItemData[] = null;\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 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 handleOptionsChange() {\n this._options = [...this.options];\n }\n\n connectedCallback() {\n if (this.virtualScroll && this.options === null) {\n console.error('Options must be defined when using virtual scrolling');\n }\n\n if (this.options !== null) {\n this._options = [...this.options];\n }\n\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n this.handleMenuItemActivate = this.handleMenuItemActivate.bind(this);\n this.handlePanelSelect = this.handlePanelSelect.bind(this);\n this.handleTriggerClick = this.handleTriggerClick.bind(this);\n this.handleTriggerKeyDown = this.handleTriggerKeyDown.bind(this);\n this.handleTriggerKeyUp = this.handleTriggerKeyUp.bind(this);\n this.handleTriggerSlotChange = this.handleTriggerSlotChange.bind(this);\n this.handleDropdownScroll = this.handleDropdownScroll.bind(this);\n\n if (this.hasBeenInitialized && !this.popover) {\n // there was a weird bug when using six-dropdown inside an ag-grid filter. When closing the ag-grid filter\n // disconnectedCallback() is executed. However, since componentDidLoad() will not be rerendered the popover had\n // no longer a connected transitionEnd callback to the dropdown. To fix this, we have this sanity check here,\n // to re-initialize the popover in case the component has already been initialized but the popover is undefined.\n this.initializePopover();\n }\n }\n\n componentDidLoad() {\n this.hasBeenInitialized = true;\n this.initializePopover();\n\n // Show on init if open\n if (this.open) {\n void this.show();\n }\n\n if (this.filter) {\n this.setupFiltering(this.handleFilterInputChange);\n } else if (this.asyncFilter) {\n this.setupFiltering(() => this.sixAsyncFilterFired.emit({ filterValue: this.filterInputElement.value }));\n }\n }\n\n private initializePopover() {\n const onAfterHide = () => {\n if (this.filter) {\n this.filterInputElement.value = '';\n\n if (this._options !== null) {\n this._options = [...this.options];\n } else {\n const menuItems = this.getMenuItems();\n menuItems.forEach((item) => (item.style.display = 'unset'));\n }\n }\n\n this.sixAfterHide.emit();\n };\n\n const onAfterShow = async () => {\n if (this.hasFilterEnabled && this.autofocusFilter) {\n // if dropdown filter is enabled we should autofocus the search field\n await this.filterInputElement.setFocus();\n }\n\n this.sixAfterShow.emit();\n };\n\n const onTransitionEnd = () => {\n if (!this.open) {\n this.panel.scrollTop = 0;\n }\n };\n\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 onAfterShow,\n onTransitionEnd,\n });\n }\n\n private setupFiltering(callback: () => void) {\n this.eventListeners.add(this.filterInputElement, 'six-input-input', debounce(callback, this.filterDebounce));\n }\n\n getMenuItems = (): HTMLSixMenuItemElement[] => {\n if (this._options !== null) {\n return this._options.map((option) => <six-menu-item value={option.value}>{option.label}</six-menu-item>);\n }\n\n const [panel] = getSlotChildren<HTMLSixMenuElement>(this.panel);\n\n // the menu-items can be in a slot e.g. in six-select or direct children of the panel\n return getSlotChildren(panel) || Array.from(panel.querySelectorAll('six-menu-item'));\n };\n\n handleFilterInputChange = () => {\n const lowerCaseFilterTerm = this.filterInputElement.value?.toLowerCase()?.trim() || '';\n\n if (this._options) {\n this.handleFilteringForAttributeItems(lowerCaseFilterTerm);\n } else {\n this.handleFilteringForSlotItems(lowerCaseFilterTerm);\n }\n\n this.sixAutoFilterFired.emit({ filterValue: lowerCaseFilterTerm });\n };\n\n private handleFilteringForAttributeItems(lowerCaseFilterTerm: string) {\n if (lowerCaseFilterTerm === '') {\n this._options = [...this.options];\n return;\n }\n\n this._options = 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 }\n\n private handleFilteringForSlotItems(lowerCaseFilterTerm: string) {\n const menuItems = this.getMenuItems();\n menuItems.forEach(async (menuItem) => {\n // hide all elements which don't contain the entered substring\n const elementContainsFilterTerm =\n menuItem?.value?.toLowerCase()?.includes(lowerCaseFilterTerm) ||\n (await menuItem?.getTextLabel())?.toLowerCase()?.includes(lowerCaseFilterTerm);\n\n menuItem.style.display = elementContainsFilterTerm ? 'unset' : 'none';\n });\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n\n void this.hide();\n this.popover.destroy();\n this.popover = null;\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) {\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 this.popover.show();\n }\n\n /** Hides the dropdown panel */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible) {\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 focusOnTrigger() {\n const [trigger] = getSlotChildren<HTMLSixButtonElement>(this.trigger);\n if (trigger) {\n if (typeof trigger.setFocus === 'function') {\n trigger.setFocus();\n } else if (typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n }\n\n getMenu() {\n const [menu] = getSlotChildren<HTMLSixMenuElement>(this.panel).filter(isSixMenu);\n return menu;\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 @Method()\n async reposition() {\n if (!this.open) {\n return;\n }\n this.popover.reposition();\n }\n\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Close when escape is pressed\n if (event.key === 'Escape') {\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n if (this.filterInputElement === this.host.shadowRoot.activeElement) {\n if (event.key === 'ArrowDown') {\n const item = this.getMenuItems().find((item) => item.style.display !== 'none');\n if (item) {\n item.setFocus();\n }\n }\n }\n\n // Handle tabbing\n if (event.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && isSixMenuItem(document.activeElement)) {\n event.preventDefault();\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside of 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 handleDocumentMouseDown(event: MouseEvent) {\n // Close when clicking outside of 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 handleMenuItemActivate(event: CustomEvent) {\n const item = event.target as HTMLSixMenuItemElement;\n scrollIntoView(item, this.panel);\n }\n\n handlePanelSelect(event: CustomEvent) {\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 handleTriggerClick() {\n this.open ? this.hide() : this.show();\n }\n\n handleTriggerKeyDown(event: KeyboardEvent) {\n const menu = this.getMenu();\n const menuItems = menu ? [...menu.querySelectorAll('six-menu-item')] : null;\n const firstMenuItem = menuItems[0];\n const lastMenuItem = menuItems[menuItems.length - 1];\n\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 // 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 // Focus on a menu item\n if (event.key === 'ArrowDown' && firstMenuItem) {\n firstMenuItem.setFocus();\n return;\n }\n\n if (event.key === 'ArrowUp' && lastMenuItem) {\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 && !ignoredKeys.includes(event.key)) {\n void menu.typeToSelect(event.key);\n return;\n }\n }\n\n handleTriggerKeyUp(event: KeyboardEvent) {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n }\n\n handleTriggerSlotChange() {\n this.updateAccessibleTrigger();\n }\n\n handleDropdownScroll() {\n this.sixScroll.emit({\n scrollHeight: this.panel.scrollHeight,\n scrollTop: this.panel.scrollTop,\n scrollbarHeight: this.panel.offsetHeight * (this.panel.offsetHeight / this.panel.scrollHeight),\n scrollRatio: this.panel.scrollTop / (this.panel.scrollHeight - this.panel.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 updateAccessibleTrigger() {\n const [accessibleTrigger] = getSlotChildren(this.trigger).map(getNearestTabbableElement);\n\n if (accessibleTrigger) {\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 name=\"trigger\" onSlotchange={this.handleTriggerSlotChange} />\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 {this.hasFilterEnabled && (\n <six-input\n class={{\n 'filter-hidden': !this.open,\n }}\n aria-hidden={this.open ? 'false' : 'true'}\n ref={(el) => (this.filterInputElement = el)}\n placeholder={this.filterPlaceholder}\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 onScroll={this.handleDropdownScroll}\n >\n <slot />\n {this._options && (\n <six-menu part=\"menu\" items={this._options} virtualScroll={this.virtualScroll}></six-menu>\n )}\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SixErrorPage extends Components.SixErrorPage, HTMLElement {}
|
|
4
|
+
export const SixErrorPage: {
|
|
5
|
+
prototype: SixErrorPage;
|
|
6
|
+
new (): SixErrorPage;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|