@six-group/ui-library 3.0.0-beta.1.7 → 3.0.0-beta.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{event-listeners-4a8d66d5.js → event-listeners-74715e62.js} +38 -38
- package/dist/cjs/{execution-control-3bc9c7c4.js → execution-control-46f388e0.js} +35 -35
- package/dist/cjs/{focus-visible-b08d956f.js → focus-visible-0b352c74.js} +40 -40
- package/dist/cjs/{form-control-9e4dffd1.js → form-control-866bbece.js} +25 -25
- package/dist/cjs/{modal-a9679ddf.js → modal-48d42228.js} +41 -41
- package/dist/cjs/{popover-e3781f5a.js → popover-1d2a037c.js} +95 -95
- package/dist/cjs/{scroll-5b8676ba.js → scroll-76e6f5d7.js} +57 -57
- package/dist/cjs/set-attributes_2.cjs.entry.js +57 -57
- package/dist/cjs/six-alert.cjs.entry.js +131 -131
- package/dist/cjs/six-avatar.cjs.entry.js +28 -28
- package/dist/cjs/six-badge.cjs.entry.js +26 -26
- package/dist/cjs/six-button.cjs.entry.js +97 -97
- package/dist/cjs/six-card.cjs.entry.js +8 -8
- package/dist/cjs/six-checkbox.cjs.entry.js +152 -152
- package/dist/cjs/six-datepicker.cjs.entry.js +1189 -1189
- package/dist/cjs/six-details.cjs.entry.js +139 -139
- package/dist/cjs/six-dialog.cjs.entry.js +152 -152
- package/dist/cjs/six-drawer.cjs.entry.js +174 -174
- package/dist/cjs/six-dropdown_3.cjs.entry.js +728 -728
- package/dist/cjs/six-error-page.cjs.entry.js +94 -94
- package/dist/cjs/six-file-list-item.cjs.entry.js +38 -38
- package/dist/cjs/six-file-list.cjs.entry.js +8 -8
- package/dist/cjs/six-file-upload.cjs.entry.js +96 -96
- package/dist/cjs/six-footer.cjs.entry.js +8 -8
- package/dist/cjs/six-form.cjs.entry.js +219 -219
- package/dist/cjs/six-group-label.cjs.entry.js +46 -46
- package/dist/cjs/six-header.cjs.entry.js +149 -149
- package/dist/cjs/six-icon-button.cjs.entry.js +33 -33
- package/dist/cjs/six-icon.cjs.entry.js +24 -24
- package/dist/cjs/six-input.cjs.entry.js +230 -230
- package/dist/cjs/six-item-picker.cjs.entry.js +361 -361
- package/dist/cjs/six-language-switcher.cjs.entry.js +52 -52
- package/dist/cjs/six-layout-grid.cjs.entry.js +19 -19
- package/dist/cjs/six-main-container.cjs.entry.js +11 -11
- package/dist/cjs/six-menu-divider.cjs.entry.js +8 -8
- package/dist/cjs/six-menu-label.cjs.entry.js +8 -8
- package/dist/cjs/six-picto.cjs.entry.js +15 -15
- package/dist/cjs/six-progress-bar.cjs.entry.js +17 -17
- package/dist/cjs/six-progress-ring.cjs.entry.js +31 -31
- package/dist/cjs/six-radio.cjs.entry.js +121 -121
- package/dist/cjs/six-range.cjs.entry.js +198 -198
- package/dist/cjs/six-root.cjs.entry.js +34 -34
- package/dist/cjs/six-search-field.cjs.entry.js +43 -43
- package/dist/cjs/six-select.cjs.entry.js +447 -447
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +42 -42
- package/dist/cjs/six-sidebar-item.cjs.entry.js +18 -18
- package/dist/cjs/six-sidebar.cjs.entry.js +171 -171
- package/dist/cjs/six-spinner.cjs.entry.js +16 -16
- package/dist/cjs/six-switch.cjs.entry.js +100 -100
- package/dist/cjs/six-tab-group.cjs.entry.js +226 -226
- package/dist/cjs/six-tab-panel.cjs.entry.js +17 -17
- package/dist/cjs/six-tab.cjs.entry.js +42 -42
- package/dist/cjs/six-table-cell_4.cjs.entry.js +70 -70
- package/dist/cjs/six-table.cjs.entry.js +145 -145
- package/dist/cjs/six-tag.cjs.entry.js +40 -40
- package/dist/cjs/six-textarea.cjs.entry.js +211 -211
- package/dist/cjs/six-tile.cjs.entry.js +89 -89
- package/dist/cjs/six-timepicker.cjs.entry.js +489 -489
- package/dist/cjs/{six-timepicker.types-c58cc88b.js → six-timepicker.types-c19ebff3.js} +43 -43
- package/dist/cjs/six-tooltip.cjs.entry.js +172 -172
- package/dist/cjs/{slot-8abe833c.js → slot-ad537f24.js} +42 -42
- package/dist/cjs/{types-65e5c95b.js → types-581e8ff0.js} +12 -12
- package/dist/cjs/{types-0c28e484.js → types-64878648.js} +12 -12
- package/dist/collection/components/six-alert/six-alert.js +366 -366
- package/dist/collection/components/six-avatar/six-avatar.js +131 -131
- package/dist/collection/components/six-badge/six-badge.js +101 -101
- package/dist/collection/components/six-button/six-button.js +466 -466
- package/dist/collection/components/six-card/six-card.js +21 -21
- package/dist/collection/components/six-checkbox/six-checkbox.js +550 -550
- package/dist/collection/components/six-datepicker/components/day-selection.js +13 -13
- package/dist/collection/components/six-datepicker/components/month-selection.js +12 -12
- package/dist/collection/components/six-datepicker/components/year-selection.js +10 -10
- package/dist/collection/components/six-datepicker/six-date-formats.js +23 -23
- package/dist/collection/components/six-datepicker/six-datepicker.js +1343 -1343
- package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js +16 -16
- package/dist/collection/components/six-details/six-details.js +432 -432
- package/dist/collection/components/six-dialog/six-dialog.js +401 -401
- package/dist/collection/components/six-drawer/six-drawer.js +458 -458
- package/dist/collection/components/six-dropdown/six-dropdown.js +939 -939
- package/dist/collection/components/six-error-page/six-error-page.js +199 -199
- package/dist/collection/components/six-file-list/six-file-list.js +20 -20
- package/dist/collection/components/six-file-list-item/six-file-list-item.js +203 -203
- package/dist/collection/components/six-file-upload/six-file-upload.js +272 -272
- package/dist/collection/components/six-footer/six-footer.js +21 -21
- package/dist/collection/components/six-form/six-form.js +408 -408
- package/dist/collection/components/six-group-label/six-group-label.js +166 -166
- package/dist/collection/components/six-header/six-header.js +420 -420
- package/dist/collection/components/six-icon/six-icon.js +77 -77
- package/dist/collection/components/six-icon-button/six-icon-button.js +142 -142
- package/dist/collection/components/six-input/six-input.js +1141 -1141
- package/dist/collection/components/six-item-picker/six-item-picker.js +688 -688
- package/dist/collection/components/six-item-picker/types.js +13 -13
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +128 -128
- package/dist/collection/components/six-layout-grid/six-layout-grid.js +52 -52
- package/dist/collection/components/six-main-container/six-main-container.js +53 -53
- package/dist/collection/components/six-menu/six-menu.js +406 -406
- package/dist/collection/components/six-menu-divider/six-menu-divider.js +22 -22
- package/dist/collection/components/six-menu-item/six-menu-item.js +177 -177
- package/dist/collection/components/six-menu-label/six-menu-label.js +25 -25
- package/dist/collection/components/six-picto/six-picto.js +50 -50
- package/dist/collection/components/six-progress-bar/six-progress-bar.js +77 -77
- package/dist/collection/components/six-progress-ring/six-progress-ring.js +111 -111
- package/dist/collection/components/six-radio/six-radio.js +410 -410
- package/dist/collection/components/six-range/six-range.js +620 -620
- package/dist/collection/components/six-root/six-root.js +167 -167
- package/dist/collection/components/six-search-field/six-search-field.js +171 -171
- package/dist/collection/components/six-select/six-select.js +1105 -1105
- package/dist/collection/components/six-sidebar/six-sidebar.js +455 -455
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +89 -89
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +158 -158
- package/dist/collection/components/six-spinner/six-spinner.js +55 -55
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +46 -46
- package/dist/collection/components/six-switch/six-switch.js +393 -393
- package/dist/collection/components/six-tab/six-tab.js +198 -198
- package/dist/collection/components/six-tab-group/six-tab-group.js +362 -362
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +75 -75
- package/dist/collection/components/six-table/six-table.js +209 -209
- package/dist/collection/components/six-table/test/helpers.js +13 -13
- package/dist/collection/components/six-table/types.js +8 -8
- package/dist/collection/components/six-table/util/filter-by.js +34 -34
- package/dist/collection/components/six-table/util/from-data.js +33 -33
- package/dist/collection/components/six-table/util/is.js +3 -3
- package/dist/collection/components/six-table/util/quick-filter-by.js +13 -13
- package/dist/collection/components/six-table/util/sort-by.js +25 -25
- package/dist/collection/components/six-table-cell/six-table-cell.js +21 -21
- package/dist/collection/components/six-table-header/six-table-header.js +21 -21
- package/dist/collection/components/six-table-header-cell/get-next-state.js +7 -7
- package/dist/collection/components/six-table-header-cell/icons.js +12 -12
- package/dist/collection/components/six-table-header-cell/six-table-header-cell.js +174 -174
- package/dist/collection/components/six-table-header-cell/types.js +13 -13
- package/dist/collection/components/six-table-header-cell/util/create-model.js +6 -6
- package/dist/collection/components/six-table-header-cell/util/get-next-state.js +7 -7
- package/dist/collection/components/six-table-row/six-table-row.js +21 -21
- package/dist/collection/components/six-tag/six-tag.js +157 -157
- package/dist/collection/components/six-textarea/six-textarea.js +912 -912
- package/dist/collection/components/six-tile/six-tile.js +315 -315
- package/dist/collection/components/six-timepicker/six-time-format.js +14 -14
- package/dist/collection/components/six-timepicker/six-timepicker.js +980 -980
- package/dist/collection/components/six-timepicker/six-timepicker.types.js +40 -40
- package/dist/collection/components/six-tooltip/six-tooltip.js +435 -435
- package/dist/collection/functional-components/form-control/form-control.js +28 -28
- package/dist/collection/index.js +1 -1
- package/dist/collection/testUtil/delay.js +3 -3
- package/dist/collection/utils/as-array.js +1 -1
- package/dist/collection/utils/date-util.js +712 -712
- package/dist/collection/utils/event-listeners.js +39 -39
- package/dist/collection/utils/execution-control.js +38 -38
- package/dist/collection/utils/focus-visible.js +41 -41
- package/dist/collection/utils/matchers.js +2 -2
- package/dist/collection/utils/modal.js +28 -28
- package/dist/collection/utils/offset.js +13 -13
- package/dist/collection/utils/popover.js +113 -113
- package/dist/collection/utils/scroll.js +47 -47
- package/dist/collection/utils/slot.js +59 -59
- package/dist/collection/utils/support.js +15 -15
- package/dist/collection/utils/tabbable.js +22 -22
- package/dist/collection/utils/testing.js +38 -38
- package/dist/collection/utils/time.util.js +74 -74
- package/dist/collection/utils/type-check.js +5 -5
- package/dist/collection/utils/types.js +1 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js +68 -68
- package/dist/components.json +1 -1
- package/dist/custom-elements/index.js +7595 -7595
- package/dist/esm/{event-listeners-1bef934e.js → event-listeners-570a24ea.js} +38 -38
- package/dist/esm/{execution-control-235f5126.js → execution-control-1a60d709.js} +35 -35
- package/dist/esm/{focus-visible-4b7946aa.js → focus-visible-97933ea9.js} +40 -40
- package/dist/esm/{form-control-17478ad2.js → form-control-24f446af.js} +25 -25
- package/dist/esm/{modal-e5709f6b.js → modal-5ebdc320.js} +41 -41
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{popover-5a51f84d.js → popover-1c7a1139.js} +95 -95
- package/dist/esm/{scroll-99b214c2.js → scroll-180b53fd.js} +57 -57
- package/dist/esm/set-attributes_2.entry.js +57 -57
- package/dist/esm/six-alert.entry.js +131 -131
- package/dist/esm/six-avatar.entry.js +28 -28
- package/dist/esm/six-badge.entry.js +26 -26
- package/dist/esm/six-button.entry.js +97 -97
- package/dist/esm/six-card.entry.js +8 -8
- package/dist/esm/six-checkbox.entry.js +152 -152
- package/dist/esm/six-datepicker.entry.js +1189 -1189
- package/dist/esm/six-details.entry.js +139 -139
- package/dist/esm/six-dialog.entry.js +152 -152
- package/dist/esm/six-drawer.entry.js +174 -174
- package/dist/esm/six-dropdown_3.entry.js +728 -728
- package/dist/esm/six-error-page.entry.js +94 -94
- package/dist/esm/six-file-list-item.entry.js +38 -38
- package/dist/esm/six-file-list.entry.js +8 -8
- package/dist/esm/six-file-upload.entry.js +96 -96
- package/dist/esm/six-footer.entry.js +8 -8
- package/dist/esm/six-form.entry.js +219 -219
- package/dist/esm/six-group-label.entry.js +46 -46
- package/dist/esm/six-header.entry.js +149 -149
- package/dist/esm/six-icon-button.entry.js +33 -33
- package/dist/esm/six-icon.entry.js +24 -24
- package/dist/esm/six-input.entry.js +230 -230
- package/dist/esm/six-item-picker.entry.js +361 -361
- package/dist/esm/six-language-switcher.entry.js +52 -52
- package/dist/esm/six-layout-grid.entry.js +19 -19
- package/dist/esm/six-main-container.entry.js +11 -11
- package/dist/esm/six-menu-divider.entry.js +8 -8
- package/dist/esm/six-menu-label.entry.js +8 -8
- package/dist/esm/six-picto.entry.js +15 -15
- package/dist/esm/six-progress-bar.entry.js +17 -17
- package/dist/esm/six-progress-ring.entry.js +31 -31
- package/dist/esm/six-radio.entry.js +121 -121
- package/dist/esm/six-range.entry.js +198 -198
- package/dist/esm/six-root.entry.js +34 -34
- package/dist/esm/six-search-field.entry.js +43 -43
- package/dist/esm/six-select.entry.js +447 -447
- package/dist/esm/six-sidebar-item-group.entry.js +42 -42
- package/dist/esm/six-sidebar-item.entry.js +18 -18
- package/dist/esm/six-sidebar.entry.js +171 -171
- package/dist/esm/six-spinner.entry.js +16 -16
- package/dist/esm/six-switch.entry.js +100 -100
- package/dist/esm/six-tab-group.entry.js +226 -226
- package/dist/esm/six-tab-panel.entry.js +17 -17
- package/dist/esm/six-tab.entry.js +42 -42
- package/dist/esm/six-table-cell_4.entry.js +70 -70
- package/dist/esm/six-table.entry.js +145 -145
- package/dist/esm/six-tag.entry.js +40 -40
- package/dist/esm/six-textarea.entry.js +211 -211
- package/dist/esm/six-tile.entry.js +89 -89
- package/dist/esm/six-timepicker.entry.js +489 -489
- package/dist/esm/{six-timepicker.types-cd6bac03.js → six-timepicker.types-e161a447.js} +43 -43
- package/dist/esm/six-tooltip.entry.js +172 -172
- package/dist/esm/{slot-5253e199.js → slot-6f3984c7.js} +42 -42
- package/dist/esm/{types-a37c1695.js → types-4b10b413.js} +12 -12
- package/dist/esm/{types-33d15673.js → types-ed860f7c.js} +12 -12
- package/dist/types/components/six-alert/six-alert.d.ts +60 -60
- package/dist/types/components/six-avatar/six-avatar.d.ts +27 -27
- package/dist/types/components/six-badge/six-badge.d.ts +20 -20
- package/dist/types/components/six-button/six-button.d.ts +69 -69
- package/dist/types/components/six-card/six-card.d.ts +9 -9
- package/dist/types/components/six-checkbox/six-checkbox.d.ts +86 -86
- package/dist/types/components/six-datepicker/components/day-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/components/month-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/components/year-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/six-date-formats.d.ts +22 -22
- package/dist/types/components/six-datepicker/six-datepicker.d.ts +214 -214
- package/dist/types/components/six-datepicker/test/six-datepicker.test-helpers.d.ts +1 -1
- package/dist/types/components/six-details/six-details.d.ts +61 -61
- package/dist/types/components/six-dialog/six-dialog.d.ts +75 -75
- package/dist/types/components/six-drawer/six-drawer.d.ts +82 -82
- package/dist/types/components/six-dropdown/six-dropdown.d.ts +140 -140
- package/dist/types/components/six-error-page/six-error-page.d.ts +27 -27
- package/dist/types/components/six-file-list/six-file-list.d.ts +8 -8
- package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +35 -35
- package/dist/types/components/six-file-upload/six-file-upload.d.ts +42 -42
- package/dist/types/components/six-footer/six-footer.d.ts +9 -9
- package/dist/types/components/six-form/six-form.d.ts +69 -69
- package/dist/types/components/six-group-label/six-group-label.d.ts +37 -37
- package/dist/types/components/six-header/six-header.d.ts +90 -90
- package/dist/types/components/six-icon/six-icon.d.ts +13 -13
- package/dist/types/components/six-icon-button/six-icon-button.d.ts +28 -28
- package/dist/types/components/six-input/six-input.d.ts +165 -165
- package/dist/types/components/six-item-picker/six-item-picker.d.ts +106 -106
- package/dist/types/components/six-item-picker/types.d.ts +11 -11
- package/dist/types/components/six-language-switcher/six-language-switcher.d.ts +25 -25
- package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +14 -14
- package/dist/types/components/six-main-container/six-main-container.d.ts +16 -16
- package/dist/types/components/six-menu/six-menu.d.ts +81 -81
- package/dist/types/components/six-menu-divider/six-menu-divider.d.ts +11 -11
- package/dist/types/components/six-menu-item/six-menu-item.d.ts +36 -36
- package/dist/types/components/six-menu-label/six-menu-label.d.ts +13 -13
- package/dist/types/components/six-picto/six-picto.d.ts +14 -14
- package/dist/types/components/six-progress-bar/six-progress-bar.d.ts +19 -19
- package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +24 -24
- package/dist/types/components/six-radio/six-radio.d.ts +66 -66
- package/dist/types/components/six-range/six-range.d.ts +101 -101
- package/dist/types/components/six-root/six-root.d.ts +34 -34
- package/dist/types/components/six-search-field/six-search-field.d.ts +32 -32
- package/dist/types/components/six-select/six-select.d.ts +163 -163
- package/dist/types/components/six-sidebar/six-sidebar.d.ts +55 -55
- package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +15 -15
- package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +26 -26
- package/dist/types/components/six-spinner/six-spinner.d.ts +15 -15
- package/dist/types/components/six-stage-indicator/six-stage-indicator.d.ts +6 -6
- package/dist/types/components/six-switch/six-switch.d.ts +62 -62
- package/dist/types/components/six-tab/six-tab.d.ts +35 -35
- package/dist/types/components/six-tab-group/six-tab-group.d.ts +62 -62
- package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +19 -19
- package/dist/types/components/six-table/six-table.d.ts +30 -30
- package/dist/types/components/six-table/test/helpers.d.ts +2 -2
- package/dist/types/components/six-table/types.d.ts +33 -33
- package/dist/types/components/six-table/util/filter-by.d.ts +2 -2
- package/dist/types/components/six-table/util/from-data.d.ts +8 -8
- package/dist/types/components/six-table/util/is.d.ts +3 -3
- package/dist/types/components/six-table/util/quick-filter-by.d.ts +2 -2
- package/dist/types/components/six-table/util/sort-by.d.ts +2 -2
- package/dist/types/components/six-table-cell/six-table-cell.d.ts +9 -9
- package/dist/types/components/six-table-header/six-table-header.d.ts +9 -9
- package/dist/types/components/six-table-header-cell/get-next-state.d.ts +2 -2
- package/dist/types/components/six-table-header-cell/icons.d.ts +3 -3
- package/dist/types/components/six-table-header-cell/six-table-header-cell.d.ts +32 -32
- package/dist/types/components/six-table-header-cell/types.d.ts +11 -11
- package/dist/types/components/six-table-header-cell/util/create-model.d.ts +4 -4
- package/dist/types/components/six-table-header-cell/util/get-next-state.d.ts +3 -3
- package/dist/types/components/six-table-row/six-table-row.d.ts +9 -9
- package/dist/types/components/six-tag/six-tag.d.ts +30 -30
- package/dist/types/components/six-textarea/six-textarea.d.ts +134 -134
- package/dist/types/components/six-tile/six-tile.d.ts +40 -40
- package/dist/types/components/six-timepicker/six-time-format.d.ts +13 -13
- package/dist/types/components/six-timepicker/six-timepicker.d.ts +184 -184
- package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +36 -36
- package/dist/types/components/six-tooltip/six-tooltip.d.ts +72 -72
- package/dist/types/functional-components/form-control/form-control.d.ts +34 -34
- package/dist/types/index.d.ts +1 -1
- package/dist/types/testUtil/delay.d.ts +1 -1
- package/dist/types/utils/as-array.d.ts +1 -1
- package/dist/types/utils/date-util.d.ts +194 -194
- package/dist/types/utils/event-listeners.d.ts +15 -15
- package/dist/types/utils/execution-control.d.ts +26 -26
- package/dist/types/utils/focus-visible.d.ts +6 -6
- package/dist/types/utils/matchers.d.ts +2 -2
- package/dist/types/utils/modal.d.ts +13 -13
- package/dist/types/utils/offset.d.ts +4 -4
- package/dist/types/utils/popover.d.ts +27 -27
- package/dist/types/utils/scroll.d.ts +3 -3
- package/dist/types/utils/slot.d.ts +9 -9
- package/dist/types/utils/support.d.ts +1 -1
- package/dist/types/utils/tabbable.d.ts +2 -2
- package/dist/types/utils/testing.d.ts +2 -2
- package/dist/types/utils/time.util.d.ts +10 -10
- package/dist/types/utils/type-check.d.ts +4 -4
- package/dist/types/utils/types.d.ts +4 -4
- package/dist/types/wrappers/set-attributes/set-attributes.d.ts +9 -9
- package/dist/ui-library/{p-a8c225f2.entry.js → p-007bc8e8.entry.js} +1 -1
- package/dist/ui-library/{p-f9c0cfb7.entry.js → p-044b784e.entry.js} +1 -1
- package/dist/ui-library/{p-c733dead.js → p-0786fa7c.js} +0 -0
- package/dist/ui-library/{p-12cc24c3.js → p-07d1e830.js} +0 -0
- package/dist/ui-library/{p-48ea4419.entry.js → p-09cb13fa.entry.js} +1 -1
- package/dist/ui-library/{p-e96dcf96.entry.js → p-0c596054.entry.js} +1 -1
- package/dist/ui-library/{p-a77a6442.entry.js → p-1b8dc7b7.entry.js} +1 -1
- package/dist/ui-library/{p-68d31736.js → p-25a3bf57.js} +0 -0
- package/dist/ui-library/{p-ebaea182.entry.js → p-281e8c2d.entry.js} +1 -1
- package/dist/ui-library/{p-9f2dc381.entry.js → p-2924f82f.entry.js} +1 -1
- package/dist/ui-library/{p-ea1fcff2.entry.js → p-2d7ed407.entry.js} +1 -1
- package/dist/ui-library/{p-89f68e76.entry.js → p-4162dcdd.entry.js} +1 -1
- package/dist/ui-library/{p-6f67f986.entry.js → p-4d3a4e93.entry.js} +1 -1
- package/dist/ui-library/{p-8bd0873f.entry.js → p-4ed023b8.entry.js} +1 -1
- package/dist/ui-library/{p-af3d757c.js → p-4f8394d7.js} +0 -0
- package/dist/ui-library/{p-1b92cc7a.entry.js → p-530ea6ec.entry.js} +1 -1
- package/dist/ui-library/{p-19543c96.entry.js → p-531ab886.entry.js} +1 -1
- package/dist/ui-library/{p-fdb455d7.entry.js → p-54c48654.entry.js} +1 -1
- package/dist/ui-library/{p-c948d3db.entry.js → p-55c64cbc.entry.js} +1 -1
- package/dist/ui-library/{p-1c9f0dc6.js → p-5f1c6a5f.js} +0 -0
- package/dist/ui-library/{p-60491176.entry.js → p-675a8243.entry.js} +1 -1
- package/dist/ui-library/{p-b9fb8455.entry.js → p-6d622ed0.entry.js} +1 -1
- package/dist/ui-library/{p-572e3690.js → p-75297ad7.js} +0 -0
- package/dist/ui-library/{p-2ff97cdf.entry.js → p-90b26447.entry.js} +1 -1
- package/dist/ui-library/{p-fcd2356c.entry.js → p-93945629.entry.js} +1 -1
- package/dist/ui-library/{p-7735d99f.js → p-9a860acc.js} +0 -0
- package/dist/ui-library/{p-4cc01afc.entry.js → p-aa37e45a.entry.js} +1 -1
- package/dist/ui-library/{p-191f958b.js → p-b1e66136.js} +0 -0
- package/dist/ui-library/{p-c09dc3a9.js → p-b4dfb7cf.js} +0 -0
- package/dist/ui-library/{p-968c5169.entry.js → p-c24292b3.entry.js} +1 -1
- package/dist/ui-library/{p-ed21cc57.entry.js → p-cd79de73.entry.js} +1 -1
- package/dist/ui-library/{p-34e6d8e8.js → p-d12c6092.js} +0 -0
- package/dist/ui-library/{p-f0e91e17.entry.js → p-d28ac80a.entry.js} +1 -1
- package/dist/ui-library/{p-5ead7b2f.entry.js → p-d837e5a8.entry.js} +1 -1
- package/dist/ui-library/{p-ec1ecc2a.entry.js → p-dd3cae68.entry.js} +1 -1
- package/dist/ui-library/{p-044c6bf9.js → p-eb8f05a9.js} +0 -0
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/package.json +1 -1
|
@@ -1,146 +1,146 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a2605a62.js';
|
|
2
|
-
import { f as focusVisible } from './focus-visible-
|
|
2
|
+
import { f as focusVisible } from './focus-visible-97933ea9.js';
|
|
3
3
|
|
|
4
4
|
const sixDetailsCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{--hide-duration:var(--six-transition-medium);--hide-timing-function:ease;--show-duration:var(--six-transition-medium);--show-timing-function:ease;font-family:var(--six-font-family);display:block}.details{border:solid var(--six-border-width) var(--six-input-border-color);border-radius:var(--six-border-radius-medium);color:var(--six-details-color);overflow-anchor:none;font-size:var(--six-input-font-size-medium)}.details:hover:not(.details--disabled):not(.details--open){border-color:var(--six-input-border-color-hover)}.details.inline{border:none;color:var(--six-sidebar-color)}.details.inline:hover{background-color:var(--six-sidebar-hover-background-color)}.details.inline.details--open{background-color:var(--six-color-web-rock-50)}.details.inline.details--open:hover{border:none;box-shadow:none}.details.inline.details--open>.details__header{color:var(--six-sidebar-color);font-weight:var(--six-font-weight-bold);background-color:var(--six-sidebar-header-background-color)}.details--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);color:var(--six-input-color-disabled)}.details__header{display:flex;align-items:center;border-radius:inherit;padding:var(--six-spacing-medium);user-select:none;cursor:pointer}.details__header:focus{outline:none}.details--disabled .details__header{cursor:not-allowed;border-width:1px}.details--disabled .details__header:focus{outline:none;box-shadow:none}.details__summary{flex:1 1 auto;display:flex;align-items:center}.details__summary-icon{flex:0 0 auto;display:flex;align-items:center;font-size:1.2em;transition:var(--six-transition-medium) transform ease}.details--open .details__summary-icon--animate{transform:rotate(-180deg)}.details--open:hover{color:var(--six-input-color-focus)}.details__body{height:0;overflow:hidden;transition-property:height;transition-duration:var(--hide-duration);transition-timing-function:var(--hide-timing-function)}.details--open .details__body{transition-duration:var(--show-duration);transition-timing-function:var(--show-timing-function)}.details__content{padding:var(--six-spacing-medium)}";
|
|
5
5
|
|
|
6
|
-
let id = 0;
|
|
7
|
-
let SixDetails = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.sixShow = createEvent(this, "six-details-show", 7);
|
|
11
|
-
this.sixAfterShow = createEvent(this, "six-details-after-show", 7);
|
|
12
|
-
this.sixHide = createEvent(this, "six-details-hide", 7);
|
|
13
|
-
this.sixAfterHide = createEvent(this, "six-details-after-hide", 7);
|
|
14
|
-
this.animateSummaryIcon = true;
|
|
15
|
-
this.componentId = `details-${++id}`;
|
|
16
|
-
this.isVisible = false;
|
|
17
|
-
/** Indicates whether or not the details is open. You can use this in lieu of the show/hide methods. */
|
|
18
|
-
this.open = false;
|
|
19
|
-
/** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */
|
|
20
|
-
this.summary = '';
|
|
21
|
-
/** The icon's size. */
|
|
22
|
-
this.summaryIconSize = 'inherit';
|
|
23
|
-
/** Set to true to prevent the user from toggling the details. */
|
|
24
|
-
this.disabled = false;
|
|
25
|
-
/** Set to true when you want to use six-details inline e.g. in a sidebar */
|
|
26
|
-
this.inline = false;
|
|
27
|
-
/** 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 */
|
|
28
|
-
this.selectableEmpty = false;
|
|
29
|
-
this.hasContent = true;
|
|
30
|
-
}
|
|
31
|
-
handleOpenChange() {
|
|
32
|
-
if (this.body) {
|
|
33
|
-
this.open ? this.show() : this.hide();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
connectedCallback() {
|
|
37
|
-
this.handleBodyTransitionEnd = this.handleBodyTransitionEnd.bind(this);
|
|
38
|
-
this.handleSummaryClick = this.handleSummaryClick.bind(this);
|
|
39
|
-
this.handleSummaryKeyDown = this.handleSummaryKeyDown.bind(this);
|
|
40
|
-
}
|
|
41
|
-
componentDidLoad() {
|
|
42
|
-
focusVisible.observe(this.details);
|
|
43
|
-
this.body.hidden = !this.open;
|
|
44
|
-
// Show on init if open
|
|
45
|
-
if (this.open) {
|
|
46
|
-
this.show();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
disconnectedCallback() {
|
|
50
|
-
focusVisible.unobserve(this.details);
|
|
51
|
-
}
|
|
52
|
-
/** Shows the detail body */
|
|
53
|
-
async show() {
|
|
54
|
-
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
|
|
55
|
-
if (this.isVisible) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const sixShow = this.sixShow.emit();
|
|
59
|
-
if (sixShow.defaultPrevented) {
|
|
60
|
-
this.open = false;
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
this.body.hidden = false;
|
|
64
|
-
if (this.body.scrollHeight === 0) {
|
|
65
|
-
// When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open
|
|
66
|
-
// intiially, but not immediately visible (i.e. in a tab panel).
|
|
67
|
-
this.body.style.height = 'auto';
|
|
68
|
-
this.body.style.overflow = 'visible';
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.body.style.height = `${this.body.scrollHeight}px`;
|
|
72
|
-
this.body.style.overflow = 'hidden';
|
|
73
|
-
}
|
|
74
|
-
this.isVisible = true;
|
|
75
|
-
this.open = true;
|
|
76
|
-
}
|
|
77
|
-
/** Hides the detail body */
|
|
78
|
-
async hide() {
|
|
79
|
-
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
|
|
80
|
-
if (!this.isVisible) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const sixHide = this.sixHide.emit();
|
|
84
|
-
if (sixHide.defaultPrevented) {
|
|
85
|
-
this.open = true;
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
// We can't transition out of `height: auto`, so let's set it to the current height first
|
|
89
|
-
this.body.style.height = `${this.body.scrollHeight}px`;
|
|
90
|
-
this.body.style.overflow = 'hidden';
|
|
91
|
-
requestAnimationFrame(() => {
|
|
92
|
-
this.body.style.height = '0';
|
|
93
|
-
});
|
|
94
|
-
this.isVisible = false;
|
|
95
|
-
this.open = false;
|
|
96
|
-
}
|
|
97
|
-
handleBodyTransitionEnd(event) {
|
|
98
|
-
const target = event.target;
|
|
99
|
-
// Ensure we only emit one event when the target element is no longer visible
|
|
100
|
-
if (event.propertyName === 'height' && target.classList.contains('details__body')) {
|
|
101
|
-
this.body.style.overflow = this.open ? 'visible' : 'hidden';
|
|
102
|
-
this.body.style.height = this.open ? 'auto' : '0';
|
|
103
|
-
this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
|
|
104
|
-
this.body.hidden = !this.open;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
handleSummaryClick() {
|
|
108
|
-
if (!this.disabled && (this.hasContent || this.selectableEmpty)) {
|
|
109
|
-
this.open ? this.hide() : this.show();
|
|
110
|
-
this.header.focus();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
handleSummaryKeyDown(event) {
|
|
114
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
115
|
-
event.preventDefault();
|
|
116
|
-
this.open ? this.hide() : this.show();
|
|
117
|
-
}
|
|
118
|
-
if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {
|
|
119
|
-
event.preventDefault();
|
|
120
|
-
this.hide();
|
|
121
|
-
}
|
|
122
|
-
if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {
|
|
123
|
-
event.preventDefault();
|
|
124
|
-
this.show();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
render() {
|
|
128
|
-
const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');
|
|
129
|
-
return (h("div", { ref: (el) => (this.details = el), part: "base", class: {
|
|
130
|
-
details: true,
|
|
131
|
-
'details--open': this.open,
|
|
132
|
-
'details--disabled': this.disabled,
|
|
133
|
-
inline: this.inline,
|
|
134
|
-
} }, h("header", { ref: (el) => (this.header = el), part: "header", id: `${this.componentId}-header`, class: "details__header", role: "button", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": `${this.componentId}-content`, "aria-disabled": this.disabled ? 'true' : 'false', tabIndex: this.disabled ? -1 : 0, onClick: this.handleSummaryClick, onKeyDown: this.handleSummaryKeyDown }, h("div", { part: "summary", class: "details__summary" }, h("slot", { name: "summary" }, this.summary)), h("span", { part: "summary-icon", class: {
|
|
135
|
-
'details__summary-icon': true,
|
|
136
|
-
'details__summary-icon--animate': this.animateSummaryIcon,
|
|
137
|
-
} }, h("slot", { name: "summary-icon", onSlotchange: () => (this.animateSummaryIcon = false) }, summaryIcon && h("six-icon", { size: this.summaryIconSize }, summaryIcon)))), h("div", { ref: (el) => (this.body = el), class: "details__body", onTransitionEnd: this.handleBodyTransitionEnd }, h("div", { part: "content", id: `${this.componentId}-content`, class: "details__content", role: "region", "aria-labelledby": `${this.componentId}-header` }, h("slot", null)))));
|
|
138
|
-
}
|
|
139
|
-
get host() { return getElement(this); }
|
|
140
|
-
static get watchers() { return {
|
|
141
|
-
"open": ["handleOpenChange"]
|
|
142
|
-
}; }
|
|
143
|
-
};
|
|
6
|
+
let id = 0;
|
|
7
|
+
let SixDetails = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.sixShow = createEvent(this, "six-details-show", 7);
|
|
11
|
+
this.sixAfterShow = createEvent(this, "six-details-after-show", 7);
|
|
12
|
+
this.sixHide = createEvent(this, "six-details-hide", 7);
|
|
13
|
+
this.sixAfterHide = createEvent(this, "six-details-after-hide", 7);
|
|
14
|
+
this.animateSummaryIcon = true;
|
|
15
|
+
this.componentId = `details-${++id}`;
|
|
16
|
+
this.isVisible = false;
|
|
17
|
+
/** Indicates whether or not the details is open. You can use this in lieu of the show/hide methods. */
|
|
18
|
+
this.open = false;
|
|
19
|
+
/** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */
|
|
20
|
+
this.summary = '';
|
|
21
|
+
/** The icon's size. */
|
|
22
|
+
this.summaryIconSize = 'inherit';
|
|
23
|
+
/** Set to true to prevent the user from toggling the details. */
|
|
24
|
+
this.disabled = false;
|
|
25
|
+
/** Set to true when you want to use six-details inline e.g. in a sidebar */
|
|
26
|
+
this.inline = false;
|
|
27
|
+
/** 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 */
|
|
28
|
+
this.selectableEmpty = false;
|
|
29
|
+
this.hasContent = true;
|
|
30
|
+
}
|
|
31
|
+
handleOpenChange() {
|
|
32
|
+
if (this.body) {
|
|
33
|
+
this.open ? this.show() : this.hide();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
this.handleBodyTransitionEnd = this.handleBodyTransitionEnd.bind(this);
|
|
38
|
+
this.handleSummaryClick = this.handleSummaryClick.bind(this);
|
|
39
|
+
this.handleSummaryKeyDown = this.handleSummaryKeyDown.bind(this);
|
|
40
|
+
}
|
|
41
|
+
componentDidLoad() {
|
|
42
|
+
focusVisible.observe(this.details);
|
|
43
|
+
this.body.hidden = !this.open;
|
|
44
|
+
// Show on init if open
|
|
45
|
+
if (this.open) {
|
|
46
|
+
this.show();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
focusVisible.unobserve(this.details);
|
|
51
|
+
}
|
|
52
|
+
/** Shows the detail body */
|
|
53
|
+
async show() {
|
|
54
|
+
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
|
|
55
|
+
if (this.isVisible) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const sixShow = this.sixShow.emit();
|
|
59
|
+
if (sixShow.defaultPrevented) {
|
|
60
|
+
this.open = false;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.body.hidden = false;
|
|
64
|
+
if (this.body.scrollHeight === 0) {
|
|
65
|
+
// When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open
|
|
66
|
+
// intiially, but not immediately visible (i.e. in a tab panel).
|
|
67
|
+
this.body.style.height = 'auto';
|
|
68
|
+
this.body.style.overflow = 'visible';
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.body.style.height = `${this.body.scrollHeight}px`;
|
|
72
|
+
this.body.style.overflow = 'hidden';
|
|
73
|
+
}
|
|
74
|
+
this.isVisible = true;
|
|
75
|
+
this.open = true;
|
|
76
|
+
}
|
|
77
|
+
/** Hides the detail body */
|
|
78
|
+
async hide() {
|
|
79
|
+
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
|
|
80
|
+
if (!this.isVisible) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const sixHide = this.sixHide.emit();
|
|
84
|
+
if (sixHide.defaultPrevented) {
|
|
85
|
+
this.open = true;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
// We can't transition out of `height: auto`, so let's set it to the current height first
|
|
89
|
+
this.body.style.height = `${this.body.scrollHeight}px`;
|
|
90
|
+
this.body.style.overflow = 'hidden';
|
|
91
|
+
requestAnimationFrame(() => {
|
|
92
|
+
this.body.style.height = '0';
|
|
93
|
+
});
|
|
94
|
+
this.isVisible = false;
|
|
95
|
+
this.open = false;
|
|
96
|
+
}
|
|
97
|
+
handleBodyTransitionEnd(event) {
|
|
98
|
+
const target = event.target;
|
|
99
|
+
// Ensure we only emit one event when the target element is no longer visible
|
|
100
|
+
if (event.propertyName === 'height' && target.classList.contains('details__body')) {
|
|
101
|
+
this.body.style.overflow = this.open ? 'visible' : 'hidden';
|
|
102
|
+
this.body.style.height = this.open ? 'auto' : '0';
|
|
103
|
+
this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
|
|
104
|
+
this.body.hidden = !this.open;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
handleSummaryClick() {
|
|
108
|
+
if (!this.disabled && (this.hasContent || this.selectableEmpty)) {
|
|
109
|
+
this.open ? this.hide() : this.show();
|
|
110
|
+
this.header.focus();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
handleSummaryKeyDown(event) {
|
|
114
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
this.open ? this.hide() : this.show();
|
|
117
|
+
}
|
|
118
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
this.hide();
|
|
121
|
+
}
|
|
122
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {
|
|
123
|
+
event.preventDefault();
|
|
124
|
+
this.show();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
render() {
|
|
128
|
+
const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');
|
|
129
|
+
return (h("div", { ref: (el) => (this.details = el), part: "base", class: {
|
|
130
|
+
details: true,
|
|
131
|
+
'details--open': this.open,
|
|
132
|
+
'details--disabled': this.disabled,
|
|
133
|
+
inline: this.inline,
|
|
134
|
+
} }, h("header", { ref: (el) => (this.header = el), part: "header", id: `${this.componentId}-header`, class: "details__header", role: "button", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": `${this.componentId}-content`, "aria-disabled": this.disabled ? 'true' : 'false', tabIndex: this.disabled ? -1 : 0, onClick: this.handleSummaryClick, onKeyDown: this.handleSummaryKeyDown }, h("div", { part: "summary", class: "details__summary" }, h("slot", { name: "summary" }, this.summary)), h("span", { part: "summary-icon", class: {
|
|
135
|
+
'details__summary-icon': true,
|
|
136
|
+
'details__summary-icon--animate': this.animateSummaryIcon,
|
|
137
|
+
} }, h("slot", { name: "summary-icon", onSlotchange: () => (this.animateSummaryIcon = false) }, summaryIcon && h("six-icon", { size: this.summaryIconSize }, summaryIcon)))), h("div", { ref: (el) => (this.body = el), class: "details__body", onTransitionEnd: this.handleBodyTransitionEnd }, h("div", { part: "content", id: `${this.componentId}-content`, class: "details__content", role: "region", "aria-labelledby": `${this.componentId}-header` }, h("slot", null)))));
|
|
138
|
+
}
|
|
139
|
+
get host() { return getElement(this); }
|
|
140
|
+
static get watchers() { return {
|
|
141
|
+
"open": ["handleOpenChange"]
|
|
142
|
+
}; }
|
|
143
|
+
};
|
|
144
144
|
SixDetails.style = sixDetailsCss;
|
|
145
145
|
|
|
146
146
|
export { SixDetails as six_details };
|
|
@@ -1,159 +1,159 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a2605a62.js';
|
|
2
|
-
import { u as unlockBodyScrolling, l as lockBodyScrolling } from './scroll-
|
|
3
|
-
import { h as hasSlot } from './slot-
|
|
4
|
-
import { i as isPreventScrollSupported, M as Modal } from './modal-
|
|
2
|
+
import { u as unlockBodyScrolling, l as lockBodyScrolling } from './scroll-180b53fd.js';
|
|
3
|
+
import { h as hasSlot } from './slot-6f3984c7.js';
|
|
4
|
+
import { i as isPreventScrollSupported, M as Modal } from './modal-5ebdc320.js';
|
|
5
5
|
|
|
6
6
|
const sixDialogCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{--width:31rem;display:contents}.dialog{display:flex;align-items:center;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--six-z-index-dialog);color:var(--six-color-web-rock-900)}.dialog:not(.dialog--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.dialog__panel{display:flex;flex-direction:column;z-index:2;width:var(--width);max-width:calc(100% - var(--six-spacing-xx-large));max-height:calc(100% - var(--six-spacing-xx-large));background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);box-shadow:var(--six-shadow-x-large);opacity:0;transform:scale(0.8);transition:var(--six-transition-medium) opacity, var(--six-transition-medium) transform}.dialog__panel:focus{outline:none}@media screen and (max-width: 420px){.dialog__panel{max-height:80vh}}.dialog--open .dialog__panel{display:flex;opacity:1;transform:none}.dialog__header{flex:0 0 auto;display:flex}.dialog__title{flex:1 1 auto;font-size:var(--six-font-size-x-large);font-weight:var(--six-font-weight-bold);line-height:var(--six-line-height-dense);padding:var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small)}.dialog__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-x-large);padding:0 var(--six-spacing-x-small)}.dialog__body{flex:1 1 auto;padding:var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);overflow:auto;-webkit-overflow-scrolling:touch}.dialog__footer{flex:0 0 auto;text-align:right;padding:var(--six-spacing-large)}.dialog__footer ::slotted(six-button:not(:first-of-type)){margin-left:var(--six-spacing-xx-small)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}.dialog__overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--six-overlay-background-color);opacity:0;transition:var(--six-transition-medium) opacity}.dialog--open .dialog__overlay{opacity:0.8}";
|
|
7
7
|
|
|
8
|
-
const hasPreventScroll = isPreventScrollSupported();
|
|
9
|
-
let id = 0;
|
|
10
|
-
let SixDialog = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
registerInstance(this, hostRef);
|
|
13
|
-
this.sixShow = createEvent(this, "six-dialog-show", 7);
|
|
14
|
-
this.sixAfterShow = createEvent(this, "six-dialog-after-show", 7);
|
|
15
|
-
this.sixHide = createEvent(this, "six-dialog-hide", 7);
|
|
16
|
-
this.sixAfterHide = createEvent(this, "six-dialog-after-hide", 7);
|
|
17
|
-
this.sixInitialFocus = createEvent(this, "six-dialog-initial-focus", 7);
|
|
18
|
-
this.sixOverlayDismiss = createEvent(this, "six-dialog-overlay-dismiss", 7);
|
|
19
|
-
this.componentId = `dialog-${++id}`;
|
|
20
|
-
this.willShow = false;
|
|
21
|
-
this.willHide = false;
|
|
22
|
-
this.hasFooter = false;
|
|
23
|
-
this.isVisible = false;
|
|
24
|
-
/** Indicates whether or not the dialog is open. You can use this in lieu of the show/hide methods. */
|
|
25
|
-
this.open = false;
|
|
26
|
-
/**
|
|
27
|
-
* The dialog's label as displayed in the header. You should always include a relevant label even when using
|
|
28
|
-
* `no-header`, as it is required for proper accessibility.
|
|
29
|
-
*/
|
|
30
|
-
this.label = '';
|
|
31
|
-
/**
|
|
32
|
-
* Set to true to disable the header. This will also remove the default close button, so please ensure you provide an
|
|
33
|
-
* easy, accessible way for users to dismiss the dialog.
|
|
34
|
-
*/
|
|
35
|
-
this.noHeader = false;
|
|
36
|
-
}
|
|
37
|
-
handleOpenChange() {
|
|
38
|
-
this.open ? this.show() : this.hide();
|
|
39
|
-
}
|
|
40
|
-
connectedCallback() {
|
|
41
|
-
this.handleCloseClick = this.handleCloseClick.bind(this);
|
|
42
|
-
this.handleTransitionEnd = this.handleTransitionEnd.bind(this);
|
|
43
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
44
|
-
this.handleOverlayClick = this.handleOverlayClick.bind(this);
|
|
45
|
-
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
46
|
-
this.modal = new Modal(this.host, {
|
|
47
|
-
onFocusOut: () => this.panel.focus(),
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
componentWillLoad() {
|
|
51
|
-
this.handleSlotChange();
|
|
52
|
-
// Show on init if open
|
|
53
|
-
if (this.open) {
|
|
54
|
-
this.show();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
disconnectedCallback() {
|
|
58
|
-
unlockBodyScrolling(this.host);
|
|
59
|
-
}
|
|
60
|
-
/** Shows the dialog */
|
|
61
|
-
async show() {
|
|
62
|
-
if (this.willShow) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
const sixShow = this.sixShow.emit();
|
|
66
|
-
if (sixShow.defaultPrevented) {
|
|
67
|
-
this.open = false;
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
this.willShow = true;
|
|
71
|
-
this.isVisible = true;
|
|
72
|
-
this.open = true;
|
|
73
|
-
this.modal.activate();
|
|
74
|
-
lockBodyScrolling(this.host);
|
|
75
|
-
if (this.open) {
|
|
76
|
-
if (hasPreventScroll) {
|
|
77
|
-
// Wait for the next frame before setting initial focus so the dialog is technically visible
|
|
78
|
-
requestAnimationFrame(() => {
|
|
79
|
-
const sixInitialFocus = this.sixInitialFocus.emit();
|
|
80
|
-
if (!sixInitialFocus.defaultPrevented) {
|
|
81
|
-
this.panel.focus({ preventScroll: true });
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
// Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to
|
|
87
|
-
// wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its
|
|
88
|
-
// out of view initially.
|
|
89
|
-
//
|
|
90
|
-
// Fiddle: https://jsfiddle.net/g6buoafq/1/
|
|
91
|
-
// Safari: https://bugs.webkit.org/show_bug.cgi?id=178583
|
|
92
|
-
//
|
|
93
|
-
this.dialog.addEventListener('transitionend', () => {
|
|
94
|
-
const sixInitialFocus = this.sixInitialFocus.emit();
|
|
95
|
-
if (!sixInitialFocus.defaultPrevented) {
|
|
96
|
-
this.panel.focus();
|
|
97
|
-
}
|
|
98
|
-
}, { once: true });
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
/** Hides the dialog */
|
|
103
|
-
async hide() {
|
|
104
|
-
if (this.willHide) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
const sixHide = this.sixHide.emit();
|
|
108
|
-
if (sixHide.defaultPrevented) {
|
|
109
|
-
this.open = true;
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
this.willHide = true;
|
|
113
|
-
this.open = false;
|
|
114
|
-
this.modal.deactivate();
|
|
115
|
-
unlockBodyScrolling(this.host);
|
|
116
|
-
}
|
|
117
|
-
handleCloseClick() {
|
|
118
|
-
this.hide();
|
|
119
|
-
}
|
|
120
|
-
handleKeyDown(event) {
|
|
121
|
-
if (event.key === 'Escape') {
|
|
122
|
-
this.hide();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
handleOverlayClick() {
|
|
126
|
-
const sixOverlayDismiss = this.sixOverlayDismiss.emit();
|
|
127
|
-
if (!sixOverlayDismiss.defaultPrevented) {
|
|
128
|
-
this.hide();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
handleSlotChange() {
|
|
132
|
-
this.hasFooter = hasSlot(this.host, 'footer');
|
|
133
|
-
}
|
|
134
|
-
handleTransitionEnd(event) {
|
|
135
|
-
const target = event.target;
|
|
136
|
-
// Ensure we only emit one event when the target element is no longer visible
|
|
137
|
-
if (event.propertyName === 'opacity' && target.classList.contains('dialog__panel')) {
|
|
138
|
-
this.isVisible = this.open;
|
|
139
|
-
this.willShow = false;
|
|
140
|
-
this.willHide = false;
|
|
141
|
-
this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
render() {
|
|
145
|
-
return (h("div", { ref: (el) => (this.dialog = el), part: "base", class: {
|
|
146
|
-
dialog: true,
|
|
147
|
-
'dialog--open': this.open,
|
|
148
|
-
'dialog--visible': this.isVisible,
|
|
149
|
-
'dialog--has-footer': this.hasFooter,
|
|
150
|
-
}, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { part: "overlay", class: "dialog__overlay", onClick: this.handleOverlayClick }), h("div", { ref: (el) => (this.panel = el), part: "panel", class: "dialog__panel", role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? 'false' : 'true', "aria-label": this.noHeader ? this.label : null, "aria-labelledby": !this.noHeader ? `${this.componentId}-title` : null, tabIndex: 0 }, !this.noHeader && (h("header", { part: "header", class: "dialog__header" }, h("span", { part: "title", class: "dialog__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "dialog__close", name: "close", onClick: this.handleCloseClick }))), h("div", { part: "body", class: "dialog__body" }, h("slot", null)), h("footer", { part: "footer", class: "dialog__footer" }, h("slot", { name: "footer", onSlotchange: this.handleSlotChange })))));
|
|
151
|
-
}
|
|
152
|
-
get host() { return getElement(this); }
|
|
153
|
-
static get watchers() { return {
|
|
154
|
-
"open": ["handleOpenChange"]
|
|
155
|
-
}; }
|
|
156
|
-
};
|
|
8
|
+
const hasPreventScroll = isPreventScrollSupported();
|
|
9
|
+
let id = 0;
|
|
10
|
+
let SixDialog = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
registerInstance(this, hostRef);
|
|
13
|
+
this.sixShow = createEvent(this, "six-dialog-show", 7);
|
|
14
|
+
this.sixAfterShow = createEvent(this, "six-dialog-after-show", 7);
|
|
15
|
+
this.sixHide = createEvent(this, "six-dialog-hide", 7);
|
|
16
|
+
this.sixAfterHide = createEvent(this, "six-dialog-after-hide", 7);
|
|
17
|
+
this.sixInitialFocus = createEvent(this, "six-dialog-initial-focus", 7);
|
|
18
|
+
this.sixOverlayDismiss = createEvent(this, "six-dialog-overlay-dismiss", 7);
|
|
19
|
+
this.componentId = `dialog-${++id}`;
|
|
20
|
+
this.willShow = false;
|
|
21
|
+
this.willHide = false;
|
|
22
|
+
this.hasFooter = false;
|
|
23
|
+
this.isVisible = false;
|
|
24
|
+
/** Indicates whether or not the dialog is open. You can use this in lieu of the show/hide methods. */
|
|
25
|
+
this.open = false;
|
|
26
|
+
/**
|
|
27
|
+
* The dialog's label as displayed in the header. You should always include a relevant label even when using
|
|
28
|
+
* `no-header`, as it is required for proper accessibility.
|
|
29
|
+
*/
|
|
30
|
+
this.label = '';
|
|
31
|
+
/**
|
|
32
|
+
* Set to true to disable the header. This will also remove the default close button, so please ensure you provide an
|
|
33
|
+
* easy, accessible way for users to dismiss the dialog.
|
|
34
|
+
*/
|
|
35
|
+
this.noHeader = false;
|
|
36
|
+
}
|
|
37
|
+
handleOpenChange() {
|
|
38
|
+
this.open ? this.show() : this.hide();
|
|
39
|
+
}
|
|
40
|
+
connectedCallback() {
|
|
41
|
+
this.handleCloseClick = this.handleCloseClick.bind(this);
|
|
42
|
+
this.handleTransitionEnd = this.handleTransitionEnd.bind(this);
|
|
43
|
+
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
44
|
+
this.handleOverlayClick = this.handleOverlayClick.bind(this);
|
|
45
|
+
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
46
|
+
this.modal = new Modal(this.host, {
|
|
47
|
+
onFocusOut: () => this.panel.focus(),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
componentWillLoad() {
|
|
51
|
+
this.handleSlotChange();
|
|
52
|
+
// Show on init if open
|
|
53
|
+
if (this.open) {
|
|
54
|
+
this.show();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
disconnectedCallback() {
|
|
58
|
+
unlockBodyScrolling(this.host);
|
|
59
|
+
}
|
|
60
|
+
/** Shows the dialog */
|
|
61
|
+
async show() {
|
|
62
|
+
if (this.willShow) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const sixShow = this.sixShow.emit();
|
|
66
|
+
if (sixShow.defaultPrevented) {
|
|
67
|
+
this.open = false;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.willShow = true;
|
|
71
|
+
this.isVisible = true;
|
|
72
|
+
this.open = true;
|
|
73
|
+
this.modal.activate();
|
|
74
|
+
lockBodyScrolling(this.host);
|
|
75
|
+
if (this.open) {
|
|
76
|
+
if (hasPreventScroll) {
|
|
77
|
+
// Wait for the next frame before setting initial focus so the dialog is technically visible
|
|
78
|
+
requestAnimationFrame(() => {
|
|
79
|
+
const sixInitialFocus = this.sixInitialFocus.emit();
|
|
80
|
+
if (!sixInitialFocus.defaultPrevented) {
|
|
81
|
+
this.panel.focus({ preventScroll: true });
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
// Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to
|
|
87
|
+
// wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its
|
|
88
|
+
// out of view initially.
|
|
89
|
+
//
|
|
90
|
+
// Fiddle: https://jsfiddle.net/g6buoafq/1/
|
|
91
|
+
// Safari: https://bugs.webkit.org/show_bug.cgi?id=178583
|
|
92
|
+
//
|
|
93
|
+
this.dialog.addEventListener('transitionend', () => {
|
|
94
|
+
const sixInitialFocus = this.sixInitialFocus.emit();
|
|
95
|
+
if (!sixInitialFocus.defaultPrevented) {
|
|
96
|
+
this.panel.focus();
|
|
97
|
+
}
|
|
98
|
+
}, { once: true });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Hides the dialog */
|
|
103
|
+
async hide() {
|
|
104
|
+
if (this.willHide) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const sixHide = this.sixHide.emit();
|
|
108
|
+
if (sixHide.defaultPrevented) {
|
|
109
|
+
this.open = true;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
this.willHide = true;
|
|
113
|
+
this.open = false;
|
|
114
|
+
this.modal.deactivate();
|
|
115
|
+
unlockBodyScrolling(this.host);
|
|
116
|
+
}
|
|
117
|
+
handleCloseClick() {
|
|
118
|
+
this.hide();
|
|
119
|
+
}
|
|
120
|
+
handleKeyDown(event) {
|
|
121
|
+
if (event.key === 'Escape') {
|
|
122
|
+
this.hide();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
handleOverlayClick() {
|
|
126
|
+
const sixOverlayDismiss = this.sixOverlayDismiss.emit();
|
|
127
|
+
if (!sixOverlayDismiss.defaultPrevented) {
|
|
128
|
+
this.hide();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
handleSlotChange() {
|
|
132
|
+
this.hasFooter = hasSlot(this.host, 'footer');
|
|
133
|
+
}
|
|
134
|
+
handleTransitionEnd(event) {
|
|
135
|
+
const target = event.target;
|
|
136
|
+
// Ensure we only emit one event when the target element is no longer visible
|
|
137
|
+
if (event.propertyName === 'opacity' && target.classList.contains('dialog__panel')) {
|
|
138
|
+
this.isVisible = this.open;
|
|
139
|
+
this.willShow = false;
|
|
140
|
+
this.willHide = false;
|
|
141
|
+
this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
render() {
|
|
145
|
+
return (h("div", { ref: (el) => (this.dialog = el), part: "base", class: {
|
|
146
|
+
dialog: true,
|
|
147
|
+
'dialog--open': this.open,
|
|
148
|
+
'dialog--visible': this.isVisible,
|
|
149
|
+
'dialog--has-footer': this.hasFooter,
|
|
150
|
+
}, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { part: "overlay", class: "dialog__overlay", onClick: this.handleOverlayClick }), h("div", { ref: (el) => (this.panel = el), part: "panel", class: "dialog__panel", role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? 'false' : 'true', "aria-label": this.noHeader ? this.label : null, "aria-labelledby": !this.noHeader ? `${this.componentId}-title` : null, tabIndex: 0 }, !this.noHeader && (h("header", { part: "header", class: "dialog__header" }, h("span", { part: "title", class: "dialog__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "dialog__close", name: "close", onClick: this.handleCloseClick }))), h("div", { part: "body", class: "dialog__body" }, h("slot", null)), h("footer", { part: "footer", class: "dialog__footer" }, h("slot", { name: "footer", onSlotchange: this.handleSlotChange })))));
|
|
151
|
+
}
|
|
152
|
+
get host() { return getElement(this); }
|
|
153
|
+
static get watchers() { return {
|
|
154
|
+
"open": ["handleOpenChange"]
|
|
155
|
+
}; }
|
|
156
|
+
};
|
|
157
157
|
SixDialog.style = sixDialogCss;
|
|
158
158
|
|
|
159
159
|
export { SixDialog as six_dialog };
|