@six-group/ui-library 4.0.0-beta.1 → 4.0.0-beta.2
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-fdfe838c.js +61 -0
- package/dist/cjs/event-listeners-fdfe838c.js.map +1 -0
- package/dist/cjs/{execution-control-46f388e0.js → execution-control-b4707294.js} +6 -3
- package/dist/cjs/execution-control-b4707294.js.map +1 -0
- package/dist/cjs/{focus-visible-0b352c74.js → focus-visible-ae2470dd.js} +3 -3
- package/dist/cjs/focus-visible-ae2470dd.js.map +1 -0
- package/dist/cjs/form-2df8c5bb.js +20 -0
- package/dist/cjs/form-2df8c5bb.js.map +1 -0
- package/dist/cjs/{form-control-2c17c573.js → form-control-d369af14.js} +10 -11
- package/dist/cjs/form-control-d369af14.js.map +1 -0
- package/dist/cjs/{index-2f6daa5b.js → index-900437fc.js} +186 -53
- package/dist/cjs/index-900437fc.js.map +1 -0
- package/dist/cjs/index.cjs.js +94 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +3 -12
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/{modal-48d42228.js → modal-d5f074c7.js} +4 -3
- package/dist/cjs/modal-d5f074c7.js.map +1 -0
- package/dist/cjs/{popover-f743f62b.js → popover-2df7e154.js} +39 -31
- package/dist/cjs/popover-2df7e154.js.map +1 -0
- package/dist/cjs/popup-f1d9910f.js +103 -0
- package/dist/cjs/popup-f1d9910f.js.map +1 -0
- package/dist/cjs/{scroll-76e6f5d7.js → scroll-03678de1.js} +1 -1
- package/dist/cjs/scroll-03678de1.js.map +1 -0
- package/dist/cjs/set-attributes_2.cjs.entry.js +4 -2
- package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-alert.cjs.entry.js +18 -23
- package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +5 -8
- package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-badge.cjs.entry.js +2 -2
- package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/six-button.cjs.entry.js +36 -34
- package/dist/cjs/six-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-card.cjs.entry.js +1 -1
- package/dist/cjs/six-card.cjs.entry.js.map +1 -1
- package/dist/cjs/six-checkbox.cjs.entry.js +50 -85
- package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/six-datepicker.cjs.entry.js +154 -280
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +48 -47
- package/dist/cjs/six-details.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dialog.cjs.entry.js +37 -41
- package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/six-drawer.cjs.entry.js +34 -38
- package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dropdown_2.cjs.entry.js +215 -196
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error-page.cjs.entry.js +20 -22
- package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js +2 -2
- package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-list.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-upload.cjs.entry.js +21 -21
- package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/six-footer.cjs.entry.js +1 -1
- package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +12 -11
- package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
- package/dist/cjs/six-header.cjs.entry.js +66 -44
- package/dist/cjs/six-header.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +4 -4
- package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon.cjs.entry.js +1 -1
- package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/six-input.cjs.entry.js +95 -128
- package/dist/cjs/six-input.cjs.entry.js.map +1 -1
- package/dist/cjs/six-item-picker.cjs.entry.js +62 -81
- package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js +2 -2
- package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
- package/dist/cjs/six-layout-grid.cjs.entry.js +5 -3
- package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
- package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/six-menu-item.cjs.entry.js +9 -7
- package/dist/cjs/six-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
- package/dist/cjs/six-picto.cjs.entry.js +5 -2
- package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
- package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-progress-ring.cjs.entry.js +4 -4
- package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +63 -72
- package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/six-range.cjs.entry.js +107 -106
- package/dist/cjs/six-range.cjs.entry.js.map +1 -1
- package/dist/cjs/six-root.cjs.entry.js +2 -2
- package/dist/cjs/six-root.cjs.entry.js.map +1 -1
- package/dist/cjs/six-search-field.cjs.entry.js +11 -6
- package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
- package/dist/cjs/six-select.cjs.entry.js +190 -223
- package/dist/cjs/six-select.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +10 -6
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item.cjs.entry.js +1 -1
- package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar.cjs.entry.js +41 -20
- package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-spinner.cjs.entry.js +1 -1
- package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/six-switch.cjs.entry.js +58 -64
- package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-group.cjs.entry.js +132 -114
- package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +5 -3
- package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +6 -9
- package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/six-textarea.cjs.entry.js +82 -108
- package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tile.cjs.entry.js +14 -17
- package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js +159 -215
- package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +54 -57
- package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{slot-ad537f24.js → slot-6e6a400f.js} +11 -10
- package/dist/cjs/slot-6e6a400f.js.map +1 -0
- package/dist/cjs/{types-64878648.js → types-47199040.js} +1 -1
- package/dist/cjs/types-47199040.js.map +1 -0
- package/dist/cjs/ui-library.cjs.js +3 -6
- package/dist/cjs/ui-library.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +54 -55
- package/dist/collection/components/six-alert/six-alert.js +32 -30
- package/dist/collection/components/six-alert/six-alert.js.map +1 -1
- package/dist/collection/components/six-alert/test/six-alert.spec.js +25 -0
- package/dist/collection/components/six-alert/test/six-alert.spec.js.map +1 -0
- package/dist/collection/components/six-avatar/six-avatar.js +5 -8
- package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
- package/dist/collection/components/six-avatar/test/six-avatar.spec.js +26 -0
- package/dist/collection/components/six-avatar/test/six-avatar.spec.js.map +1 -0
- package/dist/collection/components/six-badge/six-badge.js +2 -2
- package/dist/collection/components/six-badge/six-badge.js.map +1 -1
- package/dist/collection/components/six-badge/test/six-badge.spec.js +20 -0
- package/dist/collection/components/six-badge/test/six-badge.spec.js.map +1 -0
- package/dist/collection/components/six-button/six-button.js +56 -47
- package/dist/collection/components/six-button/six-button.js.map +1 -1
- package/dist/collection/components/six-button/test/six-button.spec.js +69 -0
- package/dist/collection/components/six-button/test/six-button.spec.js.map +1 -0
- package/dist/collection/components/six-card/six-card.js +1 -1
- package/dist/collection/components/six-card/six-card.js.map +1 -1
- package/dist/collection/components/six-card/test/six-card.spec.js +18 -0
- package/dist/collection/components/six-card/test/six-card.spec.js.map +1 -0
- package/dist/collection/components/six-checkbox/six-checkbox.js +81 -194
- package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
- package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js +79 -0
- package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js.map +1 -0
- package/dist/collection/components/six-datepicker/components/day-selection.js +3 -3
- package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/components/month-selection.js +6 -5
- package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/components/year-selection.js +11 -8
- package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.js +219 -395
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
- package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js +26 -0
- package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js.map +1 -0
- package/dist/collection/components/six-details/six-details.js +65 -58
- package/dist/collection/components/six-details/six-details.js.map +1 -1
- package/dist/collection/components/six-details/test/six-details.spec.js +36 -0
- package/dist/collection/components/six-details/test/six-details.spec.js.map +1 -0
- package/dist/collection/components/six-dialog/six-dialog.js +55 -51
- package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
- package/dist/collection/components/six-dialog/test/six-dialog.spec.js +34 -0
- package/dist/collection/components/six-dialog/test/six-dialog.spec.js.map +1 -0
- package/dist/collection/components/six-drawer/six-drawer.js +52 -48
- package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
- package/dist/collection/components/six-drawer/test/six-drawer.spec.js +34 -0
- package/dist/collection/components/six-drawer/test/six-drawer.spec.js.map +1 -0
- package/dist/collection/components/six-dropdown/six-dropdown.js +215 -191
- package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
- package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js +122 -0
- package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js.map +1 -0
- package/dist/collection/components/six-error-page/six-error-page.js +26 -28
- package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
- package/dist/collection/components/six-error-page/test/six-error-page.spec.js +240 -0
- package/dist/collection/components/six-error-page/test/six-error-page.spec.js.map +1 -0
- package/dist/collection/components/six-file-list/six-file-list.js +1 -1
- package/dist/collection/components/six-file-list/test/six-file-list.spec.js +67 -0
- package/dist/collection/components/six-file-list/test/six-file-list.spec.js.map +1 -0
- package/dist/collection/components/six-file-list-item/six-file-list-item.js +8 -6
- package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
- package/dist/collection/components/six-file-list-item/test/six-file-list-item.spec.js +169 -0
- package/dist/collection/components/six-file-list-item/test/six-file-list-item.spec.js.map +1 -0
- package/dist/collection/components/six-file-upload/six-file-upload.js +37 -35
- package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
- package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +103 -0
- package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -0
- package/dist/collection/components/six-footer/six-footer.js +1 -1
- package/dist/collection/components/six-footer/test/six-footer.spec.js +21 -0
- package/dist/collection/components/six-footer/test/six-footer.spec.js.map +1 -0
- package/dist/collection/components/six-group-label/six-group-label.js +15 -13
- package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
- package/dist/collection/components/six-group-label/test/six-group-label.spec.js +43 -0
- package/dist/collection/components/six-group-label/test/six-group-label.spec.js.map +1 -0
- package/dist/collection/components/six-header/six-header.js +82 -52
- package/dist/collection/components/six-header/six-header.js.map +1 -1
- package/dist/collection/components/six-header/test/six-header.spec.js +133 -0
- package/dist/collection/components/six-header/test/six-header.spec.js.map +1 -0
- package/dist/collection/components/six-icon/six-icon.js +1 -1
- package/dist/collection/components/six-icon/test/six-icon.spec.js +20 -0
- package/dist/collection/components/six-icon/test/six-icon.spec.js.map +1 -0
- package/dist/collection/components/six-icon-button/six-icon-button.js +10 -10
- package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
- package/dist/collection/components/six-icon-button/test/six-icon-button.spec.js +23 -0
- package/dist/collection/components/six-icon-button/test/six-icon-button.spec.js.map +1 -0
- package/dist/collection/components/six-input/six-input.css +1 -1
- package/dist/collection/components/six-input/six-input.js +189 -362
- package/dist/collection/components/six-input/six-input.js.map +1 -1
- package/dist/collection/components/six-input/test/six-input.spec.js +37 -0
- package/dist/collection/components/six-input/test/six-input.spec.js.map +1 -0
- package/dist/collection/components/six-item-picker/six-item-picker.js +79 -94
- package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
- package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js +90 -0
- package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js.map +1 -0
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +7 -5
- package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
- package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +196 -0
- package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -0
- package/dist/collection/components/six-layout-grid/six-layout-grid.js +10 -8
- package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
- package/dist/collection/components/six-layout-grid/test/six-layout-grid.spec.js +18 -0
- package/dist/collection/components/six-layout-grid/test/six-layout-grid.spec.js.map +1 -0
- package/dist/collection/components/six-main-container/six-main-container.js +1 -1
- package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
- package/dist/collection/components/six-main-container/test/six-main-container.spec.js +22 -0
- package/dist/collection/components/six-main-container/test/six-main-container.spec.js.map +1 -0
- package/dist/collection/components/six-menu/six-menu.js +41 -31
- package/dist/collection/components/six-menu/six-menu.js.map +1 -1
- package/dist/collection/components/six-menu/test/six-menu.spec.js +93 -0
- package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -0
- package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
- package/dist/collection/components/six-menu-divider/test/six-menu-divider.spec.js +18 -0
- package/dist/collection/components/six-menu-divider/test/six-menu-divider.spec.js.map +1 -0
- package/dist/collection/components/six-menu-item/six-menu-item.js +17 -11
- package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
- package/dist/collection/components/six-menu-item/test/six-menu-item.spec.js +33 -0
- package/dist/collection/components/six-menu-item/test/six-menu-item.spec.js.map +1 -0
- package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
- package/dist/collection/components/six-menu-label/test/six-menu-label.spec.js +20 -0
- package/dist/collection/components/six-menu-label/test/six-menu-label.spec.js.map +1 -0
- package/dist/collection/components/six-picto/six-picto.js +5 -2
- package/dist/collection/components/six-picto/six-picto.js.map +1 -1
- package/dist/collection/components/six-picto/test/six-picto.spec.js +33 -0
- package/dist/collection/components/six-picto/test/six-picto.spec.js.map +1 -0
- package/dist/collection/components/six-progress-bar/six-progress-bar.js +1 -1
- package/dist/collection/components/six-progress-bar/test/six-progress-bar.spec.js +24 -0
- package/dist/collection/components/six-progress-bar/test/six-progress-bar.spec.js.map +1 -0
- package/dist/collection/components/six-progress-ring/six-progress-ring.js +6 -5
- package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
- package/dist/collection/components/six-progress-ring/test/six-progress-ring.spec.js +26 -0
- package/dist/collection/components/six-progress-ring/test/six-progress-ring.spec.js.map +1 -0
- package/dist/collection/components/six-radio/six-radio.js +82 -148
- package/dist/collection/components/six-radio/six-radio.js.map +1 -1
- package/dist/collection/components/six-radio/test/six-radio.spec.js +63 -0
- package/dist/collection/components/six-radio/test/six-radio.spec.js.map +1 -0
- package/dist/collection/components/six-range/six-range.js +149 -190
- package/dist/collection/components/six-range/six-range.js.map +1 -1
- package/dist/collection/components/six-range/test/six-range.spec.js +32 -0
- package/dist/collection/components/six-range/test/six-range.spec.js.map +1 -0
- package/dist/collection/components/six-root/six-root.js +9 -7
- package/dist/collection/components/six-root/six-root.js.map +1 -1
- package/dist/collection/components/six-root/test/six-root.spec.js +43 -0
- package/dist/collection/components/six-root/test/six-root.spec.js.map +1 -0
- package/dist/collection/components/six-search-field/six-search-field.js +15 -9
- package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
- package/dist/collection/components/six-search-field/test/six-search-field.spec.js +22 -0
- package/dist/collection/components/six-search-field/test/six-search-field.spec.js.map +1 -0
- package/dist/collection/components/six-select/six-select.css +6 -9
- package/dist/collection/components/six-select/six-select.js +235 -349
- package/dist/collection/components/six-select/six-select.js.map +1 -1
- package/dist/collection/components/six-select/test/six-select.spec.js +82 -0
- package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -0
- package/dist/collection/components/six-select/test/util.spec.js +81 -0
- package/dist/collection/components/six-select/test/util.spec.js.map +1 -0
- package/dist/collection/components/six-select/util.js +52 -0
- package/dist/collection/components/six-select/util.js.map +1 -0
- package/dist/collection/components/six-sidebar/six-sidebar.js +66 -33
- package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
- package/dist/collection/components/six-sidebar/test/six-sidebar.spec.js +22 -0
- package/dist/collection/components/six-sidebar/test/six-sidebar.spec.js.map +1 -0
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +1 -1
- package/dist/collection/components/six-sidebar-item/test/six-sidebar-item.spec.js +50 -0
- package/dist/collection/components/six-sidebar-item/test/six-sidebar-item.spec.js.map +1 -0
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +14 -10
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
- package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js +53 -0
- package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js.map +1 -0
- package/dist/collection/components/six-spinner/six-spinner.js +1 -1
- package/dist/collection/components/six-spinner/six-spinner.js.map +1 -1
- package/dist/collection/components/six-spinner/test/six-spinner.spec.js +37 -0
- package/dist/collection/components/six-spinner/test/six-spinner.spec.js.map +1 -0
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +4 -3
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js.map +1 -1
- package/dist/collection/components/six-stage-indicator/test/six-stage-indicator.spec.js +117 -0
- package/dist/collection/components/six-stage-indicator/test/six-stage-indicator.spec.js.map +1 -0
- package/dist/collection/components/six-switch/six-switch.css +77 -0
- package/dist/collection/components/six-switch/six-switch.js +108 -139
- package/dist/collection/components/six-switch/six-switch.js.map +1 -1
- package/dist/collection/components/six-switch/test/six-switch.spec.js +69 -0
- package/dist/collection/components/six-switch/test/six-switch.spec.js.map +1 -0
- package/dist/collection/components/six-tab/six-tab.js +13 -7
- package/dist/collection/components/six-tab/six-tab.js.map +1 -1
- package/dist/collection/components/six-tab/test/six-tab.spec.js +20 -0
- package/dist/collection/components/six-tab/test/six-tab.spec.js.map +1 -0
- package/dist/collection/components/six-tab-group/six-tab-group.js +140 -119
- package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
- package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js +45 -0
- package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js.map +1 -0
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +2 -2
- package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
- package/dist/collection/components/six-tab-panel/test/six-tab-panel.spec.js +20 -0
- package/dist/collection/components/six-tab-panel/test/six-tab-panel.spec.js.map +1 -0
- package/dist/collection/components/six-tag/six-tag.css +6 -0
- package/dist/collection/components/six-tag/six-tag.js +7 -9
- package/dist/collection/components/six-tag/six-tag.js.map +1 -1
- package/dist/collection/components/six-tag/test/six-tag.spec.js +42 -0
- package/dist/collection/components/six-tag/test/six-tag.spec.js.map +1 -0
- package/dist/collection/components/six-textarea/six-textarea.js +167 -282
- package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
- package/dist/collection/components/six-textarea/test/six-textarea.spec.js +117 -0
- package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -0
- package/dist/collection/components/six-tile/six-tile.js +26 -25
- package/dist/collection/components/six-tile/six-tile.js.map +1 -1
- package/dist/collection/components/six-tile/test/six-tile.spec.js +69 -0
- package/dist/collection/components/six-tile/test/six-tile.spec.js.map +1 -0
- package/dist/collection/components/six-timepicker/six-timepicker.js +169 -264
- package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
- package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js +496 -0
- package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -0
- package/dist/collection/components/six-tooltip/six-tooltip.js +69 -66
- package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
- package/dist/collection/components/six-tooltip/test/six-tooltip.spec.js +28 -0
- package/dist/collection/components/six-tooltip/test/six-tooltip.spec.js.map +1 -0
- package/dist/collection/functional-components/form-control/form-control.js +9 -10
- package/dist/collection/functional-components/form-control/form-control.js.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/testUtil/delay.js.map +1 -1
- package/dist/collection/utils/date-util.js +25 -16
- package/dist/collection/utils/date-util.js.map +1 -1
- package/dist/collection/utils/date-util.spec.js +995 -0
- package/dist/collection/utils/date-util.spec.js.map +1 -0
- package/dist/collection/utils/error-messages.js +91 -0
- package/dist/collection/utils/error-messages.js.map +1 -0
- package/dist/collection/utils/event-listeners.js +22 -6
- package/dist/collection/utils/event-listeners.js.map +1 -1
- package/dist/collection/utils/execution-control.js +5 -4
- package/dist/collection/utils/execution-control.js.map +1 -1
- package/dist/collection/utils/focus-visible.js +2 -2
- package/dist/collection/utils/focus-visible.js.map +1 -1
- package/dist/collection/utils/form.js +15 -0
- package/dist/collection/utils/form.js.map +1 -0
- package/dist/collection/utils/modal.js +3 -2
- package/dist/collection/utils/modal.js.map +1 -1
- package/dist/collection/utils/popover.js +33 -19
- package/dist/collection/utils/popover.js.map +1 -1
- package/dist/collection/utils/popup.js +95 -0
- package/dist/collection/utils/popup.js.map +1 -0
- package/dist/collection/utils/scroll.js +1 -1
- package/dist/collection/utils/scroll.spec.js +122 -0
- package/dist/collection/utils/scroll.spec.js.map +1 -0
- package/dist/collection/utils/slot.js +9 -24
- package/dist/collection/utils/slot.js.map +1 -1
- package/dist/collection/utils/tabbable.js +6 -6
- package/dist/collection/utils/tabbable.js.map +1 -1
- package/dist/collection/utils/time.util.js +48 -34
- package/dist/collection/utils/time.util.js.map +1 -1
- package/dist/collection/utils/time.util.spec.js +368 -0
- package/dist/collection/utils/time.util.spec.js.map +1 -0
- package/dist/collection/utils/type-check.js +0 -1
- package/dist/collection/utils/type-check.js.map +1 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js +4 -2
- package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -1
- package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js +16 -0
- package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js.map +1 -0
- package/dist/components/event-listeners.js +22 -6
- package/dist/components/event-listeners.js.map +1 -1
- package/dist/components/execution-control.js +5 -2
- package/dist/components/execution-control.js.map +1 -1
- package/dist/components/focus-visible.js +2 -2
- package/dist/components/focus-visible.js.map +1 -1
- package/dist/components/form-control.js +8 -9
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.js +18 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/index.js +92 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/modal.js +3 -2
- package/dist/components/modal.js.map +1 -1
- package/dist/components/popover.js +38 -30
- package/dist/components/popover.js.map +1 -1
- package/dist/components/scroll.js.map +1 -1
- package/dist/components/set-attributes2.js +3 -1
- package/dist/components/set-attributes2.js.map +1 -1
- package/dist/components/six-alert.js +17 -22
- package/dist/components/six-alert.js.map +1 -1
- package/dist/components/six-avatar.js +4 -7
- package/dist/components/six-avatar.js.map +1 -1
- package/dist/components/six-badge.js +1 -1
- package/dist/components/six-badge.js.map +1 -1
- package/dist/components/six-button.js +34 -32
- package/dist/components/six-button.js.map +1 -1
- package/dist/components/six-card.js.map +1 -1
- package/dist/components/six-checkbox.js +48 -89
- package/dist/components/six-checkbox.js.map +1 -1
- package/dist/components/six-datepicker.js +153 -282
- package/dist/components/six-datepicker.js.map +1 -1
- package/dist/components/six-details2.js +46 -45
- package/dist/components/six-details2.js.map +1 -1
- package/dist/components/six-dialog.js +33 -37
- package/dist/components/six-dialog.js.map +1 -1
- package/dist/components/six-drawer.js +30 -34
- package/dist/components/six-drawer.js.map +1 -1
- package/dist/components/six-dropdown2.js +185 -173
- package/dist/components/six-dropdown2.js.map +1 -1
- package/dist/components/six-error-page.js +19 -21
- package/dist/components/six-error-page.js.map +1 -1
- package/dist/components/six-file-list-item.js +1 -1
- package/dist/components/six-file-list-item.js.map +1 -1
- package/dist/components/six-file-list.js.map +1 -1
- package/dist/components/six-file-upload.js +20 -20
- package/dist/components/six-file-upload.js.map +1 -1
- package/dist/components/six-footer.js.map +1 -1
- package/dist/components/six-group-label.js +10 -9
- package/dist/components/six-group-label.js.map +1 -1
- package/dist/components/six-header.js +64 -42
- package/dist/components/six-header.js.map +1 -1
- package/dist/components/six-icon-button2.js +2 -2
- package/dist/components/six-icon-button2.js.map +1 -1
- package/dist/components/six-icon2.js.map +1 -1
- package/dist/components/six-input2.js +96 -138
- package/dist/components/six-input2.js.map +1 -1
- package/dist/components/six-item-picker2.js +58 -77
- package/dist/components/six-item-picker2.js.map +1 -1
- package/dist/components/six-language-switcher.js +1 -1
- package/dist/components/six-language-switcher.js.map +1 -1
- package/dist/components/six-layout-grid.js +5 -3
- package/dist/components/six-layout-grid.js.map +1 -1
- package/dist/components/six-main-container.js.map +1 -1
- package/dist/components/six-menu-divider.js.map +1 -1
- package/dist/components/six-menu-item2.js +7 -5
- package/dist/components/six-menu-item2.js.map +1 -1
- package/dist/components/six-menu-label.js.map +1 -1
- package/dist/components/six-menu2.js +25 -18
- package/dist/components/six-menu2.js.map +1 -1
- package/dist/components/six-picto2.js +4 -1
- package/dist/components/six-picto2.js.map +1 -1
- package/dist/components/six-progress-bar.js.map +1 -1
- package/dist/components/six-progress-ring.js +3 -3
- package/dist/components/six-progress-ring.js.map +1 -1
- package/dist/components/six-radio.js +65 -78
- package/dist/components/six-radio.js.map +1 -1
- package/dist/components/six-range.js +108 -111
- package/dist/components/six-range.js.map +1 -1
- package/dist/components/six-root.js +1 -1
- package/dist/components/six-root.js.map +1 -1
- package/dist/components/six-search-field.js +8 -3
- package/dist/components/six-search-field.js.map +1 -1
- package/dist/components/six-select.js +190 -229
- package/dist/components/six-select.js.map +1 -1
- package/dist/components/six-sidebar-item-group.js +8 -4
- package/dist/components/six-sidebar-item-group.js.map +1 -1
- package/dist/components/six-sidebar-item.js.map +1 -1
- package/dist/components/six-sidebar.js +39 -18
- package/dist/components/six-sidebar.js.map +1 -1
- package/dist/components/six-spinner2.js.map +1 -1
- package/dist/components/six-stage-indicator2.js.map +1 -1
- package/dist/components/six-switch.js +61 -69
- package/dist/components/six-switch.js.map +1 -1
- package/dist/components/six-tab-group.js +129 -111
- package/dist/components/six-tab-group.js.map +1 -1
- package/dist/components/six-tab-panel.js +1 -1
- package/dist/components/six-tab-panel.js.map +1 -1
- package/dist/components/six-tab.js +4 -2
- package/dist/components/six-tab.js.map +1 -1
- package/dist/components/six-tag2.js +5 -8
- package/dist/components/six-tag2.js.map +1 -1
- package/dist/components/six-textarea.js +83 -115
- package/dist/components/six-textarea.js.map +1 -1
- package/dist/components/six-tile.js +14 -17
- package/dist/components/six-tile.js.map +1 -1
- package/dist/components/six-timepicker.js +1 -1
- package/dist/components/six-timepicker2.js +247 -258
- package/dist/components/six-timepicker2.js.map +1 -1
- package/dist/components/six-tooltip2.js +52 -55
- package/dist/components/six-tooltip2.js.map +1 -1
- package/dist/components/slot.js +10 -9
- package/dist/components/slot.js.map +1 -1
- package/dist/components.d.ts +361 -88
- package/dist/components.json +4265 -1020
- package/dist/esm/event-listeners-f6e5b0ab.js +59 -0
- package/dist/esm/event-listeners-f6e5b0ab.js.map +1 -0
- package/dist/esm/{execution-control-1a60d709.js → execution-control-e0892a05.js} +6 -3
- package/dist/esm/execution-control-e0892a05.js.map +1 -0
- package/dist/esm/{focus-visible-97933ea9.js → focus-visible-fc6ac671.js} +3 -3
- package/dist/esm/focus-visible-fc6ac671.js.map +1 -0
- package/dist/esm/form-81252534.js +18 -0
- package/dist/esm/form-81252534.js.map +1 -0
- package/dist/esm/{form-control-3b440ea1.js → form-control-32cb533f.js} +10 -11
- package/dist/esm/form-control-32cb533f.js.map +1 -0
- package/dist/esm/{index-5c0f6628.js → index-8a74f992.js} +186 -53
- package/dist/esm/index-8a74f992.js.map +1 -0
- package/dist/esm/index.js +91 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +4 -13
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/{modal-5ebdc320.js → modal-7d32e141.js} +4 -3
- package/dist/esm/modal-7d32e141.js.map +1 -0
- package/dist/esm/{popover-bd2c2fca.js → popover-136d1f73.js} +39 -31
- package/dist/esm/popover-136d1f73.js.map +1 -0
- package/dist/esm/popup-7f89a001.js +98 -0
- package/dist/esm/popup-7f89a001.js.map +1 -0
- package/dist/esm/{scroll-180b53fd.js → scroll-3fb087a2.js} +1 -1
- package/dist/esm/scroll-3fb087a2.js.map +1 -0
- package/dist/esm/set-attributes_2.entry.js +4 -2
- package/dist/esm/set-attributes_2.entry.js.map +1 -1
- package/dist/esm/six-alert.entry.js +18 -23
- package/dist/esm/six-alert.entry.js.map +1 -1
- package/dist/esm/six-avatar.entry.js +5 -8
- package/dist/esm/six-avatar.entry.js.map +1 -1
- package/dist/esm/six-badge.entry.js +2 -2
- package/dist/esm/six-badge.entry.js.map +1 -1
- package/dist/esm/six-button.entry.js +36 -34
- package/dist/esm/six-button.entry.js.map +1 -1
- package/dist/esm/six-card.entry.js +1 -1
- package/dist/esm/six-card.entry.js.map +1 -1
- package/dist/esm/six-checkbox.entry.js +50 -85
- package/dist/esm/six-checkbox.entry.js.map +1 -1
- package/dist/esm/six-datepicker.entry.js +152 -278
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +48 -47
- package/dist/esm/six-details.entry.js.map +1 -1
- package/dist/esm/six-dialog.entry.js +37 -41
- package/dist/esm/six-dialog.entry.js.map +1 -1
- package/dist/esm/six-drawer.entry.js +34 -38
- package/dist/esm/six-drawer.entry.js.map +1 -1
- package/dist/esm/six-dropdown_2.entry.js +215 -196
- package/dist/esm/six-dropdown_2.entry.js.map +1 -1
- package/dist/esm/six-error-page.entry.js +20 -22
- package/dist/esm/six-error-page.entry.js.map +1 -1
- package/dist/esm/six-file-list-item.entry.js +2 -2
- package/dist/esm/six-file-list-item.entry.js.map +1 -1
- package/dist/esm/six-file-list.entry.js +1 -1
- package/dist/esm/six-file-list.entry.js.map +1 -1
- package/dist/esm/six-file-upload.entry.js +21 -21
- package/dist/esm/six-file-upload.entry.js.map +1 -1
- package/dist/esm/six-footer.entry.js +1 -1
- package/dist/esm/six-footer.entry.js.map +1 -1
- package/dist/esm/six-group-label.entry.js +12 -11
- package/dist/esm/six-group-label.entry.js.map +1 -1
- package/dist/esm/six-header.entry.js +66 -44
- package/dist/esm/six-header.entry.js.map +1 -1
- package/dist/esm/six-icon-button.entry.js +4 -4
- package/dist/esm/six-icon-button.entry.js.map +1 -1
- package/dist/esm/six-icon.entry.js +1 -1
- package/dist/esm/six-icon.entry.js.map +1 -1
- package/dist/esm/six-input.entry.js +95 -128
- package/dist/esm/six-input.entry.js.map +1 -1
- package/dist/esm/six-item-picker.entry.js +62 -81
- package/dist/esm/six-item-picker.entry.js.map +1 -1
- package/dist/esm/six-language-switcher.entry.js +2 -2
- package/dist/esm/six-language-switcher.entry.js.map +1 -1
- package/dist/esm/six-layout-grid.entry.js +5 -3
- package/dist/esm/six-layout-grid.entry.js.map +1 -1
- package/dist/esm/six-main-container.entry.js +1 -1
- package/dist/esm/six-main-container.entry.js.map +1 -1
- package/dist/esm/six-menu-divider.entry.js +1 -1
- package/dist/esm/six-menu-divider.entry.js.map +1 -1
- package/dist/esm/six-menu-item.entry.js +9 -7
- package/dist/esm/six-menu-item.entry.js.map +1 -1
- package/dist/esm/six-menu-label.entry.js +1 -1
- package/dist/esm/six-menu-label.entry.js.map +1 -1
- package/dist/esm/six-picto.entry.js +5 -2
- package/dist/esm/six-picto.entry.js.map +1 -1
- package/dist/esm/six-progress-bar.entry.js +1 -1
- package/dist/esm/six-progress-bar.entry.js.map +1 -1
- package/dist/esm/six-progress-ring.entry.js +4 -4
- package/dist/esm/six-progress-ring.entry.js.map +1 -1
- package/dist/esm/six-radio.entry.js +63 -72
- package/dist/esm/six-radio.entry.js.map +1 -1
- package/dist/esm/six-range.entry.js +107 -106
- package/dist/esm/six-range.entry.js.map +1 -1
- package/dist/esm/six-root.entry.js +2 -2
- package/dist/esm/six-root.entry.js.map +1 -1
- package/dist/esm/six-search-field.entry.js +11 -6
- package/dist/esm/six-search-field.entry.js.map +1 -1
- package/dist/esm/six-select.entry.js +190 -223
- package/dist/esm/six-select.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item-group.entry.js +10 -6
- package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item.entry.js +1 -1
- package/dist/esm/six-sidebar-item.entry.js.map +1 -1
- package/dist/esm/six-sidebar.entry.js +41 -20
- package/dist/esm/six-sidebar.entry.js.map +1 -1
- package/dist/esm/six-spinner.entry.js +1 -1
- package/dist/esm/six-spinner.entry.js.map +1 -1
- package/dist/esm/six-switch.entry.js +58 -64
- package/dist/esm/six-switch.entry.js.map +1 -1
- package/dist/esm/six-tab-group.entry.js +132 -114
- package/dist/esm/six-tab-group.entry.js.map +1 -1
- package/dist/esm/six-tab-panel.entry.js +2 -2
- package/dist/esm/six-tab-panel.entry.js.map +1 -1
- package/dist/esm/six-tab.entry.js +5 -3
- package/dist/esm/six-tab.entry.js.map +1 -1
- package/dist/esm/six-tag.entry.js +6 -9
- package/dist/esm/six-tag.entry.js.map +1 -1
- package/dist/esm/six-textarea.entry.js +82 -108
- package/dist/esm/six-textarea.entry.js.map +1 -1
- package/dist/esm/six-tile.entry.js +14 -17
- package/dist/esm/six-tile.entry.js.map +1 -1
- package/dist/esm/six-timepicker.entry.js +159 -215
- package/dist/esm/six-timepicker.entry.js.map +1 -1
- package/dist/esm/six-tooltip.entry.js +54 -57
- package/dist/esm/six-tooltip.entry.js.map +1 -1
- package/dist/esm/{slot-6f3984c7.js → slot-ad36df3a.js} +11 -10
- package/dist/esm/slot-ad36df3a.js.map +1 -0
- package/dist/esm/{types-4b10b413.js → types-59b455aa.js} +1 -1
- package/dist/esm/types-59b455aa.js.map +1 -0
- package/dist/esm/ui-library.js +4 -7
- package/dist/esm/ui-library.js.map +1 -1
- package/dist/types/components/six-alert/six-alert.d.ts +5 -7
- package/dist/types/components/six-avatar/six-avatar.d.ts +1 -2
- package/dist/types/components/six-badge/six-badge.d.ts +0 -1
- package/dist/types/components/six-button/six-button.d.ts +8 -9
- package/dist/types/components/six-checkbox/six-checkbox.d.ts +23 -35
- package/dist/types/components/six-datepicker/components/day-selection.d.ts +9 -5
- package/dist/types/components/six-datepicker/components/month-selection.d.ts +8 -5
- package/dist/types/components/six-datepicker/components/year-selection.d.ts +7 -5
- package/dist/types/components/six-datepicker/six-datepicker.d.ts +41 -52
- package/dist/types/components/six-details/six-details.d.ts +12 -12
- package/dist/types/components/six-dialog/six-dialog.d.ts +12 -13
- package/dist/types/components/six-drawer/six-drawer.d.ts +12 -13
- package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -32
- package/dist/types/components/six-error-page/six-error-page.d.ts +1 -1
- package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +3 -3
- package/dist/types/components/six-file-upload/six-file-upload.d.ts +11 -11
- package/dist/types/components/six-group-label/six-group-label.d.ts +5 -5
- package/dist/types/components/six-header/six-header.d.ts +16 -27
- package/dist/types/components/six-icon-button/six-icon-button.d.ts +4 -4
- package/dist/types/components/six-input/six-input.d.ts +32 -67
- package/dist/types/components/six-item-picker/six-item-picker.d.ts +13 -16
- package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +1 -1
- package/dist/types/components/six-menu/six-menu.d.ts +10 -11
- package/dist/types/components/six-menu-item/six-menu-item.d.ts +6 -6
- package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +2 -2
- package/dist/types/components/six-radio/six-radio.d.ts +14 -25
- package/dist/types/components/six-range/six-range.d.ts +27 -38
- package/dist/types/components/six-root/six-root.d.ts +3 -3
- package/dist/types/components/six-search-field/six-search-field.d.ts +4 -5
- package/dist/types/components/six-select/six-select.d.ts +41 -58
- package/dist/types/components/six-select/util.d.ts +7 -0
- package/dist/types/components/six-sidebar/six-sidebar.d.ts +5 -5
- package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +7 -6
- package/dist/types/components/six-spinner/six-spinner.d.ts +2 -2
- package/dist/types/components/six-switch/six-switch.d.ts +18 -21
- package/dist/types/components/six-tab/six-tab.d.ts +3 -3
- package/dist/types/components/six-tab-group/six-tab-group.d.ts +20 -21
- package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +1 -1
- package/dist/types/components/six-tag/six-tag.d.ts +1 -3
- package/dist/types/components/six-textarea/six-textarea.d.ts +27 -55
- package/dist/types/components/six-tile/six-tile.d.ts +2 -3
- package/dist/types/components/six-timepicker/six-timepicker.d.ts +26 -43
- package/dist/types/components/six-tooltip/six-tooltip.d.ts +19 -21
- package/dist/types/components.d.ts +209 -452
- package/dist/types/functional-components/form-control/form-control.d.ts +5 -6
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +15 -2
- package/dist/types/testUtil/delay.d.ts +1 -1
- package/dist/types/types.d.ts +2 -0
- package/dist/types/utils/date-util.d.ts +18 -10
- package/dist/types/utils/error-messages.d.ts +42 -0
- package/dist/types/utils/event-listeners.d.ts +4 -3
- package/dist/types/utils/execution-control.d.ts +1 -3
- package/dist/types/utils/form.d.ts +1 -0
- package/dist/types/utils/modal.d.ts +2 -2
- package/dist/types/utils/popover.d.ts +5 -5
- package/dist/types/utils/popup.d.ts +9 -0
- package/dist/types/utils/slot.d.ts +2 -7
- package/dist/types/utils/tabbable.d.ts +1 -1
- package/dist/types/utils/time.util.d.ts +18 -9
- package/dist/types/utils/type-check.d.ts +3 -4
- package/dist/types/wrappers/set-attributes/set-attributes.d.ts +1 -1
- package/dist/ui-library/index.esm.js +1 -1
- package/dist/ui-library/index.esm.js.map +1 -1
- package/dist/ui-library/p-02981b91.entry.js +2 -0
- package/dist/ui-library/p-02981b91.entry.js.map +1 -0
- package/dist/ui-library/{p-25a3bf57.js → p-0f510624.js} +1 -1
- package/dist/ui-library/p-0f510624.js.map +1 -0
- package/dist/ui-library/p-0fdb185d.js +2 -0
- package/dist/ui-library/p-0fdb185d.js.map +1 -0
- package/dist/ui-library/{p-611e1978.entry.js → p-1256cc0a.entry.js} +2 -2
- package/dist/ui-library/p-1256cc0a.entry.js.map +1 -0
- package/dist/ui-library/{p-19364560.entry.js → p-13b43e04.entry.js} +2 -2
- package/dist/ui-library/p-13b43e04.entry.js.map +1 -0
- package/dist/ui-library/p-15559d38.js +2 -0
- package/dist/ui-library/p-15559d38.js.map +1 -0
- package/dist/ui-library/p-19ed7a4c.entry.js +2 -0
- package/dist/ui-library/p-19ed7a4c.entry.js.map +1 -0
- package/dist/ui-library/{p-97323ad7.entry.js → p-1d5ee1a0.entry.js} +2 -2
- package/dist/ui-library/p-1d5ee1a0.entry.js.map +1 -0
- package/dist/ui-library/{p-eb8f05a9.js → p-1f18768a.js} +1 -1
- package/dist/ui-library/p-1f18768a.js.map +1 -0
- package/dist/ui-library/p-21b3b321.entry.js +2 -0
- package/dist/ui-library/p-21b3b321.entry.js.map +1 -0
- package/dist/ui-library/p-264d4ea8.entry.js +2 -0
- package/dist/ui-library/p-264d4ea8.entry.js.map +1 -0
- package/dist/ui-library/{p-c30f9e0b.entry.js → p-29ac3d7d.entry.js} +2 -2
- package/dist/ui-library/p-29ac3d7d.entry.js.map +1 -0
- package/dist/ui-library/p-314b2096.entry.js +2 -0
- package/dist/ui-library/p-314b2096.entry.js.map +1 -0
- package/dist/ui-library/p-330a4988.entry.js +2 -0
- package/dist/ui-library/p-330a4988.entry.js.map +1 -0
- package/dist/ui-library/{p-21859bca.entry.js → p-346f9557.entry.js} +2 -2
- package/dist/ui-library/p-346f9557.entry.js.map +1 -0
- package/dist/ui-library/p-37557787.entry.js +2 -0
- package/dist/ui-library/p-37557787.entry.js.map +1 -0
- package/dist/ui-library/{p-baa03951.entry.js → p-3cc5addb.entry.js} +2 -2
- package/dist/ui-library/p-3cc5addb.entry.js.map +1 -0
- package/dist/ui-library/p-3d9de119.entry.js +2 -0
- package/dist/ui-library/p-3d9de119.entry.js.map +1 -0
- package/dist/ui-library/p-411ed539.entry.js +2 -0
- package/dist/ui-library/p-411ed539.entry.js.map +1 -0
- package/dist/ui-library/p-4705a51e.entry.js +2 -0
- package/dist/ui-library/p-4705a51e.entry.js.map +1 -0
- package/dist/ui-library/p-4abed9df.entry.js +2 -0
- package/dist/ui-library/p-4abed9df.entry.js.map +1 -0
- package/dist/ui-library/p-5654e4c7.js +2 -0
- package/dist/ui-library/p-5654e4c7.js.map +1 -0
- package/dist/ui-library/p-59210f0b.js +2 -0
- package/dist/ui-library/p-59210f0b.js.map +1 -0
- package/dist/ui-library/{p-19b50b5a.entry.js → p-5af44076.entry.js} +2 -2
- package/dist/ui-library/p-5af44076.entry.js.map +1 -0
- package/dist/ui-library/p-5d6b7353.entry.js +2 -0
- package/dist/ui-library/p-5d6b7353.entry.js.map +1 -0
- package/dist/ui-library/{p-097cced4.entry.js → p-613283a7.entry.js} +2 -2
- package/dist/ui-library/p-613283a7.entry.js.map +1 -0
- package/dist/ui-library/p-6153045b.js +3 -0
- package/dist/ui-library/p-6153045b.js.map +1 -0
- package/dist/ui-library/{p-e19a6c95.entry.js → p-6197fe2f.entry.js} +2 -2
- package/dist/ui-library/p-6197fe2f.entry.js.map +1 -0
- package/dist/ui-library/p-698bb2c8.js +2 -0
- package/dist/ui-library/p-698bb2c8.js.map +1 -0
- package/dist/ui-library/{p-d5633a29.entry.js → p-72254eef.entry.js} +2 -2
- package/dist/ui-library/p-72254eef.entry.js.map +1 -0
- package/dist/ui-library/p-724875b0.entry.js +2 -0
- package/dist/ui-library/p-724875b0.entry.js.map +1 -0
- package/dist/ui-library/{p-dd3c76f1.entry.js → p-7afafb9d.entry.js} +2 -2
- package/dist/ui-library/p-7afafb9d.entry.js.map +1 -0
- package/dist/ui-library/p-7d95def3.js +2 -0
- package/dist/ui-library/p-7d95def3.js.map +1 -0
- package/dist/ui-library/{p-63703ba3.entry.js → p-7e3ad38a.entry.js} +2 -2
- package/dist/ui-library/p-7e3ad38a.entry.js.map +1 -0
- package/dist/ui-library/p-83864cfe.entry.js +2 -0
- package/dist/ui-library/p-83864cfe.entry.js.map +1 -0
- package/dist/ui-library/{p-9328e5bc.entry.js → p-878226a0.entry.js} +2 -2
- package/dist/ui-library/p-878226a0.entry.js.map +1 -0
- package/dist/ui-library/p-8c0971e0.js +2 -0
- package/dist/ui-library/p-8c0971e0.js.map +1 -0
- package/dist/ui-library/p-91b51800.entry.js +2 -0
- package/dist/ui-library/p-91b51800.entry.js.map +1 -0
- package/dist/ui-library/p-95fbdd0b.entry.js +2 -0
- package/dist/ui-library/p-95fbdd0b.entry.js.map +1 -0
- package/dist/ui-library/p-99e24daf.entry.js +2 -0
- package/dist/ui-library/p-99e24daf.entry.js.map +1 -0
- package/dist/ui-library/{p-4f8394d7.js → p-9ace84c7.js} +2 -2
- package/dist/ui-library/p-9ace84c7.js.map +1 -0
- package/dist/ui-library/p-9b354f5d.entry.js +2 -0
- package/dist/ui-library/p-9b354f5d.entry.js.map +1 -0
- package/dist/ui-library/{p-c349d1d4.entry.js → p-9c1be3fb.entry.js} +2 -2
- package/dist/ui-library/p-9c1be3fb.entry.js.map +1 -0
- package/dist/ui-library/p-9f0b43f9.entry.js +2 -0
- package/dist/ui-library/p-9f0b43f9.entry.js.map +1 -0
- package/dist/ui-library/{p-af793d04.entry.js → p-a0f290d0.entry.js} +2 -2
- package/dist/ui-library/p-a0f290d0.entry.js.map +1 -0
- package/dist/ui-library/p-a55c7258.entry.js +2 -0
- package/dist/ui-library/p-a55c7258.entry.js.map +1 -0
- package/dist/ui-library/{p-6d75f216.entry.js → p-a6a9ee96.entry.js} +2 -2
- package/dist/ui-library/p-a6a9ee96.entry.js.map +1 -0
- package/dist/ui-library/{p-73597d13.entry.js → p-ac099e6b.entry.js} +2 -2
- package/dist/ui-library/p-ac099e6b.entry.js.map +1 -0
- package/dist/ui-library/p-ae601a0f.entry.js +2 -0
- package/dist/ui-library/p-ae601a0f.entry.js.map +1 -0
- package/dist/ui-library/p-b351f889.entry.js +2 -0
- package/dist/ui-library/p-b351f889.entry.js.map +1 -0
- package/dist/ui-library/{p-6433c0da.entry.js → p-b550a258.entry.js} +2 -2
- package/dist/ui-library/p-b550a258.entry.js.map +1 -0
- package/dist/ui-library/{p-90dc6af4.entry.js → p-bf87464b.entry.js} +2 -2
- package/dist/ui-library/p-bf87464b.entry.js.map +1 -0
- package/dist/ui-library/p-c03ebf7d.entry.js +2 -0
- package/dist/ui-library/p-c03ebf7d.entry.js.map +1 -0
- package/dist/ui-library/{p-a1d4f6cf.entry.js → p-cd67da3d.entry.js} +2 -2
- package/dist/ui-library/p-cd67da3d.entry.js.map +1 -0
- package/dist/ui-library/p-cdaed936.entry.js +2 -0
- package/dist/ui-library/p-cdaed936.entry.js.map +1 -0
- package/dist/ui-library/{p-8a970a40.entry.js → p-d367f4f9.entry.js} +2 -2
- package/dist/ui-library/p-d367f4f9.entry.js.map +1 -0
- package/dist/ui-library/p-d42c2025.js +2 -0
- package/dist/ui-library/p-d42c2025.js.map +1 -0
- package/dist/ui-library/{p-820c23f0.entry.js → p-dfed33c5.entry.js} +2 -2
- package/dist/ui-library/p-dfed33c5.entry.js.map +1 -0
- package/dist/ui-library/p-ed381ad9.entry.js +2 -0
- package/dist/ui-library/p-ed381ad9.entry.js.map +1 -0
- package/dist/ui-library/p-ee8342e1.entry.js +2 -0
- package/dist/ui-library/p-ee8342e1.entry.js.map +1 -0
- package/dist/ui-library/p-ee950ce2.entry.js +2 -0
- package/dist/ui-library/p-ee950ce2.entry.js.map +1 -0
- package/dist/ui-library/{p-7e0cc4ae.entry.js → p-ff90ffd1.entry.js} +2 -2
- package/dist/ui-library/p-ff90ffd1.entry.js.map +1 -0
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -1
- package/loader/index.d.ts +1 -1
- package/package.json +19 -20
- package/dist/cjs/event-listeners-74715e62.js +0 -45
- package/dist/cjs/event-listeners-74715e62.js.map +0 -1
- package/dist/cjs/execution-control-46f388e0.js.map +0 -1
- package/dist/cjs/focus-visible-0b352c74.js.map +0 -1
- package/dist/cjs/form-control-2c17c573.js.map +0 -1
- package/dist/cjs/index-2f6daa5b.js.map +0 -1
- package/dist/cjs/modal-48d42228.js.map +0 -1
- package/dist/cjs/popover-f743f62b.js.map +0 -1
- package/dist/cjs/scroll-76e6f5d7.js.map +0 -1
- package/dist/cjs/six-form.cjs.entry.js +0 -231
- package/dist/cjs/six-form.cjs.entry.js.map +0 -1
- package/dist/cjs/six-timepicker.types-c19ebff3.js +0 -56
- package/dist/cjs/six-timepicker.types-c19ebff3.js.map +0 -1
- package/dist/cjs/slot-ad537f24.js.map +0 -1
- package/dist/cjs/types-64878648.js.map +0 -1
- package/dist/collection/components/six-form/six-form.css +0 -11
- package/dist/collection/components/six-form/six-form.js +0 -419
- package/dist/collection/components/six-form/six-form.js.map +0 -1
- package/dist/collection/components/six-timepicker/six-time-format.js +0 -15
- package/dist/collection/components/six-timepicker/six-time-format.js.map +0 -1
- package/dist/collection/components/six-timepicker/six-timepicker.types.js +0 -41
- package/dist/collection/components/six-timepicker/six-timepicker.types.js.map +0 -1
- package/dist/collection/utils/as-array.js +0 -2
- package/dist/collection/utils/as-array.js.map +0 -1
- package/dist/collection/utils/matchers.js +0 -3
- package/dist/collection/utils/matchers.js.map +0 -1
- package/dist/collection/utils/testing.js +0 -39
- package/dist/collection/utils/testing.js.map +0 -1
- package/dist/components/six-form.d.ts +0 -11
- package/dist/components/six-form.js +0 -252
- package/dist/components/six-form.js.map +0 -1
- package/dist/esm/event-listeners-570a24ea.js +0 -43
- package/dist/esm/event-listeners-570a24ea.js.map +0 -1
- package/dist/esm/execution-control-1a60d709.js.map +0 -1
- package/dist/esm/focus-visible-97933ea9.js.map +0 -1
- package/dist/esm/form-control-3b440ea1.js.map +0 -1
- package/dist/esm/index-5c0f6628.js.map +0 -1
- package/dist/esm/modal-5ebdc320.js.map +0 -1
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/popover-bd2c2fca.js.map +0 -1
- package/dist/esm/scroll-180b53fd.js.map +0 -1
- package/dist/esm/six-form.entry.js +0 -227
- package/dist/esm/six-form.entry.js.map +0 -1
- package/dist/esm/six-timepicker.types-e161a447.js +0 -50
- package/dist/esm/six-timepicker.types-e161a447.js.map +0 -1
- package/dist/esm/slot-6f3984c7.js.map +0 -1
- package/dist/esm/types-4b10b413.js.map +0 -1
- package/dist/types/components/six-form/six-form.d.ts +0 -69
- package/dist/types/components/six-timepicker/six-time-format.d.ts +0 -13
- package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +0 -36
- package/dist/types/utils/as-array.d.ts +0 -1
- package/dist/types/utils/matchers.d.ts +0 -2
- package/dist/types/utils/popper.d.ts +0 -33
- package/dist/types/utils/testing.d.ts +0 -2
- package/dist/ui-library/p-054e12cc.entry.js +0 -2
- package/dist/ui-library/p-054e12cc.entry.js.map +0 -1
- package/dist/ui-library/p-0786fa7c.js +0 -2
- package/dist/ui-library/p-0786fa7c.js.map +0 -1
- package/dist/ui-library/p-097cced4.entry.js.map +0 -1
- package/dist/ui-library/p-0d79b0c6.entry.js +0 -2
- package/dist/ui-library/p-0d79b0c6.entry.js.map +0 -1
- package/dist/ui-library/p-14f20bbb.entry.js +0 -2
- package/dist/ui-library/p-14f20bbb.entry.js.map +0 -1
- package/dist/ui-library/p-18e5f772.entry.js +0 -2
- package/dist/ui-library/p-18e5f772.entry.js.map +0 -1
- package/dist/ui-library/p-18ea0c56.js +0 -2
- package/dist/ui-library/p-18ea0c56.js.map +0 -1
- package/dist/ui-library/p-19364560.entry.js.map +0 -1
- package/dist/ui-library/p-19b50b5a.entry.js.map +0 -1
- package/dist/ui-library/p-21859bca.entry.js.map +0 -1
- package/dist/ui-library/p-25a3bf57.js.map +0 -1
- package/dist/ui-library/p-2e48c8d2.entry.js +0 -2
- package/dist/ui-library/p-2e48c8d2.entry.js.map +0 -1
- package/dist/ui-library/p-308261c4.entry.js +0 -2
- package/dist/ui-library/p-308261c4.entry.js.map +0 -1
- package/dist/ui-library/p-33f7e22b.entry.js +0 -2
- package/dist/ui-library/p-33f7e22b.entry.js.map +0 -1
- package/dist/ui-library/p-4ae91795.entry.js +0 -2
- package/dist/ui-library/p-4ae91795.entry.js.map +0 -1
- package/dist/ui-library/p-4f8394d7.js.map +0 -1
- package/dist/ui-library/p-53a13db5.entry.js +0 -2
- package/dist/ui-library/p-53a13db5.entry.js.map +0 -1
- package/dist/ui-library/p-559c87f0.entry.js +0 -2
- package/dist/ui-library/p-559c87f0.entry.js.map +0 -1
- package/dist/ui-library/p-611e1978.entry.js.map +0 -1
- package/dist/ui-library/p-63703ba3.entry.js.map +0 -1
- package/dist/ui-library/p-6403fd87.entry.js +0 -2
- package/dist/ui-library/p-6403fd87.entry.js.map +0 -1
- package/dist/ui-library/p-6433c0da.entry.js.map +0 -1
- package/dist/ui-library/p-6d75f216.entry.js.map +0 -1
- package/dist/ui-library/p-73597d13.entry.js.map +0 -1
- package/dist/ui-library/p-79eee01b.js +0 -2
- package/dist/ui-library/p-79eee01b.js.map +0 -1
- package/dist/ui-library/p-7e0cc4ae.entry.js.map +0 -1
- package/dist/ui-library/p-820c23f0.entry.js.map +0 -1
- package/dist/ui-library/p-835c3ff7.entry.js +0 -2
- package/dist/ui-library/p-835c3ff7.entry.js.map +0 -1
- package/dist/ui-library/p-8a970a40.entry.js.map +0 -1
- package/dist/ui-library/p-90824648.entry.js +0 -2
- package/dist/ui-library/p-90824648.entry.js.map +0 -1
- package/dist/ui-library/p-90dc6af4.entry.js.map +0 -1
- package/dist/ui-library/p-9328e5bc.entry.js.map +0 -1
- package/dist/ui-library/p-97323ad7.entry.js.map +0 -1
- package/dist/ui-library/p-9a860acc.js +0 -2
- package/dist/ui-library/p-9a860acc.js.map +0 -1
- package/dist/ui-library/p-9d1d222f.entry.js +0 -2
- package/dist/ui-library/p-9d1d222f.entry.js.map +0 -1
- package/dist/ui-library/p-a1d4f6cf.entry.js.map +0 -1
- package/dist/ui-library/p-ac4f4d45.js +0 -3
- package/dist/ui-library/p-ac4f4d45.js.map +0 -1
- package/dist/ui-library/p-af793d04.entry.js.map +0 -1
- package/dist/ui-library/p-b0e5658f.entry.js +0 -2
- package/dist/ui-library/p-b0e5658f.entry.js.map +0 -1
- package/dist/ui-library/p-b1e66136.js +0 -2
- package/dist/ui-library/p-b1e66136.js.map +0 -1
- package/dist/ui-library/p-b4dfb7cf.js +0 -2
- package/dist/ui-library/p-b4dfb7cf.js.map +0 -1
- package/dist/ui-library/p-b997e43c.entry.js +0 -2
- package/dist/ui-library/p-b997e43c.entry.js.map +0 -1
- package/dist/ui-library/p-baa03951.entry.js.map +0 -1
- package/dist/ui-library/p-c0cb6436.entry.js +0 -2
- package/dist/ui-library/p-c0cb6436.entry.js.map +0 -1
- package/dist/ui-library/p-c30f9e0b.entry.js.map +0 -1
- package/dist/ui-library/p-c349d1d4.entry.js.map +0 -1
- package/dist/ui-library/p-c53a63f9.entry.js +0 -2
- package/dist/ui-library/p-c53a63f9.entry.js.map +0 -1
- package/dist/ui-library/p-c640c2d8.entry.js +0 -2
- package/dist/ui-library/p-c640c2d8.entry.js.map +0 -1
- package/dist/ui-library/p-c94d0b07.entry.js +0 -2
- package/dist/ui-library/p-c94d0b07.entry.js.map +0 -1
- package/dist/ui-library/p-d12c6092.js +0 -2
- package/dist/ui-library/p-d12c6092.js.map +0 -1
- package/dist/ui-library/p-d5633a29.entry.js.map +0 -1
- package/dist/ui-library/p-dd3c76f1.entry.js.map +0 -1
- package/dist/ui-library/p-df655bc9.entry.js +0 -2
- package/dist/ui-library/p-df655bc9.entry.js.map +0 -1
- package/dist/ui-library/p-e19a6c95.entry.js.map +0 -1
- package/dist/ui-library/p-eb8f05a9.js.map +0 -1
- package/dist/ui-library/p-edc96efc.entry.js +0 -2
- package/dist/ui-library/p-edc96efc.entry.js.map +0 -1
- package/dist/ui-library/p-f18ba86f.entry.js +0 -2
- package/dist/ui-library/p-f18ba86f.entry.js.map +0 -1
- package/dist/ui-library/p-f4938771.entry.js +0 -2
- package/dist/ui-library/p-f4938771.entry.js.map +0 -1
- package/dist/ui-library/p-f70e2403.entry.js +0 -2
- package/dist/ui-library/p-f70e2403.entry.js.map +0 -1
- package/dist/ui-library/p-f9d345e0.entry.js +0 -2
- package/dist/ui-library/p-f9d345e0.entry.js.map +0 -1
- package/dist/ui-library/p-fed07a1f.entry.js +0 -2
- package/dist/ui-library/p-fed07a1f.entry.js.map +0 -1
- package/dist/ui-library/p-ff0257bf.entry.js +0 -2
- package/dist/ui-library/p-ff0257bf.entry.js.map +0 -1
|
@@ -1,51 +1,26 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { I as ItemPickerType, a as ItemPickerPaddingDirection } from './types-
|
|
3
|
-
import { D as DEFAULT_DEBOUNCE_FAST, b as DEFAULT_DEBOUNCE_INSANELY_FAST, a as debounce } from './execution-control-
|
|
4
|
-
import { E as EventListeners } from './event-listeners-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-8a74f992.js';
|
|
2
|
+
import { I as ItemPickerType, a as ItemPickerPaddingDirection } from './types-59b455aa.js';
|
|
3
|
+
import { D as DEFAULT_DEBOUNCE_FAST, b as DEFAULT_DEBOUNCE_INSANELY_FAST, a as debounce } from './execution-control-e0892a05.js';
|
|
4
|
+
import { E as EventListeners } from './event-listeners-f6e5b0ab.js';
|
|
5
5
|
|
|
6
6
|
const sixItemPickerCss = ".item_picker__container{width:2.5em;display:flex;flex-wrap:wrap;justify-content:center}.item_picker__content{font-size:1.5rem}.item_picker__btn{cursor:pointer;width:2.5em;height:2.5em;display:flex;vertical-align:middle;align-items:center;justify-content:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--six-color-web-rock-500)}.item_picker__btn:hover{background-color:var(--six-color-web-rock-100);border-radius:100%}.item_picker__btn:active{color:var(--six-color-web-rock-400)}.item_picker__btn--disabled{color:var(--six-color-web-rock-300);cursor:not-allowed}.item_picker__btn--disabled:hover{background-color:initial}.item_picker__btn--disabled:active{color:var(--six-color-web-rock-300)}";
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const letterIndexes = {};
|
|
23
|
-
for (let i = 0; i < CAPITAL_ALPHABET.alphabet.length; i++) {
|
|
24
|
-
const lowercaseCharacter = CAPITAL_ALPHABET.alphabet[i].toLowerCase();
|
|
25
|
-
letterIndexes[lowercaseCharacter] = alphabet.length;
|
|
26
|
-
alphabet.push(lowercaseCharacter);
|
|
27
|
-
}
|
|
28
|
-
return { alphabet, letterIndexes };
|
|
29
|
-
})();
|
|
30
|
-
const ALPHABET = (() => {
|
|
31
|
-
const alphabet = [];
|
|
32
|
-
const letterIndexes = {};
|
|
33
|
-
for (let i = 0; i < CAPITAL_ALPHABET.alphabet.length; i++) {
|
|
34
|
-
const capitalCharacter = CAPITAL_ALPHABET.alphabet[i];
|
|
35
|
-
letterIndexes[capitalCharacter] = alphabet.length;
|
|
36
|
-
alphabet.push(capitalCharacter);
|
|
37
|
-
const lowerCharacter = LOWERCASE_ALPHABET.alphabet[i];
|
|
38
|
-
letterIndexes[lowerCharacter] = alphabet.length;
|
|
39
|
-
alphabet.push(lowerCharacter);
|
|
40
|
-
}
|
|
41
|
-
return { alphabet, letterIndexes };
|
|
42
|
-
})();
|
|
8
|
+
const uppercaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
9
|
+
const upperAndLowercaseLetters = [...uppercaseLetters].flatMap((c) => [c, c.toLowerCase()]);
|
|
10
|
+
const ALPHABET = {
|
|
11
|
+
alphabet: upperAndLowercaseLetters,
|
|
12
|
+
letterIndexes: Object.fromEntries(upperAndLowercaseLetters.map((c, i) => [c, i])),
|
|
13
|
+
};
|
|
14
|
+
const CAPITAL_ALPHABET = {
|
|
15
|
+
alphabet: [...uppercaseLetters].flatMap((c) => [c]),
|
|
16
|
+
letterIndexes: Object.fromEntries([...uppercaseLetters].map((c, i) => [c, i])),
|
|
17
|
+
};
|
|
18
|
+
const LOWERCASE_ALPHABET = {
|
|
19
|
+
alphabet: [...uppercaseLetters.toLowerCase()].flatMap((c) => [c]),
|
|
20
|
+
letterIndexes: Object.fromEntries([...uppercaseLetters.toLowerCase()].map((c, i) => [c, i])),
|
|
21
|
+
};
|
|
43
22
|
const createItemIndexes = (arr) => {
|
|
44
|
-
|
|
45
|
-
for (let i = 0; i < (arr === null || arr === void 0 ? void 0 : arr.length); i++) {
|
|
46
|
-
itemIndexes[arr[i]] = i;
|
|
47
|
-
}
|
|
48
|
-
return itemIndexes;
|
|
23
|
+
return Object.fromEntries([...arr].map((c, i) => [c, i]));
|
|
49
24
|
};
|
|
50
25
|
const TAG = `[SIX-ITEM-PICKER]`;
|
|
51
26
|
const subtract = (a, b) => a - b;
|
|
@@ -75,7 +50,7 @@ const SixItemPicker = class {
|
|
|
75
50
|
this.interval = DEFAULT_DEBOUNCE_INSANELY_FAST;
|
|
76
51
|
this.debounce = DEFAULT_DEBOUNCE_FAST;
|
|
77
52
|
this._items = [];
|
|
78
|
-
this._itemIndexes =
|
|
53
|
+
this._itemIndexes = {};
|
|
79
54
|
}
|
|
80
55
|
handleValueChange() {
|
|
81
56
|
this.setup();
|
|
@@ -115,11 +90,7 @@ const SixItemPicker = class {
|
|
|
115
90
|
}
|
|
116
91
|
}
|
|
117
92
|
setUpStringItems() {
|
|
118
|
-
this._items = this.
|
|
119
|
-
if (!this._items) {
|
|
120
|
-
console.warn(`${TAG}: abort setup because no items were found.`);
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
93
|
+
this._items = this.getStringItems();
|
|
123
94
|
this._itemIndexes = this.getItemIndexes();
|
|
124
95
|
const itemsMissValue = this._items.find((i) => String(i) === String(this.value)) === undefined;
|
|
125
96
|
if (itemsMissValue) {
|
|
@@ -146,23 +117,39 @@ const SixItemPicker = class {
|
|
|
146
117
|
getLastStringItem() {
|
|
147
118
|
return this._items[this._items.length - 1];
|
|
148
119
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
120
|
+
getStringItems() {
|
|
121
|
+
switch (this.type) {
|
|
122
|
+
case ItemPickerType.NUMBER:
|
|
123
|
+
console.warn(`${TAG}: unexpected type ${this.type}`);
|
|
124
|
+
return [];
|
|
125
|
+
case ItemPickerType.LETTER:
|
|
126
|
+
return ALPHABET.alphabet;
|
|
127
|
+
case ItemPickerType.CAPITAL_LETTER:
|
|
128
|
+
return CAPITAL_ALPHABET.alphabet;
|
|
129
|
+
case ItemPickerType.LOWER_LETTER:
|
|
130
|
+
return LOWERCASE_ALPHABET.alphabet;
|
|
131
|
+
case ItemPickerType.CUSTOM:
|
|
132
|
+
if (this.items == null || this.items.length === 0) {
|
|
133
|
+
console.warn(`${TAG}: no items defined for type ${this.type}`);
|
|
134
|
+
return [];
|
|
135
|
+
}
|
|
136
|
+
return this.items;
|
|
137
|
+
}
|
|
156
138
|
}
|
|
157
139
|
getItemIndexes() {
|
|
158
|
-
|
|
159
|
-
|
|
140
|
+
switch (this.type) {
|
|
141
|
+
case ItemPickerType.NUMBER:
|
|
142
|
+
console.warn(`${TAG}: unexpected type ${this.type}`);
|
|
143
|
+
return {};
|
|
144
|
+
case ItemPickerType.LETTER:
|
|
145
|
+
return ALPHABET.letterIndexes;
|
|
146
|
+
case ItemPickerType.CAPITAL_LETTER:
|
|
147
|
+
return CAPITAL_ALPHABET.letterIndexes;
|
|
148
|
+
case ItemPickerType.LOWER_LETTER:
|
|
149
|
+
return LOWERCASE_ALPHABET.letterIndexes;
|
|
150
|
+
case ItemPickerType.CUSTOM:
|
|
151
|
+
return createItemIndexes(this._items);
|
|
160
152
|
}
|
|
161
|
-
return {
|
|
162
|
-
[ItemPickerType.LETTER]: ALPHABET.letterIndexes,
|
|
163
|
-
[ItemPickerType.CAPITAL_LETTER]: CAPITAL_ALPHABET.letterIndexes,
|
|
164
|
-
[ItemPickerType.LOWER_LETTER]: LOWERCASE_ALPHABET.letterIndexes,
|
|
165
|
-
}[this.type];
|
|
166
153
|
}
|
|
167
154
|
previousItem() {
|
|
168
155
|
if (this.isNumber()) {
|
|
@@ -182,13 +169,13 @@ const SixItemPicker = class {
|
|
|
182
169
|
});
|
|
183
170
|
}
|
|
184
171
|
previousStringItem() {
|
|
185
|
-
const value = this.value;
|
|
186
|
-
const minLetter = this.min;
|
|
172
|
+
const value = String(this.value);
|
|
173
|
+
const minLetter = String(this.min);
|
|
187
174
|
this.changeValue({
|
|
188
175
|
isNextItemAllowed: () => minLetter === undefined || this.getStringItemIndex(value) > this.getStringItemIndex(minLetter),
|
|
189
176
|
getNextItem: () => this.getNextItemByOperation(subtract),
|
|
190
|
-
getRoundtripItem: () => this.max,
|
|
191
|
-
isRoundtripPossible: () => this.max
|
|
177
|
+
getRoundtripItem: () => String(this.max),
|
|
178
|
+
isRoundtripPossible: () => this.max == null && this.roundtrip,
|
|
192
179
|
});
|
|
193
180
|
}
|
|
194
181
|
nextItem() {
|
|
@@ -212,17 +199,17 @@ const SixItemPicker = class {
|
|
|
212
199
|
return this._itemIndexes[char];
|
|
213
200
|
}
|
|
214
201
|
nextStringItem() {
|
|
215
|
-
const value = this.value;
|
|
216
|
-
const maxLetter = this.max;
|
|
202
|
+
const value = String(this.value);
|
|
203
|
+
const maxLetter = String(this.max);
|
|
217
204
|
this.changeValue({
|
|
218
205
|
isNextItemAllowed: () => maxLetter === undefined || this.getStringItemIndex(value) < this.getStringItemIndex(maxLetter),
|
|
219
206
|
getNextItem: () => this.getNextItemByOperation(add),
|
|
220
|
-
getRoundtripItem: () => this.min,
|
|
207
|
+
getRoundtripItem: () => String(this.min),
|
|
221
208
|
isRoundtripPossible: () => this.min === undefined && this.roundtrip,
|
|
222
209
|
});
|
|
223
210
|
}
|
|
224
211
|
getNextItemByOperation(operation) {
|
|
225
|
-
const value = this.value;
|
|
212
|
+
const value = String(this.value);
|
|
226
213
|
const nextIndexCandidate = operation(this.getStringItemIndex(value), this.step);
|
|
227
214
|
const numberOfItems = this._items.length;
|
|
228
215
|
const nextIndex = ((nextIndexCandidate % numberOfItems) + numberOfItems) % numberOfItems;
|
|
@@ -247,7 +234,7 @@ const SixItemPicker = class {
|
|
|
247
234
|
return this.type === ItemPickerType.NUMBER;
|
|
248
235
|
}
|
|
249
236
|
isInvalidNumber() {
|
|
250
|
-
return this.value === '' ||
|
|
237
|
+
return this.value === '' || isNaN(this.value);
|
|
251
238
|
}
|
|
252
239
|
isNextDisabled() {
|
|
253
240
|
if (this.roundtrip) {
|
|
@@ -257,15 +244,12 @@ const SixItemPicker = class {
|
|
|
257
244
|
return this.isNextNumberDisabled();
|
|
258
245
|
}
|
|
259
246
|
else {
|
|
260
|
-
if (!this._itemIndexes) {
|
|
261
|
-
return true;
|
|
262
|
-
}
|
|
263
247
|
return this._itemIndexes[String(this.value)] + this.step > this._itemIndexes[String(this.max)];
|
|
264
248
|
}
|
|
265
249
|
}
|
|
266
250
|
isNextNumberDisabled() {
|
|
267
251
|
var _a;
|
|
268
|
-
return Number(this.value) + this.step > ((_a = this.max) !== null && _a !== void 0 ? _a : Infinity);
|
|
252
|
+
return Number(this.value) + this.step > Number((_a = this.max) !== null && _a !== void 0 ? _a : Infinity);
|
|
269
253
|
}
|
|
270
254
|
isPrevDisabled() {
|
|
271
255
|
if (this.roundtrip) {
|
|
@@ -275,15 +259,12 @@ const SixItemPicker = class {
|
|
|
275
259
|
return this.isPreviousNumberDisabled();
|
|
276
260
|
}
|
|
277
261
|
else {
|
|
278
|
-
if (!this._itemIndexes) {
|
|
279
|
-
return true;
|
|
280
|
-
}
|
|
281
262
|
return this._itemIndexes[String(this.value)] - this.step < this._itemIndexes[String(this.min)];
|
|
282
263
|
}
|
|
283
264
|
}
|
|
284
265
|
isPreviousNumberDisabled() {
|
|
285
266
|
var _a;
|
|
286
|
-
return Number(this.value) - this.step < ((_a = this.min) !== null && _a !== void 0 ? _a : -Infinity);
|
|
267
|
+
return Number(this.value) - this.step < Number((_a = this.min) !== null && _a !== void 0 ? _a : -Infinity);
|
|
287
268
|
}
|
|
288
269
|
onMouseDownNext() {
|
|
289
270
|
if (this.isNextDisabled()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-item-picker.entry.js","mappings":";;;;;AAAA,MAAM,gBAAgB,GAAG,4uBAA4uB;;ACYrwB,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,gBAAgB,GAAa,CAAC;EAClC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,CAAC;EACzF,MAAM,aAAa,GAAG,EAAE,CAAC;EACzB,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK;IACjD,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChD,aAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;IACjC,OAAO,SAAS,CAAC;GAClB,CAAC,CAAC;EACH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AACrC,CAAC,GAAG,CAAC;AAEL,MAAM,kBAAkB,GAAa,CAAC;EACpC,MAAM,QAAQ,GAAG,EAAE,CAAC;EACpB,MAAM,aAAa,GAAG,EAAE,CAAC;EAEzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACzD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,QAAQ,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IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;KACxE;IAED,OAAO,IAAI,CAAC,KAAK,CAAC;GACnB;EAED,MAAM;IACJ,QACE,WAAK,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,wBAAwB,IAClD,WACE,IAAI,EAAC,IAAI,EACT,KAAK,EAAE;QACL,gBAAgB,EAAE,IAAI;QACtB,4BAA4B,EAAE,IAAI,CAAC,cAAc,EAAE;OACpD,EACD,WAAW,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,EACzC,SAAS,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAErC,gBAAU,IAAI,EAAC,OAAO,kBAAuB,CACzC,EACN,WAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,sBAAsB,IAC7C,IAAI,CAAC,iBAAiB,EAAE,CACrB,EACN,WACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE;QACL,gBAAgB,EAAE,IAAI;QACtB,4BAA4B,EAAE,IAAI,CAAC,cAAc,EAAE;OACpD,EACD,WAAW,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,EACzC,SAAS,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAErC,gBAAU,IAAI,EAAC,OAAO,kBAAuB,CACzC,CACF,EACN;GACH;;;;;;;;;;;;","names":[],"sources":["./src/components/six-item-picker/six-item-picker.scss?tag=six-item-picker&encapsulation=shadow","./src/components/six-item-picker/six-item-picker.tsx"],"sourcesContent":[".item_picker {\n &__container {\n width: 2.5em;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n }\n\n &__content {\n font-size: 1.5rem;\n }\n\n &__btn {\n cursor: pointer;\n width: 2.5em;\n height: 2.5em;\n display: flex;\n vertical-align: middle;\n align-items: center;\n justify-content: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n color: var(--six-color-web-rock-500);\n\n &:hover {\n background-color: var(--six-color-web-rock-100);\n border-radius: 100%;\n }\n\n &:active {\n color: var(--six-color-web-rock-400);\n }\n\n &--disabled {\n color: var(--six-color-web-rock-300);\n cursor: not-allowed;\n\n &:hover {\n background-color: initial;\n }\n\n &:active {\n color: var(--six-color-web-rock-300);\n }\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport { ItemPickerPaddingDirection, ItemPickerType } from './types';\nimport { debounce, DEFAULT_DEBOUNCE_FAST, DEFAULT_DEBOUNCE_INSANELY_FAST } from '../../utils/execution-control';\nimport { EventListeners } from '../../utils/event-listeners';\n\ntype StringItemIndex = { [key: string]: number };\n\ninterface Alphabet {\n alphabet: string[];\n letterIndexes: StringItemIndex;\n}\n\nconst A_CHARCODE = 65;\nconst NUMBER_OF_LETTERS = 26;\n\nconst CAPITAL_ALPHABET: Alphabet = (() => {\n const alphabetCodes = Array.from(Array(NUMBER_OF_LETTERS)).map((_, i) => i + A_CHARCODE);\n const letterIndexes = {};\n const alphabet = alphabetCodes.map((charCode, index) => {\n const character = String.fromCharCode(charCode);\n letterIndexes[character] = index;\n return character;\n });\n return { alphabet, letterIndexes };\n})();\n\nconst LOWERCASE_ALPHABET: Alphabet = (() => {\n const alphabet = [];\n const letterIndexes = {};\n\n for (let i = 0; i < CAPITAL_ALPHABET.alphabet.length; i++) {\n const lowercaseCharacter = CAPITAL_ALPHABET.alphabet[i].toLowerCase();\n letterIndexes[lowercaseCharacter] = alphabet.length;\n alphabet.push(lowercaseCharacter);\n }\n\n return { alphabet, letterIndexes };\n})();\n\nconst ALPHABET: Alphabet = (() => {\n const alphabet = [];\n const letterIndexes = {};\n\n for (let i = 0; i < CAPITAL_ALPHABET.alphabet.length; i++) {\n const capitalCharacter = CAPITAL_ALPHABET.alphabet[i];\n letterIndexes[capitalCharacter] = alphabet.length;\n alphabet.push(capitalCharacter);\n\n const lowerCharacter = LOWERCASE_ALPHABET.alphabet[i];\n letterIndexes[lowerCharacter] = alphabet.length;\n alphabet.push(lowerCharacter);\n }\n\n return { alphabet, letterIndexes };\n})();\n\nconst createItemIndexes = (arr: string[]): StringItemIndex => {\n const itemIndexes = {};\n\n for (let i = 0; i < arr?.length; i++) {\n itemIndexes[arr[i]] = i;\n }\n\n return itemIndexes;\n};\n\nconst TAG = `[SIX-ITEM-PICKER]`;\n\nconst subtract = (a: number, b: number) => a - b;\nconst add = (a: number, b: number) => a + b;\n\nexport type SixItemPickerChangePayload = number | string;\n\nconst DEBOUNCE_ITEM_PICKER_LISTENER = 'debounced-item-picker';\n\n/**\n * @since 2.0.0\n * @status experimental\n * @part container - The whole component container\n * @part up - The up button\n * @part content - The content area\n * @part down - The down button\n *\n */\n@Component({\n tag: 'six-item-picker',\n styleUrl: 'six-item-picker.scss',\n shadow: true,\n})\nexport class SixItemPicker {\n private readonly eventListeners = new EventListeners();\n\n @Element() host: HTMLSixItemPickerElement;\n\n /** The item picker's value attribute. */\n @Prop({ mutable: true, reflect: true }) value: number | string = '';\n\n /** The type of items you want to rotate through. */\n @Prop() type: ItemPickerType = ItemPickerType.NUMBER;\n\n /** The minimum value allowed to pick. */\n @Prop({ reflect: true, mutable: true }) min: number | string;\n\n /** The maximum value allowed to pick. */\n @Prop({ reflect: true, mutable: true }) max: number | string;\n\n /** Define whether the picker should to a roundtrip i.e. start at max when reaching min and vice versa. */\n @Prop({ reflect: true }) roundtrip = true;\n\n /** Defines how many steps should be taken when navigating */\n @Prop({ reflect: true }) step: number = 1;\n\n /** Defines a custom list of items you can iterate through */\n @Prop() items: string[];\n\n /** Defines whether the items should be padded */\n @Prop() padded = false;\n\n /** Defines the length of the padded area */\n @Prop() paddingLength = 2;\n\n /** Defines the character used for padding */\n @Prop() paddingChar = '0';\n\n /** Defines whether the padding should be before or after the value. You can either use 'before' or 'after'. By default\n * before is selected */\n @Prop() paddingDirection: ItemPickerPaddingDirection = ItemPickerPaddingDirection.BEFORE;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger faster switching between items.\n */\n @Prop() timeout = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Set the amount of time, in milliseconds, to wait between switching to next item when mouse button is held pressed.\n */\n @Prop() interval = DEFAULT_DEBOUNCE_INSANELY_FAST;\n\n /**\n * Emitted when the item picker's value changes\n */\n @Event({ eventName: 'six-item-picker-change' }) sixChange: EventEmitter<SixItemPickerChangePayload>;\n\n /**\n * Emitted when the item picker's value changes, but debounced\n */\n @Event({ eventName: 'six-item-picker-change-debounced' })\n sixChangeDebounced: EventEmitter<SixItemPickerChangePayload>;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `six-item-picker-change-debounced` event.\n * If you want your change debounce event to not trigger when keeping the nav button pressed before, make sure debounce\n * is a bit bigger than timeout, otherwise keeping the button pressed will trigger the event twice: once you click\n * (and keep pressed) and once you release\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n @Watch('value')\n handleValueChange() {\n this.setup();\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n this.eventListeners.removeByIdentifier(DEBOUNCE_ITEM_PICKER_LISTENER);\n this.eventListeners.add(\n this.host,\n 'six-item-picker-change',\n debounce(this.handleSixItemPickerChangeDebounced, this.debounce),\n DEBOUNCE_ITEM_PICKER_LISTENER\n );\n }\n\n @Watch('items')\n handleSetChange() {\n this.setup();\n this.min = this._items[0];\n this.max = this.getLastStringItem();\n }\n\n @State() _items: string[] = [];\n @State() _itemIndexes: StringItemIndex;\n\n // used for fast increasing when keeping the mouse button held down\n _timeoutNext: ReturnType<typeof setTimeout>;\n _intervalNext: ReturnType<typeof setInterval>;\n\n _timeoutPrev: ReturnType<typeof setTimeout>;\n _intervalPrev: ReturnType<typeof setInterval>;\n\n componentWillLoad() {\n this.setup();\n }\n\n componentDidLoad() {\n this.eventListeners.add(\n this.host,\n 'six-item-picker-change',\n debounce(this.handleSixItemPickerChangeDebounced, this.debounce),\n DEBOUNCE_ITEM_PICKER_LISTENER\n );\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n handleSixItemPickerChangeDebounced = () => {\n this.sixChangeDebounced.emit(this.value);\n };\n\n private setup() {\n if (this.isNumber()) {\n this.setupNumberItems();\n } else {\n this.setUpStringItems();\n }\n }\n\n private setupNumberItems() {\n if (this.isInvalidNumber()) {\n console.warn(`${TAG} Expected number but value is not a number: \"${this.value}\"`);\n console.info(`${TAG} Will set value to either minimum or if not provided to zero.`);\n this.value = this.min ?? 0;\n }\n }\n\n private setUpStringItems() {\n this._items = this.getItems();\n\n if (!this._items) {\n console.warn(`${TAG}: abort setup because no items were found.`);\n return;\n }\n\n this._itemIndexes = this.getItemIndexes();\n const itemsMissValue = this._items.find((i) => String(i) === String(this.value)) === undefined;\n if (itemsMissValue) {\n console.warn(`${TAG} Expected item from item set but value was not found in set: \"${this.value}\"`);\n console.info(`${TAG} Will set value to either minimum or if not provided to \"${this._items[0]}\".`);\n this.value = this._items[0];\n }\n\n if (this.min === undefined) {\n if (!this.roundtrip) {\n console.warn(`${TAG} Expected a min value`);\n console.info(`${TAG} Will set min value to ${this._items[0]}`);\n }\n this.min = this._items[0];\n }\n\n if (this.max === undefined) {\n const maxItem = this.getLastStringItem();\n if (!this.roundtrip) {\n console.warn(`${TAG} Expected a min value if roundtrip is enabled`);\n console.info(`${TAG} Will set min value to ${maxItem}`);\n }\n this.max = maxItem;\n }\n }\n\n private getLastStringItem() {\n return this._items[this._items.length - 1];\n }\n\n private getItems() {\n return {\n [ItemPickerType.LETTER]: ALPHABET.alphabet,\n [ItemPickerType.CAPITAL_LETTER]: CAPITAL_ALPHABET.alphabet,\n [ItemPickerType.LOWER_LETTER]: LOWERCASE_ALPHABET.alphabet,\n [ItemPickerType.CUSTOM]: this.items,\n }[this.type];\n }\n\n private getItemIndexes() {\n if (this.type === ItemPickerType.CUSTOM) {\n return createItemIndexes(this.items);\n }\n\n return {\n [ItemPickerType.LETTER]: ALPHABET.letterIndexes,\n [ItemPickerType.CAPITAL_LETTER]: CAPITAL_ALPHABET.letterIndexes,\n [ItemPickerType.LOWER_LETTER]: LOWERCASE_ALPHABET.letterIndexes,\n }[this.type];\n }\n\n private previousItem() {\n if (this.isNumber()) {\n this.previousNumber();\n } else {\n this.previousStringItem();\n }\n\n this.sixChange.emit(this.value);\n }\n\n private previousNumber() {\n this.changeValue({\n isNextItemAllowed: () => !this.isPreviousNumberDisabled(),\n getNextItem: () => Number(this.value) - this.step,\n getRoundtripItem: () => Number(this.max),\n isRoundtripPossible: () => this.max === undefined && this.roundtrip,\n });\n }\n\n private previousStringItem() {\n const value = this.value as string;\n const minLetter = this.min as string;\n\n this.changeValue({\n isNextItemAllowed: () =>\n minLetter === undefined || this.getStringItemIndex(value) > this.getStringItemIndex(minLetter),\n getNextItem: () => this.getNextItemByOperation(subtract),\n getRoundtripItem: () => this.max,\n isRoundtripPossible: () => this.max === undefined && this.roundtrip,\n });\n }\n\n private nextItem() {\n if (this.isNumber()) {\n this.nextNumber();\n } else {\n this.nextStringItem();\n }\n\n this.sixChange.emit(this.value);\n }\n\n private nextNumber() {\n this.changeValue({\n isNextItemAllowed: () => !this.isNextNumberDisabled(),\n getNextItem: () => Number(this.value) + this.step,\n getRoundtripItem: () => Number(this.min),\n isRoundtripPossible: () => this.min === undefined && this.roundtrip,\n });\n }\n\n private getStringItemIndex(char: string): number {\n return this._itemIndexes[char];\n }\n\n private nextStringItem() {\n const value = this.value as string;\n const maxLetter = this.max as string;\n\n this.changeValue({\n isNextItemAllowed: () =>\n maxLetter === undefined || this.getStringItemIndex(value) < this.getStringItemIndex(maxLetter),\n getNextItem: () => this.getNextItemByOperation(add),\n getRoundtripItem: () => this.min,\n isRoundtripPossible: () => this.min === undefined && this.roundtrip,\n });\n }\n\n private getNextItemByOperation(operation: (a: number, b: number) => number) {\n const value = this.value as string;\n const nextIndexCandidate = operation(this.getStringItemIndex(value), this.step);\n const numberOfItems = this._items.length;\n const nextIndex = ((nextIndexCandidate % numberOfItems) + numberOfItems) % numberOfItems;\n return this._items[nextIndex];\n }\n\n private changeValue(params: {\n getNextItem: () => any;\n isNextItemAllowed: () => boolean;\n getRoundtripItem: () => number | string;\n isRoundtripPossible: () => boolean;\n }) {\n if (params.isNextItemAllowed()) {\n this.value = params.getNextItem();\n return;\n }\n\n if (params.isRoundtripPossible()) {\n console.error(\n `${TAG} Item picker is expected to perform a roundtrip, but either max or min value is missing so a roundtrip is not possible`\n );\n return;\n }\n\n if (this.roundtrip) {\n this.value = params.getRoundtripItem();\n return;\n }\n\n console.warn(\n `${TAG} Roundtrip is not allowed, but was still triggered, please report this issue to the developer of six-item-picker`\n );\n }\n\n private isNumber() {\n return this.type === ItemPickerType.NUMBER;\n }\n\n private isInvalidNumber() {\n return this.value === '' || !!isNaN(this.value as number);\n }\n\n private isNextDisabled() {\n if (this.roundtrip) {\n return false;\n }\n\n if (this.isNumber()) {\n return this.isNextNumberDisabled();\n } else {\n if (!this._itemIndexes) {\n return true;\n }\n\n return this._itemIndexes[String(this.value)] + this.step > this._itemIndexes[String(this.max)];\n }\n }\n\n private isNextNumberDisabled() {\n return Number(this.value) + this.step > (this.max ?? Infinity);\n }\n\n private isPrevDisabled() {\n if (this.roundtrip) {\n return false;\n }\n\n if (this.isNumber()) {\n return this.isPreviousNumberDisabled();\n } else {\n if (!this._itemIndexes) {\n return true;\n }\n\n return this._itemIndexes[String(this.value)] - this.step < this._itemIndexes[String(this.min)];\n }\n }\n\n private isPreviousNumberDisabled() {\n return Number(this.value) - this.step < (this.min ?? -Infinity);\n }\n\n private onMouseDownNext() {\n if (this.isNextDisabled()) {\n return;\n }\n\n this.nextItem();\n\n this._timeoutNext = setTimeout(() => {\n this._intervalNext = setInterval(() => {\n this.nextItem();\n }, this.interval);\n }, this.timeout);\n }\n\n private onMouseUpNext() {\n clearTimeout(this._timeoutNext);\n clearInterval(this._intervalNext);\n }\n\n private onMouseDownPrev() {\n if (this.isPrevDisabled()) {\n return;\n }\n\n this.previousItem();\n\n this._timeoutPrev = setTimeout(() => {\n this._intervalPrev = setInterval(() => {\n this.previousItem();\n }, this.interval);\n }, this.timeout);\n }\n\n private onMouseUpPrev() {\n clearTimeout(this._timeoutPrev);\n clearInterval(this._intervalPrev);\n }\n\n private getFormattedValue() {\n if (this.value === undefined || this.value === null) {\n return this.value;\n }\n\n if (!this.padded) {\n return this.value;\n }\n\n if (this.paddingDirection === ItemPickerPaddingDirection.BEFORE) {\n return String(this.value).padStart(this.paddingLength, this.paddingChar);\n } else if (this.paddingDirection === ItemPickerPaddingDirection.AFTER) {\n return String(this.value).padEnd(this.paddingLength, this.paddingChar);\n }\n\n return this.value;\n }\n\n render() {\n return (\n <div part=\"container\" class=\"item_picker__container\">\n <div\n part=\"up\"\n class={{\n item_picker__btn: true,\n 'item_picker__btn--disabled': this.isNextDisabled(),\n }}\n onMouseDown={() => this.onMouseDownNext()}\n onMouseUp={() => this.onMouseUpNext()}\n >\n <six-icon size=\"large\">expand_less</six-icon>\n </div>\n <div part=\"content\" class=\"item_picker__content\">\n {this.getFormattedValue()}\n </div>\n <div\n part=\"down\"\n class={{\n item_picker__btn: true,\n 'item_picker__btn--disabled': this.isPrevDisabled(),\n }}\n onMouseDown={() => this.onMouseDownPrev()}\n onMouseUp={() => this.onMouseUpPrev()}\n >\n <six-icon size=\"large\">expand_more</six-icon>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"six-item-picker.entry.js","mappings":";;;;;AAAA,MAAM,gBAAgB,GAAG,4uBAA4uB;;ACWrwB,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AACtD,MAAM,wBAAwB,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAC5F,MAAM,QAAQ,GAAa;EACzB,QAAQ,EAAE,wBAAwB;EAClC,aAAa,EAAE,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC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,CAAC,CAAC;KAC1E;SAAM,IAAI,IAAI,CAAC,gBAAgB,KAAK,0BAA0B,CAAC,KAAK,EAAE;MACrE,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;KACxE;IAED,OAAO,IAAI,CAAC,KAAK,CAAC;GACnB;EAED,MAAM;IACJ,QACE,WAAK,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,wBAAwB,IAClD,WACE,IAAI,EAAC,IAAI,EACT,KAAK,EAAE;QACL,gBAAgB,EAAE,IAAI;QACtB,4BAA4B,EAAE,IAAI,CAAC,cAAc,EAAE;OACpD,EACD,WAAW,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,EACzC,SAAS,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAErC,gBAAU,IAAI,EAAC,OAAO,kBAAuB,CACzC,EACN,WAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,sBAAsB,IAC7C,IAAI,CAAC,iBAAiB,EAAE,CACrB,EACN,WACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE;QACL,gBAAgB,EAAE,IAAI;QACtB,4BAA4B,EAAE,IAAI,CAAC,cAAc,EAAE;OACpD,EACD,WAAW,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,EACzC,SAAS,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAErC,gBAAU,IAAI,EAAC,OAAO,kBAAuB,CACzC,CACF,EACN;GACH;;;;;;;;;;;;","names":[],"sources":["src/components/six-item-picker/six-item-picker.scss?tag=six-item-picker&encapsulation=shadow","src/components/six-item-picker/six-item-picker.tsx"],"sourcesContent":[".item_picker {\n &__container {\n width: 2.5em;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n }\n\n &__content {\n font-size: 1.5rem;\n }\n\n &__btn {\n cursor: pointer;\n width: 2.5em;\n height: 2.5em;\n display: flex;\n vertical-align: middle;\n align-items: center;\n justify-content: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n color: var(--six-color-web-rock-500);\n\n &:hover {\n background-color: var(--six-color-web-rock-100);\n border-radius: 100%;\n }\n\n &:active {\n color: var(--six-color-web-rock-400);\n }\n\n &--disabled {\n color: var(--six-color-web-rock-300);\n cursor: not-allowed;\n\n &:hover {\n background-color: initial;\n }\n\n &:active {\n color: var(--six-color-web-rock-300);\n }\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport { ItemPickerPaddingDirection, ItemPickerType } from './types';\nimport { debounce, DEFAULT_DEBOUNCE_FAST, DEFAULT_DEBOUNCE_INSANELY_FAST } from '../../utils/execution-control';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { TimePeriod } from '../../utils/time.util';\n\ninterface Alphabet {\n alphabet: string[];\n letterIndexes: Record<string, number>;\n}\n\nconst uppercaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst upperAndLowercaseLetters = [...uppercaseLetters].flatMap((c) => [c, c.toLowerCase()]);\nconst ALPHABET: Alphabet = {\n alphabet: upperAndLowercaseLetters,\n letterIndexes: Object.fromEntries(upperAndLowercaseLetters.map((c, i) => [c, i])),\n};\nconst CAPITAL_ALPHABET: Alphabet = {\n alphabet: [...uppercaseLetters].flatMap((c) => [c]),\n letterIndexes: Object.fromEntries([...uppercaseLetters].map((c, i) => [c, i])),\n};\nconst LOWERCASE_ALPHABET: Alphabet = {\n alphabet: [...uppercaseLetters.toLowerCase()].flatMap((c) => [c]),\n letterIndexes: Object.fromEntries([...uppercaseLetters.toLowerCase()].map((c, i) => [c, i])),\n};\n\nconst createItemIndexes = (arr: string[]): Record<string, number> => {\n return Object.fromEntries([...arr].map((c, i) => [c, i]));\n};\n\nconst TAG = `[SIX-ITEM-PICKER]`;\n\nconst subtract = (a: number, b: number) => a - b;\nconst add = (a: number, b: number) => a + b;\n\nexport type SixItemPickerChangePayload = number | string | boolean | TimePeriod;\n\nconst DEBOUNCE_ITEM_PICKER_LISTENER = 'debounced-item-picker';\n\n/**\n * @since 2.0.0\n * @status experimental\n * @part container - The whole component container\n * @part up - The up button\n * @part content - The content area\n * @part down - The down button\n *\n */\n@Component({\n tag: 'six-item-picker',\n styleUrl: 'six-item-picker.scss',\n shadow: true,\n})\nexport class SixItemPicker {\n private readonly eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixItemPickerElement;\n\n /** The item picker's value attribute. */\n @Prop({ mutable: true, reflect: true }) value: number | string = '';\n\n /** The type of items you want to rotate through. */\n @Prop() type: ItemPickerType = ItemPickerType.NUMBER;\n\n /** The minimum value allowed to pick. */\n @Prop({ reflect: true, mutable: true }) min?: number | string;\n\n /** The maximum value allowed to pick. */\n @Prop({ reflect: true, mutable: true }) max?: number | string;\n\n /** Define whether the picker should to a roundtrip i.e. start at max when reaching min and vice versa. */\n @Prop({ reflect: true }) roundtrip = true;\n\n /** Defines how many steps should be taken when navigating */\n @Prop({ reflect: true }) step = 1;\n\n /** Defines a custom list of items you can iterate through */\n @Prop() items?: string[];\n\n /** Defines whether the items should be padded */\n @Prop() padded = false;\n\n /** Defines the length of the padded area */\n @Prop() paddingLength = 2;\n\n /** Defines the character used for padding */\n @Prop() paddingChar = '0';\n\n /** Defines whether the padding should be before or after the value. You can either use 'before' or 'after'. By default,\n * before is selected */\n @Prop() paddingDirection: ItemPickerPaddingDirection = ItemPickerPaddingDirection.BEFORE;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger faster switching between items.\n */\n @Prop() timeout = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Set the amount of time, in milliseconds, to wait between switching to next item when mouse button is held pressed.\n */\n @Prop() interval = DEFAULT_DEBOUNCE_INSANELY_FAST;\n\n /**\n * Emitted when the item picker's value changes\n */\n @Event({ eventName: 'six-item-picker-change' }) sixChange!: EventEmitter<SixItemPickerChangePayload>;\n\n /**\n * Emitted when the item picker's value changes, but debounced\n */\n @Event({ eventName: 'six-item-picker-change-debounced' })\n sixChangeDebounced!: EventEmitter<SixItemPickerChangePayload>;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `six-item-picker-change-debounced` event.\n * If you want your change debounce event to not trigger when keeping the nav button pressed before, make sure debounce\n * is a bit bigger than timeout, otherwise keeping the button pressed will trigger the event twice: once you click\n * (and keep pressed) and once you release\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n @Watch('value')\n handleValueChange() {\n this.setup();\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n this.eventListeners.removeByIdentifier(DEBOUNCE_ITEM_PICKER_LISTENER);\n this.eventListeners.add(\n this.host,\n 'six-item-picker-change',\n debounce(this.handleSixItemPickerChangeDebounced, this.debounce),\n DEBOUNCE_ITEM_PICKER_LISTENER\n );\n }\n\n @Watch('items')\n handleSetChange() {\n this.setup();\n this.min = this._items[0];\n this.max = this.getLastStringItem();\n }\n\n @State() _items: string[] = [];\n @State() _itemIndexes: Record<string, number> = {};\n\n // used for fast increasing when keeping the mouse button held down\n private _timeoutNext!: ReturnType<typeof setTimeout>;\n private _intervalNext!: ReturnType<typeof setInterval>;\n\n private _timeoutPrev!: ReturnType<typeof setTimeout>;\n private _intervalPrev!: ReturnType<typeof setInterval>;\n\n componentWillLoad() {\n this.setup();\n }\n\n componentDidLoad() {\n this.eventListeners.add(\n this.host,\n 'six-item-picker-change',\n debounce(this.handleSixItemPickerChangeDebounced, this.debounce),\n DEBOUNCE_ITEM_PICKER_LISTENER\n );\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n private handleSixItemPickerChangeDebounced = () => {\n this.sixChangeDebounced.emit(this.value);\n };\n\n private setup() {\n if (this.isNumber()) {\n this.setupNumberItems();\n } else {\n this.setUpStringItems();\n }\n }\n\n private setupNumberItems() {\n if (this.isInvalidNumber()) {\n console.warn(`${TAG} Expected number but value is not a number: \"${this.value}\"`);\n console.info(`${TAG} Will set value to either minimum or if not provided to zero.`);\n this.value = this.min ?? 0;\n }\n }\n\n private setUpStringItems() {\n this._items = this.getStringItems();\n this._itemIndexes = this.getItemIndexes();\n const itemsMissValue = this._items.find((i) => String(i) === String(this.value)) === undefined;\n if (itemsMissValue) {\n console.warn(`${TAG} Expected item from item set but value was not found in set: \"${this.value}\"`);\n console.info(`${TAG} Will set value to either minimum or if not provided to \"${this._items[0]}\".`);\n this.value = this._items[0];\n }\n\n if (this.min === undefined) {\n if (!this.roundtrip) {\n console.warn(`${TAG} Expected a min value`);\n console.info(`${TAG} Will set min value to ${this._items[0]}`);\n }\n this.min = this._items[0];\n }\n\n if (this.max === undefined) {\n const maxItem = this.getLastStringItem();\n if (!this.roundtrip) {\n console.warn(`${TAG} Expected a min value if roundtrip is enabled`);\n console.info(`${TAG} Will set min value to ${maxItem}`);\n }\n this.max = maxItem;\n }\n }\n\n private getLastStringItem() {\n return this._items[this._items.length - 1];\n }\n\n private getStringItems(): string[] {\n switch (this.type) {\n case ItemPickerType.NUMBER:\n console.warn(`${TAG}: unexpected type ${this.type}`);\n return [];\n case ItemPickerType.LETTER:\n return ALPHABET.alphabet;\n case ItemPickerType.CAPITAL_LETTER:\n return CAPITAL_ALPHABET.alphabet;\n case ItemPickerType.LOWER_LETTER:\n return LOWERCASE_ALPHABET.alphabet;\n case ItemPickerType.CUSTOM:\n if (this.items == null || this.items.length === 0) {\n console.warn(`${TAG}: no items defined for type ${this.type}`);\n return [];\n }\n return this.items;\n }\n }\n\n private getItemIndexes(): Record<string, number> {\n switch (this.type) {\n case ItemPickerType.NUMBER:\n console.warn(`${TAG}: unexpected type ${this.type}`);\n return {};\n case ItemPickerType.LETTER:\n return ALPHABET.letterIndexes;\n case ItemPickerType.CAPITAL_LETTER:\n return CAPITAL_ALPHABET.letterIndexes;\n case ItemPickerType.LOWER_LETTER:\n return LOWERCASE_ALPHABET.letterIndexes;\n case ItemPickerType.CUSTOM:\n return createItemIndexes(this._items);\n }\n }\n\n private previousItem() {\n if (this.isNumber()) {\n this.previousNumber();\n } else {\n this.previousStringItem();\n }\n\n this.sixChange.emit(this.value);\n }\n\n private previousNumber() {\n this.changeValue({\n isNextItemAllowed: () => !this.isPreviousNumberDisabled(),\n getNextItem: () => Number(this.value) - this.step,\n getRoundtripItem: () => Number(this.max),\n isRoundtripPossible: () => this.max === undefined && this.roundtrip,\n });\n }\n\n private previousStringItem() {\n const value = String(this.value);\n const minLetter = String(this.min);\n\n this.changeValue({\n isNextItemAllowed: () =>\n minLetter === undefined || this.getStringItemIndex(value) > this.getStringItemIndex(minLetter),\n getNextItem: () => this.getNextItemByOperation(subtract),\n getRoundtripItem: () => String(this.max),\n isRoundtripPossible: () => this.max == null && this.roundtrip,\n });\n }\n\n private nextItem() {\n if (this.isNumber()) {\n this.nextNumber();\n } else {\n this.nextStringItem();\n }\n\n this.sixChange.emit(this.value);\n }\n\n private nextNumber() {\n this.changeValue({\n isNextItemAllowed: () => !this.isNextNumberDisabled(),\n getNextItem: () => Number(this.value) + this.step,\n getRoundtripItem: () => Number(this.min),\n isRoundtripPossible: () => this.min === undefined && this.roundtrip,\n });\n }\n\n private getStringItemIndex(char: string): number {\n return this._itemIndexes[char];\n }\n\n private nextStringItem() {\n const value = String(this.value);\n const maxLetter = String(this.max);\n\n this.changeValue({\n isNextItemAllowed: () =>\n maxLetter === undefined || this.getStringItemIndex(value) < this.getStringItemIndex(maxLetter),\n getNextItem: () => this.getNextItemByOperation(add),\n getRoundtripItem: () => String(this.min),\n isRoundtripPossible: () => this.min === undefined && this.roundtrip,\n });\n }\n\n private getNextItemByOperation(operation: (a: number, b: number) => number) {\n const value = String(this.value);\n const nextIndexCandidate = operation(this.getStringItemIndex(value), this.step);\n const numberOfItems = this._items.length;\n const nextIndex = ((nextIndexCandidate % numberOfItems) + numberOfItems) % numberOfItems;\n return this._items[nextIndex];\n }\n\n private changeValue(params: {\n getNextItem: () => number | string;\n isNextItemAllowed: () => boolean;\n getRoundtripItem: () => number | string;\n isRoundtripPossible: () => boolean;\n }) {\n if (params.isNextItemAllowed()) {\n this.value = params.getNextItem();\n return;\n }\n\n if (params.isRoundtripPossible()) {\n console.error(\n `${TAG} Item picker is expected to perform a roundtrip, but either max or min value is missing so a roundtrip is not possible`\n );\n return;\n }\n\n if (this.roundtrip) {\n this.value = params.getRoundtripItem();\n return;\n }\n\n console.warn(\n `${TAG} Roundtrip is not allowed, but was still triggered, please report this issue to the developer of six-item-picker`\n );\n }\n\n private isNumber() {\n return this.type === ItemPickerType.NUMBER;\n }\n\n private isInvalidNumber() {\n return this.value === '' || isNaN(this.value as number);\n }\n\n private isNextDisabled() {\n if (this.roundtrip) {\n return false;\n }\n\n if (this.isNumber()) {\n return this.isNextNumberDisabled();\n } else {\n return this._itemIndexes[String(this.value)] + this.step > this._itemIndexes[String(this.max)];\n }\n }\n\n private isNextNumberDisabled() {\n return Number(this.value) + this.step > Number(this.max ?? Infinity);\n }\n\n private isPrevDisabled() {\n if (this.roundtrip) {\n return false;\n }\n\n if (this.isNumber()) {\n return this.isPreviousNumberDisabled();\n } else {\n return this._itemIndexes[String(this.value)] - this.step < this._itemIndexes[String(this.min)];\n }\n }\n\n private isPreviousNumberDisabled() {\n return Number(this.value) - this.step < Number(this.min ?? -Infinity);\n }\n\n private onMouseDownNext() {\n if (this.isNextDisabled()) {\n return;\n }\n\n this.nextItem();\n\n this._timeoutNext = setTimeout(() => {\n this._intervalNext = setInterval(() => {\n this.nextItem();\n }, this.interval);\n }, this.timeout);\n }\n\n private onMouseUpNext() {\n clearTimeout(this._timeoutNext);\n clearInterval(this._intervalNext);\n }\n\n private onMouseDownPrev() {\n if (this.isPrevDisabled()) {\n return;\n }\n\n this.previousItem();\n\n this._timeoutPrev = setTimeout(() => {\n this._intervalPrev = setInterval(() => {\n this.previousItem();\n }, this.interval);\n }, this.timeout);\n }\n\n private onMouseUpPrev() {\n clearTimeout(this._timeoutPrev);\n clearInterval(this._intervalPrev);\n }\n\n private getFormattedValue() {\n if (this.value === undefined || this.value === null) {\n return this.value;\n }\n\n if (!this.padded) {\n return this.value;\n }\n\n if (this.paddingDirection === ItemPickerPaddingDirection.BEFORE) {\n return String(this.value).padStart(this.paddingLength, this.paddingChar);\n } else if (this.paddingDirection === ItemPickerPaddingDirection.AFTER) {\n return String(this.value).padEnd(this.paddingLength, this.paddingChar);\n }\n\n return this.value;\n }\n\n render() {\n return (\n <div part=\"container\" class=\"item_picker__container\">\n <div\n part=\"up\"\n class={{\n item_picker__btn: true,\n 'item_picker__btn--disabled': this.isNextDisabled(),\n }}\n onMouseDown={() => this.onMouseDownNext()}\n onMouseUp={() => this.onMouseUpNext()}\n >\n <six-icon size=\"large\">expand_less</six-icon>\n </div>\n <div part=\"content\" class=\"item_picker__content\">\n {this.getFormattedValue()}\n </div>\n <div\n part=\"down\"\n class={{\n item_picker__btn: true,\n 'item_picker__btn--disabled': this.isPrevDisabled(),\n }}\n onMouseDown={() => this.onMouseDownPrev()}\n onMouseUp={() => this.onMouseUpPrev()}\n >\n <six-icon size=\"large\">expand_more</six-icon>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-8a74f992.js';
|
|
2
2
|
|
|
3
3
|
const sixLanguageSwitcherCss = ".language-switcher__container{display:flex}.language-switcher__separator{padding:0 0.25rem}.language-switcher__label{cursor:pointer}.language-switcher__label:hover{color:var(--six-color-red)}.language-switcher__label--selected{color:var(--six-color-red)}";
|
|
4
4
|
|
|
@@ -44,7 +44,7 @@ const SixLanguageSwitcher = class {
|
|
|
44
44
|
render() {
|
|
45
45
|
return (h("div", { part: "container", class: "language-switcher__container" }, this.languages.map((lang, index) => {
|
|
46
46
|
const language = typeof lang === 'string' ? lang : lang.key;
|
|
47
|
-
return (h("div", { onClick: this.handleLanguageSwitching(language, lang.value) }, h("span", { part: "label", class: {
|
|
47
|
+
return (h("div", { onClick: this.handleLanguageSwitching(language, typeof lang === 'string' ? lang : lang.value) }, h("span", { part: "label", class: {
|
|
48
48
|
'language-switcher__label': true,
|
|
49
49
|
'language-switcher__label--selected': this.selected === language,
|
|
50
50
|
} }, language), index < this.languages.length - 1 && (h("span", { part: "separator", class: "language-switcher__separator" }, "/"))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-language-switcher.entry.js","mappings":";;AAAA,MAAM,sBAAsB,GAAG,gQAAgQ;;ACa/R,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;MAchC,mBAAmB;;;;IAqCtB,4BAAuB,GAAG,CAAC,WAAmB,EAAE,aAAsB,KAAK;MACjF,IAAI,aAAa,KAAK,SAAS,EAAE;QAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;OACpC;WAAM;QACL,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;OAClC;MACD,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;KAC7B,CAAC;;qBAvCyD,iBAAiB;;EAG5E,sBAAsB,CAAC,QAAkB;IACvC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;MAC5B,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;IAED,IAAI,CAAC,sBAAsB,EAAE,CAAC;GAC/B;EAMD,iBAAiB;IACf,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;MAC/B,IAAI,CAAC,sBAAsB,EAAE,CAAC;KAC/B;GACF;EAEO,sBAAsB;IAC5B,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC3C,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE;MACxC,IAAI,CAAC,QAAQ,GAAG,gBAAgB,CAAC;MACjC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CA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,IAAI,CAAC,sBAAsB,EAAE,CAAC;KAC/B;GACF;EAEO,sBAAsB;IAC5B,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC3C,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE;MACxC,IAAI,CAAC,QAAQ,GAAG,gBAAgB,CAAC;MACjC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpC;SAAM;MACL,IAAI,CAAC,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC;MACrC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC7C;GACF;EAWD,MAAM;IACJ,QACE,WAAK,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,8BAA8B,IACvD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK;MAC9B,MAAM,QAAQ,GAAG,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;MAC5D,QACE,WAAK,OAAO,EAAE,IAAI,CAAC,uBAAuB,CAAC,QAAQ,EAAE,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAChG,YACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;UACL,0BAA0B,EAAE,IAAI;UAChC,oCAAoC,EAAE,IAAI,CAAC,QAAQ,KAAK,QAAQ;SACjE,IAEA,QAAQ,CACJ,EACN,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,KAChC,YAAM,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,8BAA8B,QAEpD,CACR,CACG,EACN;KACH,CAAC,CACE,EACN;GACH;;;;;;;;;","names":[],"sources":["src/components/six-language-switcher/six-language-switcher.scss?tag=six-language-switcher&encapsulation=shadow","src/components/six-language-switcher/six-language-switcher.tsx"],"sourcesContent":[".language-switcher {\n &__container {\n display: flex;\n }\n\n &__separator {\n padding: 0 0.25rem;\n }\n\n &__label {\n cursor: pointer;\n\n &:hover {\n color: var(--six-color-red);\n }\n\n &--selected {\n color: var(--six-color-red);\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Prop, Watch } from '@stencil/core';\n\n/**\n * @since 2.1.0\n * @status experimental\n **/\n\nexport interface SixLanguageSwitcherInput {\n key: string;\n value: string;\n}\nexport type SixLanguageSwitcherChangePayload = string;\n\nconst DEFAULT_LANGUAGES = ['EN', 'DE', 'ES'];\n\n/*\n * @since 2.2.0\n * @status experimental\n * @part container - The whole component container\n * @part label - The language label\n * @part separator - The separator between the language labels\n */\n@Component({\n tag: 'six-language-switcher',\n styleUrl: 'six-language-switcher.scss',\n shadow: true,\n})\nexport class SixLanguageSwitcher {\n /** The language which should be shown as selected */\n @Prop({ mutable: true, reflect: true }) selected?: string;\n\n /** The languages which should be selectable options. */\n @Prop() languages: string[] | SixLanguageSwitcherInput[] = DEFAULT_LANGUAGES;\n\n @Watch('languages')\n handleChangesLanguages(newValue: string[]) {\n if (!Array.isArray(newValue)) {\n throw new Error('languages is expected to be an array');\n }\n\n this.updateSelectedLanguage();\n }\n /**\n * Emitted when the language switchers value changes\n */\n @Event({ eventName: 'six-language-switcher-change' }) sixChange!: EventEmitter<SixLanguageSwitcherChangePayload>;\n\n componentWillLoad() {\n if (this.selected === undefined) {\n this.updateSelectedLanguage();\n }\n }\n\n private updateSelectedLanguage() {\n const selectedLanguage = this.languages[0];\n if (typeof selectedLanguage === 'string') {\n this.selected = selectedLanguage;\n this.sixChange.emit(this.selected);\n } else {\n this.selected = selectedLanguage.key;\n this.sixChange.emit(selectedLanguage.value);\n }\n }\n\n private handleLanguageSwitching = (newLanguage: string, languageValue?: string) => () => {\n if (languageValue !== undefined) {\n this.sixChange.emit(languageValue);\n } else {\n this.sixChange.emit(newLanguage);\n }\n this.selected = newLanguage;\n };\n\n render() {\n return (\n <div part=\"container\" class=\"language-switcher__container\">\n {this.languages.map((lang, index) => {\n const language = typeof lang === 'string' ? lang : lang.key;\n return (\n <div onClick={this.handleLanguageSwitching(language, typeof lang === 'string' ? lang : lang.value)}>\n <span\n part=\"label\"\n class={{\n 'language-switcher__label': true,\n 'language-switcher__label--selected': this.selected === language,\n }}\n >\n {language}\n </span>\n {index < this.languages.length - 1 && (\n <span part=\"separator\" class=\"language-switcher__separator\">\n /\n </span>\n )}\n </div>\n );\n })}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-8a74f992.js';
|
|
2
2
|
|
|
3
3
|
const sixLayoutGridCss = ":host{display:grid;grid-template-columns:repeat(var(--no-of-columns), 1fr);grid-column-gap:1rem}";
|
|
4
4
|
|
|
@@ -8,8 +8,10 @@ const SixLayoutGrid = class {
|
|
|
8
8
|
this.columns = undefined;
|
|
9
9
|
}
|
|
10
10
|
handleColumnsChange() {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
if (typeof this.columns !== 'number' || this.columns === 0) {
|
|
12
|
+
this.columns = 12;
|
|
13
|
+
}
|
|
14
|
+
this.host.style.setProperty('--no-of-columns', String(this.columns));
|
|
13
15
|
}
|
|
14
16
|
componentWillLoad() {
|
|
15
17
|
this.handleColumnsChange();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-layout-grid.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,kGAAkG;;MCc9G,aAAa;;;;;EAOxB,mBAAmB;IACjB,
|
|
1
|
+
{"file":"six-layout-grid.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,kGAAkG;;MCc9G,aAAa;;;;;EAOxB,mBAAmB;IACjB,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,KAAK,CAAC,EAAE;MAC1D,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;KACnB;IACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;GACtE;EAED,iBAAiB;IACf,IAAI,CAAC,mBAAmB,EAAE,CAAC;GAC5B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eAAQ,CACH,EACP;GACH;;;;;;;;;;","names":[],"sources":["src/components/six-layout-grid/six-layout-grid.scss?tag=six-layout-grid&encapsulation=shadow","src/components/six-layout-grid/six-layout-grid.tsx"],"sourcesContent":[":host {\n display: grid;\n grid-template-columns: repeat(var(--no-of-columns), 1fr);\n grid-column-gap: 1rem;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n/**\n * @since 1.01\n * @status stable\n *\n * @slot - The grid's content\n */\n\n@Component({\n tag: 'six-layout-grid',\n styleUrl: 'six-layout-grid.scss',\n shadow: true,\n})\nexport class SixLayoutGrid {\n @Element() host!: HTMLSixLayoutGridElement;\n\n /** Set the number of grid columns */\n @Prop({ mutable: true }) columns?: number;\n\n @Watch('columns')\n handleColumnsChange() {\n if (typeof this.columns !== 'number' || this.columns === 0) {\n this.columns = 12;\n }\n this.host.style.setProperty('--no-of-columns', String(this.columns));\n }\n\n componentWillLoad() {\n this.handleColumnsChange();\n }\n\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-8a74f992.js';
|
|
2
2
|
|
|
3
3
|
const sixMainContainerCss = ":host{display:flex;flex-wrap:nowrap;min-width:fit-content}.left-margin,.right-margin{flex:1 6 10rem;min-width:var(--six-spacing-xxx-large)}.content{flex:6 1 60rem;min-width:48rem;max-width:100rem}.content--padded{padding:var(--six-spacing-xxx-large) 0}";
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-main-container.entry.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,8PAA8P;;MCkB7Q,gBAAgB;;;kBAIV,IAAI;;EAErB,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WAAK,IAAI,EAAC,aAAa,EAAC,KAAK,EAAC,aAAa,GAAG,EAC9C,WAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,MAAM,EAAE,IAC1E,eAAQ,CACJ,EACN,WAAK,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,cAAc,GAAG,CAC3C,EACP;GACH;;;;;;;","names":[],"sources":["
|
|
1
|
+
{"file":"six-main-container.entry.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,8PAA8P;;MCkB7Q,gBAAgB;;;kBAIV,IAAI;;EAErB,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WAAK,IAAI,EAAC,aAAa,EAAC,KAAK,EAAC,aAAa,GAAG,EAC9C,WAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,MAAM,EAAE,IAC1E,eAAQ,CACJ,EACN,WAAK,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,cAAc,GAAG,CAC3C,EACP;GACH;;;;;;;","names":[],"sources":["src/components/six-main-container/six-main-container.scss?tag=six-main-container&encapsulation=shadow","src/components/six-main-container/six-main-container.tsx"],"sourcesContent":["$margin-default-width: 10rem;\n$content-default-width: 60rem;\n$content-min-width: 48rem;\n$content-max-width: 100rem;\n\n:host {\n display: flex;\n flex-wrap: nowrap;\n min-width: fit-content;\n}\n\n.left-margin,\n.right-margin {\n flex: 1 6 $margin-default-width;\n min-width: var(--six-spacing-xxx-large);\n}\n\n.content {\n flex: 6 1 $content-default-width;\n min-width: $content-min-width;\n max-width: $content-max-width;\n &--padded {\n padding: var(--six-spacing-xxx-large) 0;\n }\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * @since 1.01\n * @status stable\n *\n * @slot - The main container's content.\n *\n * @part left-margin - The component's left margin area.\n * @part content - The component's content area.\n * @part right-margin - The component's right margin area.\n */\n\n@Component({\n tag: 'six-main-container',\n styleUrl: 'six-main-container.scss',\n shadow: true,\n})\nexport class SixMainContainer {\n @Element() host!: HTMLSixMainContainerElement;\n\n /** Set to false to remove top and bottom padding. */\n @Prop() padded = true;\n\n render() {\n return (\n <Host>\n <div part=\"left-margin\" class=\"left-margin\" />\n <div part=\"content\" class={{ content: true, 'content--padded': this.padded }}>\n <slot />\n </div>\n <div part=\"right-margin\" class=\"right-margin\" />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-8a74f992.js';
|
|
2
2
|
|
|
3
3
|
const sixMenuDividerCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:block}.menu-divider{border-top:solid var(--six-border-width) var(--six-menu-divider-color);margin:0}";
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-menu-divider.entry.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,0NAA0N;;MCgBvO,cAAc;;;;EACzB,MAAM;IACJ,OAAO,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,WAAW,iBAAa,MAAM,GAAG,CAAC;GACrF;;;;;;","names":[],"sources":["
|
|
1
|
+
{"file":"six-menu-divider.entry.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,0NAA0N;;MCgBvO,cAAc;;;;EACzB,MAAM;IACJ,OAAO,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,WAAW,iBAAa,MAAM,GAAG,CAAC;GACrF;;;;;;","names":[],"sources":["src/components/six-menu-divider/six-menu-divider.scss?tag=six-menu-divider&encapsulation=shadow","src/components/six-menu-divider/six-menu-divider.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu-divider {\n border-top: solid var(--six-border-width) var(--six-menu-divider-color);\n margin: 0;\n}\n","import { Component, h } from '@stencil/core';\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 * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-menu-divider',\n styleUrl: 'six-menu-divider.scss',\n shadow: true,\n})\nexport class SixMenuDivider {\n render() {\n return <div part=\"base\" class=\"menu-divider\" role=\"separator\" aria-hidden=\"true\" />;\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
2
|
-
import { a as getTextContent } from './slot-
|
|
1
|
+
import { r as registerInstance, h } from './index-8a74f992.js';
|
|
2
|
+
import { a as getTextContent } from './slot-ad36df3a.js';
|
|
3
3
|
|
|
4
4
|
const sixMenuItemCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:block}.menu-item{position:relative;display:flex;align-items:stretch;font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);text-align:left;color:var(--six-input-color);border-radius:var(--six-border-radius-medium);padding:var(--six-spacing-medium) var(--six-spacing-medium);transition:var(--six-transition-fast) fill;user-select:none;white-space:nowrap;cursor:pointer}.menu-item.menu-item--focused:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--disabled{outline:none;color:var(--six-input-color-disabled);cursor:not-allowed}.menu-item .menu-item__label{flex:1 1 auto;align-self:center}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix ::slotted(:last-child){margin-right:0.5em}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix ::slotted(:first-child){margin-left:0.5em}.menu-item .menu-item__check{flex:0 0 auto;display:flex;align-items:center;margin-left:var(--six-spacing-small);visibility:hidden;font-size:inherit}.menu-item--checked .menu-item__check{visibility:visible}";
|
|
5
5
|
|
|
@@ -19,11 +19,13 @@ const SixMenuItem = class {
|
|
|
19
19
|
}
|
|
20
20
|
/** Sets focus on the button. */
|
|
21
21
|
async setFocus(options) {
|
|
22
|
-
|
|
22
|
+
var _a;
|
|
23
|
+
(_a = this.menuItem) === null || _a === void 0 ? void 0 : _a.focus(options);
|
|
23
24
|
}
|
|
24
25
|
/** Removes focus from the button. */
|
|
25
26
|
async removeFocus() {
|
|
26
|
-
|
|
27
|
+
var _a;
|
|
28
|
+
(_a = this.menuItem) === null || _a === void 0 ? void 0 : _a.blur();
|
|
27
29
|
}
|
|
28
30
|
/** Returns a text label based on the contents of the menu item's default slot. */
|
|
29
31
|
getTextLabel() {
|
|
@@ -36,10 +38,10 @@ const SixMenuItem = class {
|
|
|
36
38
|
this.hasFocus = true;
|
|
37
39
|
}
|
|
38
40
|
handleMouseEnter() {
|
|
39
|
-
this.setFocus();
|
|
41
|
+
return this.setFocus();
|
|
40
42
|
}
|
|
41
43
|
handleMouseLeave() {
|
|
42
|
-
this.removeFocus();
|
|
44
|
+
return this.removeFocus();
|
|
43
45
|
}
|
|
44
46
|
render() {
|
|
45
47
|
return (h("div", { ref: (el) => (this.menuItem = el), part: "base", class: {
|
|
@@ -47,7 +49,7 @@ const SixMenuItem = class {
|
|
|
47
49
|
'menu-item--checked': this.checked,
|
|
48
50
|
'menu-item--disabled': this.disabled,
|
|
49
51
|
'menu-item--focused': this.hasFocus,
|
|
50
|
-
}, role: "menuitem", "aria-disabled": this.disabled ? 'true' : 'false', "aria-checked": this.checked ? 'true' : 'false', tabIndex: !this.disabled ? 0 :
|
|
52
|
+
}, role: "menuitem", "aria-disabled": this.disabled ? 'true' : 'false', "aria-checked": this.checked ? 'true' : 'false', tabIndex: !this.disabled ? 0 : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("span", { part: "prefix", class: "menu-item__prefix" }, h("slot", { name: "prefix" })), h("span", { part: "label", class: "menu-item__label" }, h("slot", { ref: (el) => (this.defaultSlot = el) })), h("span", { part: "suffix", class: "menu-item__suffix" }, h("slot", { name: "suffix" })), h("span", { part: "checked-icon", class: "menu-item__check" }, h("six-icon", { size: "small", "aria-hidden": "true" }, "check"))));
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
55
|
SixMenuItem.style = sixMenuItemCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-menu-item.entry.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,44CAA44C;;MCyBt5C,WAAW;;;oBAIF,KAAK;mBAGU,KAAK;iBAGP,EAAE;oBAGC,KAAK;;EAEzC,iBAAiB;IACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC1D;;EAID,MAAM,QAAQ,CAAC,OAAsB
|
|
1
|
+
{"file":"six-menu-item.entry.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,44CAA44C;;MCyBt5C,WAAW;;;oBAIF,KAAK;mBAGU,KAAK;iBAGP,EAAE;oBAGC,KAAK;;EAEzC,iBAAiB;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,MAAM,GAAG,OAAO,kBACjC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,EAC7C,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,GAAG,SAAS,EACxC,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,YAAY,EAAE,IAAI,CAAC,gBAAgB,IAEnC,YAAM,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,mBAAmB,IAC3C,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,EAEP,YAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,kBAAkB,IACzC,YAAM,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,WAAW,GAAG,EAAqB,CAAC,GAAI,CAC5D,EAEP,YAAM,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,mBAAmB,IAC3C,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,EAEP,YAAM,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,kBAAkB,IAChD,gBAAU,IAAI,EAAC,OAAO,iBAAa,MAAM,YAE9B,CACN,CACH,EACN;GACH;;;;;;","names":[],"sources":["src/components/six-menu-item/six-menu-item.scss?tag=six-menu-item&encapsulation=shadow","src/components/six-menu-item/six-menu-item.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu-item {\n position: relative;\n display: flex;\n align-items: stretch;\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-letter-spacing-normal);\n text-align: left;\n color: var(--six-input-color);\n border-radius: var(--six-border-radius-medium);\n padding: var(--six-spacing-medium) var(--six-spacing-medium);\n transition: var(--six-transition-fast) fill;\n user-select: none;\n white-space: nowrap;\n cursor: pointer;\n\n &.menu-item--focused:not(.menu-item--disabled) {\n outline: none;\n background-color: var(--six-menu-item-background-color);\n }\n\n &.menu-item--disabled {\n outline: none;\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n }\n\n .menu-item__label {\n flex: 1 1 auto;\n align-self: center;\n }\n\n .menu-item__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:last-child) {\n margin-right: 0.5em;\n }\n }\n\n .menu-item__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:first-child) {\n margin-left: 0.5em;\n }\n }\n\n .menu-item__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n margin-left: var(--six-spacing-small);\n visibility: hidden;\n font-size: inherit;\n }\n}\n\n.menu-item--checked .menu-item__check {\n visibility: visible;\n}\n","import { Component, h, Method, Prop, State } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu item's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @part base - The component's base wrapper.\n * @part checked-icon - The container that wraps the checked icon.\n * @part prefix - The prefix container.\n * @part label - The menu item label.\n * @part suffix - The suffix container.\n */\n\n@Component({\n tag: 'six-menu-item',\n styleUrl: 'six-menu-item.scss',\n shadow: true,\n})\nexport class SixMenuItem {\n private menuItem?: HTMLElement;\n private defaultSlot?: HTMLSlotElement;\n\n @State() hasFocus = false;\n\n /** Set to true to draw the item in a checked state. */\n @Prop({ reflect: true }) checked = false;\n\n /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the menu item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n connectedCallback() {\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.menuItem?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.menuItem?.blur();\n }\n\n /** Returns a text label based on the contents of the menu item's default slot. */\n @Method()\n getTextLabel() {\n return Promise.resolve(getTextContent(this.defaultSlot));\n }\n\n private handleBlur() {\n this.hasFocus = false;\n }\n\n private handleFocus() {\n this.hasFocus = true;\n }\n\n private handleMouseEnter() {\n return this.setFocus();\n }\n\n private handleMouseLeave() {\n return this.removeFocus();\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.menuItem = el)}\n part=\"base\"\n class={{\n 'menu-item': true,\n 'menu-item--checked': this.checked,\n 'menu-item--disabled': this.disabled,\n 'menu-item--focused': this.hasFocus,\n }}\n role=\"menuitem\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-checked={this.checked ? 'true' : 'false'}\n tabIndex={!this.disabled ? 0 : undefined}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n <span part=\"prefix\" class=\"menu-item__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <span part=\"label\" class=\"menu-item__label\">\n <slot ref={(el) => (this.defaultSlot = el as HTMLSlotElement)} />\n </span>\n\n <span part=\"suffix\" class=\"menu-item__suffix\">\n <slot name=\"suffix\" />\n </span>\n\n <span part=\"checked-icon\" class=\"menu-item__check\">\n <six-icon size=\"small\" aria-hidden=\"true\">\n check\n </six-icon>\n </span>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-8a74f992.js';
|
|
2
2
|
|
|
3
3
|
const sixMenuLabelCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:block}.menu-label{font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);color:var(--six-input-label-color);padding:var(--six-spacing-xx-small) var(--six-spacing-small);user-select:none}";
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-menu-label.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,mcAAmc;;MCkB9c,YAAY;;;;EACvB,MAAM;IACJ,QACE,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,YAAY,IACjC,eAAQ,CACJ,EACN;GACH;;;;;;","names":[],"sources":["
|
|
1
|
+
{"file":"six-menu-label.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,mcAAmc;;MCkB9c,YAAY;;;;EACvB,MAAM;IACJ,QACE,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,YAAY,IACjC,eAAQ,CACJ,EACN;GACH;;;;;;","names":[],"sources":["src/components/six-menu-label/six-menu-label.scss?tag=six-menu-label&encapsulation=shadow","src/components/six-menu-label/six-menu-label.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu-label {\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-letter-spacing-normal);\n color: var(--six-input-label-color);\n padding: var(--six-spacing-xx-small) var(--six-spacing-small);\n user-select: none;\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu label's content.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-menu-label',\n styleUrl: 'six-menu-label.scss',\n shadow: true,\n})\nexport class SixMenuLabel {\n render() {\n return (\n <div part=\"base\" class=\"menu-label\">\n <slot />\n </div>\n );\n }\n}\n"],"version":3}
|