@six-group/ui-library 0.0.0-insider.a358260 → 0.0.0-insider.cd0cd0d
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-b835dfae.js +61 -0
- package/dist/cjs/event-listeners-b835dfae.js.map +1 -0
- package/dist/cjs/{execution-control-46f388e0.js → execution-control-45c84c46.js} +6 -3
- package/dist/cjs/execution-control-45c84c46.js.map +1 -0
- package/dist/cjs/{focus-visible-0b352c74.js → focus-visible-e0d93a95.js} +3 -3
- package/dist/cjs/focus-visible-e0d93a95.js.map +1 -0
- package/dist/cjs/form-8cbd4e0e.js +20 -0
- package/dist/cjs/form-8cbd4e0e.js.map +1 -0
- package/dist/cjs/{form-control-2c17c573.js → form-control-8df00a52.js} +9 -10
- package/dist/cjs/form-control-8df00a52.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 +1 -1
- package/dist/cjs/{modal-48d42228.js → modal-21350fb5.js} +4 -3
- package/dist/cjs/modal-21350fb5.js.map +1 -0
- package/dist/cjs/{popover-f743f62b.js → popover-8885d50f.js} +39 -31
- package/dist/cjs/popover-8885d50f.js.map +1 -0
- package/dist/cjs/popup-44836aaf.js +103 -0
- package/dist/cjs/popup-44836aaf.js.map +1 -0
- package/dist/cjs/set-attributes_2.cjs.entry.js +3 -1
- package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-alert.cjs.entry.js +17 -22
- package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +4 -7
- package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-badge.cjs.entry.js +1 -1
- package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/six-button.cjs.entry.js +35 -33
- package/dist/cjs/six-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-card.cjs.entry.js.map +1 -1
- package/dist/cjs/six-checkbox.cjs.entry.js +9 -47
- package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/six-datepicker.cjs.entry.js +150 -278
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +47 -46
- package/dist/cjs/six-details.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dialog.cjs.entry.js +35 -39
- package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/six-drawer.cjs.entry.js +32 -36
- package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dropdown_2.cjs.entry.js +214 -195
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error-page.cjs.entry.js +19 -21
- package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-upload.cjs.entry.js +20 -20
- package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +11 -10
- package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
- package/dist/cjs/six-header.cjs.entry.js +65 -43
- package/dist/cjs/six-header.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +3 -3
- package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-input.cjs.entry.js +28 -87
- package/dist/cjs/six-input.cjs.entry.js.map +1 -1
- package/dist/cjs/six-item-picker.cjs.entry.js +58 -77
- package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
- package/dist/cjs/six-layout-grid.cjs.entry.js +4 -2
- package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
- package/dist/cjs/six-menu-item.cjs.entry.js +8 -6
- package/dist/cjs/six-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-picto.cjs.entry.js +4 -1
- package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
- package/dist/cjs/six-progress-ring.cjs.entry.js +3 -3
- package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +17 -23
- package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/six-range.cjs.entry.js +6 -44
- package/dist/cjs/six-range.cjs.entry.js.map +1 -1
- package/dist/cjs/six-root.cjs.entry.js +1 -1
- package/dist/cjs/six-root.cjs.entry.js.map +1 -1
- package/dist/cjs/six-search-field.cjs.entry.js +10 -5
- package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
- package/dist/cjs/six-select.cjs.entry.js +129 -222
- package/dist/cjs/six-select.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +9 -5
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar.cjs.entry.js +39 -18
- package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/six-switch.cjs.entry.js +54 -62
- package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-group.cjs.entry.js +130 -112
- package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +4 -2
- package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +4 -7
- package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/six-textarea.cjs.entry.js +27 -76
- package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tile.cjs.entry.js +13 -16
- package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js +157 -213
- package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +53 -56
- package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{slot-ad537f24.js → slot-bccbdb59.js} +11 -10
- package/dist/cjs/slot-bccbdb59.js.map +1 -0
- package/dist/cjs/ui-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/six-alert/six-alert.js +17 -22
- package/dist/collection/components/six-alert/six-alert.js.map +1 -1
- package/dist/collection/components/six-avatar/six-avatar.js +4 -7
- package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
- package/dist/collection/components/six-badge/six-badge.js +1 -1
- package/dist/collection/components/six-badge/six-badge.js.map +1 -1
- package/dist/collection/components/six-button/six-button.js +44 -40
- package/dist/collection/components/six-button/six-button.js.map +1 -1
- package/dist/collection/components/six-card/six-card.js +1 -1
- package/dist/collection/components/six-card/six-card.js.map +1 -1
- package/dist/collection/components/six-checkbox/six-checkbox.js +20 -128
- package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
- package/dist/collection/components/six-datepicker/components/day-selection.js +2 -2
- package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/components/month-selection.js +4 -3
- package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/components/year-selection.js +9 -6
- package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.js +186 -376
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
- package/dist/collection/components/six-details/six-details.js +51 -50
- package/dist/collection/components/six-details/six-details.js.map +1 -1
- package/dist/collection/components/six-dialog/six-dialog.js +34 -38
- package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
- package/dist/collection/components/six-drawer/six-drawer.js +31 -35
- package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
- package/dist/collection/components/six-dropdown/six-dropdown.js +185 -173
- package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
- package/dist/collection/components/six-error-page/six-error-page.js +25 -27
- package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
- package/dist/collection/components/six-file-list-item/six-file-list-item.js +3 -3
- package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
- package/dist/collection/components/six-file-upload/six-file-upload.js +32 -32
- package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
- package/dist/collection/components/six-group-label/six-group-label.js +12 -10
- package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
- package/dist/collection/components/six-header/six-header.js +64 -42
- package/dist/collection/components/six-header/six-header.js.map +1 -1
- package/dist/collection/components/six-icon-button/six-icon-button.js +8 -8
- package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
- package/dist/collection/components/six-input/six-input.js +77 -274
- package/dist/collection/components/six-input/six-input.js.map +1 -1
- package/dist/collection/components/six-item-picker/six-item-picker.js +65 -84
- package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +2 -2
- package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
- 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-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-menu/six-menu.js +29 -23
- package/dist/collection/components/six-menu/six-menu.js.map +1 -1
- package/dist/collection/components/six-menu-item/six-menu-item.js +7 -5
- package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
- 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-progress-ring/six-progress-ring.js +5 -4
- package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
- package/dist/collection/components/six-radio/six-radio.js +21 -76
- package/dist/collection/components/six-radio/six-radio.js.map +1 -1
- package/dist/collection/components/six-range/six-range.js +27 -119
- package/dist/collection/components/six-range/six-range.js.map +1 -1
- package/dist/collection/components/six-root/six-root.js +4 -4
- package/dist/collection/components/six-root/six-root.js.map +1 -1
- package/dist/collection/components/six-search-field/six-search-field.js +10 -5
- package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
- package/dist/collection/components/six-select/six-select.js +165 -294
- package/dist/collection/components/six-select/six-select.js.map +1 -1
- package/dist/collection/components/six-select/util.js.map +1 -1
- package/dist/collection/components/six-sidebar/six-sidebar.js +40 -19
- package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +12 -8
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
- package/dist/collection/components/six-spinner/six-spinner.js.map +1 -1
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +1 -1
- package/dist/collection/components/six-switch/six-switch.css +77 -0
- package/dist/collection/components/six-switch/six-switch.js +96 -133
- package/dist/collection/components/six-switch/six-switch.js.map +1 -1
- package/dist/collection/components/six-tab/six-tab.js +5 -3
- package/dist/collection/components/six-tab/six-tab.js.map +1 -1
- package/dist/collection/components/six-tab-group/six-tab-group.js +130 -112
- package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
- 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-tag/six-tag.js +4 -7
- package/dist/collection/components/six-tag/six-tag.js.map +1 -1
- package/dist/collection/components/six-textarea/six-textarea.js +72 -207
- package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
- package/dist/collection/components/six-tile/six-tile.js +17 -20
- package/dist/collection/components/six-tile/six-tile.js.map +1 -1
- package/dist/collection/components/six-timepicker/six-timepicker.js +153 -254
- package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
- package/dist/collection/components/six-tooltip/six-tooltip.js +56 -59
- package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
- package/dist/collection/functional-components/form-control/form-control.js +8 -9
- 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/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 +32 -18
- 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/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/type-check.js +0 -1
- package/dist/collection/utils/type-check.js.map +1 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js +3 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -1
- 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/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 +7 -50
- package/dist/components/six-checkbox.js.map +1 -1
- package/dist/components/six-datepicker.js +150 -281
- 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-upload.js +20 -20
- package/dist/components/six-file-upload.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-input2.js +30 -98
- package/dist/components/six-input2.js.map +1 -1
- package/dist/components/six-item-picker2.js +56 -75
- 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-item2.js +7 -5
- package/dist/components/six-menu-item2.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-ring.js +3 -3
- package/dist/components/six-progress-ring.js.map +1 -1
- package/dist/components/six-radio.js +19 -28
- package/dist/components/six-radio.js.map +1 -1
- package/dist/components/six-range.js +8 -50
- 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 +129 -228
- 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.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-switch.js +58 -68
- 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 +4 -7
- package/dist/components/six-tag2.js.map +1 -1
- package/dist/components/six-textarea.js +29 -84
- 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.json +494 -891
- package/dist/esm/event-listeners-535f3ad1.js +59 -0
- package/dist/esm/event-listeners-535f3ad1.js.map +1 -0
- package/dist/esm/{execution-control-1a60d709.js → execution-control-72cc50f4.js} +6 -3
- package/dist/esm/execution-control-72cc50f4.js.map +1 -0
- package/dist/esm/{focus-visible-97933ea9.js → focus-visible-fa7129a0.js} +3 -3
- package/dist/esm/focus-visible-fa7129a0.js.map +1 -0
- package/dist/esm/form-0b9c11cd.js +18 -0
- package/dist/esm/form-0b9c11cd.js.map +1 -0
- package/dist/esm/{form-control-3b440ea1.js → form-control-785c5f79.js} +9 -10
- package/dist/esm/form-control-785c5f79.js.map +1 -0
- package/dist/esm/index.js +91 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{modal-5ebdc320.js → modal-b1d96441.js} +4 -3
- package/dist/esm/modal-b1d96441.js.map +1 -0
- package/dist/esm/{popover-bd2c2fca.js → popover-2e72e7d8.js} +39 -31
- package/dist/esm/popover-2e72e7d8.js.map +1 -0
- package/dist/esm/popup-678b8592.js +98 -0
- package/dist/esm/popup-678b8592.js.map +1 -0
- package/dist/esm/set-attributes_2.entry.js +3 -1
- package/dist/esm/set-attributes_2.entry.js.map +1 -1
- package/dist/esm/six-alert.entry.js +17 -22
- package/dist/esm/six-alert.entry.js.map +1 -1
- package/dist/esm/six-avatar.entry.js +4 -7
- package/dist/esm/six-avatar.entry.js.map +1 -1
- package/dist/esm/six-badge.entry.js +1 -1
- package/dist/esm/six-badge.entry.js.map +1 -1
- package/dist/esm/six-button.entry.js +35 -33
- package/dist/esm/six-button.entry.js.map +1 -1
- package/dist/esm/six-card.entry.js.map +1 -1
- package/dist/esm/six-checkbox.entry.js +9 -47
- package/dist/esm/six-checkbox.entry.js.map +1 -1
- package/dist/esm/six-datepicker.entry.js +148 -276
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +47 -46
- package/dist/esm/six-details.entry.js.map +1 -1
- package/dist/esm/six-dialog.entry.js +35 -39
- package/dist/esm/six-dialog.entry.js.map +1 -1
- package/dist/esm/six-drawer.entry.js +32 -36
- package/dist/esm/six-drawer.entry.js.map +1 -1
- package/dist/esm/six-dropdown_2.entry.js +214 -195
- package/dist/esm/six-dropdown_2.entry.js.map +1 -1
- package/dist/esm/six-error-page.entry.js +19 -21
- package/dist/esm/six-error-page.entry.js.map +1 -1
- package/dist/esm/six-file-list-item.entry.js +1 -1
- package/dist/esm/six-file-list-item.entry.js.map +1 -1
- package/dist/esm/six-file-upload.entry.js +20 -20
- package/dist/esm/six-file-upload.entry.js.map +1 -1
- package/dist/esm/six-group-label.entry.js +11 -10
- package/dist/esm/six-group-label.entry.js.map +1 -1
- package/dist/esm/six-header.entry.js +65 -43
- package/dist/esm/six-header.entry.js.map +1 -1
- package/dist/esm/six-icon-button.entry.js +3 -3
- package/dist/esm/six-icon-button.entry.js.map +1 -1
- package/dist/esm/six-input.entry.js +28 -87
- package/dist/esm/six-input.entry.js.map +1 -1
- package/dist/esm/six-item-picker.entry.js +58 -77
- package/dist/esm/six-item-picker.entry.js.map +1 -1
- package/dist/esm/six-language-switcher.entry.js +1 -1
- package/dist/esm/six-language-switcher.entry.js.map +1 -1
- package/dist/esm/six-layout-grid.entry.js +4 -2
- package/dist/esm/six-layout-grid.entry.js.map +1 -1
- package/dist/esm/six-main-container.entry.js.map +1 -1
- package/dist/esm/six-menu-item.entry.js +8 -6
- package/dist/esm/six-menu-item.entry.js.map +1 -1
- package/dist/esm/six-picto.entry.js +4 -1
- package/dist/esm/six-picto.entry.js.map +1 -1
- package/dist/esm/six-progress-ring.entry.js +3 -3
- package/dist/esm/six-progress-ring.entry.js.map +1 -1
- package/dist/esm/six-radio.entry.js +17 -23
- package/dist/esm/six-radio.entry.js.map +1 -1
- package/dist/esm/six-range.entry.js +6 -44
- package/dist/esm/six-range.entry.js.map +1 -1
- package/dist/esm/six-root.entry.js +1 -1
- package/dist/esm/six-root.entry.js.map +1 -1
- package/dist/esm/six-search-field.entry.js +10 -5
- package/dist/esm/six-search-field.entry.js.map +1 -1
- package/dist/esm/six-select.entry.js +129 -222
- package/dist/esm/six-select.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item-group.entry.js +9 -5
- package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
- package/dist/esm/six-sidebar.entry.js +39 -18
- package/dist/esm/six-sidebar.entry.js.map +1 -1
- package/dist/esm/six-spinner.entry.js.map +1 -1
- package/dist/esm/six-switch.entry.js +55 -63
- package/dist/esm/six-switch.entry.js.map +1 -1
- package/dist/esm/six-tab-group.entry.js +130 -112
- package/dist/esm/six-tab-group.entry.js.map +1 -1
- package/dist/esm/six-tab-panel.entry.js +1 -1
- package/dist/esm/six-tab-panel.entry.js.map +1 -1
- package/dist/esm/six-tab.entry.js +4 -2
- package/dist/esm/six-tab.entry.js.map +1 -1
- package/dist/esm/six-tag.entry.js +4 -7
- package/dist/esm/six-tag.entry.js.map +1 -1
- package/dist/esm/six-textarea.entry.js +27 -76
- package/dist/esm/six-textarea.entry.js.map +1 -1
- package/dist/esm/six-tile.entry.js +13 -16
- package/dist/esm/six-tile.entry.js.map +1 -1
- package/dist/esm/six-timepicker.entry.js +157 -213
- package/dist/esm/six-timepicker.entry.js.map +1 -1
- package/dist/esm/six-tooltip.entry.js +53 -56
- package/dist/esm/six-tooltip.entry.js.map +1 -1
- package/dist/esm/{slot-6f3984c7.js → slot-2e64df19.js} +11 -10
- package/dist/esm/slot-2e64df19.js.map +1 -0
- package/dist/esm/ui-library.js +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 +5 -17
- 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 +9 -35
- 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 +5 -10
- package/dist/types/components/six-range/six-range.d.ts +6 -21
- 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 +19 -31
- 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 +9 -28
- 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 +190 -417
- package/dist/types/functional-components/form-control/form-control.d.ts +5 -6
- package/dist/types/index.d.ts +1 -0
- 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 +2 -1
- 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-0108fe92.entry.js +2 -0
- package/dist/ui-library/p-0108fe92.entry.js.map +1 -0
- package/dist/ui-library/p-03a145f5.entry.js +2 -0
- package/dist/ui-library/p-03a145f5.entry.js.map +1 -0
- package/dist/ui-library/{p-3c635d0a.entry.js → p-087fdd96.entry.js} +2 -2
- package/dist/ui-library/p-087fdd96.entry.js.map +1 -0
- package/dist/ui-library/p-09779e47.entry.js +2 -0
- package/dist/ui-library/p-09779e47.entry.js.map +1 -0
- package/dist/ui-library/p-097cced4.entry.js.map +1 -1
- package/dist/ui-library/p-0b2c6348.js +2 -0
- package/dist/ui-library/p-0b2c6348.js.map +1 -0
- package/dist/ui-library/p-0cc08e91.js +2 -0
- package/dist/ui-library/p-0cc08e91.js.map +1 -0
- package/dist/ui-library/p-0fe78f9b.js +2 -0
- package/dist/ui-library/p-0fe78f9b.js.map +1 -0
- package/dist/ui-library/p-18e9f8b8.entry.js +2 -0
- package/dist/ui-library/p-18e9f8b8.entry.js.map +1 -0
- package/dist/ui-library/p-2761f908.js +2 -0
- package/dist/ui-library/p-2761f908.js.map +1 -0
- package/dist/ui-library/{p-19b50b5a.entry.js → p-28be55f0.entry.js} +2 -2
- package/dist/ui-library/p-28be55f0.entry.js.map +1 -0
- package/dist/ui-library/{p-c349d1d4.entry.js → p-3929b0af.entry.js} +2 -2
- package/dist/ui-library/p-3929b0af.entry.js.map +1 -0
- package/dist/ui-library/{p-9328e5bc.entry.js → p-445ba5b8.entry.js} +2 -2
- package/dist/ui-library/p-445ba5b8.entry.js.map +1 -0
- package/dist/ui-library/p-4d408fb4.js +2 -0
- package/dist/ui-library/p-4d408fb4.js.map +1 -0
- package/dist/ui-library/p-502ff3d3.entry.js +2 -0
- package/dist/ui-library/p-502ff3d3.entry.js.map +1 -0
- package/dist/ui-library/p-5a34c93e.entry.js +2 -0
- package/dist/ui-library/p-5a34c93e.entry.js.map +1 -0
- package/dist/ui-library/p-60621dc6.js +2 -0
- package/dist/ui-library/p-60621dc6.js.map +1 -0
- package/dist/ui-library/p-63703ba3.entry.js.map +1 -1
- package/dist/ui-library/p-66180e89.entry.js +2 -0
- package/dist/ui-library/p-66180e89.entry.js.map +1 -0
- package/dist/ui-library/p-686b12ec.entry.js +2 -0
- package/dist/ui-library/p-686b12ec.entry.js.map +1 -0
- package/dist/ui-library/p-71035abf.entry.js +2 -0
- package/dist/ui-library/p-71035abf.entry.js.map +1 -0
- package/dist/ui-library/{p-8a970a40.entry.js → p-724e154d.entry.js} +2 -2
- package/dist/ui-library/p-724e154d.entry.js.map +1 -0
- package/dist/ui-library/p-72ca96e1.entry.js +2 -0
- package/dist/ui-library/p-72ca96e1.entry.js.map +1 -0
- package/dist/ui-library/p-73597d13.entry.js.map +1 -1
- package/dist/ui-library/{p-c30f9e0b.entry.js → p-778cf804.entry.js} +2 -2
- package/dist/ui-library/p-778cf804.entry.js.map +1 -0
- package/dist/ui-library/p-87032e26.entry.js +2 -0
- package/dist/ui-library/p-87032e26.entry.js.map +1 -0
- package/dist/ui-library/p-8cf72af6.js +2 -0
- package/dist/ui-library/p-8cf72af6.js.map +1 -0
- package/dist/ui-library/p-8e0b6b7e.entry.js +2 -0
- package/dist/ui-library/p-8e0b6b7e.entry.js.map +1 -0
- package/dist/ui-library/p-912092c0.entry.js +2 -0
- package/dist/ui-library/p-912092c0.entry.js.map +1 -0
- package/dist/ui-library/p-92ca6a84.entry.js +2 -0
- package/dist/ui-library/p-92ca6a84.entry.js.map +1 -0
- package/dist/ui-library/{p-d5633a29.entry.js → p-9337cdd6.entry.js} +2 -2
- package/dist/ui-library/p-9337cdd6.entry.js.map +1 -0
- package/dist/ui-library/p-9461417e.entry.js +2 -0
- package/dist/ui-library/p-9461417e.entry.js.map +1 -0
- package/dist/ui-library/p-a1d4f6cf.entry.js.map +1 -1
- package/dist/ui-library/p-a49ae60a.entry.js +2 -0
- package/dist/ui-library/p-a49ae60a.entry.js.map +1 -0
- package/dist/ui-library/{p-611e1978.entry.js → p-a844cb72.entry.js} +2 -2
- package/dist/ui-library/{p-611e1978.entry.js.map → p-a844cb72.entry.js.map} +1 -1
- package/dist/ui-library/p-afcbe9da.entry.js +2 -0
- package/dist/ui-library/p-afcbe9da.entry.js.map +1 -0
- package/dist/ui-library/{p-97cc839c.entry.js → p-b3bff992.entry.js} +2 -2
- package/dist/ui-library/p-b3bff992.entry.js.map +1 -0
- package/dist/ui-library/p-b4547fb5.entry.js +2 -0
- package/dist/ui-library/p-b4547fb5.entry.js.map +1 -0
- package/dist/ui-library/{p-4f8394d7.js → p-ba74863a.js} +2 -2
- package/dist/ui-library/p-ba74863a.js.map +1 -0
- package/dist/ui-library/p-bd8f8eef.entry.js +2 -0
- package/dist/ui-library/p-bd8f8eef.entry.js.map +1 -0
- package/dist/ui-library/p-c57f16af.entry.js +2 -0
- package/dist/ui-library/p-c57f16af.entry.js.map +1 -0
- package/dist/ui-library/p-c5cdba08.entry.js +2 -0
- package/dist/ui-library/p-c5cdba08.entry.js.map +1 -0
- package/dist/ui-library/p-c87810b0.entry.js +2 -0
- package/dist/ui-library/p-c87810b0.entry.js.map +1 -0
- package/dist/ui-library/{p-af793d04.entry.js → p-cdcde4cd.entry.js} +2 -2
- package/dist/ui-library/p-cdcde4cd.entry.js.map +1 -0
- package/dist/ui-library/p-d6798d35.entry.js +2 -0
- package/dist/ui-library/p-d6798d35.entry.js.map +1 -0
- package/dist/ui-library/p-d87a6f4d.js +2 -0
- package/dist/ui-library/p-d87a6f4d.js.map +1 -0
- package/dist/ui-library/p-dc3f5996.entry.js +2 -0
- package/dist/ui-library/p-dc3f5996.entry.js.map +1 -0
- package/dist/ui-library/p-dcd7c547.entry.js +2 -0
- package/dist/ui-library/p-dcd7c547.entry.js.map +1 -0
- package/dist/ui-library/p-e07b3f0c.entry.js +2 -0
- package/dist/ui-library/p-e07b3f0c.entry.js.map +1 -0
- package/dist/ui-library/{p-19364560.entry.js → p-e8feb81f.entry.js} +2 -2
- package/dist/ui-library/{p-19364560.entry.js.map → p-e8feb81f.entry.js.map} +1 -1
- package/dist/ui-library/p-ef3936e5.entry.js +2 -0
- package/dist/ui-library/p-ef3936e5.entry.js.map +1 -0
- package/dist/ui-library/p-f0dd77e1.entry.js +2 -0
- package/dist/ui-library/p-f0dd77e1.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/package.json +2 -2
- 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/modal-48d42228.js.map +0 -1
- package/dist/cjs/popover-f743f62b.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/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/modal-5ebdc320.js.map +0 -1
- package/dist/esm/popover-bd2c2fca.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/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-163f2bb0.entry.js +0 -2
- package/dist/ui-library/p-163f2bb0.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-19b50b5a.entry.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-394a2a12.entry.js +0 -2
- package/dist/ui-library/p-394a2a12.entry.js.map +0 -1
- package/dist/ui-library/p-3c635d0a.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-5a25d6fb.entry.js +0 -2
- package/dist/ui-library/p-5a25d6fb.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 +0 -2
- package/dist/ui-library/p-6433c0da.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-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-9328e5bc.entry.js.map +0 -1
- package/dist/ui-library/p-97cc839c.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-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-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-df655bc9.entry.js +0 -2
- package/dist/ui-library/p-df655bc9.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-f604e067.entry.js +0 -2
- package/dist/ui-library/p-f604e067.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-datepicker.js","sourceRoot":"","sources":["../../../src/components/six-datepicker/six-datepicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,EACL,kBAAkB,EAClB,GAAG,EACH,UAAU,EACV,oBAAoB,EACpB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,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EAAE,CAAC;KACxB,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport {\n createCalendarGrid,\n day,\n formatDate,\n getFirstDayOfTheWeek,\n hours,\n i18nDate,\n isValidDate,\n isValidDateString,\n minutes,\n month,\n now,\n PointerDate,\n seconds,\n toDate,\n year,\n} from '../../utils/date-util';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { isNil } from '../../utils/type-check';\nimport { debounce, debounceEvent, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixDateFormats } from './six-date-formats';\nimport { MonthSelection } from './components/month-selection';\nimport { DaySelection } from './components/day-selection';\nimport { YearSelection } from './components/year-selection';\nimport { SixTimepickerChange } from '../six-timepicker/six-timepicker';\nimport { SixTimePropertyName } from '../six-timepicker/six-timepicker.types';\n\nconst NUMBER_OF_YEARS_SHOWN = 25;\n\nconst MIN_POPUP_HEIGHT = 400;\n\nexport type SixDatepickerSelectPayload = Date | undefined | null;\n\nexport interface CalendarCell {\n date: Date;\n dateString: string;\n display: string;\n isDisabled: boolean;\n isOutdated: boolean;\n isSelected: boolean;\n isToday: boolean;\n label: string;\n}\n\nenum SelectionMode {\n DAY = 'day',\n MONTH = 'month',\n YEAR = 'year',\n}\n\nconst getYearSelectionAroundYear = (year: number): number[][] => {\n const numberOfElementsPerRow = 5;\n return Array.from(new Array(NUMBER_OF_YEARS_SHOWN).keys())\n .map((n) => n + year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2))\n .reduce((curr, item, index) => {\n if (index % numberOfElementsPerRow === 0) {\n curr.push([]);\n }\n\n curr[curr.length - 1].push(item);\n\n return curr;\n }, []);\n};\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define a footer for the date picker.\n */\n@Component({\n tag: 'six-datepicker',\n styleUrl: 'six-datepicker.scss',\n shadow: true,\n})\nexport class SixDatepicker {\n private readonly eventListeners = new EventListeners();\n\n private inputElement: HTMLSixInputElement;\n\n private popup: HTMLElement;\n\n private wrapper: HTMLElement;\n\n @Element()\n readonly host: HTMLSixDatepickerElement;\n\n private selectedDate: Date | null = null;\n\n @State() private pointerDate = SixDatepicker.getCurrentDateAsPointer();\n @State() selectionMode: SelectionMode = SelectionMode.DAY;\n @State() isDropDownContentUp = false;\n\n /**\n * Set the type.\n */\n @Prop() type: 'date' | 'date-time' = 'date';\n\n /**\n * The language used to render the weekdays and months.\n */\n @Prop() locale: 'en' | 'de' | 'fr' | 'it' = 'en';\n\n /** Indicates whether or not the calendar dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether or not the calendar should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a date via the component in the popup, but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Callback to determine which date in the datepicker should be selectable.\n * the callback function will get a datestring as an argument, e.g. '2021-07-04'\n *\n * Usage e.g.:\n * const datepicker = document.getElementById('allowed-date-picker');\n * datepicker.allowedDates = datestring => parseInt(datestring.split('-')[2], 10) % 2 === 0;\n */\n @Prop() allowedDates: (date: Date) => boolean = () => true;\n\n /**\n * The minimum datetime allowed. Value must be a date object\n */\n @Prop() min?: Date | null = null;\n\n /**\n * The maximum datetime allowed. Value must be a date object\n */\n @Prop() max?: Date | null = null;\n\n /**\n * Closes the datepicker dropdown after selection\n */\n @Prop() closeOnSelect = this.type === 'date';\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement: 'top' | 'bottom';\n\n /** Datepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to make the input a required field. */\n @Prop({ reflect: true }) required: boolean;\n\n /**\n * The date to defines where the datepicker popup starts. The prop accepts ISO 8601 date strings (YYYY-MM-DD).\n */\n @Prop() defaultDate?: string | null;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string | null;\n\n /**\n * The value of the form field, which accepts a date object.\n */\n @Prop({ mutable: true }) value?: Date | null = null;\n\n /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement: HTMLElement;\n\n /** Define the dateFormat. Valid formats are:\n * 'dd.mm.yyyy'\n * 'yyyy-mm-dd'\n * 'dd-mm-yyyy'\n * 'dd/mm/yyyy'\n * 'yyyy/mm/dd'\n * 'dd.mm.yy'\n * 'yy-mm-dd'\n * 'dd-mm-yy'\n * 'dd/mm/yy'\n * 'yy/mm/dd'\n * */\n @Prop() dateFormat: SixDateFormats = SixDateFormats.DDMMYYY_DOT;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `dateChange` event after each keystroke.\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /** Set to display the error text on blur and not when typing */\n @Prop() errorOnBlur = false;\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText = '';\n\n /** The input's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.sixSelect = debounceEvent(this.sixSelect, this.debounce);\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n // map unreadable values to undefined to make the datepicker fault-tolerant\n if (this.isValidValue()) {\n console.warn('Encountered unreadable date, will map to undefined. Received value', this.value);\n this.value = undefined;\n return;\n }\n\n this.selectedDate = this.value;\n this.updatePointerDates();\n this.sixSelect.emit(this.value);\n }\n\n /**\n * Emitted when a option got selected.\n */\n @Event({ eventName: 'six-datepicker-select' }) sixSelect: EventEmitter<SixDatepickerSelectPayload>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-datepicker-clear' }) sixClear: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when a option got selected.\n */\n @Event({ eventName: 'six-datepicker-blur' }) sixBlur: EventEmitter<SixDatepickerSelectPayload>;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.calcIsDropDownContentUp();\n this.moveOpenHoistedPopup();\n this.adjustPopupPosition();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.calcIsDropDownContentUp();\n this.moveOpenHoistedPopup();\n }\n\n private defaultValue: Date = null;\n\n get container() {\n return this.containingElement || this.host;\n }\n\n get firstDateOfBox(): Date {\n const date = new Date(this.pointerDate.year, this.pointerDate.month, 1);\n return getFirstDayOfTheWeek(date);\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n @Method()\n async reportValidity() {\n return this.inputElement.reportValidity();\n }\n\n /** Checks for validity. */\n @Method()\n async checkValidity() {\n return this.inputElement.checkValidity();\n }\n\n /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */\n @Method()\n async setCustomValidity(message: string) {\n await this.inputElement.setCustomValidity(message);\n }\n\n /** Resets the formcontrol */\n @Method()\n async reset() {\n this.value = this.defaultValue;\n this.inputElement.value = formatDate(this.defaultValue, this.dateFormat);\n await this.inputElement.reset();\n }\n\n private isValidValue() {\n if (this.value === undefined || this.value === null) {\n return false;\n }\n\n if (!(this.value instanceof Date)) {\n return true;\n }\n\n return this.value instanceof Date && isNaN(this.value as any);\n }\n\n get calendarGrid() {\n return createCalendarGrid({\n firstDateOfBox: this.firstDateOfBox,\n allowedDates: this.allowedDates,\n dateFormat: this.dateFormat,\n locale: this.locale,\n selectedDate: this.selectedDate,\n minDate: this.min,\n maxDate: this.max,\n pointerDate: this.pointerDate,\n });\n }\n\n private calcIsDropDownContentUp() {\n if (!this.inputElement || !this.wrapper) {\n return;\n }\n\n const inputBoundingRect = this.inputElement.getBoundingClientRect();\n const wrapperBoundingRect = this.wrapper.getBoundingClientRect();\n const minPopupHeight = Math.max(wrapperBoundingRect.height, MIN_POPUP_HEIGHT);\n\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n this.isDropDownContentUp = moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + minPopupHeight;\n }\n\n private getMonthStringForIndex(index: number) {\n return i18nDate[this.locale].months[index];\n }\n\n private previousUnit() {\n if (this.selectionMode === SelectionMode.DAY) {\n this.previousMonth();\n } else if (this.selectionMode === SelectionMode.MONTH) {\n this.previousYear();\n } else if (this.selectionMode === SelectionMode.YEAR) {\n this.previousYearGroup();\n }\n }\n\n private previousYear() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - 1 };\n }\n\n private previousYearGroup() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - NUMBER_OF_YEARS_SHOWN };\n }\n\n private previousMonth() {\n if (this.pointerDate.month === 0) {\n this.pointerDate = { year: this.pointerDate.year - 1, month: 11, day: 1, hours: 0, minutes: 0, seconds: 0 };\n } else {\n this.pointerDate = {\n year: this.pointerDate.year,\n month: this.pointerDate.month - 1,\n day: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n };\n }\n }\n\n private nextUnit() {\n if (this.selectionMode === SelectionMode.DAY) {\n this.nextMonth();\n } else if (this.selectionMode === SelectionMode.MONTH) {\n this.nextYear();\n } else if (this.selectionMode === SelectionMode.YEAR) {\n this.nextYearGroup();\n }\n }\n\n private nextMonth() {\n if (this.pointerDate.month === 11) {\n this.pointerDate = { year: this.pointerDate.year + 1, month: 0, day: 1, hours: 0, minutes: 0, seconds: 0 };\n } else {\n this.pointerDate = {\n year: this.pointerDate.year,\n month: this.pointerDate.month + 1,\n day: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n };\n }\n }\n\n private nextYear() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + 1 };\n }\n\n private nextYearGroup() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + NUMBER_OF_YEARS_SHOWN };\n }\n\n openCalendar() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.setupEventListenersForOpenPopup();\n }\n }\n\n private setupEventListenersForOpenPopup() {\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n handleDocumentKeyDown = (event: KeyboardEvent) => {\n // Close when escape is pressed\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.closePopup();\n void this.inputElement.setFocus();\n }\n\n // Handle tabbing\n if (event.key === 'Tab') {\n this.closePopup();\n }\n };\n\n handleDocumentMouseDown = (event: MouseEvent) => {\n // Close when clicking outside of the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.container)) {\n this.closePopup();\n return;\n }\n };\n\n handleClearClick(event: MouseEvent) {\n event.stopPropagation();\n void this.select(undefined);\n this.sixClear.emit();\n }\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n this.selectionMode = SelectionMode.DAY;\n }\n\n private updatePointerDates() {\n const date = this.getPointerDate();\n if (this.differsFromPointerDate(date)) {\n this.pointerDate = {\n year: year(date),\n month: month(date),\n day: day(date),\n hours: hours(date),\n minutes: minutes(date),\n seconds: seconds(date),\n };\n }\n }\n\n private differsFromPointerDate(date: Date): boolean {\n return (\n this.pointerDate.day !== day(date) ||\n this.pointerDate.month !== month(date) ||\n this.pointerDate.year !== year(date) ||\n this.pointerDate.hours !== hours(date) ||\n this.pointerDate.minutes !== minutes(date) ||\n this.pointerDate.seconds !== seconds(date)\n );\n }\n\n private getPointerDate() {\n if (this.selectedDate !== undefined && this.selectedDate !== null) {\n return this.selectedDate;\n }\n\n if (isNil(this.defaultDate)) {\n return now();\n } else {\n return this.defaultDate && toDate(this.defaultDate, this.dateFormat);\n }\n }\n\n private updateValue(newDate: Date | undefined | null) {\n this.displayCustomMessage(true);\n this.updateIfChanged(newDate);\n }\n\n updateIfChanged(newDate: Date) {\n if (this.value?.getTime() === newDate?.getTime()) {\n return;\n }\n\n this.value = newDate;\n }\n\n /**\n * Selects an option\n */\n @Method()\n async select(datestring: string) {\n if (!datestring) {\n this.updateValue(undefined);\n } else {\n const newDate = toDate(datestring, this.dateFormat);\n newDate.setHours(this.pointerDate.hours, this.pointerDate.minutes, this.pointerDate.seconds);\n this.updateValue(newDate);\n }\n\n this.updatePointerDates();\n\n if (this.closeOnSelect) {\n this.closePopup();\n }\n }\n\n onTimepickerChange = (sixTimepickerChange: CustomEvent<SixTimepickerChange>) => {\n const time = sixTimepickerChange.detail.value;\n const newDate = new Date();\n\n if (this.selectedDate) {\n newDate.setFullYear(this.selectedDate.getFullYear(), this.selectedDate.getMonth(), this.selectedDate.getDate());\n }\n\n newDate.setHours(\n time[SixTimePropertyName.HOURS],\n time[SixTimePropertyName.MINUTES],\n time[SixTimePropertyName.SECONDS]\n );\n\n this.updateValue(newDate);\n this.updatePointerDates();\n };\n\n onClickDateCell = (cell: CalendarCell) => {\n if (!cell.isDisabled) {\n void this.select(cell.dateString);\n }\n };\n\n onClickMonthCell = (selectedMonth: string) => {\n const month = i18nDate[this.locale].monthsShort.findIndex((monthShort) => monthShort === selectedMonth);\n this.pointerDate = { ...this.pointerDate, month };\n this.selectionMode = SelectionMode.DAY;\n };\n\n onClickYearCell = (year: number) => {\n this.pointerDate = { ...this.pointerDate, year };\n this.selectionMode = SelectionMode.DAY;\n };\n\n handleInputChange = (event: Event) => {\n const inputValue = this.inputElement.value;\n\n if (!isValidDateString(inputValue, this.dateFormat)) {\n return;\n }\n\n const inputValueDate = toDate(inputValue, this.dateFormat);\n\n if (inputValueDate === undefined) {\n return;\n }\n\n if (this.min && this.min.getTime() > inputValueDate.getTime()) {\n return;\n }\n\n if (this.max && this.max.getTime() < inputValueDate.getTime()) {\n return;\n }\n\n this.updateIfChanged(inputValueDate);\n event.stopPropagation();\n\n const datesOnly = inputValue.replace(/[^\\d]/g, '');\n\n let isDateValid = !inputValue;\n\n if (inputValue && datesOnly.length >= 6) {\n const date = toDate(inputValue, this.dateFormat);\n const datestring = formatDate(date, this.dateFormat);\n if (isValidDateString(datestring, this.dateFormat)) {\n this.selectedDate = toDate(datestring, this.dateFormat);\n this.updatePointerDates();\n this.updateValue(this.selectedDate);\n isDateValid = true;\n }\n }\n this.displayCustomMessage(isDateValid);\n };\n\n handleOnBlur = (event: Event) => {\n // clear the value if the user deleted the date\n if (this.inputElement.value === '' && isValidDate(this.value)) {\n this.value = undefined;\n }\n\n event.stopPropagation();\n const inputValue = this.inputElement.value;\n const inputValueDate = toDate(inputValue, this.dateFormat);\n const formattedDate = formatDate(this.value, this.dateFormat);\n\n if (inputValueDate && inputValue !== formattedDate) {\n // properly format date if necessary\n this.inputElement.value = formattedDate;\n }\n\n this.sixBlur.emit(this.value);\n };\n\n componentWillLoad() {\n this.validateProps();\n\n this.defaultValue = this.value;\n this.selectedDate = this.value;\n this.updatePointerDates();\n this.updateValue(this.value);\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.setupEventListenersForOpenPopup();\n }\n }\n\n private validateProps() {\n if (this.value !== null && this.value !== undefined && !(this.value instanceof Date)) {\n throw new Error('Datepicker no longer supports strings as value. Use a date object instead!');\n }\n\n if (this.min !== null && this.min !== undefined && !(this.min instanceof Date)) {\n throw new Error('Datepicker no longer supports strings as min. Use a date object instead!');\n }\n\n if (this.max !== null && this.max !== undefined && !(this.max instanceof Date)) {\n throw new Error('Datepicker no longer supports strings as min. Use a date object instead!');\n }\n }\n\n componentDidLoad() {\n this.eventListeners.add(this.inputElement, 'six-input-input', debounce(this.handleInputChange, this.debounce));\n this.eventListeners.add(this.inputElement, 'six-input-blur', this.handleOnBlur);\n }\n\n renderHeader() {\n return (\n <header class=\"datepicker-header\" part=\"header\">\n <div class=\"datepicker-header__btn prev\" onClick={() => this.previousUnit()}>\n <svg viewBox=\"0 5 13 13\" width=\"14\" height=\"23\">\n <path d=\"M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z\" />\n </svg>\n </div>\n\n <div class=\"datepicker-header__label\">\n {this.selectionMode === SelectionMode.DAY && (\n <div onClick={() => (this.selectionMode = SelectionMode.MONTH)}>\n <span class=\"datepicker-header__label-month\">{this.getMonthStringForIndex(this.pointerDate.month)}</span>\n <span>\n <svg viewBox=\"-3 -4 24 24\" width=\"20\" height=\"20\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </div>\n )}\n\n {this.selectionMode !== SelectionMode.YEAR && (\n <div onClick={() => (this.selectionMode = SelectionMode.YEAR)}>\n <span class=\"datepicker-header__label-year\">{this.pointerDate.year}</span>\n <span>\n <svg viewBox=\"-3 -4 24 24\" width=\"20\" height=\"20\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </div>\n )}\n\n {this.selectionMode === SelectionMode.YEAR && (\n <div>\n {this.pointerDate.year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2)} –{' '}\n {this.pointerDate.year + Math.floor(NUMBER_OF_YEARS_SHOWN / 2)}\n </div>\n )}\n </div>\n\n <div class=\"datepicker-header__btn next\" onClick={() => this.nextUnit()}>\n <svg viewBox=\"5 5 13 13\" width=\"14\" height=\"23\">\n <path d=\"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z\" />\n </svg>\n </div>\n </header>\n );\n }\n\n renderBody() {\n switch (this.selectionMode) {\n case SelectionMode.DAY:\n return (\n <DaySelection\n locale={i18nDate[this.locale]}\n calendarGrid={this.calendarGrid}\n onClickDateCell={this.onClickDateCell}\n />\n );\n case SelectionMode.MONTH:\n return (\n <MonthSelection\n locale={i18nDate[this.locale]}\n selectedDate={this.selectedDate}\n onClickMonthCell={this.onClickMonthCell}\n />\n );\n case SelectionMode.YEAR:\n return (\n <YearSelection\n selectedDate={this.selectedDate}\n yearSelection={getYearSelectionAroundYear(this.pointerDate.year)}\n onClickYearCell={this.onClickYearCell}\n />\n );\n }\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>today</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n 'datepicker-clear': true,\n 'datepicker-clear--right': this.iconPosition === 'left',\n 'datepicker-clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n render() {\n this.adjustPopupPosition();\n\n return (\n <div ref={(el) => (this.wrapper = el)} class=\"datepicker__container\">\n <six-input\n part=\"base\"\n value={formatDate(this.value, this.dateFormat)}\n ref={(el) => (this.inputElement = el)}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n name={this.name}\n label={this.label}\n required={this.required}\n error-text={this.errorText}\n error-on-blur={this.errorOnBlur}\n onClick={() => this.openCalendar()}\n size={this.size}\n class={{ 'input--empty': !this.value }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n\n {hasSlot(this.host, 'error-text') ? (\n <span slot=\"error-text\">\n <slot name=\"error-text\" />\n </span>\n ) : null}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n part=\"popup\"\n ref={(el) => (this.popup = el)}\n class={{\n datepicker__popup: true,\n 'datepicker__popup--is-up': this.placement ? this.placement === 'top' : this.isDropDownContentUp,\n 'datepicker__popup--is-inline': this.inline,\n }}\n >\n {this.renderHeader()}\n {this.renderBody()}\n {this.type === 'date-time' && (\n <six-timepicker\n inline={true}\n onSix-timepicker-change-debounced={(event) => this.onTimepickerChange(event)}\n value={\n this.selectedDate?.getHours() +\n ':' +\n this.selectedDate?.getMinutes() +\n ':' +\n this.selectedDate?.getSeconds()\n }\n ></six-timepicker>\n )}\n <div class=\"datepicker__footer\">\n <slot />\n </div>\n </div>\n )}\n </div>\n );\n }\n\n private adjustPopupPosition() {\n this.adjustPopupForHoisting();\n this.adjustPopupForSmallScreens();\n }\n\n /*\n * The position of the hoisted datepicker needs to be correctly calculated since the position changes to fixed.\n * Thus if the user scrolls or adjusts the screen size we need to recalculate the datepicker position.\n */\n private moveOpenHoistedPopup() {\n if (!this.hoist || !this.open) {\n return;\n }\n\n const popupBoundingClientRect = this.popup.getBoundingClientRect();\n const popupHeight = popupBoundingClientRect.height;\n const inputBoundingClientRect = this.inputElement.getBoundingClientRect();\n const inputTop = inputBoundingClientRect.top;\n const inputHeight = inputBoundingClientRect.height;\n\n this.calcIsDropDownContentUp();\n\n if (this.isDropDownContentUp) {\n this.popup.style.top = `${inputTop - popupHeight}px`;\n } else {\n this.popup.style.top = `${inputTop + inputHeight}px`;\n }\n }\n\n /*\n * For small screens the datepicker popup could be cut-off even though there might still be space within the viewport.\n * This is because the popup is always aligned with the trigger input field. However in the scenario of small screens\n * we should reposition the popup to use the space available.\n */\n private adjustPopupForSmallScreens() {\n // execute after dropdown has been rendered to make sure the popup reference is correctly set\n setTimeout(() => {\n if (!this.popup) {\n return;\n }\n\n const popupBoundingClientRect = this.popup.getBoundingClientRect();\n\n const setPopupAsFixPosition = () => {\n // apply screen position to fixed popup\n this.popup.style.position = 'fixed';\n ['top', 'left', 'width', 'height'].forEach((property) => {\n this.popup.style[property] = `${popupBoundingClientRect[property]}px`;\n });\n };\n\n if (\n popupBoundingClientRect.y < 0 &&\n window.innerHeight - popupBoundingClientRect.height > 0 &&\n Math.abs(popupBoundingClientRect.y) <= popupBoundingClientRect.height\n ) {\n // handle case where popup is cut-off on top but there is still space available\n\n setPopupAsFixPosition();\n this.popup.style.top = '0px';\n } else if (\n window.innerHeight < popupBoundingClientRect.y + popupBoundingClientRect.height &&\n window.innerHeight > popupBoundingClientRect.height &&\n Math.abs(popupBoundingClientRect.y - window.innerHeight) <= popupBoundingClientRect.height\n ) {\n // handle case where popup is cut-off at the bottom but there is still space available above\n // apply screen position to fixed popup\n setPopupAsFixPosition();\n this.popup.style.top = `${window.innerHeight - popupBoundingClientRect.height}px`;\n }\n\n if (\n window.innerWidth < popupBoundingClientRect.x + popupBoundingClientRect.width &&\n window.innerWidth > popupBoundingClientRect.width &&\n Math.abs(popupBoundingClientRect.x - window.innerWidth) <= popupBoundingClientRect.width\n ) {\n // handle case where popup is cut-off to the right\n setPopupAsFixPosition();\n this.popup.style.left = `${window.innerWidth - popupBoundingClientRect.width}px`;\n }\n }, 0);\n }\n\n /*\n * If the popup is hoisted we popup is hoisted its position will change to fix to not be clipped of by a containing container.\n * To render the popup correctly we render it normally, and then assign this screenposition to the fixed popup\n */\n private adjustPopupForHoisting() {\n if (!this.hoist) {\n return;\n }\n\n // execute after dropdown has been rendered to make sure the popup reference is correctly set\n setTimeout(() => {\n if (!this.popup) {\n return;\n }\n\n // take a snapshot of normally rendered popup\n const popupBoundingClientRect = this.popup.getBoundingClientRect();\n\n // apply screen position to fixed popup\n this.popup.style.position = 'fixed';\n ['top', 'left', 'width', 'height'].forEach((property) => {\n this.popup.style[property] = `${popupBoundingClientRect[property]}px`;\n });\n\n const inputBoundingClientRect = this.inputElement.getBoundingClientRect();\n const inputTop = inputBoundingClientRect.top;\n const popupTop = popupBoundingClientRect.top;\n\n this.calcIsDropDownContentUp();\n // check screen position to check whether the popup should be moved above or below the trigger element\n if (this.isDropDownContentUp && inputTop < popupTop) {\n // move popup above input field if datepicker is at bottom of screen\n this.popup.style.top = `${popupTop - popupBoundingClientRect.height - inputBoundingClientRect.height}px`;\n }\n }, 0);\n }\n\n connectedCallback() {\n this.handleClearClick = this.handleClearClick.bind(this);\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n private displayCustomMessage(valid: boolean) {\n if (!this.inputElement) {\n return;\n }\n if (valid) {\n void this.setCustomValidity('');\n } else {\n const message = this.errorText ? this.errorText : 'Invalid date format';\n void this.setCustomValidity(message);\n }\n }\n\n private static getCurrentDateAsPointer(): PointerDate {\n return {\n year: year(now()),\n month: month(now()),\n day: day(now()),\n hours: hours(now()),\n minutes: minutes(now()),\n seconds: seconds(now()),\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"six-datepicker.js","sourceRoot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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport {\n createCalendarGrid,\n day,\n formatDate,\n getFirstDayOfTheWeek,\n hours,\n i18nDate,\n isValidDate,\n isValidDateString,\n minutes,\n month,\n now,\n PointerDate,\n rangeAround,\n removeTime,\n seconds,\n toDate,\n year,\n} from '../../utils/date-util';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce, debounceEvent, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixDateFormats } from './six-date-formats';\nimport { MonthSelection } from './components/month-selection';\nimport { DaySelection } from './components/day-selection';\nimport { YearSelection } from './components/year-selection';\nimport { SixTimepickerChange } from '../six-timepicker/six-timepicker';\nimport {\n adjustPopupForHoisting,\n adjustPopupForSmallScreens,\n calcIsDropDownContentUp,\n movePopup,\n} from '../../utils/popup';\n\nconst NUMBER_OF_YEARS_SHOWN = 25;\n\nconst MIN_POPUP_HEIGHT = 400;\n\nexport type SixDatepickerSelectPayload = Date | undefined | null;\n\nexport interface CalendarCell {\n date: Date;\n dateString: string;\n display: string;\n isDisabled: boolean;\n isOutdated: boolean;\n isSelected: boolean;\n isToday: boolean;\n label: string;\n}\n\nenum SelectionMode {\n DAY = 'day',\n MONTH = 'month',\n YEAR = 'year',\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define a footer for the date picker.\n */\n@Component({\n tag: 'six-datepicker',\n styleUrl: 'six-datepicker.scss',\n shadow: true,\n})\nexport class SixDatepicker {\n private eventListeners = new EventListeners();\n private inputElement?: HTMLSixInputElement;\n private popup?: HTMLElement;\n private wrapper?: HTMLElement;\n private selectedDate?: Date;\n\n @Element() host!: HTMLSixDatepickerElement;\n\n @State() private pointerDate = SixDatepicker.getCurrentDateAsPointer();\n @State() selectionMode: SelectionMode = SelectionMode.DAY;\n @State() isDropDownContentUp = false;\n\n /**\n * Set the type.\n */\n @Prop() type: 'date' | 'date-time' = 'date';\n\n /**\n * The language used to render the weekdays and months.\n */\n @Prop() locale: 'en' | 'de' | 'fr' | 'it' = 'en';\n\n /** Indicates whether or not the calendar dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether or not the calendar should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a date via the component in the popup, but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Callback to determine which date in the datepicker should be selectable.\n * the callback function will get a datestring as an argument, e.g. '2021-07-04'\n *\n * Usage e.g.:\n * const datepicker = document.getElementById('allowed-date-picker');\n * datepicker.allowedDates = datestring => parseInt(datestring.split('-')[2], 10) % 2 === 0;\n */\n @Prop() allowedDates: (date: Date) => boolean = () => true;\n\n /**\n * The minimum datetime allowed. Value must be a date object\n */\n @Prop() min?: Date;\n\n /**\n * The maximum datetime allowed. Value must be a date object\n */\n @Prop() max?: Date;\n\n /**\n * Closes the datepicker dropdown after selection\n */\n @Prop() closeOnSelect = this.type === 'date';\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement?: 'top' | 'bottom';\n\n /** Datepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /**\n * The date to defines where the datepicker popup starts. The prop accepts ISO 8601 date strings (YYYY-MM-DD).\n */\n @Prop() defaultDate?: string;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string;\n\n /**\n * The value of the form field, which accepts a date object.\n */\n @Prop({ mutable: true }) value?: Date;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement?: HTMLElement;\n\n /** Define the dateFormat. Valid formats are:\n * 'dd.mm.yyyy'\n * 'yyyy-mm-dd'\n * 'dd-mm-yyyy'\n * 'dd/mm/yyyy'\n * 'yyyy/mm/dd'\n * 'dd.mm.yy'\n * 'yy-mm-dd'\n * 'dd-mm-yy'\n * 'dd/mm/yy'\n * 'yy/mm/dd'\n * */\n @Prop() dateFormat: SixDateFormats = SixDateFormats.DDMMYYY_DOT;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `dateChange` event after each keystroke.\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.sixSelect = debounceEvent(this.sixSelect, this.debounce);\n }\n\n @Watch('invalid')\n protected invalidChanged(invalid: boolean) {\n if (this.inputElement) {\n this.inputElement.invalid = invalid;\n }\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n if (this.value != null && !isValidDate(this.value)) {\n console.warn('invalid date value: ', this.value);\n this.value = undefined;\n }\n this.selectedDate = this.value;\n this.updatePointerDates();\n this.sixSelect.emit(this.value);\n }\n\n /**\n * Emitted when a option got selected.\n */\n @Event({ eventName: 'six-datepicker-select' }) sixSelect!: EventEmitter<SixDatepickerSelectPayload>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-datepicker-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when a option got selected.\n */\n @Event({ eventName: 'six-datepicker-blur' }) sixBlur!: EventEmitter<SixDatepickerSelectPayload>;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.updateDropdownDirection();\n this.moveOpenHoistedPopup();\n this.adjustPopupPosition();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.updateDropdownDirection();\n this.moveOpenHoistedPopup();\n }\n\n private moveOpenHoistedPopup() {\n movePopup(this.hoist, this.open, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n get container() {\n return this.containingElement || this.host;\n }\n\n get firstDateOfBox(): Date {\n const date = new Date(this.pointerDate.year, this.pointerDate.month, 1);\n return getFirstDayOfTheWeek(date);\n }\n\n /** Sets focus on the datepickers input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n get calendarGrid() {\n return createCalendarGrid({\n firstDateOfBox: this.firstDateOfBox,\n allowedDates: this.allowedDates,\n dateFormat: this.dateFormat,\n locale: this.locale,\n selectedDate: this.selectedDate,\n minDate: this.min,\n maxDate: this.max,\n pointerDate: this.pointerDate,\n });\n }\n\n private updateDropdownDirection() {\n if (this.inputElement == null || this.wrapper == null) {\n return;\n }\n this.isDropDownContentUp = calcIsDropDownContentUp(this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n private getMonthStringForIndex(index: number) {\n return i18nDate[this.locale].months[index];\n }\n\n private previousUnit = () => {\n if (this.selectionMode === SelectionMode.DAY) {\n this.previousMonth();\n } else if (this.selectionMode === SelectionMode.MONTH) {\n this.previousYear();\n } else if (this.selectionMode === SelectionMode.YEAR) {\n this.previousYearGroup();\n }\n };\n\n private previousYear() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - 1 };\n }\n\n private previousYearGroup() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - NUMBER_OF_YEARS_SHOWN };\n }\n\n private previousMonth() {\n if (this.pointerDate.month === 0) {\n this.pointerDate = { year: this.pointerDate.year - 1, month: 11, day: 1, hours: 0, minutes: 0, seconds: 0 };\n } else {\n this.pointerDate = {\n year: this.pointerDate.year,\n month: this.pointerDate.month - 1,\n day: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n };\n }\n }\n\n private nextUnit = () => {\n if (this.selectionMode === SelectionMode.DAY) {\n this.nextMonth();\n } else if (this.selectionMode === SelectionMode.MONTH) {\n this.nextYear();\n } else if (this.selectionMode === SelectionMode.YEAR) {\n this.nextYearGroup();\n }\n };\n\n private nextMonth() {\n if (this.pointerDate.month === 11) {\n this.pointerDate = { year: this.pointerDate.year + 1, month: 0, day: 1, hours: 0, minutes: 0, seconds: 0 };\n } else {\n this.pointerDate = {\n year: this.pointerDate.year,\n month: this.pointerDate.month + 1,\n day: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n };\n }\n }\n\n private nextYear() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + 1 };\n }\n\n private nextYearGroup() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + NUMBER_OF_YEARS_SHOWN };\n }\n\n private openCalendar() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.setupEventListenersForOpenPopup();\n }\n }\n\n private setupEventListenersForOpenPopup() {\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Close when escape is pressed\n if (this.open && keyboardEvent.key === 'Escape') {\n keyboardEvent.stopPropagation();\n this.closePopup();\n void this.inputElement?.setFocus();\n }\n\n // Handle tabbing\n if (keyboardEvent.key === 'Tab') {\n this.closePopup();\n }\n };\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.container)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = async (event: MouseEvent) => {\n event.stopPropagation();\n await this.select(undefined);\n this.sixClear.emit();\n };\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n this.selectionMode = SelectionMode.DAY;\n }\n\n private updatePointerDates() {\n const date = this.getPointerDate();\n if (this.differsFromPointerDate(date)) {\n this.pointerDate = {\n year: year(date),\n month: month(date),\n day: day(date),\n hours: hours(date),\n minutes: minutes(date),\n seconds: seconds(date),\n };\n }\n }\n\n private differsFromPointerDate(date?: Date): boolean {\n return (\n this.pointerDate.day !== day(date) ||\n this.pointerDate.month !== month(date) ||\n this.pointerDate.year !== year(date) ||\n this.pointerDate.hours !== hours(date) ||\n this.pointerDate.minutes !== minutes(date) ||\n this.pointerDate.seconds !== seconds(date)\n );\n }\n\n private getPointerDate(): Date | undefined {\n if (this.selectedDate !== undefined && this.selectedDate !== null) {\n return this.selectedDate;\n }\n if (this.defaultDate == null) {\n return this.type === 'date' ? removeTime(now()) : now();\n } else {\n return toDate(this.defaultDate, this.dateFormat);\n }\n }\n\n private updateValue(newDate?: Date) {\n this.updateIfChanged(newDate);\n }\n\n private updateIfChanged(newDate?: Date) {\n if (this.value?.getTime() === newDate?.getTime()) {\n return;\n }\n this.value = newDate;\n }\n\n /**\n * Selects an option\n */\n @Method()\n async select(datestring?: string) {\n if (datestring == null) {\n this.updateValue(undefined);\n } else {\n const newDate = toDate(datestring, this.dateFormat);\n newDate?.setHours(this.pointerDate.hours, this.pointerDate.minutes, this.pointerDate.seconds);\n this.updateValue(newDate);\n }\n\n this.updatePointerDates();\n\n if (this.closeOnSelect) {\n this.closePopup();\n }\n }\n\n private onTimepickerChange = (sixTimepickerChange: CustomEvent<SixTimepickerChange>) => {\n const time = sixTimepickerChange.detail.value;\n const newDate = new Date();\n\n if (this.selectedDate != null) {\n newDate.setFullYear(this.selectedDate.getFullYear(), this.selectedDate.getMonth(), this.selectedDate.getDate());\n }\n\n if (time != null) {\n const hours = time.hours;\n const minutes = time.minutes;\n const seconds = time.seconds;\n if (hours != null) {\n newDate.setHours(hours, minutes, seconds);\n }\n }\n\n this.updateValue(newDate);\n this.updatePointerDates();\n };\n\n private onClickDateCell = (cell: CalendarCell) => {\n if (!cell.isDisabled) {\n void this.select(cell.dateString);\n }\n };\n\n private onClickMonthCell = (selectedMonth: string) => {\n const month = i18nDate[this.locale].monthsShort.findIndex((monthShort) => monthShort === selectedMonth);\n this.pointerDate = { ...this.pointerDate, month };\n this.selectionMode = SelectionMode.DAY;\n };\n\n private onClickYearCell = (year: number) => {\n this.pointerDate = { ...this.pointerDate, year };\n this.selectionMode = SelectionMode.DAY;\n };\n\n private handleInputChange = (event: Event) => {\n if (this.inputElement == null) {\n return;\n }\n event.stopPropagation();\n\n const inputValue = this.inputElement.value;\n if (!isValidDateString(inputValue, this.dateFormat)) {\n return;\n }\n\n const inputValueDate = toDate(inputValue, this.dateFormat);\n\n if (inputValueDate === undefined) {\n return;\n }\n\n this.updateIfChanged(inputValueDate);\n const datesOnly = inputValue.replace(/[^\\d]/g, '');\n if (datesOnly.length >= 6) {\n const date = toDate(inputValue, this.dateFormat);\n const dateAsString = formatDate(date, this.dateFormat);\n if (isValidDateString(dateAsString, this.dateFormat)) {\n this.selectedDate = toDate(dateAsString, this.dateFormat);\n this.updatePointerDates();\n this.updateValue(this.selectedDate);\n }\n }\n };\n\n private handleOnBlur = (event: Event) => {\n // clear the value if the user deleted the date\n if (this.inputElement?.value === '' && isValidDate(this.value)) {\n this.value = undefined;\n }\n\n event.stopPropagation();\n const inputValue = this.inputElement?.value;\n const inputValueDate = toDate(inputValue, this.dateFormat);\n const formattedDate = formatDate(this.value, this.dateFormat);\n\n if (this.inputElement != null && inputValueDate != null && inputValue !== formattedDate) {\n // properly format date if necessary\n this.inputElement.value = formattedDate;\n }\n\n this.sixBlur.emit(this.value);\n };\n\n componentWillLoad() {\n this.selectedDate = this.value;\n this.updatePointerDates();\n this.updateValue(this.value);\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.setupEventListenersForOpenPopup();\n }\n }\n\n componentDidLoad() {\n if (this.inputElement != null) {\n this.eventListeners.add(this.inputElement, 'six-input-input', debounce(this.handleInputChange, this.debounce));\n this.eventListeners.add(this.inputElement, 'six-input-blur', this.handleOnBlur);\n }\n }\n\n componentDidRender() {\n this.adjustPopupPosition();\n }\n\n private renderHeader() {\n return (\n <header class=\"datepicker-header\" part=\"header\">\n <div class=\"datepicker-header__btn prev\" onClick={this.previousUnit}>\n <svg viewBox=\"0 5 13 13\" width=\"14\" height=\"23\">\n <path d=\"M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z\" />\n </svg>\n </div>\n\n <div class=\"datepicker-header__label\">\n {this.selectionMode === SelectionMode.DAY && (\n <div onClick={() => (this.selectionMode = SelectionMode.MONTH)}>\n <span class=\"datepicker-header__label-month\">{this.getMonthStringForIndex(this.pointerDate.month)}</span>\n <span>\n <svg viewBox=\"-3 -4 24 24\" width=\"20\" height=\"20\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </div>\n )}\n\n {this.selectionMode !== SelectionMode.YEAR && (\n <div onClick={() => (this.selectionMode = SelectionMode.YEAR)}>\n <span class=\"datepicker-header__label-year\">{this.pointerDate.year}</span>\n <span>\n <svg viewBox=\"-3 -4 24 24\" width=\"20\" height=\"20\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </div>\n )}\n\n {this.selectionMode === SelectionMode.YEAR && (\n <div>\n {this.pointerDate.year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2)} –{' '}\n {this.pointerDate.year + Math.floor(NUMBER_OF_YEARS_SHOWN / 2)}\n </div>\n )}\n </div>\n\n <div class=\"datepicker-header__btn next\" onClick={this.nextUnit}>\n <svg viewBox=\"5 5 13 13\" width=\"14\" height=\"23\">\n <path d=\"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z\" />\n </svg>\n </div>\n </header>\n );\n }\n\n private renderBody() {\n switch (this.selectionMode) {\n case SelectionMode.DAY:\n return (\n <DaySelection\n locale={i18nDate[this.locale]}\n calendarGrid={this.calendarGrid}\n onClickDateCell={this.onClickDateCell}\n />\n );\n case SelectionMode.MONTH:\n return (\n <MonthSelection\n locale={i18nDate[this.locale]}\n selectedDate={this.selectedDate}\n onClickMonthCell={this.onClickMonthCell}\n />\n );\n case SelectionMode.YEAR:\n return (\n <YearSelection\n selectedDate={this.selectedDate}\n yearSelection={rangeAround(this.pointerDate.year, NUMBER_OF_YEARS_SHOWN)}\n onClickYearCell={this.onClickYearCell}\n />\n );\n }\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>today</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n 'datepicker-clear': true,\n 'datepicker-clear--right': this.iconPosition === 'left',\n 'datepicker-clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n render() {\n this.adjustPopupPosition();\n\n return (\n <div ref={(el) => (this.wrapper = el)} class=\"datepicker__container\">\n <six-input\n part=\"base\"\n value={formatDate(this.value, this.dateFormat)}\n ref={(el) => (this.inputElement = el)}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n name={this.name}\n label={this.label}\n required={this.required}\n error-text={this.errorText}\n onClick={() => this.openCalendar()}\n size={this.size}\n class={{ 'input--empty': this.value == null }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n part=\"popup\"\n ref={(el) => (this.popup = el)}\n class={{\n datepicker__popup: true,\n 'datepicker__popup--is-up': this.placement != null ? this.placement === 'top' : this.isDropDownContentUp,\n 'datepicker__popup--is-inline': this.inline,\n }}\n >\n {this.renderHeader()}\n {this.renderBody()}\n {this.type === 'date-time' && (\n <six-timepicker\n inline={true}\n onSix-timepicker-change-debounced={(event) => this.onTimepickerChange(event)}\n value={\n this.selectedDate?.getHours() +\n ':' +\n this.selectedDate?.getMinutes() +\n ':' +\n this.selectedDate?.getSeconds()\n }\n ></six-timepicker>\n )}\n <div class=\"datepicker__footer\">\n <slot />\n </div>\n </div>\n )}\n </div>\n );\n }\n\n private adjustPopupPosition() {\n adjustPopupForHoisting(\n this.hoist,\n this.popup,\n this.inputElement,\n this.wrapper,\n MIN_POPUP_HEIGHT,\n (isUp) => (this.isDropDownContentUp = isUp)\n );\n adjustPopupForSmallScreens(this.popup);\n }\n\n connectedCallback() {\n this.eventListeners.forward('six-datepicker-select', 'change', this.host);\n this.eventListeners.forward('six-datepicker-blur', 'blur', this.host);\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n private static getCurrentDateAsPointer(): PointerDate {\n return {\n year: year(now()),\n month: month(now()),\n day: day(now()),\n hours: hours(now()),\n minutes: minutes(now()),\n seconds: seconds(now()),\n };\n }\n}\n"]}
|
|
@@ -20,6 +20,39 @@ export class SixDetails {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
this.componentId = `details-${++id}`;
|
|
22
22
|
this.isVisible = false;
|
|
23
|
+
this.handleBodyTransitionEnd = (event) => {
|
|
24
|
+
if (this.body == null)
|
|
25
|
+
return;
|
|
26
|
+
const target = event.target;
|
|
27
|
+
// Ensure we only emit one event when the target element is no longer visible
|
|
28
|
+
if (event.propertyName === 'height' && target.classList.contains('details__body')) {
|
|
29
|
+
this.body.style.overflow = this.open ? 'visible' : 'hidden';
|
|
30
|
+
this.body.style.height = this.open ? 'auto' : '0';
|
|
31
|
+
this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
|
|
32
|
+
this.body.hidden = !this.open;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.handleSummaryClick = () => {
|
|
36
|
+
var _a;
|
|
37
|
+
if (!this.disabled && (this.hasContent || this.selectableEmpty)) {
|
|
38
|
+
this.open ? this.hide() : this.show();
|
|
39
|
+
(_a = this.header) === null || _a === void 0 ? void 0 : _a.focus();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
this.handleSummaryKeyDown = (event) => {
|
|
43
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
this.open ? this.hide() : this.show();
|
|
46
|
+
}
|
|
47
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
this.hide();
|
|
50
|
+
}
|
|
51
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
this.show();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
23
56
|
this.animateSummaryIcon = true;
|
|
24
57
|
this.open = false;
|
|
25
58
|
this.summary = '';
|
|
@@ -31,16 +64,13 @@ export class SixDetails {
|
|
|
31
64
|
this.hasContent = true;
|
|
32
65
|
}
|
|
33
66
|
handleOpenChange() {
|
|
34
|
-
if (this.body) {
|
|
67
|
+
if (this.body != null) {
|
|
35
68
|
this.open ? this.show() : this.hide();
|
|
36
69
|
}
|
|
37
70
|
}
|
|
38
|
-
connectedCallback() {
|
|
39
|
-
this.handleBodyTransitionEnd = this.handleBodyTransitionEnd.bind(this);
|
|
40
|
-
this.handleSummaryClick = this.handleSummaryClick.bind(this);
|
|
41
|
-
this.handleSummaryKeyDown = this.handleSummaryKeyDown.bind(this);
|
|
42
|
-
}
|
|
43
71
|
componentDidLoad() {
|
|
72
|
+
if (this.details == null || this.body == null)
|
|
73
|
+
return;
|
|
44
74
|
focusVisible.observe(this.details);
|
|
45
75
|
this.body.hidden = !this.open;
|
|
46
76
|
// Show on init if open
|
|
@@ -49,14 +79,15 @@ export class SixDetails {
|
|
|
49
79
|
}
|
|
50
80
|
}
|
|
51
81
|
disconnectedCallback() {
|
|
52
|
-
|
|
82
|
+
if (this.details != null) {
|
|
83
|
+
focusVisible.unobserve(this.details);
|
|
84
|
+
}
|
|
53
85
|
}
|
|
54
86
|
/** Shows the detail body */
|
|
55
87
|
async show() {
|
|
56
88
|
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
|
|
57
|
-
if (this.isVisible)
|
|
89
|
+
if (this.isVisible || this.body == null)
|
|
58
90
|
return;
|
|
59
|
-
}
|
|
60
91
|
const sixShow = this.sixShow.emit();
|
|
61
92
|
if (sixShow.defaultPrevented) {
|
|
62
93
|
this.open = false;
|
|
@@ -65,7 +96,7 @@ export class SixDetails {
|
|
|
65
96
|
this.body.hidden = false;
|
|
66
97
|
if (this.body.scrollHeight === 0) {
|
|
67
98
|
// When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open
|
|
68
|
-
//
|
|
99
|
+
// initially, but not immediately visible (i.e. in a tab panel).
|
|
69
100
|
this.body.style.height = 'auto';
|
|
70
101
|
this.body.style.overflow = 'visible';
|
|
71
102
|
}
|
|
@@ -79,55 +110,25 @@ export class SixDetails {
|
|
|
79
110
|
/** Hides the detail body */
|
|
80
111
|
async hide() {
|
|
81
112
|
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
|
|
82
|
-
if (!this.isVisible)
|
|
113
|
+
if (!this.isVisible || this.body == null)
|
|
83
114
|
return;
|
|
84
|
-
|
|
115
|
+
const body = this.body;
|
|
85
116
|
const sixHide = this.sixHide.emit();
|
|
86
117
|
if (sixHide.defaultPrevented) {
|
|
87
118
|
this.open = true;
|
|
88
119
|
return;
|
|
89
120
|
}
|
|
90
121
|
// We can't transition out of `height: auto`, so let's set it to the current height first
|
|
91
|
-
|
|
92
|
-
|
|
122
|
+
body.style.height = `${body.scrollHeight}px`;
|
|
123
|
+
body.style.overflow = 'hidden';
|
|
93
124
|
requestAnimationFrame(() => {
|
|
94
125
|
// tslint:disable-next-line: no-unused-expression
|
|
95
|
-
|
|
96
|
-
|
|
126
|
+
body.clientWidth; // force a reflow
|
|
127
|
+
body.style.height = '0';
|
|
97
128
|
});
|
|
98
129
|
this.isVisible = false;
|
|
99
130
|
this.open = false;
|
|
100
131
|
}
|
|
101
|
-
handleBodyTransitionEnd(event) {
|
|
102
|
-
const target = event.target;
|
|
103
|
-
// Ensure we only emit one event when the target element is no longer visible
|
|
104
|
-
if (event.propertyName === 'height' && target.classList.contains('details__body')) {
|
|
105
|
-
this.body.style.overflow = this.open ? 'visible' : 'hidden';
|
|
106
|
-
this.body.style.height = this.open ? 'auto' : '0';
|
|
107
|
-
this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
|
|
108
|
-
this.body.hidden = !this.open;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
handleSummaryClick() {
|
|
112
|
-
if (!this.disabled && (this.hasContent || this.selectableEmpty)) {
|
|
113
|
-
this.open ? this.hide() : this.show();
|
|
114
|
-
this.header.focus();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
handleSummaryKeyDown(event) {
|
|
118
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
119
|
-
event.preventDefault();
|
|
120
|
-
this.open ? this.hide() : this.show();
|
|
121
|
-
}
|
|
122
|
-
if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {
|
|
123
|
-
event.preventDefault();
|
|
124
|
-
this.hide();
|
|
125
|
-
}
|
|
126
|
-
if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {
|
|
127
|
-
event.preventDefault();
|
|
128
|
-
this.show();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
132
|
render() {
|
|
132
133
|
const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');
|
|
133
134
|
return (h("div", { ref: (el) => (this.details = el), part: "base", class: {
|
|
@@ -166,7 +167,7 @@ export class SixDetails {
|
|
|
166
167
|
"optional": false,
|
|
167
168
|
"docs": {
|
|
168
169
|
"tags": [],
|
|
169
|
-
"text": "Indicates whether
|
|
170
|
+
"text": "Indicates whether the details is open. You can use this in lieu of the show/hide methods."
|
|
170
171
|
},
|
|
171
172
|
"attribute": "open",
|
|
172
173
|
"reflect": true,
|
|
@@ -195,11 +196,11 @@ export class SixDetails {
|
|
|
195
196
|
"mutable": false,
|
|
196
197
|
"complexType": {
|
|
197
198
|
"original": "string",
|
|
198
|
-
"resolved": "string",
|
|
199
|
+
"resolved": "string | undefined",
|
|
199
200
|
"references": {}
|
|
200
201
|
},
|
|
201
202
|
"required": false,
|
|
202
|
-
"optional":
|
|
203
|
+
"optional": true,
|
|
203
204
|
"docs": {
|
|
204
205
|
"tags": [],
|
|
205
206
|
"text": "The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead."
|
|
@@ -291,7 +292,7 @@ export class SixDetails {
|
|
|
291
292
|
"optional": false,
|
|
292
293
|
"docs": {
|
|
293
294
|
"tags": [],
|
|
294
|
-
"text": ""
|
|
295
|
+
"text": "Set to false when you want to hide the summary icon and disable the open/close mechanism. Usually not needed, but used internally by 'six-sidebar-item-group'"
|
|
295
296
|
},
|
|
296
297
|
"attribute": "has-content",
|
|
297
298
|
"reflect": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-details.js","sourceRoot":"","sources":["../../../src/components/six-details/six-details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n body: HTMLElement;\n componentId = `details-${++id}`;\n details: HTMLElement;\n header: HTMLElement;\n isVisible = false;\n\n /** Indicates whether or not the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n @Prop() readonly hasContent: boolean = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleBodyTransitionEnd = this.handleBodyTransitionEnd.bind(this);\n this.handleSummaryClick = this.handleSummaryClick.bind(this);\n this.handleSummaryKeyDown = this.handleSummaryKeyDown.bind(this);\n }\n\n componentDidLoad() {\n focusVisible.observe(this.details);\n\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n focusVisible.unobserve(this.details);\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // intiially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n this.body.clientWidth; // force a reflow\n this.body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n handleBodyTransitionEnd(event: TransitionEvent) {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n }\n\n handleSummaryClick() {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header.focus();\n }\n }\n\n handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n }\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"six-details.js","sourceRoot":"","sources":["../../../src/components/six-details/six-details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;;GAcG;AAOH,MAAM,OAAO,UAAU;;IAQb,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;IAChC,cAAS,GAAG,KAAK,CAAC;IA6HlB,4BAAuB,GAAG,CAAC,KAAsB,EAAE,EAAE;MAC3D,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI;QAAE,OAAO;MAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;MAE3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il/core';\nimport { focusVisible } from '../../utils/focus-visible';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host!: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n private body?: HTMLElement;\n private details?: HTMLElement;\n private header?: HTMLElement;\n private componentId = `details-${++id}`;\n private isVisible = false;\n\n /** Indicates whether the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon?: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n /** Set to false when you want to hide the summary icon and disable the open/close mechanism. Usually not needed, but used internally by 'six-sidebar-item-group' */\n @Prop() hasContent = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body != null) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.details == null || this.body == null) return;\n\n focusVisible.observe(this.details);\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.details != null) {\n focusVisible.unobserve(this.details);\n }\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.body == null) return;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // initially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.body == null) return;\n const body = this.body;\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n body.style.height = `${body.scrollHeight}px`;\n body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n body.clientWidth; // force a reflow\n body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n private handleBodyTransitionEnd = (event: TransitionEvent) => {\n if (this.body == null) return;\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n };\n\n private handleSummaryClick = () => {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header?.focus();\n }\n };\n\n private handleSummaryKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n };\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -30,6 +30,33 @@ export class SixDialog {
|
|
|
30
30
|
this.componentId = `dialog-${++id}`;
|
|
31
31
|
this.willShow = false;
|
|
32
32
|
this.willHide = false;
|
|
33
|
+
this.handleCloseClick = () => {
|
|
34
|
+
this.hide();
|
|
35
|
+
};
|
|
36
|
+
this.handleKeyDown = (event) => {
|
|
37
|
+
if (event.key === 'Escape') {
|
|
38
|
+
this.hide();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
this.handleOverlayClick = () => {
|
|
42
|
+
const sixOverlayDismiss = this.sixOverlayDismiss.emit();
|
|
43
|
+
if (!sixOverlayDismiss.defaultPrevented) {
|
|
44
|
+
this.hide();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
this.handleSlotChange = () => {
|
|
48
|
+
this.hasFooter = hasSlot(this.host, 'footer');
|
|
49
|
+
};
|
|
50
|
+
this.handleTransitionEnd = (event) => {
|
|
51
|
+
const target = event.target;
|
|
52
|
+
// Ensure we only emit one event when the target element is no longer visible
|
|
53
|
+
if (event.propertyName === 'opacity' && target.classList.contains('dialog__panel')) {
|
|
54
|
+
this.isVisible = this.open;
|
|
55
|
+
this.willShow = false;
|
|
56
|
+
this.willHide = false;
|
|
57
|
+
this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
|
|
58
|
+
}
|
|
59
|
+
};
|
|
33
60
|
this.hasFooter = false;
|
|
34
61
|
this.isVisible = false;
|
|
35
62
|
this.open = false;
|
|
@@ -40,13 +67,8 @@ export class SixDialog {
|
|
|
40
67
|
this.open ? this.show() : this.hide();
|
|
41
68
|
}
|
|
42
69
|
connectedCallback() {
|
|
43
|
-
this.handleCloseClick = this.handleCloseClick.bind(this);
|
|
44
|
-
this.handleTransitionEnd = this.handleTransitionEnd.bind(this);
|
|
45
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
46
|
-
this.handleOverlayClick = this.handleOverlayClick.bind(this);
|
|
47
|
-
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
48
70
|
this.modal = new Modal(this.host, {
|
|
49
|
-
onFocusOut: () => this.panel.focus(),
|
|
71
|
+
onFocusOut: () => { var _a; return (_a = this.panel) === null || _a === void 0 ? void 0 : _a.focus(); },
|
|
50
72
|
});
|
|
51
73
|
}
|
|
52
74
|
componentWillLoad() {
|
|
@@ -61,9 +83,10 @@ export class SixDialog {
|
|
|
61
83
|
}
|
|
62
84
|
/** Shows the dialog */
|
|
63
85
|
async show() {
|
|
64
|
-
if (this.willShow) {
|
|
86
|
+
if (this.willShow || this.modal == null || this.panel == null || this.dialog == null) {
|
|
65
87
|
return;
|
|
66
88
|
}
|
|
89
|
+
const panel = this.panel;
|
|
67
90
|
const sixShow = this.sixShow.emit();
|
|
68
91
|
if (sixShow.defaultPrevented) {
|
|
69
92
|
this.open = false;
|
|
@@ -80,7 +103,7 @@ export class SixDialog {
|
|
|
80
103
|
requestAnimationFrame(() => {
|
|
81
104
|
const sixInitialFocus = this.sixInitialFocus.emit();
|
|
82
105
|
if (!sixInitialFocus.defaultPrevented) {
|
|
83
|
-
|
|
106
|
+
panel.focus({ preventScroll: true });
|
|
84
107
|
}
|
|
85
108
|
});
|
|
86
109
|
}
|
|
@@ -95,7 +118,7 @@ export class SixDialog {
|
|
|
95
118
|
this.dialog.addEventListener('transitionend', () => {
|
|
96
119
|
const sixInitialFocus = this.sixInitialFocus.emit();
|
|
97
120
|
if (!sixInitialFocus.defaultPrevented) {
|
|
98
|
-
|
|
121
|
+
panel.focus();
|
|
99
122
|
}
|
|
100
123
|
}, { once: true });
|
|
101
124
|
}
|
|
@@ -103,7 +126,7 @@ export class SixDialog {
|
|
|
103
126
|
}
|
|
104
127
|
/** Hides the dialog */
|
|
105
128
|
async hide() {
|
|
106
|
-
if (this.willHide) {
|
|
129
|
+
if (this.willHide || this.modal == null) {
|
|
107
130
|
return;
|
|
108
131
|
}
|
|
109
132
|
const sixHide = this.sixHide.emit();
|
|
@@ -116,33 +139,6 @@ export class SixDialog {
|
|
|
116
139
|
this.modal.deactivate();
|
|
117
140
|
unlockBodyScrolling(this.host);
|
|
118
141
|
}
|
|
119
|
-
handleCloseClick() {
|
|
120
|
-
this.hide();
|
|
121
|
-
}
|
|
122
|
-
handleKeyDown(event) {
|
|
123
|
-
if (event.key === 'Escape') {
|
|
124
|
-
this.hide();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
handleOverlayClick() {
|
|
128
|
-
const sixOverlayDismiss = this.sixOverlayDismiss.emit();
|
|
129
|
-
if (!sixOverlayDismiss.defaultPrevented) {
|
|
130
|
-
this.hide();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
handleSlotChange() {
|
|
134
|
-
this.hasFooter = hasSlot(this.host, 'footer');
|
|
135
|
-
}
|
|
136
|
-
handleTransitionEnd(event) {
|
|
137
|
-
const target = event.target;
|
|
138
|
-
// Ensure we only emit one event when the target element is no longer visible
|
|
139
|
-
if (event.propertyName === 'opacity' && target.classList.contains('dialog__panel')) {
|
|
140
|
-
this.isVisible = this.open;
|
|
141
|
-
this.willShow = false;
|
|
142
|
-
this.willHide = false;
|
|
143
|
-
this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
142
|
render() {
|
|
147
143
|
return (h("div", { ref: (el) => (this.dialog = el), part: "base", class: {
|
|
148
144
|
dialog: true,
|
|
@@ -177,7 +173,7 @@ export class SixDialog {
|
|
|
177
173
|
"optional": false,
|
|
178
174
|
"docs": {
|
|
179
175
|
"tags": [],
|
|
180
|
-
"text": "Indicates whether
|
|
176
|
+
"text": "Indicates whether the dialog is open. You can use this in lieu of the show/hide methods."
|
|
181
177
|
},
|
|
182
178
|
"attribute": "open",
|
|
183
179
|
"reflect": true,
|