@six-group/ui-library 0.0.0-insider.faf050a → 0.0.0-insider.fbc1348
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/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/error-messages-6e8049a4.js +119 -0
- package/dist/cjs/error-messages-6e8049a4.js.map +1 -0
- package/dist/cjs/{form-control-f9bc25dd.js → form-control-de259450.js} +2 -2
- package/dist/cjs/{form-control-f9bc25dd.js.map → form-control-de259450.js.map} +1 -1
- package/dist/cjs/{index-3baddcdc.js → index-1f707a55.js} +127 -76
- package/dist/cjs/index-1f707a55.js.map +1 -0
- package/dist/cjs/index.cjs.js +54 -101
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +5 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/{modal-3ce015be.js → modal-bd7fc5bc.js} +1 -18
- package/dist/cjs/modal-bd7fc5bc.js.map +1 -0
- package/dist/cjs/{popup-40a9adbb.js → popup-e854acda.js} +2 -2
- package/dist/cjs/popup-e854acda.js.map +1 -0
- package/dist/cjs/six-alert.cjs.entry.js +42 -9
- package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +5 -4
- package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-badge.cjs.entry.js +6 -5
- package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/six-button.cjs.entry.js +8 -6
- package/dist/cjs/six-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-card.cjs.entry.js +5 -4
- package/dist/cjs/six-card.cjs.entry.js.map +1 -1
- package/dist/cjs/six-checkbox_2.cjs.entry.js +192 -0
- package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -0
- package/dist/cjs/six-datepicker.cjs.entry.js +44 -15
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +7 -6
- package/dist/cjs/six-details.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dialog.cjs.entry.js +16 -32
- package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/six-drawer.cjs.entry.js +15 -32
- package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dropdown_2.cjs.entry.js +204 -130
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error-page.cjs.entry.js +4 -3
- package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error.cjs.entry.js +4 -3
- package/dist/cjs/six-error.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js +6 -5
- package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-list.cjs.entry.js +4 -3
- package/dist/cjs/six-file-list.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-upload.cjs.entry.js +34 -9
- package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/six-footer.cjs.entry.js +5 -4
- package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +7 -6
- package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
- package/dist/cjs/six-header.cjs.entry.js +43 -20
- package/dist/cjs/six-header.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +7 -6
- package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon.cjs.entry.js +6 -5
- package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/six-input.cjs.entry.js +11 -8
- package/dist/cjs/six-input.cjs.entry.js.map +1 -1
- package/dist/cjs/six-item-picker.cjs.entry.js +106 -9
- package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js +11 -6
- package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
- package/dist/cjs/six-layout-grid.cjs.entry.js +4 -3
- package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js +4 -3
- package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
- package/dist/cjs/six-menu-divider.cjs.entry.js +5 -4
- package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/six-menu-label.cjs.entry.js +5 -4
- package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
- package/dist/cjs/six-picto.cjs.entry.js +4 -3
- package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
- package/dist/cjs/six-progress-bar.cjs.entry.js +6 -5
- package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-progress-ring.cjs.entry.js +5 -4
- package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +6 -5
- package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/six-range.cjs.entry.js +18 -7
- package/dist/cjs/six-range.cjs.entry.js.map +1 -1
- package/dist/cjs/six-root.cjs.entry.js +4 -22
- package/dist/cjs/six-root.cjs.entry.js.map +1 -1
- package/dist/cjs/six-search-field.cjs.entry.js +5 -4
- package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
- package/dist/cjs/six-select.cjs.entry.js +340 -182
- package/dist/cjs/six-select.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +5 -4
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item.cjs.entry.js +5 -4
- package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar.cjs.entry.js +6 -5
- package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-spinner.cjs.entry.js +5 -4
- package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/six-stage-indicator.cjs.entry.js +23 -0
- package/dist/cjs/six-stage-indicator.cjs.entry.js.map +1 -0
- package/dist/cjs/six-switch.cjs.entry.js +8 -7
- package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-group.cjs.entry.js +35 -9
- package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js +5 -4
- package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +6 -5
- package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +7 -6
- package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/six-textarea.cjs.entry.js +8 -7
- package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tile.cjs.entry.js +8 -7
- package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js +8 -7
- package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +6 -5
- package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{slot-9821749e.js → slot-1b1232a1.js} +1 -3
- package/dist/cjs/slot-1b1232a1.js.map +1 -0
- package/dist/cjs/{types-0a6d66f6.js → types-d3da200b.js} +3 -1
- package/dist/cjs/types-d3da200b.js.map +1 -0
- package/dist/cjs/ui-library.cjs.js +6 -4
- package/dist/cjs/ui-library.cjs.js.map +1 -1
- package/dist/collection/assets/TRADEMARKS.md +3 -3
- package/dist/collection/collection-manifest.json +5 -6
- package/dist/collection/components/six-alert/six-alert.css +5 -1
- package/dist/collection/components/six-alert/six-alert.js +57 -12
- package/dist/collection/components/six-alert/six-alert.js.map +1 -1
- package/dist/collection/components/six-avatar/six-avatar.css +2 -2
- package/dist/collection/components/six-avatar/six-avatar.js +1 -1
- package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
- package/dist/collection/components/six-badge/six-badge.css +1 -1
- package/dist/collection/components/six-badge/six-badge.js +2 -2
- package/dist/collection/components/six-badge/six-badge.js.map +1 -1
- package/dist/collection/components/six-button/six-button.css +19 -1
- package/dist/collection/components/six-button/six-button.js +8 -6
- package/dist/collection/components/six-button/six-button.js.map +1 -1
- package/dist/collection/components/six-button/test/six-button.spec.js.map +1 -1
- package/dist/collection/components/six-card/six-card.css +4 -5
- 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.css +8 -1
- package/dist/collection/components/six-checkbox/six-checkbox.js +5 -4
- package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
- package/dist/collection/components/six-datepicker/six-date-formats.js +1 -0
- package/dist/collection/components/six-datepicker/six-date-formats.js.map +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.css +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.js +20 -16
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
- package/dist/collection/components/six-details/six-details.css +1 -5
- package/dist/collection/components/six-details/six-details.js +3 -3
- package/dist/collection/components/six-details/six-details.js.map +1 -1
- package/dist/collection/components/six-dialog/six-dialog.css +2 -2
- package/dist/collection/components/six-dialog/six-dialog.js +10 -28
- package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
- package/dist/collection/components/six-drawer/six-drawer.css +2 -2
- package/dist/collection/components/six-drawer/six-drawer.js +9 -28
- package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
- package/dist/collection/components/six-dropdown/six-dropdown.css +22 -7
- package/dist/collection/components/six-dropdown/six-dropdown.js +216 -124
- package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
- package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js +54 -29
- package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js.map +1 -1
- package/dist/collection/components/six-error/six-error.js +1 -1
- package/dist/collection/components/six-error/six-error.js.map +1 -1
- package/dist/collection/components/six-error-page/six-error-page.js +1 -1
- package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
- package/dist/collection/components/six-file-list/six-file-list.js +1 -1
- package/dist/collection/components/six-file-list/six-file-list.js.map +1 -1
- package/dist/collection/components/six-file-list-item/six-file-list-item.css +1 -1
- package/dist/collection/components/six-file-list-item/six-file-list-item.js +2 -2
- 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.css +12 -4
- package/dist/collection/components/six-file-upload/six-file-upload.js +87 -7
- package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
- package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +187 -24
- package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -1
- package/dist/collection/components/six-footer/six-footer.css +2 -2
- package/dist/collection/components/six-footer/six-footer.js +1 -1
- package/dist/collection/components/six-footer/six-footer.js.map +1 -1
- package/dist/collection/components/six-group-label/six-group-label.css +1 -1
- package/dist/collection/components/six-group-label/six-group-label.js +1 -1
- package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
- package/dist/collection/components/six-header/six-header.css +15 -2
- package/dist/collection/components/six-header/six-header.js +77 -18
- package/dist/collection/components/six-header/six-header.js.map +1 -1
- package/dist/collection/components/six-icon/six-icon.css +5 -2
- package/dist/collection/components/six-icon/six-icon.js +2 -2
- package/dist/collection/components/six-icon/six-icon.js.map +1 -1
- package/dist/collection/components/six-icon-button/six-icon-button.css +1 -1
- package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
- package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
- package/dist/collection/components/six-input/six-input.css +10 -1
- package/dist/collection/components/six-input/six-input.js +47 -19
- package/dist/collection/components/six-input/six-input.js.map +1 -1
- package/dist/collection/components/six-item-picker/six-item-picker.css +8 -0
- package/dist/collection/components/six-item-picker/six-item-picker.js +101 -5
- package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
- package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js +57 -57
- package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js.map +1 -1
- package/dist/collection/components/six-item-picker/types.js +2 -0
- package/dist/collection/components/six-item-picker/types.js.map +1 -1
- package/dist/collection/components/six-language-switcher/six-language-switcher.css +7 -2
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +7 -3
- package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
- package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +20 -20
- package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -1
- package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
- 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.css +8 -7
- package/dist/collection/components/six-menu/six-menu.js +30 -8
- package/dist/collection/components/six-menu/six-menu.js.map +1 -1
- package/dist/collection/components/six-menu/test/six-menu.spec.js +6 -6
- package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
- package/dist/collection/components/six-menu-divider/six-menu-divider.css +3 -2
- package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
- package/dist/collection/components/six-menu-divider/six-menu-divider.js.map +1 -1
- package/dist/collection/components/six-menu-item/six-menu-item.css +13 -2
- package/dist/collection/components/six-menu-item/six-menu-item.js +37 -8
- package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
- package/dist/collection/components/six-menu-label/six-menu-label.css +1 -1
- package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
- package/dist/collection/components/six-menu-label/six-menu-label.js.map +1 -1
- package/dist/collection/components/six-picto/six-picto.js +1 -1
- package/dist/collection/components/six-picto/six-picto.js.map +1 -1
- package/dist/collection/components/six-progress-bar/six-progress-bar.css +1 -1
- package/dist/collection/components/six-progress-bar/six-progress-bar.js +2 -2
- package/dist/collection/components/six-progress-bar/six-progress-bar.js.map +1 -1
- package/dist/collection/components/six-progress-ring/six-progress-ring.css +1 -1
- package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
- package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
- package/dist/collection/components/six-radio/six-radio.css +1 -1
- package/dist/collection/components/six-radio/six-radio.js +5 -4
- package/dist/collection/components/six-radio/six-radio.js.map +1 -1
- package/dist/collection/components/six-range/six-range.css +2 -2
- package/dist/collection/components/six-range/six-range.js +15 -4
- package/dist/collection/components/six-range/six-range.js.map +1 -1
- package/dist/collection/components/six-root/six-root.js +1 -69
- package/dist/collection/components/six-root/six-root.js.map +1 -1
- package/dist/collection/components/six-root/test/six-root.spec.js +0 -7
- package/dist/collection/components/six-root/test/six-root.spec.js.map +1 -1
- package/dist/collection/components/six-search-field/six-search-field.css +1 -1
- package/dist/collection/components/six-search-field/six-search-field.js +1 -1
- package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
- package/dist/collection/components/six-select/six-select.css +54 -66
- package/dist/collection/components/six-select/six-select.js +351 -183
- package/dist/collection/components/six-select/six-select.js.map +1 -1
- package/dist/collection/components/six-select/test/six-select.spec.js +31 -15
- package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -1
- package/dist/collection/components/six-select/test/util.spec.js +23 -1
- package/dist/collection/components/six-select/test/util.spec.js.map +1 -1
- package/dist/collection/components/six-select/util.js +24 -0
- package/dist/collection/components/six-select/util.js.map +1 -1
- package/dist/collection/components/six-sidebar/six-sidebar.css +2 -2
- package/dist/collection/components/six-sidebar/six-sidebar.js +8 -6
- package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +2 -1
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
- package/dist/collection/components/six-spinner/six-spinner.css +1 -1
- package/dist/collection/components/six-spinner/six-spinner.js +2 -1
- package/dist/collection/components/six-spinner/six-spinner.js.map +1 -1
- package/dist/collection/components/six-spinner/test/six-spinner.spec.js +1 -1
- package/dist/collection/components/six-spinner/test/six-spinner.spec.js.map +1 -1
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.css +1 -1
- package/dist/collection/components/six-switch/six-switch.css +1 -1
- package/dist/collection/components/six-switch/six-switch.js +5 -4
- package/dist/collection/components/six-switch/six-switch.js.map +1 -1
- package/dist/collection/components/six-tab/six-tab.css +1 -1
- package/dist/collection/components/six-tab/six-tab.js +5 -4
- package/dist/collection/components/six-tab/six-tab.js.map +1 -1
- package/dist/collection/components/six-tab-group/six-tab-group.css +1 -1
- package/dist/collection/components/six-tab-group/six-tab-group.js +36 -9
- package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
- package/dist/collection/components/six-tab-panel/six-tab-panel.css +1 -1
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
- package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
- package/dist/collection/components/six-tag/six-tag.css +1 -1
- package/dist/collection/components/six-tag/six-tag.js +2 -2
- package/dist/collection/components/six-tag/six-tag.js.map +1 -1
- package/dist/collection/components/six-textarea/six-textarea.css +1 -1
- package/dist/collection/components/six-textarea/six-textarea.js +26 -18
- package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
- package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -1
- package/dist/collection/components/six-tile/six-tile.css +2 -2
- package/dist/collection/components/six-tile/six-tile.js +3 -3
- package/dist/collection/components/six-tile/six-tile.js.map +1 -1
- package/dist/collection/components/six-timepicker/six-timepicker.css +1 -1
- package/dist/collection/components/six-timepicker/six-timepicker.js +4 -3
- package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
- package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -1
- package/dist/collection/components/six-tooltip/six-tooltip.css +1 -1
- package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
- package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/alert.js +54 -0
- package/dist/collection/utils/alert.js.map +1 -0
- package/dist/collection/utils/date-util.js +25 -0
- package/dist/collection/utils/date-util.js.map +1 -1
- package/dist/collection/utils/date-util.spec.js.map +1 -1
- package/dist/collection/utils/error-messages.js +7 -0
- package/dist/collection/utils/error-messages.js.map +1 -1
- package/dist/collection/utils/event-listeners.js.map +1 -1
- package/dist/collection/utils/focus-visible.js.map +1 -1
- package/dist/collection/utils/form.js.map +1 -1
- package/dist/collection/utils/modal.js.map +1 -1
- package/dist/collection/utils/popover.js.map +1 -1
- package/dist/collection/utils/popup.js +1 -1
- package/dist/collection/utils/popup.js.map +1 -1
- package/dist/collection/utils/scroll.js.map +1 -1
- package/dist/collection/utils/slot.js +0 -1
- package/dist/collection/utils/slot.js.map +1 -1
- package/dist/collection/utils/tabbable.js.map +1 -1
- package/dist/collection/utils/time.util.js.map +1 -1
- package/dist/collection/utils/time.util.spec.js.map +1 -1
- package/dist/components/index.js +50 -102
- package/dist/components/index.js.map +1 -1
- package/dist/components/modal.js +1 -17
- package/dist/components/modal.js.map +1 -1
- package/dist/components/six-alert.js +41 -8
- package/dist/components/six-alert.js.map +1 -1
- package/dist/components/six-avatar.js +4 -3
- package/dist/components/six-avatar.js.map +1 -1
- package/dist/components/six-badge.js +5 -4
- package/dist/components/six-badge.js.map +1 -1
- package/dist/components/six-button.js +1 -142
- package/dist/components/six-button.js.map +1 -1
- package/dist/components/six-button2.js +148 -0
- package/dist/components/six-button2.js.map +1 -0
- package/dist/components/six-card.js +4 -3
- package/dist/components/six-card.js.map +1 -1
- package/dist/components/six-checkbox.js +1 -161
- package/dist/components/six-checkbox.js.map +1 -1
- package/dist/components/six-checkbox2.js +166 -0
- package/dist/components/six-checkbox2.js.map +1 -0
- package/dist/components/six-datepicker.js +41 -12
- package/dist/components/six-datepicker.js.map +1 -1
- package/dist/components/six-details2.js +6 -5
- package/dist/components/six-details2.js.map +1 -1
- package/dist/components/six-dialog.js +14 -30
- package/dist/components/six-dialog.js.map +1 -1
- package/dist/components/six-drawer.js +13 -30
- package/dist/components/six-drawer.js.map +1 -1
- package/dist/components/six-dropdown2.js +204 -127
- package/dist/components/six-dropdown2.js.map +1 -1
- package/dist/components/six-error-page.js +3 -2
- package/dist/components/six-error-page.js.map +1 -1
- package/dist/components/six-error2.js +3 -2
- package/dist/components/six-error2.js.map +1 -1
- package/dist/components/six-file-list-item.js +5 -4
- package/dist/components/six-file-list-item.js.map +1 -1
- package/dist/components/six-file-list.js +3 -2
- package/dist/components/six-file-list.js.map +1 -1
- package/dist/components/six-file-upload.js +53 -12
- package/dist/components/six-file-upload.js.map +1 -1
- package/dist/components/six-footer.js +4 -3
- package/dist/components/six-footer.js.map +1 -1
- package/dist/components/six-group-label.js +4 -3
- package/dist/components/six-group-label.js.map +1 -1
- package/dist/components/six-header.js +50 -19
- package/dist/components/six-header.js.map +1 -1
- package/dist/components/six-icon-button2.js +6 -5
- package/dist/components/six-icon-button2.js.map +1 -1
- package/dist/components/six-icon2.js +5 -4
- package/dist/components/six-icon2.js.map +1 -1
- package/dist/components/six-input2.js +9 -5
- package/dist/components/six-input2.js.map +1 -1
- package/dist/components/six-item-picker2.js +106 -7
- package/dist/components/six-item-picker2.js.map +1 -1
- package/dist/components/six-language-switcher.js +10 -5
- package/dist/components/six-language-switcher.js.map +1 -1
- package/dist/components/six-layout-grid.js +3 -2
- package/dist/components/six-layout-grid.js.map +1 -1
- package/dist/components/six-main-container.js +3 -2
- package/dist/components/six-main-container.js.map +1 -1
- package/dist/components/six-menu-divider.js +4 -3
- package/dist/components/six-menu-divider.js.map +1 -1
- package/dist/components/six-menu-item2.js +31 -7
- package/dist/components/six-menu-item2.js.map +1 -1
- package/dist/components/six-menu-label.js +4 -3
- package/dist/components/six-menu-label.js.map +1 -1
- package/dist/components/six-menu2.js +26 -9
- package/dist/components/six-menu2.js.map +1 -1
- package/dist/components/six-picto2.js +3 -2
- package/dist/components/six-picto2.js.map +1 -1
- package/dist/components/six-progress-bar.js +5 -4
- package/dist/components/six-progress-bar.js.map +1 -1
- package/dist/components/six-progress-ring.js +4 -3
- package/dist/components/six-progress-ring.js.map +1 -1
- package/dist/components/six-radio.js +5 -4
- package/dist/components/six-radio.js.map +1 -1
- package/dist/components/six-range.js +15 -4
- package/dist/components/six-range.js.map +1 -1
- package/dist/components/six-root.js +6 -34
- package/dist/components/six-root.js.map +1 -1
- package/dist/components/six-search-field.js +4 -3
- package/dist/components/six-search-field.js.map +1 -1
- package/dist/components/six-select.js +478 -201
- package/dist/components/six-select.js.map +1 -1
- package/dist/components/six-sidebar-item-group.js +3 -2
- package/dist/components/six-sidebar-item-group.js.map +1 -1
- package/dist/components/six-sidebar-item.js +4 -3
- package/dist/components/six-sidebar-item.js.map +1 -1
- package/dist/components/six-sidebar.js +5 -4
- package/dist/components/six-sidebar.js.map +1 -1
- package/dist/components/six-spinner2.js +4 -3
- package/dist/components/six-spinner2.js.map +1 -1
- package/dist/components/six-stage-indicator2.js +3 -2
- package/dist/components/six-stage-indicator2.js.map +1 -1
- package/dist/components/six-switch.js +5 -4
- package/dist/components/six-switch.js.map +1 -1
- package/dist/components/six-tab-group.js +36 -9
- package/dist/components/six-tab-group.js.map +1 -1
- package/dist/components/six-tab-panel.js +4 -3
- package/dist/components/six-tab-panel.js.map +1 -1
- package/dist/components/six-tab.js +5 -4
- package/dist/components/six-tab.js.map +1 -1
- package/dist/components/six-tag.js +99 -1
- package/dist/components/six-tag.js.map +1 -1
- package/dist/components/six-textarea.js +5 -4
- package/dist/components/six-textarea.js.map +1 -1
- package/dist/components/six-tile.js +6 -5
- package/dist/components/six-tile.js.map +1 -1
- package/dist/components/six-timepicker2.js +5 -4
- package/dist/components/six-timepicker2.js.map +1 -1
- package/dist/components/six-tooltip2.js +5 -4
- package/dist/components/six-tooltip2.js.map +1 -1
- package/dist/components/slot.js +1 -2
- package/dist/components/slot.js.map +1 -1
- package/dist/components.d.ts +1 -21
- package/dist/components.json +741 -242
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/error-messages-1eaaad23.js +115 -0
- package/dist/esm/error-messages-1eaaad23.js.map +1 -0
- package/dist/esm/{form-control-6b30894f.js → form-control-30c5bd8b.js} +2 -2
- package/dist/esm/{form-control-6b30894f.js.map → form-control-30c5bd8b.js.map} +1 -1
- package/dist/esm/{index-17d8173e.js → index-5390c1d6.js} +127 -76
- package/dist/esm/index-5390c1d6.js.map +1 -0
- package/dist/esm/index.js +51 -100
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +6 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/{modal-96526245.js → modal-6c1288e3.js} +2 -18
- package/dist/esm/modal-6c1288e3.js.map +1 -0
- package/dist/esm/{popup-e8049817.js → popup-7209e9d5.js} +2 -2
- package/dist/esm/popup-7209e9d5.js.map +1 -0
- package/dist/esm/six-alert.entry.js +42 -9
- package/dist/esm/six-alert.entry.js.map +1 -1
- package/dist/esm/six-avatar.entry.js +5 -4
- package/dist/esm/six-avatar.entry.js.map +1 -1
- package/dist/esm/six-badge.entry.js +6 -5
- package/dist/esm/six-badge.entry.js.map +1 -1
- package/dist/esm/six-button.entry.js +8 -6
- package/dist/esm/six-button.entry.js.map +1 -1
- package/dist/esm/six-card.entry.js +5 -4
- package/dist/esm/six-card.entry.js.map +1 -1
- package/dist/esm/six-checkbox_2.entry.js +187 -0
- package/dist/esm/six-checkbox_2.entry.js.map +1 -0
- package/dist/esm/six-datepicker.entry.js +44 -15
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +7 -6
- package/dist/esm/six-details.entry.js.map +1 -1
- package/dist/esm/six-dialog.entry.js +16 -32
- package/dist/esm/six-dialog.entry.js.map +1 -1
- package/dist/esm/six-drawer.entry.js +15 -32
- package/dist/esm/six-drawer.entry.js.map +1 -1
- package/dist/esm/six-dropdown_2.entry.js +205 -131
- package/dist/esm/six-dropdown_2.entry.js.map +1 -1
- package/dist/esm/six-error-page.entry.js +4 -3
- package/dist/esm/six-error-page.entry.js.map +1 -1
- package/dist/esm/six-error.entry.js +4 -3
- package/dist/esm/six-error.entry.js.map +1 -1
- package/dist/esm/six-file-list-item.entry.js +6 -5
- package/dist/esm/six-file-list-item.entry.js.map +1 -1
- package/dist/esm/six-file-list.entry.js +4 -3
- package/dist/esm/six-file-list.entry.js.map +1 -1
- package/dist/esm/six-file-upload.entry.js +34 -9
- package/dist/esm/six-file-upload.entry.js.map +1 -1
- package/dist/esm/six-footer.entry.js +5 -4
- package/dist/esm/six-footer.entry.js.map +1 -1
- package/dist/esm/six-group-label.entry.js +7 -6
- package/dist/esm/six-group-label.entry.js.map +1 -1
- package/dist/esm/six-header.entry.js +43 -20
- package/dist/esm/six-header.entry.js.map +1 -1
- package/dist/esm/six-icon-button.entry.js +7 -6
- package/dist/esm/six-icon-button.entry.js.map +1 -1
- package/dist/esm/six-icon.entry.js +6 -5
- package/dist/esm/six-icon.entry.js.map +1 -1
- package/dist/esm/six-input.entry.js +11 -8
- package/dist/esm/six-input.entry.js.map +1 -1
- package/dist/esm/six-item-picker.entry.js +106 -9
- package/dist/esm/six-item-picker.entry.js.map +1 -1
- package/dist/esm/six-language-switcher.entry.js +11 -6
- package/dist/esm/six-language-switcher.entry.js.map +1 -1
- package/dist/esm/six-layout-grid.entry.js +4 -3
- package/dist/esm/six-layout-grid.entry.js.map +1 -1
- package/dist/esm/six-main-container.entry.js +4 -3
- package/dist/esm/six-main-container.entry.js.map +1 -1
- package/dist/esm/six-menu-divider.entry.js +5 -4
- package/dist/esm/six-menu-divider.entry.js.map +1 -1
- package/dist/esm/six-menu-label.entry.js +5 -4
- package/dist/esm/six-menu-label.entry.js.map +1 -1
- package/dist/esm/six-picto.entry.js +4 -3
- package/dist/esm/six-picto.entry.js.map +1 -1
- package/dist/esm/six-progress-bar.entry.js +6 -5
- package/dist/esm/six-progress-bar.entry.js.map +1 -1
- package/dist/esm/six-progress-ring.entry.js +5 -4
- package/dist/esm/six-progress-ring.entry.js.map +1 -1
- package/dist/esm/six-radio.entry.js +6 -5
- package/dist/esm/six-radio.entry.js.map +1 -1
- package/dist/esm/six-range.entry.js +18 -7
- package/dist/esm/six-range.entry.js.map +1 -1
- package/dist/esm/six-root.entry.js +4 -22
- package/dist/esm/six-root.entry.js.map +1 -1
- package/dist/esm/six-search-field.entry.js +5 -4
- package/dist/esm/six-search-field.entry.js.map +1 -1
- package/dist/esm/six-select.entry.js +340 -182
- package/dist/esm/six-select.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item-group.entry.js +5 -4
- package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item.entry.js +5 -4
- package/dist/esm/six-sidebar-item.entry.js.map +1 -1
- package/dist/esm/six-sidebar.entry.js +6 -5
- package/dist/esm/six-sidebar.entry.js.map +1 -1
- package/dist/esm/six-spinner.entry.js +5 -4
- package/dist/esm/six-spinner.entry.js.map +1 -1
- package/dist/esm/six-stage-indicator.entry.js +19 -0
- package/dist/esm/six-stage-indicator.entry.js.map +1 -0
- package/dist/esm/six-switch.entry.js +8 -7
- package/dist/esm/six-switch.entry.js.map +1 -1
- package/dist/esm/six-tab-group.entry.js +35 -9
- package/dist/esm/six-tab-group.entry.js.map +1 -1
- package/dist/esm/six-tab-panel.entry.js +5 -4
- package/dist/esm/six-tab-panel.entry.js.map +1 -1
- package/dist/esm/six-tab.entry.js +6 -5
- package/dist/esm/six-tab.entry.js.map +1 -1
- package/dist/esm/six-tag.entry.js +7 -6
- package/dist/esm/six-tag.entry.js.map +1 -1
- package/dist/esm/six-textarea.entry.js +8 -7
- package/dist/esm/six-textarea.entry.js.map +1 -1
- package/dist/esm/six-tile.entry.js +8 -7
- package/dist/esm/six-tile.entry.js.map +1 -1
- package/dist/esm/six-timepicker.entry.js +8 -7
- package/dist/esm/six-timepicker.entry.js.map +1 -1
- package/dist/esm/six-tooltip.entry.js +6 -5
- package/dist/esm/six-tooltip.entry.js.map +1 -1
- package/dist/esm/{slot-41bc439a.js → slot-56531341.js} +2 -3
- package/dist/esm/slot-56531341.js.map +1 -0
- package/dist/esm/{types-07748c42.js → types-a07bb999.js} +3 -1
- package/dist/esm/types-a07bb999.js.map +1 -0
- package/dist/esm/ui-library.js +7 -5
- package/dist/esm/ui-library.js.map +1 -1
- package/dist/types/components/six-alert/six-alert.d.ts +13 -6
- package/dist/types/components/six-button/six-button.d.ts +1 -1
- package/dist/types/components/six-datepicker/six-datepicker.d.ts +1 -1
- package/dist/types/components/six-dialog/six-dialog.d.ts +1 -0
- package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -9
- package/dist/types/components/six-file-upload/six-file-upload.d.ts +10 -0
- package/dist/types/components/six-header/six-header.d.ts +8 -2
- package/dist/types/components/six-input/six-input.d.ts +4 -0
- package/dist/types/components/six-item-picker/six-item-picker.d.ts +7 -0
- package/dist/types/components/six-menu/six-menu.d.ts +4 -0
- package/dist/types/components/six-menu-item/six-menu-item.d.ts +7 -1
- package/dist/types/components/six-range/six-range.d.ts +2 -0
- package/dist/types/components/six-root/six-root.d.ts +0 -13
- package/dist/types/components/six-select/six-select.d.ts +27 -13
- package/dist/types/components/six-select/util.d.ts +2 -0
- package/dist/types/components/six-spinner/six-spinner.d.ts +1 -0
- package/dist/types/components/six-tab-group/six-tab-group.d.ts +4 -1
- package/dist/types/components.d.ts +120 -62
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/utils/alert.d.ts +10 -0
- package/dist/types/utils/date-util.d.ts +9 -1
- package/dist/types/utils/error-messages.d.ts +1 -0
- package/dist/types/utils/slot.d.ts +0 -1
- package/dist/ui-library/assets/TRADEMARKS.md +3 -3
- package/dist/ui-library/index.esm.js +1 -1
- package/dist/ui-library/index.esm.js.map +1 -1
- package/dist/ui-library/p-030fa1fa.entry.js +2 -0
- package/dist/ui-library/p-030fa1fa.entry.js.map +1 -0
- package/dist/ui-library/p-03d1b956.entry.js +2 -0
- package/dist/ui-library/p-03d1b956.entry.js.map +1 -0
- package/dist/ui-library/p-047d02ad.entry.js +2 -0
- package/dist/ui-library/p-047d02ad.entry.js.map +1 -0
- package/dist/ui-library/p-05eb1bab.js +3 -0
- package/dist/ui-library/p-05eb1bab.js.map +1 -0
- package/dist/ui-library/p-060069d4.entry.js +2 -0
- package/dist/ui-library/p-060069d4.entry.js.map +1 -0
- package/dist/ui-library/p-06ba653e.entry.js +2 -0
- package/dist/ui-library/p-06ba653e.entry.js.map +1 -0
- package/dist/ui-library/p-07c8de65.entry.js +2 -0
- package/dist/ui-library/p-07c8de65.entry.js.map +1 -0
- package/dist/ui-library/p-0cebf1d2.js +2 -0
- package/dist/ui-library/p-0cebf1d2.js.map +1 -0
- package/dist/ui-library/p-0fb3fb30.entry.js +2 -0
- package/dist/ui-library/p-0fb3fb30.entry.js.map +1 -0
- package/dist/ui-library/p-14e5fccc.entry.js +2 -0
- package/dist/ui-library/p-14e5fccc.entry.js.map +1 -0
- package/dist/ui-library/p-189602e4.entry.js +2 -0
- package/dist/ui-library/p-189602e4.entry.js.map +1 -0
- package/dist/ui-library/p-19560508.entry.js +2 -0
- package/dist/ui-library/p-19560508.entry.js.map +1 -0
- package/dist/ui-library/p-21074819.entry.js +2 -0
- package/dist/ui-library/p-21074819.entry.js.map +1 -0
- package/dist/ui-library/p-2386627e.entry.js +2 -0
- package/dist/ui-library/p-2386627e.entry.js.map +1 -0
- package/dist/ui-library/p-2c25cb61.entry.js +2 -0
- package/dist/ui-library/p-2c25cb61.entry.js.map +1 -0
- package/dist/ui-library/p-32e421a3.entry.js +2 -0
- package/dist/ui-library/p-32e421a3.entry.js.map +1 -0
- package/dist/ui-library/p-3603dd96.entry.js +2 -0
- package/dist/ui-library/p-3603dd96.entry.js.map +1 -0
- package/dist/ui-library/p-39ff5f61.entry.js +2 -0
- package/dist/ui-library/p-39ff5f61.entry.js.map +1 -0
- package/dist/ui-library/p-3b5a76ea.entry.js +2 -0
- package/dist/ui-library/p-3b5a76ea.entry.js.map +1 -0
- package/dist/ui-library/p-419ed003.entry.js +2 -0
- package/dist/ui-library/p-419ed003.entry.js.map +1 -0
- package/dist/ui-library/p-45003bae.entry.js +2 -0
- package/dist/ui-library/p-45003bae.entry.js.map +1 -0
- package/dist/ui-library/p-4963f03c.entry.js +2 -0
- package/dist/ui-library/p-4963f03c.entry.js.map +1 -0
- package/dist/ui-library/p-4d89932f.entry.js +2 -0
- package/dist/ui-library/p-4d89932f.entry.js.map +1 -0
- package/dist/ui-library/{p-6907a7dc.js → p-605bdd81.js} +2 -2
- package/dist/ui-library/p-63acceb6.entry.js +2 -0
- package/dist/ui-library/p-63acceb6.entry.js.map +1 -0
- package/dist/ui-library/p-651293e7.js +2 -0
- package/dist/ui-library/p-651293e7.js.map +1 -0
- package/dist/ui-library/p-6888b9ee.entry.js +2 -0
- package/dist/ui-library/p-6888b9ee.entry.js.map +1 -0
- package/dist/ui-library/p-6f9153be.entry.js +2 -0
- package/dist/ui-library/p-6f9153be.entry.js.map +1 -0
- package/dist/ui-library/p-7561b336.entry.js +2 -0
- package/dist/ui-library/p-7561b336.entry.js.map +1 -0
- package/dist/ui-library/p-7c18b8ca.entry.js +2 -0
- package/dist/ui-library/p-7c18b8ca.entry.js.map +1 -0
- package/dist/ui-library/p-82bd8781.entry.js +2 -0
- package/dist/ui-library/p-82bd8781.entry.js.map +1 -0
- package/dist/ui-library/{p-0861899a.js → p-862d474e.js} +1 -1
- package/dist/ui-library/p-862d474e.js.map +1 -0
- package/dist/ui-library/p-89db9a8b.entry.js +2 -0
- package/dist/ui-library/p-89db9a8b.entry.js.map +1 -0
- package/dist/ui-library/{p-d310a6dd.entry.js → p-8f1d3461.entry.js} +2 -2
- package/dist/ui-library/p-8f1d3461.entry.js.map +1 -0
- package/dist/ui-library/p-8fb96142.entry.js +2 -0
- package/dist/ui-library/p-8fb96142.entry.js.map +1 -0
- package/dist/ui-library/p-96d441e9.entry.js +2 -0
- package/dist/ui-library/p-96d441e9.entry.js.map +1 -0
- package/dist/ui-library/p-9bc1639b.entry.js +2 -0
- package/dist/ui-library/p-9bc1639b.entry.js.map +1 -0
- package/dist/ui-library/p-9cb83369.entry.js +2 -0
- package/dist/ui-library/p-9cb83369.entry.js.map +1 -0
- package/dist/ui-library/p-a398e3eb.entry.js +2 -0
- package/dist/ui-library/p-a398e3eb.entry.js.map +1 -0
- package/dist/ui-library/p-a7e2f511.entry.js +2 -0
- package/dist/ui-library/p-a7e2f511.entry.js.map +1 -0
- package/dist/ui-library/p-a8863197.entry.js +2 -0
- package/dist/ui-library/p-a8863197.entry.js.map +1 -0
- package/dist/ui-library/p-a9e009af.entry.js +2 -0
- package/dist/ui-library/p-a9e009af.entry.js.map +1 -0
- package/dist/ui-library/p-ac00076d.entry.js +2 -0
- package/dist/ui-library/p-ac00076d.entry.js.map +1 -0
- package/dist/ui-library/p-b4bc4915.entry.js +2 -0
- package/dist/ui-library/p-b4bc4915.entry.js.map +1 -0
- package/dist/ui-library/p-b5acf54d.entry.js +2 -0
- package/dist/ui-library/p-b5acf54d.entry.js.map +1 -0
- package/dist/ui-library/p-b60c20aa.entry.js +2 -0
- package/dist/ui-library/p-b60c20aa.entry.js.map +1 -0
- package/dist/ui-library/p-c1d68730.entry.js +2 -0
- package/dist/ui-library/p-c1d68730.entry.js.map +1 -0
- package/dist/ui-library/p-c35a7cef.entry.js +2 -0
- package/dist/ui-library/p-c35a7cef.entry.js.map +1 -0
- package/dist/ui-library/p-c62893e5.entry.js +2 -0
- package/dist/ui-library/p-c62893e5.entry.js.map +1 -0
- package/dist/ui-library/p-c6464bfe.entry.js +2 -0
- package/dist/ui-library/p-c6464bfe.entry.js.map +1 -0
- package/dist/ui-library/p-cf109cbf.entry.js +2 -0
- package/dist/ui-library/p-cf109cbf.entry.js.map +1 -0
- package/dist/ui-library/p-d07b549f.entry.js +2 -0
- package/dist/ui-library/p-d07b549f.entry.js.map +1 -0
- package/dist/ui-library/p-d42f1ea9.entry.js +2 -0
- package/dist/ui-library/p-d42f1ea9.entry.js.map +1 -0
- package/dist/ui-library/p-e080d5b6.js +2 -0
- package/dist/ui-library/p-e080d5b6.js.map +1 -0
- package/dist/ui-library/p-e1255160.js +2 -0
- package/dist/ui-library/p-e1255160.js.map +1 -0
- package/dist/ui-library/p-f136a6b2.js +2 -0
- package/dist/ui-library/p-f136a6b2.js.map +1 -0
- package/dist/ui-library/p-fe37dadf.entry.js +2 -0
- package/dist/ui-library/p-fe37dadf.entry.js.map +1 -0
- package/dist/ui-library/p-fe89a7c4.entry.js +2 -0
- package/dist/ui-library/p-fe89a7c4.entry.js.map +1 -0
- package/dist/ui-library/ui-library.css +1 -10
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -1
- package/package.json +10 -13
- package/dist/cjs/index-3baddcdc.js.map +0 -1
- package/dist/cjs/modal-3ce015be.js.map +0 -1
- package/dist/cjs/popup-40a9adbb.js.map +0 -1
- package/dist/cjs/set-attributes_2.cjs.entry.js +0 -73
- package/dist/cjs/set-attributes_2.cjs.entry.js.map +0 -1
- package/dist/cjs/six-checkbox.cjs.entry.js +0 -127
- package/dist/cjs/six-checkbox.cjs.entry.js.map +0 -1
- package/dist/cjs/six-menu-item.cjs.entry.js +0 -63
- package/dist/cjs/six-menu-item.cjs.entry.js.map +0 -1
- package/dist/cjs/slot-9821749e.js.map +0 -1
- package/dist/cjs/types-0a6d66f6.js.map +0 -1
- package/dist/collection/components/six-header/assets/six-logo.svg +0 -1
- package/dist/collection/components/six-header/test/six-header.spec.js +0 -133
- package/dist/collection/components/six-header/test/six-header.spec.js.map +0 -1
- package/dist/collection/utils/support.js +0 -16
- package/dist/collection/utils/support.js.map +0 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js +0 -74
- package/dist/collection/wrappers/set-attributes/set-attributes.js.map +0 -1
- package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js +0 -16
- package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js.map +0 -1
- package/dist/components/set-attributes.d.ts +0 -11
- package/dist/components/set-attributes.js +0 -8
- package/dist/components/set-attributes.js.map +0 -1
- package/dist/components/set-attributes2.js +0 -73
- package/dist/components/set-attributes2.js.map +0 -1
- package/dist/components/six-tag2.js +0 -102
- package/dist/components/six-tag2.js.map +0 -1
- package/dist/esm/index-17d8173e.js.map +0 -1
- package/dist/esm/modal-96526245.js.map +0 -1
- package/dist/esm/popup-e8049817.js.map +0 -1
- package/dist/esm/set-attributes_2.entry.js +0 -68
- package/dist/esm/set-attributes_2.entry.js.map +0 -1
- package/dist/esm/six-checkbox.entry.js +0 -123
- package/dist/esm/six-checkbox.entry.js.map +0 -1
- package/dist/esm/six-menu-item.entry.js +0 -59
- package/dist/esm/six-menu-item.entry.js.map +0 -1
- package/dist/esm/slot-41bc439a.js.map +0 -1
- package/dist/esm/types-07748c42.js.map +0 -1
- package/dist/types/utils/support.d.ts +0 -1
- package/dist/types/wrappers/set-attributes/set-attributes.d.ts +0 -9
- package/dist/ui-library/assets/six-logo.svg +0 -1
- package/dist/ui-library/p-0861899a.js.map +0 -1
- package/dist/ui-library/p-0a81b42c.entry.js +0 -2
- package/dist/ui-library/p-0a81b42c.entry.js.map +0 -1
- package/dist/ui-library/p-0beec94f.js +0 -3
- package/dist/ui-library/p-0beec94f.js.map +0 -1
- package/dist/ui-library/p-100d5a25.entry.js +0 -2
- package/dist/ui-library/p-100d5a25.entry.js.map +0 -1
- package/dist/ui-library/p-178f5782.entry.js +0 -2
- package/dist/ui-library/p-178f5782.entry.js.map +0 -1
- package/dist/ui-library/p-19a61686.entry.js +0 -2
- package/dist/ui-library/p-19a61686.entry.js.map +0 -1
- package/dist/ui-library/p-1d0c5929.entry.js +0 -2
- package/dist/ui-library/p-1d0c5929.entry.js.map +0 -1
- package/dist/ui-library/p-23c02c98.entry.js +0 -2
- package/dist/ui-library/p-23c02c98.entry.js.map +0 -1
- package/dist/ui-library/p-2f9f2532.entry.js +0 -2
- package/dist/ui-library/p-2f9f2532.entry.js.map +0 -1
- package/dist/ui-library/p-3187bc23.entry.js +0 -2
- package/dist/ui-library/p-3187bc23.entry.js.map +0 -1
- package/dist/ui-library/p-32e1a5ab.entry.js +0 -2
- package/dist/ui-library/p-32e1a5ab.entry.js.map +0 -1
- package/dist/ui-library/p-3d54ecf2.entry.js +0 -2
- package/dist/ui-library/p-3d54ecf2.entry.js.map +0 -1
- package/dist/ui-library/p-4229f7e8.entry.js +0 -2
- package/dist/ui-library/p-4229f7e8.entry.js.map +0 -1
- package/dist/ui-library/p-479d8087.entry.js +0 -2
- package/dist/ui-library/p-479d8087.entry.js.map +0 -1
- package/dist/ui-library/p-49aa8d1e.entry.js +0 -2
- package/dist/ui-library/p-49aa8d1e.entry.js.map +0 -1
- package/dist/ui-library/p-58661675.entry.js +0 -2
- package/dist/ui-library/p-58661675.entry.js.map +0 -1
- package/dist/ui-library/p-5d43ea07.entry.js +0 -2
- package/dist/ui-library/p-5d43ea07.entry.js.map +0 -1
- package/dist/ui-library/p-6aa2929a.entry.js +0 -2
- package/dist/ui-library/p-6aa2929a.entry.js.map +0 -1
- package/dist/ui-library/p-7432d409.entry.js +0 -2
- package/dist/ui-library/p-7432d409.entry.js.map +0 -1
- package/dist/ui-library/p-74a714c0.entry.js +0 -2
- package/dist/ui-library/p-74a714c0.entry.js.map +0 -1
- package/dist/ui-library/p-76825395.entry.js +0 -2
- package/dist/ui-library/p-76825395.entry.js.map +0 -1
- package/dist/ui-library/p-816f857d.entry.js +0 -2
- package/dist/ui-library/p-816f857d.entry.js.map +0 -1
- package/dist/ui-library/p-882fbf6f.entry.js +0 -2
- package/dist/ui-library/p-882fbf6f.entry.js.map +0 -1
- package/dist/ui-library/p-88fd4973.entry.js +0 -2
- package/dist/ui-library/p-88fd4973.entry.js.map +0 -1
- package/dist/ui-library/p-8b750c9e.entry.js +0 -2
- package/dist/ui-library/p-8b750c9e.entry.js.map +0 -1
- package/dist/ui-library/p-911eb578.entry.js +0 -2
- package/dist/ui-library/p-911eb578.entry.js.map +0 -1
- package/dist/ui-library/p-93fcda4a.entry.js +0 -2
- package/dist/ui-library/p-93fcda4a.entry.js.map +0 -1
- package/dist/ui-library/p-981b3228.entry.js +0 -2
- package/dist/ui-library/p-981b3228.entry.js.map +0 -1
- package/dist/ui-library/p-998de05d.js +0 -2
- package/dist/ui-library/p-998de05d.js.map +0 -1
- package/dist/ui-library/p-9b1ff147.entry.js +0 -2
- package/dist/ui-library/p-9b1ff147.entry.js.map +0 -1
- package/dist/ui-library/p-a21f8d06.entry.js +0 -2
- package/dist/ui-library/p-a21f8d06.entry.js.map +0 -1
- package/dist/ui-library/p-a2461274.entry.js +0 -2
- package/dist/ui-library/p-a2461274.entry.js.map +0 -1
- package/dist/ui-library/p-a4e4620c.entry.js +0 -2
- package/dist/ui-library/p-a4e4620c.entry.js.map +0 -1
- package/dist/ui-library/p-ada23fe3.entry.js +0 -2
- package/dist/ui-library/p-ada23fe3.entry.js.map +0 -1
- package/dist/ui-library/p-b5ac1219.entry.js +0 -2
- package/dist/ui-library/p-b5ac1219.entry.js.map +0 -1
- package/dist/ui-library/p-ba247565.entry.js +0 -2
- package/dist/ui-library/p-ba247565.entry.js.map +0 -1
- package/dist/ui-library/p-bdb79948.entry.js +0 -2
- package/dist/ui-library/p-bdb79948.entry.js.map +0 -1
- package/dist/ui-library/p-c021a9c9.entry.js +0 -2
- package/dist/ui-library/p-c021a9c9.entry.js.map +0 -1
- package/dist/ui-library/p-c07b1240.entry.js +0 -2
- package/dist/ui-library/p-c07b1240.entry.js.map +0 -1
- package/dist/ui-library/p-c12a94ce.entry.js +0 -2
- package/dist/ui-library/p-c12a94ce.entry.js.map +0 -1
- package/dist/ui-library/p-c1675a45.entry.js +0 -2
- package/dist/ui-library/p-c1675a45.entry.js.map +0 -1
- package/dist/ui-library/p-c2df8c27.entry.js +0 -2
- package/dist/ui-library/p-c2df8c27.entry.js.map +0 -1
- package/dist/ui-library/p-c86aa5b3.entry.js +0 -2
- package/dist/ui-library/p-c86aa5b3.entry.js.map +0 -1
- package/dist/ui-library/p-cd35b3c6.entry.js +0 -2
- package/dist/ui-library/p-cd35b3c6.entry.js.map +0 -1
- package/dist/ui-library/p-d2cf4280.entry.js +0 -2
- package/dist/ui-library/p-d2cf4280.entry.js.map +0 -1
- package/dist/ui-library/p-d310a6dd.entry.js.map +0 -1
- package/dist/ui-library/p-d6838141.entry.js +0 -2
- package/dist/ui-library/p-d6838141.entry.js.map +0 -1
- package/dist/ui-library/p-dc908cbb.entry.js +0 -2
- package/dist/ui-library/p-dc908cbb.entry.js.map +0 -1
- package/dist/ui-library/p-dfb6bff6.entry.js +0 -2
- package/dist/ui-library/p-dfb6bff6.entry.js.map +0 -1
- package/dist/ui-library/p-ee71e3a3.entry.js +0 -2
- package/dist/ui-library/p-ee71e3a3.entry.js.map +0 -1
- package/dist/ui-library/p-ef317d69.entry.js +0 -2
- package/dist/ui-library/p-ef317d69.entry.js.map +0 -1
- package/dist/ui-library/p-f2ef23c4.js +0 -2
- package/dist/ui-library/p-f2ef23c4.js.map +0 -1
- package/dist/ui-library/p-f385f1c2.entry.js +0 -2
- package/dist/ui-library/p-f385f1c2.entry.js.map +0 -1
- package/dist/ui-library/p-f73a6bdc.entry.js +0 -2
- package/dist/ui-library/p-f73a6bdc.entry.js.map +0 -1
- package/dist/ui-library/p-faa04bb5.js +0 -2
- package/dist/ui-library/p-faa04bb5.js.map +0 -1
- package/dist/ui-library/p-fcd57e0a.entry.js +0 -2
- package/dist/ui-library/p-fcd57e0a.entry.js.map +0 -1
- /package/dist/ui-library/{p-6907a7dc.js.map → p-605bdd81.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-stage-indicator2.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG
|
|
1
|
+
{"file":"six-stage-indicator2.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,k2BAAk2B,CAAC;AACh4B,gCAAe,oBAAoB;;MCQtB,iBAAiB;;;;;qBAED,IAAI;;IAE/B,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,MAAM,GAAG,IAAI,IACtD,WAAK,KAAK,EAAE,cAAc,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,IAClD,WAAK,KAAK,EAAC,gBAAgB,IACzB,gBAAU,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,oBAE9B,EACX,YAAM,KAAK,EAAE,YAAY,IACvB,eAAQ,CACH,CACH,CACF,CACP,CAAC;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/six-stage-indicator/six-stage-indicator.scss?tag=six-stage-indicator&encapsulation=shadow","src/components/six-stage-indicator/six-stage-indicator.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: grid;\n}\n\n.center-content {\n display: grid;\n align-self: center;\n justify-self: center;\n grid-gap: 5px;\n grid-auto-flow: column;\n}\n\n.align-item {\n margin: auto;\n}\n\n.indicator {\n font-family: var(--six-font-family);\n font-size: 14px;\n font-weight: var(--six-font-weight-bold);\n display: grid;\n align-content: center;\n width: 100%;\n height: 24px;\n\n &--itu {\n @extend .indicator;\n background-color: var(--six-color-success-600);\n color: var(--six-color-web-rock-900);\n }\n\n &--dev {\n @extend .indicator;\n background-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n }\n\n &--etu {\n @extend .indicator;\n background-color: var(--six-color-action-600);\n color: var(--six-color-white);\n }\n\n &--acceptance {\n @extend .indicator;\n background-color: var(--six-color-warning-800);\n color: var(--six-color-web-rock-900);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\nexport type StageType = 'DEV' | 'ITU' | 'ETU' | 'ACCEPTANCE' | 'PROD' | null;\n\n@Component({\n tag: 'six-stage-indicator',\n styleUrl: 'six-stage-indicator.scss',\n shadow: true,\n})\nexport class SixStageIndicator {\n /** The indicators value attribute */\n @Prop() stage: StageType = null;\n\n render() {\n return this.stage == null || this.stage == 'PROD' ? null : (\n <div class={`indicator--${this.stage.toLowerCase()}`}>\n <div class=\"center-content\">\n <six-icon class=\"align-item\" size=\"small\">\n error_outline\n </six-icon>\n <span class={'align-item'}>\n <slot />\n </span>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,8 @@ import { F as FormControl } from './form-control.js';
|
|
|
4
4
|
import { h as hasSlot } from './slot.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './six-error2.js';
|
|
6
6
|
|
|
7
|
-
const sixSwitchCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:
|
|
7
|
+
const sixSwitchCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none;text-align:left}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:\"*\";transform:scale(1.1);margin-left:var(--six-spacing-xxx-small);position:absolute}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{--height:var(--six-selection-control-toggle-size);--thumb-size:calc(var(--six-selection-control-toggle-size) - 4px);--width:calc(var(--height) * 2);display:inline-block}.switch{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-input-font-size-medium);font-weight:var(--six-input-font-weight);color:var(--six-input-color);vertical-align:middle;cursor:pointer}.switch__control{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--width);height:var(--height);background-color:var(--six-selection-control-color-disabled);border-radius:var(--height);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color}.switch__control .switch__thumb{width:var(--thumb-size);height:var(--thumb-size);background-color:var(--six-input-background-color);border-radius:50%;transform:translateX(calc(var(--width) / -2 + var(--thumb-size) / 2 - (var(--thumb-size) - var(--height)) / 2));transition:var(--six-transition-fast) transform ease, var(--six-transition-fast) background-color, var(--six-transition-fast) border-color, var(--six-transition-fast) box-shadow}.switch__control input[type=checkbox]{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover{background-color:var(--six-input-border-color-hover)}.switch--checked .switch__control{background-color:var(--six-selection-control-color)}.switch--checked .switch__control .switch__thumb{background-color:var(--six-color-white);transform:translateX(calc(var(--width) / 2 - var(--thumb-size) / 2 + (var(--thumb-size) - var(--height)) / 2))}.switch.switch--checked:not(.switch--disabled) .switch__control:hover{background-color:var(--six-input-border-color-focus)}.switch--disabled{cursor:not-allowed;color:var(--six-selection-control-color-disabled)}.switch--disabled .switch__control{background-color:var(--six-selection-control-color-disabled)}.switch--disabled.switch--checked .switch__control{background-color:var(--six-selection-control-color-disabled)}.switch__label{line-height:var(--height);margin-left:0.5em;user-select:none}";
|
|
8
|
+
const SixSwitchStyle0 = sixSwitchCss;
|
|
8
9
|
|
|
9
10
|
let id = 0;
|
|
10
11
|
const SixSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SixSwitch extends HTMLElement {
|
|
@@ -101,12 +102,12 @@ const SixSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SixSwitch extends HTM
|
|
|
101
102
|
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
102
103
|
}
|
|
103
104
|
render() {
|
|
104
|
-
return (h(FormControl, { inputId: this.switchId, label: this.label, labelId: this.labelId, hasLabelSlot: false, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorTextSlot, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { part: "base", htmlFor: this.switchId, class: {
|
|
105
|
+
return (h(FormControl, { key: '9d6b19d30b6fbe9edaca09765fb987496085af3d', inputId: this.switchId, label: this.label, labelId: this.labelId, hasLabelSlot: false, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorTextSlot, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { key: '3e17b60e405ebdbb9a2329677b7ba58bf5b39506', part: "base", htmlFor: this.switchId, class: {
|
|
105
106
|
switch: true,
|
|
106
107
|
'switch--checked': this.checked,
|
|
107
108
|
'switch--disabled': this.disabled,
|
|
108
109
|
'switch--focused': this.hasFocus,
|
|
109
|
-
}, onMouseDown: this.handleMouseDown }, h("span", { part: "control", class: "switch__control" }, h("span", { part: "thumb", class: "switch__thumb" }), h("input", { ref: (el) => (this.inputElement = el), id: this.switchId, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown })), h("span", { part: "label", id: this.labelId, class: "switch__label" }, h("slot",
|
|
110
|
+
}, onMouseDown: this.handleMouseDown }, h("span", { key: 'a8f0a78413ef612287e59d371ecc4a4de3f95d86', part: "control", class: "switch__control" }, h("span", { key: '02e2e4f0ebea74189adaae5c5820e72c317fb3c8', part: "thumb", class: "switch__thumb" }), h("input", { key: '50f37e2801b211be3a3f378f3f59c736f10900ea', ref: (el) => (this.inputElement = el), id: this.switchId, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown })), h("span", { key: '9a4e42a33a099be2301b47553f1238f2e4acf027', part: "label", id: this.labelId, class: "switch__label" }, h("slot", { key: 'f393ef7b2eb5621a4a203d0502017a428412080d' })))));
|
|
110
111
|
}
|
|
111
112
|
get host() { return this; }
|
|
112
113
|
static get watchers() { return {
|
|
@@ -114,7 +115,7 @@ const SixSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SixSwitch extends HTM
|
|
|
114
115
|
"errorText": ["handleLabelChange"],
|
|
115
116
|
"label": ["handleLabelChange"]
|
|
116
117
|
}; }
|
|
117
|
-
static get style() { return
|
|
118
|
+
static get style() { return SixSwitchStyle0; }
|
|
118
119
|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AO,EAAC,KAAK,EAAC,eAAe,GAAG,EAE3C,aACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,EACrC,EAAE,EAAE,IAAI,CAAC,QAAQ,EACjB,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,QAAQ,kBACC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,qBAC5B,IAAI,CAAC,OAAO,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,SAAS,EAAE,IAAI,CAAC,aAAa,GAC7B,CACG,EAEP,YAAM,IAAI,EAAC,OAAO,EAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAC,eAAe,IACxD,eAAQ,CACH,CACD,CACI,EACd;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixSwitch"],"sources":["src/components/six-switch/six-switch.scss?tag=six-switch&encapsulation=shadow","src/components/six-switch/six-switch.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n/**\n * @prop --width: The width of the switch.\n * @prop --height: The height of the switch.\n * @prop --thumb-size: The size of the thumb.\n */\n:host {\n --height: var(--six-selection-control-toggle-size);\n --thumb-size: calc(var(--six-selection-control-toggle-size) - 4px);\n --width: calc(var(--height) * 2);\n\n display: inline-block;\n}\n\n.switch {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-input-font-size-medium);\n font-weight: var(--six-input-font-weight);\n color: var(--six-input-color);\n vertical-align: middle;\n cursor: pointer;\n}\n\n.switch__control {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--height);\n background-color: var(--six-selection-control-color-disabled);\n border-radius: var(--height);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color;\n\n .switch__thumb {\n width: var(--thumb-size);\n height: var(--thumb-size);\n background-color: var(--six-input-background-color);\n border-radius: 50%;\n transform: translateX(calc(var(--width) / -2 + var(--thumb-size) / 2 - (var(--thumb-size) - var(--height)) / 2));\n transition: var(--six-transition-fast) transform ease, var(--six-transition-fast) background-color,\n var(--six-transition-fast) border-color, var(--six-transition-fast) box-shadow;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n}\n\n// Hover\n.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-hover);\n}\n\n// Checked\n.switch--checked .switch__control {\n background-color: var(--six-selection-control-color);\n\n .switch__thumb {\n background-color: var(--six-color-white);\n transform: translateX(calc(var(--width) / 2 - var(--thumb-size) / 2 + (var(--thumb-size) - var(--height)) / 2));\n }\n}\n\n// Checked + hover\n.switch.switch--checked:not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-focus);\n}\n\n// Disabled\n.switch--disabled {\n cursor: not-allowed;\n color: var(--six-selection-control-color-disabled);\n\n .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n\n &.switch--checked .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n}\n\n.switch__label {\n line-height: var(--height);\n margin-left: 0.5em;\n user-select: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\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 switch's label.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part control - The switch control.\n * @part thumb - The switch position indicator.\n * @part label - The switch label.\n */\n\n@Component({\n tag: 'six-switch',\n styleUrl: 'six-switch.scss',\n shadow: true,\n})\nexport class SixSwitch {\n private switchId = `switch-${++id}`;\n private labelId = `switch-label-${id}`;\n private errorTextId = `input-error-text-${id}`;\n\n private inputElement?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixSwitchElement;\n\n @State() hasFocus = false;\n @State() hasErrorTextSlot = false;\n\n /** The switch's name attribute. */\n @Prop() name = '';\n\n /** The switch's value attribute. */\n @Prop() value = 'on';\n\n /** Set to true to disable the switch. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** Set to true to draw the switch in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n @Watch('checked')\n handleCheckedChange() {\n if (this.inputElement != null) {\n this.inputElement.checked = this.checked;\n this.checked = this.inputElement.checked;\n }\n }\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-switch-blur' }) sixBlur!: EventEmitter<boolean>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-switch-change' }) sixChange!: EventEmitter<boolean>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-switch-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-switch-change', 'change', this.host);\n this.eventListeners.forward('six-switch-blur', 'blur', this.host);\n this.eventListeners.forward('six-switch-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n private handleSlotChange = () => {\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n /** Sets focus on the switch. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.focus(options);\n }\n\n /** Removes focus from the switch. */\n @Method()\n async removeFocus() {\n this.inputElement?.blur();\n }\n\n private handleClick = () => {\n if (this.inputElement != null) {\n this.checked = this.inputElement.checked;\n this.sixChange.emit(this.checked);\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit(this.checked);\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.checked = false;\n this.sixChange.emit(this.checked);\n }\n\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.checked = true;\n this.sixChange.emit(this.checked);\n }\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.inputElement?.focus();\n };\n\n render() {\n return (\n <FormControl\n inputId={this.switchId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={false}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <label\n part=\"base\"\n htmlFor={this.switchId}\n class={{\n switch: true,\n 'switch--checked': this.checked,\n 'switch--disabled': this.disabled,\n 'switch--focused': this.hasFocus,\n }}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"switch__control\">\n <span part=\"thumb\" class=\"switch__thumb\" />\n\n <input\n ref={(el) => (this.inputElement = el)}\n id={this.switchId}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n role=\"switch\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleKeyDown}\n />\n </span>\n\n <span part=\"label\" id={this.labelId} class=\"switch__label\">\n <slot />\n </span>\n </label>\n </FormControl>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"six-switch.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,6mJAA6mJ,CAAC;AACnoJ,wBAAe,YAAY;;ACK3B,IAAI,EAAE,GAAG,CAAC,CAAC;MAsBEA,WAAS;;;;;;;;QACZ,aAAQ,GAAG,UAAU,EAAE,EAAE,EAAE,CAAC;QAC5B,YAAO,GAAG,gBAAgB,EAAE,EAAE,CAAC;QAC/B,gBAAW,GAAG,oBAAoB,EAAE,EAAE,CAAC;QAGvC,mBAAc,GAAG,IAAI,cAAc,EAAE,CAAC;QAyEtC,qBAAgB,GAAG;YACzB,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;SAC1D,CAAC;QAcM,gBAAW,GAAG;YACpB,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,EAAE;gBAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;gBACzC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACnC;SACF,CAAC;QAEM,eAAU,GAAG;YACnB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,OAAO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switch/six-switch.scss?tag=six-switch&encapsulation=shadow","src/components/six-switch/six-switch.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n/**\n * @prop --width: The width of the switch.\n * @prop --height: The height of the switch.\n * @prop --thumb-size: The size of the thumb.\n */\n:host {\n --height: var(--six-selection-control-toggle-size);\n --thumb-size: calc(var(--six-selection-control-toggle-size) - 4px);\n --width: calc(var(--height) * 2);\n\n display: inline-block;\n}\n\n.switch {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-input-font-size-medium);\n font-weight: var(--six-input-font-weight);\n color: var(--six-input-color);\n vertical-align: middle;\n cursor: pointer;\n}\n\n.switch__control {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--height);\n background-color: var(--six-selection-control-color-disabled);\n border-radius: var(--height);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color;\n\n .switch__thumb {\n width: var(--thumb-size);\n height: var(--thumb-size);\n background-color: var(--six-input-background-color);\n border-radius: 50%;\n transform: translateX(calc(var(--width) / -2 + var(--thumb-size) / 2 - (var(--thumb-size) - var(--height)) / 2));\n transition: var(--six-transition-fast) transform ease, var(--six-transition-fast) background-color,\n var(--six-transition-fast) border-color, var(--six-transition-fast) box-shadow;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n}\n\n// Hover\n.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-hover);\n}\n\n// Checked\n.switch--checked .switch__control {\n background-color: var(--six-selection-control-color);\n\n .switch__thumb {\n background-color: var(--six-color-white);\n transform: translateX(calc(var(--width) / 2 - var(--thumb-size) / 2 + (var(--thumb-size) - var(--height)) / 2));\n }\n}\n\n// Checked + hover\n.switch.switch--checked:not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-focus);\n}\n\n// Disabled\n.switch--disabled {\n cursor: not-allowed;\n color: var(--six-selection-control-color-disabled);\n\n .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n\n &.switch--checked .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n}\n\n.switch__label {\n line-height: var(--height);\n margin-left: 0.5em;\n user-select: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\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 switch's label.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part control - The switch control.\n * @part thumb - The switch position indicator.\n * @part label - The switch label.\n */\n\n@Component({\n tag: 'six-switch',\n styleUrl: 'six-switch.scss',\n shadow: true,\n})\nexport class SixSwitch {\n private switchId = `switch-${++id}`;\n private labelId = `switch-label-${id}`;\n private errorTextId = `input-error-text-${id}`;\n\n private inputElement?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixSwitchElement;\n\n @State() hasFocus = false;\n @State() hasErrorTextSlot = false;\n\n /** The switch's name attribute. */\n @Prop() name = '';\n\n /** The switch's value attribute. */\n @Prop() value = 'on';\n\n /** Set to true to disable the switch. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** Set to true to draw the switch in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n @Watch('checked')\n handleCheckedChange() {\n if (this.inputElement != null) {\n this.inputElement.checked = this.checked;\n this.checked = this.inputElement.checked;\n }\n }\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-switch-blur' }) sixBlur!: EventEmitter<boolean>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-switch-change' }) sixChange!: EventEmitter<boolean>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-switch-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-switch-change', 'change', this.host);\n this.eventListeners.forward('six-switch-blur', 'blur', this.host);\n this.eventListeners.forward('six-switch-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n private handleSlotChange = () => {\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n /** Sets focus on the switch. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.focus(options);\n }\n\n /** Removes focus from the switch. */\n @Method()\n async removeFocus() {\n this.inputElement?.blur();\n }\n\n private handleClick = () => {\n if (this.inputElement != null) {\n this.checked = this.inputElement.checked;\n this.sixChange.emit(this.checked);\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit(this.checked);\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.checked = false;\n this.sixChange.emit(this.checked);\n }\n\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.checked = true;\n this.sixChange.emit(this.checked);\n }\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.inputElement?.focus();\n };\n\n render() {\n return (\n <FormControl\n inputId={this.switchId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={false}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <label\n part=\"base\"\n htmlFor={this.switchId}\n class={{\n switch: true,\n 'switch--checked': this.checked,\n 'switch--disabled': this.disabled,\n 'switch--focused': this.hasFocus,\n }}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"switch__control\">\n <span part=\"thumb\" class=\"switch__thumb\" />\n\n <input\n ref={(el) => (this.inputElement = el)}\n id={this.switchId}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n role=\"switch\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleKeyDown}\n />\n </span>\n\n <span part=\"label\" id={this.labelId} class=\"switch__label\">\n <slot />\n </span>\n </label>\n </FormControl>\n );\n }\n}\n"],"version":3}
|
|
@@ -37,7 +37,8 @@ function flipAnimate(element, fromElement, options = {
|
|
|
37
37
|
], options);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const sixTabGroupCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:
|
|
40
|
+
const sixTabGroupCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.tab-group{display:flex;border:solid 1px transparent;border-radius:0}.tab-group .tab-group__tabs{display:flex;position:relative}.tab-group--has-scroll-controls .tab-group__nav-container{position:relative;padding:0 var(--six-spacing-x-large)}.tab-group__scroll-button{display:flex;align-items:center;justify-content:center;position:absolute;top:0;bottom:0;width:var(--six-spacing-x-large)}.tab-group__scroll-button--left{left:0}.tab-group__scroll-button--right{right:0}.tab-group--top{flex-direction:column}.tab-group--top .tab-group__nav-container{order:1}.tab-group--top .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--top .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--top .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--top .tab-group__body{order:2}.tab-group--bottom{flex-direction:column}.tab-group--bottom .tab-group__nav-container{order:2}.tab-group--bottom .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--bottom .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--bottom .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--bottom .tab-group__body{order:1}.tab-group--left{flex-direction:row}.tab-group--left .tab-group__nav-container{order:1}.tab-group--left .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--left .tab-group__body{flex:1 1 auto;order:2}.tab-group--right{flex-direction:row}.tab-group--right .tab-group__nav-container{order:2}.tab-group--right .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--right .tab-group__body{flex:1 1 auto;order:1}";
|
|
41
|
+
const SixTabGroupStyle0 = sixTabGroupCss;
|
|
41
42
|
|
|
42
43
|
const SixTabGroup$1 = /*@__PURE__*/ proxyCustomElement(class SixTabGroup extends HTMLElement {
|
|
43
44
|
constructor() {
|
|
@@ -111,7 +112,8 @@ const SixTabGroup$1 = /*@__PURE__*/ proxyCustomElement(class SixTabGroup extends
|
|
|
111
112
|
behavior: 'smooth',
|
|
112
113
|
});
|
|
113
114
|
};
|
|
114
|
-
this.
|
|
115
|
+
this.hasLeftControl = false;
|
|
116
|
+
this.hasRightControl = false;
|
|
115
117
|
this.placement = 'top';
|
|
116
118
|
this.noScrollControls = false;
|
|
117
119
|
}
|
|
@@ -133,6 +135,13 @@ const SixTabGroup$1 = /*@__PURE__*/ proxyCustomElement(class SixTabGroup extends
|
|
|
133
135
|
this.resizeObserver = new ResizeObserver(() => this.updateScrollControls());
|
|
134
136
|
this.resizeObserver.observe(this.nav);
|
|
135
137
|
requestAnimationFrame(() => this.updateScrollControls());
|
|
138
|
+
this.nav.addEventListener('scroll', () => {
|
|
139
|
+
if (this.nav == null) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this.hasRightControl = this.calculateRightControlVisibility();
|
|
143
|
+
this.hasLeftControl = this.calculateLeftControlVisibility();
|
|
144
|
+
});
|
|
136
145
|
// Update aria labels if the DOM changes
|
|
137
146
|
this.mutationObserver = new MutationObserver((mutations) => {
|
|
138
147
|
if (mutations.some((mutation) => {
|
|
@@ -180,12 +189,29 @@ const SixTabGroup$1 = /*@__PURE__*/ proxyCustomElement(class SixTabGroup extends
|
|
|
180
189
|
getActiveTab() {
|
|
181
190
|
return this.getAllTabs().find((el) => el.active);
|
|
182
191
|
}
|
|
192
|
+
calculateRightControlVisibility() {
|
|
193
|
+
var _a, _b, _c;
|
|
194
|
+
if (this.nav == null) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
return Math.abs((_a = this.nav) === null || _a === void 0 ? void 0 : _a.scrollLeft) + ((_b = this.nav) === null || _b === void 0 ? void 0 : _b.clientWidth) < ((_c = this.nav) === null || _c === void 0 ? void 0 : _c.scrollWidth) - 1;
|
|
198
|
+
}
|
|
199
|
+
calculateLeftControlVisibility() {
|
|
200
|
+
var _a;
|
|
201
|
+
if (this.nav == null) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
return Math.abs((_a = this.nav) === null || _a === void 0 ? void 0 : _a.scrollLeft) > 0;
|
|
205
|
+
}
|
|
183
206
|
updateScrollControls() {
|
|
184
207
|
if (this.nav == null)
|
|
185
208
|
return;
|
|
186
|
-
this.
|
|
209
|
+
this.hasRightControl = this.noScrollControls
|
|
210
|
+
? false
|
|
211
|
+
: ['top', 'bottom'].includes(this.placement) && this.calculateRightControlVisibility();
|
|
212
|
+
this.hasLeftControl = this.noScrollControls
|
|
187
213
|
? false
|
|
188
|
-
: ['top', 'bottom'].includes(this.placement) && this.
|
|
214
|
+
: ['top', 'bottom'].includes(this.placement) && this.calculateLeftControlVisibility();
|
|
189
215
|
}
|
|
190
216
|
setActiveTab(tab, emitEvents = true) {
|
|
191
217
|
var _a, _b, _c;
|
|
@@ -228,25 +254,26 @@ const SixTabGroup$1 = /*@__PURE__*/ proxyCustomElement(class SixTabGroup extends
|
|
|
228
254
|
});
|
|
229
255
|
}
|
|
230
256
|
render() {
|
|
231
|
-
return (h("div", { part: "base", ref: (el) => (this.tabGroup = el), class: {
|
|
257
|
+
return (h("div", { key: '36be38a8a29e4c551a670e6ab4e3efed68dda0b8', part: "base", ref: (el) => (this.tabGroup = el), class: {
|
|
232
258
|
'tab-group': true,
|
|
233
259
|
// Placements
|
|
234
260
|
'tab-group--top': this.placement === 'top',
|
|
235
261
|
'tab-group--bottom': this.placement === 'bottom',
|
|
236
262
|
'tab-group--left': this.placement === 'left',
|
|
237
263
|
'tab-group--right': this.placement === 'right',
|
|
238
|
-
'tab-group--has-scroll-controls': this.
|
|
239
|
-
}, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { class: "tab-group__nav-container" }, this.
|
|
264
|
+
'tab-group--has-scroll-controls': this.hasRightControl || this.hasLeftControl,
|
|
265
|
+
}, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { key: '04b3f5dea207ac614d91bafa647bcef07bd89dfc', class: "tab-group__nav-container" }, this.hasLeftControl && (h("six-icon-button", { class: "tab-group__scroll-button tab-group__scroll-button--left", exportparts: "base:scroll-button", name: "chevron_left", onClick: this.handleScrollLeft })), h("div", { ref: (el) => (this.nav = el), key: "nav", part: "nav", class: "tab-group__nav" }, h("div", { key: '5f8fdd3dbb4589b9616e048fb5cc59ffe41fb534', ref: (el) => (this.tabs = el), part: "tabs", class: "tab-group__tabs", role: "tablist" }, h("slot", { key: 'a1d71effb433bdf3cca519eb2639af35ae481114', name: "nav" }))), this.hasRightControl && (h("six-icon-button", { class: "tab-group__scroll-button tab-group__scroll-button--right", exportparts: "base:scroll-button", name: "chevron_right", onClick: this.handleScrollRight }))), h("div", { key: 'e8a619a1263d91f502ae3301e96bd439979b1c70', ref: (el) => (this.body = el), part: "body", class: "tab-group__body" }, h("slot", { key: 'df7a1ab8629777eb970258b76633c2282ed1169b' }))));
|
|
240
266
|
}
|
|
241
267
|
get host() { return this; }
|
|
242
268
|
static get watchers() { return {
|
|
243
269
|
"noScrollControls": ["handleNoScrollControlsChange"]
|
|
244
270
|
}; }
|
|
245
|
-
static get style() { return
|
|
271
|
+
static get style() { return SixTabGroupStyle0; }
|
|
246
272
|
}, [1, "six-tab-group", {
|
|
247
273
|
"placement": [1],
|
|
248
274
|
"noScrollControls": [4, "no-scroll-controls"],
|
|
249
|
-
"
|
|
275
|
+
"hasLeftControl": [32],
|
|
276
|
+
"hasRightControl": [32],
|
|
250
277
|
"show": [64]
|
|
251
278
|
}, undefined, {
|
|
252
279
|
"noScrollControls": ["handleNoScrollControlsChange"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-tab-group.js","mappings":";;;;;AAAA;;;;;;;;;;;SAWgB,WAAW,CACzB,OAAgB,EAChB,WAAoB,EACpB,UAAoC;IAClC,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;CACb;IAED,MAAM,YAAY,GAAG,WAAW,CAAC,qBAAqB,EAAE,CAAC;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAEvD,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;IACvD,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC;IACrD,MAAM,MAAM,GA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BAAkB,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO;gBAE9C,gCAAgC,EAAE,IAAI,CAAC,iBAAiB;aACzD,EACD,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,SAAS,EAAE,IAAI,CAAC,aAAa,IAE7B,WAAK,KAAK,EAAC,0BAA0B,IAClC,IAAI,CAAC,iBAAiB,KACrB,uBACE,KAAK,EAAC,yDAAyD,EAC/D,WAAW,EAAC,oBAAoB,EAChC,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACH,EACD,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,gBAAgB,IAC5E,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,SAAS,IACpF,YAAM,IAAI,EAAC,KAAK,GAAG,CACf,CACF,EACL,IAAI,CAAC,iBAAiB,KACrB,uBACE,KAAK,EAAC,0DAA0D,EAChE,WAAW,EAAC,oBAAoB,EAChC,IAAI,EAAC,eAAe,EACpB,OAAO,EAAE,IAAI,CAAC,iBAAiB,GAC/B,CACH,CACG,EAEN,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,IACrE,eAAQ,CACJ,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixTabGroup"],"sources":["src/utils/animation.ts","src/components/six-tab-group/six-tab-group.scss?tag=six-tab-group&encapsulation=shadow","src/components/six-tab-group/six-tab-group.tsx"],"sourcesContent":["/**\n * Animates a given `element` from the position and dimension of `fromElement` to\n * its current position and dimension. Can be useful to implement the FLIP animation technique.\n *\n * @see {@link https://css-tricks.com/animating-layouts-with-the-flip-technique/} for details on the FLIP technique.\n *\n * @param {Element} element - The element to animate.\n * @param {Element} fromElement - The element representing the initial position and dimensions.\n * @param {KeyframeAnimationOptions} [options={ duration: 150, easing: 'ease', fill: 'both' }] - Optional animation parameters.\n *\n */\nexport function flipAnimate(\n element: Element,\n fromElement: Element,\n options: KeyframeAnimationOptions = {\n duration: 150,\n easing: 'ease',\n fill: 'both',\n }\n) {\n const dimensionsTo = fromElement.getBoundingClientRect();\n const dimensionsFrom = element.getBoundingClientRect();\n\n const deltaX = dimensionsTo.left - dimensionsFrom.left;\n const deltaY = dimensionsTo.top - dimensionsFrom.top;\n const deltaW = dimensionsTo.width / dimensionsFrom.width;\n const deltaH = dimensionsTo.height / dimensionsFrom.height;\n\n element.animate(\n [\n {\n transformOrigin: 'top left',\n transform: `translate(${deltaX}px, ${deltaY}px) scale(${deltaW}, ${deltaH})`,\n },\n {\n transformOrigin: 'top left',\n transform: 'none',\n },\n ],\n options\n );\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/hide-scrollbar';\n\n:host {\n display: block;\n}\n\n.tab-group {\n display: flex;\n border: solid 1px transparent;\n border-radius: 0;\n\n .tab-group__tabs {\n display: flex;\n position: relative;\n }\n}\n\n.tab-group--has-scroll-controls .tab-group__nav-container {\n position: relative;\n padding: 0 var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n bottom: 0;\n width: var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button--left {\n left: 0;\n}\n\n.tab-group__scroll-button--right {\n right: 0;\n}\n\n// TOP\n.tab-group--top {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 2;\n }\n}\n\n// Bottom\n.tab-group--bottom {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 1;\n }\n}\n\n// Left\n\n.tab-group--left {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 2;\n }\n}\n\n// Right\n.tab-group--right {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 1;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { scrollIntoView } from '../../utils/scroll';\nimport { flipAnimate } from '../../utils/animation';\n\nexport interface SixTabShowPayload {\n name: string;\n}\n\nexport interface SixTabHidePayload {\n name: string;\n}\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 nav - Used for grouping tabs in the tab group.\n * @slot - Used for grouping tab panels in the tab group.\n *\n * @part base - The component's base wrapper.\n * @part nav - The tab group navigation container.\n * @part tabs - The container that wraps the slotted tabs.\n * @part active-tab-indicator - An element that displays the currently selected tab. This is a child of the tab's container.\n * @part body - The tab group body where tab panels are slotted in.\n * @part scroll-button - The previous and next scroll buttons that appear when tabs are scrollable.\n */\n@Component({\n tag: 'six-tab-group',\n styleUrl: 'six-tab-group.scss',\n shadow: true,\n})\nexport class SixTabGroup {\n private activeTab?: HTMLSixTabElement;\n private body?: HTMLElement;\n private mutationObserver?: MutationObserver;\n private nav?: HTMLElement;\n private resizeObserver?: ResizeObserver;\n private tabGroup?: HTMLElement;\n private tabs?: HTMLElement;\n\n @Element() host!: HTMLSixTabGroupElement;\n\n @State() hasScrollControls = false;\n\n /** The placement of the tabs. */\n @Prop() placement: 'top' | 'bottom' | 'left' | 'right' = 'top';\n\n /** Disables the scroll arrows that appear when tabs overflow. */\n @Prop() noScrollControls = false;\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n /** Emitted when a tab is shown. */\n @Event({ eventName: 'six-tab-show' }) sixTabShow!: EventEmitter<SixTabShowPayload>;\n\n /** Emitted when a tab is hidden. */\n @Event({ eventName: 'six-tab-hide' }) sixTabHide!: EventEmitter<SixTabHidePayload>;\n\n componentDidLoad() {\n if (this.tabGroup == null || this.nav == null) return;\n\n // Set initial tab state when the tabs first become visible\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab() || this.getAllTabs()[0], false);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n this.resizeObserver = new ResizeObserver(() => this.updateScrollControls());\n this.resizeObserver.observe(this.nav);\n requestAnimationFrame(() => this.updateScrollControls());\n\n // Update aria labels if the DOM changes\n this.mutationObserver = new MutationObserver((mutations) => {\n if (\n mutations.some((mutation) => {\n return !['aria-labelledby', 'aria-controls'].includes(mutation.attributeName ?? '');\n })\n ) {\n setTimeout(() => this.setAriaLabels());\n }\n });\n this.mutationObserver.observe(this.host, { attributes: true, childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n if (this.mutationObserver == null || this.tabGroup == null || this.nav == null || this.resizeObserver == null) {\n return;\n }\n this.mutationObserver.disconnect();\n this.resizeObserver.unobserve(this.nav);\n }\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n const tabs = this.getAllTabs();\n const tab = tabs.find((el) => el.panel === panel);\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n }\n\n private getAllTabs(includeDisabled = false): HTMLSixTabElement[] {\n const slot = this.tabs?.querySelector('slot');\n if (slot == null) return [];\n\n return [...slot.assignedElements()].filter((el: Element) => {\n return includeDisabled\n ? el.tagName.toLowerCase() === 'six-tab'\n : el.tagName.toLowerCase() === 'six-tab' && !(el as HTMLSixTabElement).disabled;\n }) as [HTMLSixTabElement];\n }\n\n private getAllPanels(): HTMLSixTabPanelElement[] {\n const slot = this.body?.querySelector('slot');\n if (slot == null) return [];\n return [...slot.assignedElements()].filter((el: Element) => el.tagName.toLowerCase() === 'six-tab-panel') as [\n HTMLSixTabPanelElement\n ];\n }\n\n private getActiveTab() {\n return this.getAllTabs().find((el) => el.active);\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.nav == null) return;\n\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n // Move focus left or right\n if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n const activeEl = document.activeElement as HTMLSixTabElement;\n\n if (activeEl && activeEl.tagName.toLowerCase() === 'six-tab') {\n const tabs = this.getAllTabs();\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') {\n index = 0;\n } else if (event.key === 'End') {\n index = tabs.length - 1;\n } else if (event.key === 'ArrowLeft') {\n index = Math.max(0, index - 1);\n } else if (event.key === 'ArrowRight') {\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus({ preventScroll: true });\n this.setActiveTab(tabs[index]);\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(tabs[index], this.nav, 'horizontal');\n }\n\n event.preventDefault();\n }\n }\n };\n\n private handleScrollLeft = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft - this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private handleScrollRight = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft + this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private updateScrollControls() {\n if (this.nav == null) return;\n\n this.hasScrollControls = this.noScrollControls\n ? false\n : ['top', 'bottom'].includes(this.placement) && this.nav.scrollWidth > this.nav.clientWidth;\n }\n\n private setActiveTab(tab: HTMLSixTabElement, emitEvents = true) {\n if (this.nav == null) return;\n\n const newIndicator = tab?.shadowRoot?.querySelector('.tab__indicator');\n const oldIndicator = this.getActiveTab()?.shadowRoot?.querySelector('.tab__indicator');\n\n if (oldIndicator != null && newIndicator != null) {\n flipAnimate(newIndicator, oldIndicator);\n }\n\n if (tab !== this.activeTab && !tab.disabled) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n\n // Sync tabs and panels\n this.getAllTabs().map((el) => (el.active = el === this.activeTab));\n this.getAllPanels().map((el) => (el.active = el.name === this.activeTab?.panel));\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab != null) {\n this.sixTabHide.emit({ name: previousTab.panel });\n }\n\n this.sixTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllTabs();\n const panels = this.getAllPanels();\n\n // Link each tab with its corresponding panel\n tabs.map((tab) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel != null) {\n tab.setAttribute('aria-controls', panel.getAttribute('id') ?? '');\n panel.setAttribute('aria-labelledby', tab.getAttribute('id') ?? '');\n }\n });\n }\n\n render() {\n return (\n <div\n part=\"base\"\n ref={(el) => (this.tabGroup = el)}\n class={{\n 'tab-group': true,\n\n // Placements\n 'tab-group--top': this.placement === 'top',\n 'tab-group--bottom': this.placement === 'bottom',\n 'tab-group--left': this.placement === 'left',\n 'tab-group--right': this.placement === 'right',\n\n 'tab-group--has-scroll-controls': this.hasScrollControls,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"tab-group__nav-container\">\n {this.hasScrollControls && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--left\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_left\"\n onClick={this.handleScrollLeft}\n />\n )}\n <div ref={(el) => (this.nav = el)} key=\"nav\" part=\"nav\" class=\"tab-group__nav\">\n <div ref={(el) => (this.tabs = el)} part=\"tabs\" class=\"tab-group__tabs\" role=\"tablist\">\n <slot name=\"nav\" />\n </div>\n </div>\n {this.hasScrollControls && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--right\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_right\"\n onClick={this.handleScrollRight}\n />\n )}\n </div>\n\n <div ref={(el) => (this.body = el)} part=\"body\" class=\"tab-group__body\">\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"six-tab-group.js","mappings":";;;;;AAAA;;;;;;;;;;;SAWgB,WAAW,CACzB,OAAgB,EAChB,WAAoB,EACpB,UAAoC;IAClC,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;CACb;IAED,MAAM,YAAY,GAAG,WAAW,CAAC,qBAAqB,EAAE,CAAC;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAEvD,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;IACvD,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC;IACrD,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,GAAG,cAAc,CAAC,K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OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACH,EACD,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,gBAAgB,IAC5E,4DAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,SAAS,IACpF,6DAAM,IAAI,EAAC,KAAK,GAAG,CACf,CACF,EACL,IAAI,CAAC,eAAe,KACnB,uBACE,KAAK,EAAC,0DAA0D,EAChE,WAAW,EAAC,oBAAoB,EAChC,IAAI,EAAC,eAAe,EACpB,OAAO,EAAE,IAAI,CAAC,iBAAiB,GAC/B,CACH,CACG,EAEN,4DAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,IACrE,8DAAQ,CACJ,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixTabGroup"],"sources":["src/utils/animation.ts","src/components/six-tab-group/six-tab-group.scss?tag=six-tab-group&encapsulation=shadow","src/components/six-tab-group/six-tab-group.tsx"],"sourcesContent":["/**\n * Animates a given `element` from the position and dimension of `fromElement` to\n * its current position and dimension. Can be useful to implement the FLIP animation technique.\n *\n * @see {@link https://css-tricks.com/animating-layouts-with-the-flip-technique/} for details on the FLIP technique.\n *\n * @param {Element} element - The element to animate.\n * @param {Element} fromElement - The element representing the initial position and dimensions.\n * @param {KeyframeAnimationOptions} [options={ duration: 150, easing: 'ease', fill: 'both' }] - Optional animation parameters.\n *\n */\nexport function flipAnimate(\n element: Element,\n fromElement: Element,\n options: KeyframeAnimationOptions = {\n duration: 150,\n easing: 'ease',\n fill: 'both',\n }\n) {\n const dimensionsTo = fromElement.getBoundingClientRect();\n const dimensionsFrom = element.getBoundingClientRect();\n\n const deltaX = dimensionsTo.left - dimensionsFrom.left;\n const deltaY = dimensionsTo.top - dimensionsFrom.top;\n const deltaW = dimensionsTo.width / dimensionsFrom.width;\n const deltaH = dimensionsTo.height / dimensionsFrom.height;\n\n element.animate(\n [\n {\n transformOrigin: 'top left',\n transform: `translate(${deltaX}px, ${deltaY}px) scale(${deltaW}, ${deltaH})`,\n },\n {\n transformOrigin: 'top left',\n transform: 'none',\n },\n ],\n options\n );\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/hide-scrollbar';\n\n:host {\n display: block;\n}\n\n.tab-group {\n display: flex;\n border: solid 1px transparent;\n border-radius: 0;\n\n .tab-group__tabs {\n display: flex;\n position: relative;\n }\n}\n\n.tab-group--has-scroll-controls .tab-group__nav-container {\n position: relative;\n padding: 0 var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n bottom: 0;\n width: var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button--left {\n left: 0;\n}\n\n.tab-group__scroll-button--right {\n right: 0;\n}\n\n// TOP\n.tab-group--top {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 2;\n }\n}\n\n// Bottom\n.tab-group--bottom {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 1;\n }\n}\n\n// Left\n\n.tab-group--left {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 2;\n }\n}\n\n// Right\n.tab-group--right {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 1;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { scrollIntoView } from '../../utils/scroll';\nimport { flipAnimate } from '../../utils/animation';\n\nexport interface SixTabShowPayload {\n name: string;\n}\n\nexport interface SixTabHidePayload {\n name: string;\n}\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 nav - Used for grouping tabs in the tab group.\n * @slot - Used for grouping tab panels in the tab group.\n *\n * @part base - The component's base wrapper.\n * @part nav - The tab group navigation container.\n * @part tabs - The container that wraps the slotted tabs.\n * @part active-tab-indicator - An element that displays the currently selected tab. This is a child of the tab's container.\n * @part body - The tab group body where tab panels are slotted in.\n * @part scroll-button - The previous and next scroll buttons that appear when tabs are scrollable.\n */\n@Component({\n tag: 'six-tab-group',\n styleUrl: 'six-tab-group.scss',\n shadow: true,\n})\nexport class SixTabGroup {\n private activeTab?: HTMLSixTabElement;\n private body?: HTMLElement;\n private mutationObserver?: MutationObserver;\n private nav?: HTMLElement;\n private resizeObserver?: ResizeObserver;\n private tabGroup?: HTMLElement;\n private tabs?: HTMLElement;\n\n @Element() host!: HTMLSixTabGroupElement;\n\n @State() hasLeftControl = false;\n @State() hasRightControl = false;\n\n /** The placement of the tabs. */\n @Prop() placement: 'top' | 'bottom' | 'left' | 'right' = 'top';\n\n /** Disables the scroll arrows that appear when tabs overflow. */\n @Prop() noScrollControls = false;\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n /** Emitted when a tab is shown. */\n @Event({ eventName: 'six-tab-show' }) sixTabShow!: EventEmitter<SixTabShowPayload>;\n\n /** Emitted when a tab is hidden. */\n @Event({ eventName: 'six-tab-hide' }) sixTabHide!: EventEmitter<SixTabHidePayload>;\n\n componentDidLoad() {\n if (this.tabGroup == null || this.nav == null) return;\n\n // Set initial tab state when the tabs first become visible\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab() || this.getAllTabs()[0], false);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n this.resizeObserver = new ResizeObserver(() => this.updateScrollControls());\n this.resizeObserver.observe(this.nav);\n requestAnimationFrame(() => this.updateScrollControls());\n\n this.nav.addEventListener('scroll', () => {\n if (this.nav == null) {\n return;\n }\n this.hasRightControl = this.calculateRightControlVisibility();\n\n this.hasLeftControl = this.calculateLeftControlVisibility();\n });\n\n // Update aria labels if the DOM changes\n this.mutationObserver = new MutationObserver((mutations) => {\n if (\n mutations.some((mutation) => {\n return !['aria-labelledby', 'aria-controls'].includes(mutation.attributeName ?? '');\n })\n ) {\n setTimeout(() => this.setAriaLabels());\n }\n });\n this.mutationObserver.observe(this.host, { attributes: true, childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n if (this.mutationObserver == null || this.tabGroup == null || this.nav == null || this.resizeObserver == null) {\n return;\n }\n this.mutationObserver.disconnect();\n this.resizeObserver.unobserve(this.nav);\n }\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n const tabs = this.getAllTabs();\n const tab = tabs.find((el) => el.panel === panel);\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n }\n\n private getAllTabs(includeDisabled = false): HTMLSixTabElement[] {\n const slot = this.tabs?.querySelector('slot');\n if (slot == null) return [];\n\n return [...slot.assignedElements()].filter((el: Element) => {\n return includeDisabled\n ? el.tagName.toLowerCase() === 'six-tab'\n : el.tagName.toLowerCase() === 'six-tab' && !(el as HTMLSixTabElement).disabled;\n }) as [HTMLSixTabElement];\n }\n\n private getAllPanels(): HTMLSixTabPanelElement[] {\n const slot = this.body?.querySelector('slot');\n if (slot == null) return [];\n return [...slot.assignedElements()].filter((el: Element) => el.tagName.toLowerCase() === 'six-tab-panel') as [\n HTMLSixTabPanelElement\n ];\n }\n\n private getActiveTab() {\n return this.getAllTabs().find((el) => el.active);\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.nav == null) return;\n\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n // Move focus left or right\n if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n const activeEl = document.activeElement as HTMLSixTabElement;\n\n if (activeEl && activeEl.tagName.toLowerCase() === 'six-tab') {\n const tabs = this.getAllTabs();\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') {\n index = 0;\n } else if (event.key === 'End') {\n index = tabs.length - 1;\n } else if (event.key === 'ArrowLeft') {\n index = Math.max(0, index - 1);\n } else if (event.key === 'ArrowRight') {\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus({ preventScroll: true });\n this.setActiveTab(tabs[index]);\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(tabs[index], this.nav, 'horizontal');\n }\n\n event.preventDefault();\n }\n }\n };\n\n private handleScrollLeft = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft - this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private handleScrollRight = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft + this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private calculateRightControlVisibility() {\n if (this.nav == null) {\n return false;\n }\n return Math.abs(this.nav?.scrollLeft) + this.nav?.clientWidth < this.nav?.scrollWidth - 1;\n }\n\n private calculateLeftControlVisibility() {\n if (this.nav == null) {\n return false;\n }\n return Math.abs(this.nav?.scrollLeft) > 0;\n }\n\n private updateScrollControls() {\n if (this.nav == null) return;\n\n this.hasRightControl = this.noScrollControls\n ? false\n : ['top', 'bottom'].includes(this.placement) && this.calculateRightControlVisibility();\n\n this.hasLeftControl = this.noScrollControls\n ? false\n : ['top', 'bottom'].includes(this.placement) && this.calculateLeftControlVisibility();\n }\n\n private setActiveTab(tab: HTMLSixTabElement, emitEvents = true) {\n if (this.nav == null) return;\n\n const newIndicator = tab?.shadowRoot?.querySelector('.tab__indicator');\n const oldIndicator = this.getActiveTab()?.shadowRoot?.querySelector('.tab__indicator');\n\n if (oldIndicator != null && newIndicator != null) {\n flipAnimate(newIndicator, oldIndicator);\n }\n\n if (tab !== this.activeTab && !tab.disabled) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n\n // Sync tabs and panels\n this.getAllTabs().map((el) => (el.active = el === this.activeTab));\n this.getAllPanels().map((el) => (el.active = el.name === this.activeTab?.panel));\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab != null) {\n this.sixTabHide.emit({ name: previousTab.panel });\n }\n\n this.sixTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllTabs();\n const panels = this.getAllPanels();\n\n // Link each tab with its corresponding panel\n tabs.map((tab) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel != null) {\n tab.setAttribute('aria-controls', panel.getAttribute('id') ?? '');\n panel.setAttribute('aria-labelledby', tab.getAttribute('id') ?? '');\n }\n });\n }\n\n render() {\n return (\n <div\n part=\"base\"\n ref={(el) => (this.tabGroup = el)}\n class={{\n 'tab-group': true,\n\n // Placements\n 'tab-group--top': this.placement === 'top',\n 'tab-group--bottom': this.placement === 'bottom',\n 'tab-group--left': this.placement === 'left',\n 'tab-group--right': this.placement === 'right',\n\n 'tab-group--has-scroll-controls': this.hasRightControl || this.hasLeftControl,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"tab-group__nav-container\">\n {this.hasLeftControl && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--left\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_left\"\n onClick={this.handleScrollLeft}\n />\n )}\n <div ref={(el) => (this.nav = el)} key=\"nav\" part=\"nav\" class=\"tab-group__nav\">\n <div ref={(el) => (this.tabs = el)} part=\"tabs\" class=\"tab-group__tabs\" role=\"tablist\">\n <slot name=\"nav\" />\n </div>\n </div>\n {this.hasRightControl && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--right\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_right\"\n onClick={this.handleScrollRight}\n />\n )}\n </div>\n\n <div ref={(el) => (this.body = el)} part=\"body\" class=\"tab-group__body\">\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const sixTabPanelCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:
|
|
3
|
+
const sixTabPanelCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block;font-family:var(--six-font-family)}.tab-panel{border:solid 1px transparent;padding:20px 20px}";
|
|
4
|
+
const SixTabPanelStyle0 = sixTabPanelCss;
|
|
4
5
|
|
|
5
6
|
let id = 0;
|
|
6
7
|
const SixTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class SixTabPanel extends HTMLElement {
|
|
@@ -15,10 +16,10 @@ const SixTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class SixTabPanel extends
|
|
|
15
16
|
render() {
|
|
16
17
|
return (
|
|
17
18
|
// If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels
|
|
18
|
-
h(Host, { id: this.host.id || this.componentId, style: { display: this.active ? 'block' : 'none' } }, h("div", { part: "base", class: "tab-panel", role: "tabpanel", "aria-selected": this.active ? 'true' : 'false', "aria-hidden": this.active ? 'false' : 'true' }, h("slot",
|
|
19
|
+
h(Host, { key: '9c332526981d228cc31dc50a84ebcb530b80fafd', id: this.host.id || this.componentId, style: { display: this.active ? 'block' : 'none' } }, h("div", { key: 'f83c683193cd57ae41b8d0a5192b77ecfe4e1f20', part: "base", class: "tab-panel", role: "tabpanel", "aria-selected": this.active ? 'true' : 'false', "aria-hidden": this.active ? 'false' : 'true' }, h("slot", { key: '4f86b7b5bb9aa47f2ea11dc2b76ace19bc2f458a' }))));
|
|
19
20
|
}
|
|
20
21
|
get host() { return this; }
|
|
21
|
-
static get style() { return
|
|
22
|
+
static get style() { return SixTabPanelStyle0; }
|
|
22
23
|
}, [1, "six-tab-panel", {
|
|
23
24
|
"name": [1],
|
|
24
25
|
"active": [516]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-tab-panel.js","mappings":";;AAAA,MAAM,cAAc,GAAG,
|
|
1
|
+
{"file":"six-tab-panel.js","mappings":";;AAAA,MAAM,cAAc,GAAG,4NAA4N,CAAC;AACpP,0BAAe,cAAc;;ACC7B,IAAI,EAAE,GAAG,CAAC,CAAC;MAkBEA,aAAW;;;;;QACd,gBAAW,GAAG,aAAa,EAAE,EAAE,EAAE,CAAC;oBAK3B,EAAE;sBAGiB,KAAK;;IAEvC,MAAM;QACJ;;QAEE,EAAC,IAAI,qDAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,IAC5F,4DACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,UAAU,mBACA,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,iBAChC,IAAI,CAAC,MAAM,GAAG,OAAO,GAAG,MAAM,IAE3C,8DAAQ,CACJ,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixTabPanel"],"sources":["src/components/six-tab-panel/six-tab-panel.scss?tag=six-tab-panel&encapsulation=shadow","src/components/six-tab-panel/six-tab-panel.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n font-family: var(--six-font-family);\n}\n\n.tab-panel {\n border: solid 1px transparent;\n padding: 20px 20px;\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\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 tab panel's content.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-tab-panel',\n styleUrl: 'six-tab-panel.scss',\n shadow: true,\n})\nexport class SixTabPanel {\n private componentId = `tab-panel-${++id}`;\n\n @Element() host!: HTMLSixTabPanelElement;\n\n /** The tab panel's name. */\n @Prop() name = '';\n\n /** When true, the tab panel will be shown. */\n @Prop({ reflect: true }) active = false;\n\n render() {\n return (\n // If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels\n <Host id={this.host.id || this.componentId} style={{ display: this.active ? 'block' : 'none' }}>\n <div\n part=\"base\"\n class=\"tab-panel\"\n role=\"tabpanel\"\n aria-selected={this.active ? 'true' : 'false'}\n aria-hidden={this.active ? 'false' : 'true'}\n >\n <slot />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -2,7 +2,8 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { d as defineCustomElement$3 } from './six-icon2.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './six-icon-button2.js';
|
|
4
4
|
|
|
5
|
-
const sixTabCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:
|
|
5
|
+
const sixTabCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:flex}.tab{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-semibold);color:var(--six-tab-color);padding:var(--six-spacing-medium) var(--six-spacing-large);white-space:nowrap;user-select:none;cursor:pointer;width:100%}.tab:focus{outline:none}.tab:focus-visible{outline:var(--six-focus-ring);outline-offset:calc(-1 * var(--six-focus-ring-width) - var(--six-focus-ring-offset))}.tab.tab--active:not(.tab--disabled){color:var(--six-tab-color-active);font-weight:var(--six-font-weight-bold)}.tab.tab--closable{padding-right:var(--six-spacing-small)}.tab.tab--disabled{color:var(--six-tab-color-disabled);cursor:not-allowed}.tab:hover:not(.tab--disabled){color:var(--six-tab-color-hover)}.tab__close-button{font-size:var(--six-font-size-large);margin-left:var(--six-spacing-xx-small)}.tab__close-button::part(base){padding:var(--six-spacing-xxx-small)}.tab__indicator{position:absolute}.tab__indicator.tab__indicator--active{background-color:var(--six-tab-border-color-active)}.tab--top{margin-bottom:var(--six-spacing-xxx-small)}.tab__indicator--top{width:100%;bottom:0;height:var(--six-tab-border-width)}.tab--bottom{margin-top:var(--six-spacing-xxx-small)}.tab__indicator--bottom{width:100%;top:0;height:var(--six-tab-border-width)}.tab--left{margin-right:var(--six-spacing-xxx-small)}.tab__indicator--left{height:100%;right:0;top:0;width:var(--six-tab-border-width)}.tab--right{margin-left:var(--six-spacing-xxx-small)}.tab__indicator--right{height:100%;left:0;top:0;width:var(--six-tab-border-width)}";
|
|
6
|
+
const SixTabStyle0 = sixTabCss;
|
|
6
7
|
|
|
7
8
|
let id = 0;
|
|
8
9
|
const SixTab$1 = /*@__PURE__*/ proxyCustomElement(class SixTab extends HTMLElement {
|
|
@@ -39,7 +40,7 @@ const SixTab$1 = /*@__PURE__*/ proxyCustomElement(class SixTab extends HTMLEleme
|
|
|
39
40
|
const placement = (_a = tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.placement) !== null && _a !== void 0 ? _a : 'top';
|
|
40
41
|
return (
|
|
41
42
|
// If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels
|
|
42
|
-
h(Host, { id: this.host.id || this.componentId }, h("div", { part: "base", ref: (el) => (this.tab = el), class: {
|
|
43
|
+
h(Host, { key: '66eaedc782e87077c15d655a283127bba7e89dd8', id: this.host.id || this.componentId }, h("div", { key: 'dd59ec7e9406b1baab4f4fda287cfdaf98d79c31', part: "base", ref: (el) => (this.tab = el), class: {
|
|
43
44
|
tab: true,
|
|
44
45
|
// Placements
|
|
45
46
|
'tab--top': placement === 'top',
|
|
@@ -50,7 +51,7 @@ const SixTab$1 = /*@__PURE__*/ proxyCustomElement(class SixTab extends HTMLEleme
|
|
|
50
51
|
'tab--active': this.active,
|
|
51
52
|
'tab--closable': this.closable,
|
|
52
53
|
'tab--disabled': this.disabled,
|
|
53
|
-
}, role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.active ? 'true' : 'false', tabindex: this.disabled || !this.active ? '-1' : '0' }, h("slot",
|
|
54
|
+
}, role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.active ? 'true' : 'false', tabindex: this.disabled || !this.active ? '-1' : '0' }, h("slot", { key: 'bd701cd5777e3d1cadbf3907534470a96e46a66d' }), this.closable && (h("six-icon-button", { name: "close", size: "xSmall", exportparts: "base:close-button", class: "tab__close-button", onClick: this.handleCloseClick, tabIndex: -1, "aria-hidden": "true" }))), h("div", { key: 'f80103185d457827fc8c2e990791dd947743daef', part: this.active ? 'active-tab-indicator' : '', class: {
|
|
54
55
|
tab__indicator: true,
|
|
55
56
|
'tab__indicator--active': this.active,
|
|
56
57
|
// Placements
|
|
@@ -61,7 +62,7 @@ const SixTab$1 = /*@__PURE__*/ proxyCustomElement(class SixTab extends HTMLEleme
|
|
|
61
62
|
} })));
|
|
62
63
|
}
|
|
63
64
|
get host() { return this; }
|
|
64
|
-
static get style() { return
|
|
65
|
+
static get style() { return SixTabStyle0; }
|
|
65
66
|
}, [1, "six-tab", {
|
|
66
67
|
"panel": [513],
|
|
67
68
|
"active": [516],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-tab.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,
|
|
1
|
+
{"file":"six-tab.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,orDAAorD,CAAC;AACvsD,qBAAe,SAAS;;ACExB,IAAI,EAAE,GAAG,CAAC,CAAC;MAmBEA,QAAM;;;;;;QACT,gBAAW,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC;qBAMH,EAAE;sBAGD,KAAK;wBAGpB,KAAK;wBAGY,KAAK;;IAKzC,iBAAiB;QACf,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC1D;;IAID,MAAM,QAAQ,CAAC,OAAsB;;QACnC,MAAA,IAAI,CAAC,GAAG,0CAAE,KAAK,CAAC,OAAO,CAAC,CAAC;KAC1B;;IAID,MAAM,WAAW;;QACf,MAAA,IAAI,CAAC,GAAG,0CAAE,IAAI,EAAE,CAAC;KAClB;IAEO,gBAAgB;QACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KACtB;IAED,MAAM;;QACJ,MAAM,QAAQ,GAAkC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QACnF,MAAM,SAAS,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,SAAS,mCAAI,KAAK,CAAC;QAC/C;;QAEE,EAAC,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,MAAM;gBAC5C,uBAAuB,EAAE,SAAS,KAAK,OAAO;aAC/C,GACI,CACF,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixTab"],"sources":["src/components/six-tab/six-tab.scss?tag=six-tab&encapsulation=shadow","src/components/six-tab/six-tab.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: flex;\n}\n\n.tab {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-semibold);\n color: var(--six-tab-color);\n padding: var(--six-spacing-medium) var(--six-spacing-large);\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n width: 100%;\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: calc(-1 * var(--six-focus-ring-width) - var(--six-focus-ring-offset));\n }\n\n &.tab--active:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n font-weight: var(--six-font-weight-bold);\n }\n\n &.tab--closable {\n padding-right: var(--six-spacing-small);\n }\n\n &.tab--disabled {\n color: var(--six-tab-color-disabled);\n cursor: not-allowed;\n }\n\n &:hover:not(.tab--disabled) {\n color: var(--six-tab-color-hover);\n }\n}\n\n.tab__close-button {\n font-size: var(--six-font-size-large);\n margin-left: var(--six-spacing-xx-small);\n\n &::part(base) {\n padding: var(--six-spacing-xxx-small);\n }\n}\n\n// TAB INDICATOR\n.tab__indicator {\n position: absolute;\n &.tab__indicator--active {\n background-color: var(--six-tab-border-color-active);\n }\n}\n\n// TOP\n.tab--top {\n margin-bottom: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--top {\n width: 100%;\n bottom: 0;\n height: var(--six-tab-border-width);\n}\n\n// BOTTOM\n.tab--bottom {\n margin-top: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--bottom {\n width: 100%;\n top: 0;\n height: var(--six-tab-border-width);\n}\n\n// LEFT\n.tab--left {\n margin-right: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--left {\n height: 100%;\n right: 0;\n top: 0;\n width: var(--six-tab-border-width);\n}\n\n// RIGHT\n.tab--right {\n margin-left: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--right {\n height: 100%;\n left: 0;\n top: 0;\n width: var(--six-tab-border-width);\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\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 tab's label.\n *\n * @part base - The component's base wrapper.\n * @part close-button - The close button, which is the icon button's base wrapper.\n */\n\n@Component({\n tag: 'six-tab',\n styleUrl: 'six-tab.scss',\n shadow: true,\n})\nexport class SixTab {\n private componentId = `tab-${++id}`;\n private tab?: HTMLElement;\n\n @Element() host!: HTMLSixTabElement;\n\n /** The name of the tab panel the tab will control. The panel must be located in the same tab group. */\n @Prop({ reflect: true }) panel = '';\n\n /** Set to true to draw the tab in an active state. */\n @Prop({ reflect: true }) active = false;\n\n /** When true, the tab will be rendered with a close icon. */\n @Prop() closable = false;\n\n /** Set to true to draw the tab in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event({ eventName: 'six-tab-close' }) sixClose!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleCloseClick = this.handleCloseClick.bind(this);\n }\n\n /** Sets focus to the tab. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.tab?.focus(options);\n }\n\n /** Removes focus from the tab. */\n @Method()\n async removeFocus() {\n this.tab?.blur();\n }\n\n private handleCloseClick() {\n this.sixClose.emit();\n }\n\n render() {\n const tabGroup: HTMLSixTabGroupElement | null = this.host.closest('six-tab-group');\n const placement = tabGroup?.placement ?? 'top';\n return (\n // If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels\n <Host id={this.host.id || this.componentId}>\n <div\n part=\"base\"\n ref={(el) => (this.tab = el)}\n class={{\n tab: true,\n\n // Placements\n 'tab--top': placement === 'top',\n 'tab--bottom': placement === 'bottom',\n 'tab--left': placement === 'left',\n 'tab--right': placement === 'right',\n\n // States\n 'tab--active': this.active,\n 'tab--closable': this.closable,\n 'tab--disabled': this.disabled,\n }}\n role=\"tab\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-selected={this.active ? 'true' : 'false'}\n tabindex={this.disabled || !this.active ? '-1' : '0'}\n >\n <slot />\n {this.closable && (\n <six-icon-button\n name=\"close\"\n size=\"xSmall\"\n exportparts=\"base:close-button\"\n class=\"tab__close-button\"\n onClick={this.handleCloseClick}\n tabIndex={-1}\n aria-hidden=\"true\"\n />\n )}\n </div>\n <div\n part={this.active ? 'active-tab-indicator' : ''}\n class={{\n tab__indicator: true,\n 'tab__indicator--active': this.active,\n\n // Placements\n 'tab__indicator--top': placement === 'top',\n 'tab__indicator--bottom': placement === 'bottom',\n 'tab__indicator--left': placement === 'left',\n 'tab__indicator--right': placement === 'right',\n }}\n ></div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,102 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as getTextContent } from './slot.js';
|
|
3
|
+
import { a as debounce } from './execution-control.js';
|
|
4
|
+
import { d as defineCustomElement$4 } from './six-icon2.js';
|
|
5
|
+
import { d as defineCustomElement$3 } from './six-icon-button2.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './six-tooltip2.js';
|
|
7
|
+
|
|
8
|
+
const sixTagCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;overflow:hidden}.tag{display:flex;align-items:center;border:solid 1px;font-family:var(--six-font-family);line-height:1;white-space:nowrap;user-select:none;cursor:default}.tag__content{text-overflow:ellipsis;overflow:hidden}.tag__clear::part(base){color:inherit;padding:0}.tag--info{color:var(--six-color-white);background-color:var(--six-color-web-rock-900);border-color:var(--six-color-web-rock-900)}.tag--success{color:var(--six-color-web-rock-900);border-color:var(--six-color-success-500);background-color:var(--six-color-success-500)}.tag--primary{color:var(--six-color-web-rock-900);border-color:var(--six-color-clay-50);background-color:var(--six-color-clay-50)}.tag--warning{color:var(--six-color-web-rock-900);border-color:var(--six-color-warning-700);background-color:var(--six-color-warning-700)}.tag--danger{color:var(--six-color-white);border-color:var(--six-color-danger-800);background-color:var(--six-color-danger-800)}.tag--action{color:var(--six-color-white);border-color:var(--six-color-action-500);background-color:var(--six-color-action-500)}.tag--small{font-size:var(--six-button-font-size-small);height:calc(var(--six-height-small) * 0.8);line-height:calc(var(--six-height-small) - var(--six-border-width) * 2);border-radius:var(--six-input-border-radius-small);padding:0 var(--six-spacing-x-small)}.tag--small .tag__clear{margin-left:var(--six-spacing-xx-small);margin-right:calc(-1 * var(--six-spacing-xxx-small))}.tag--medium{font-size:var(--six-button-font-size-medium);height:calc(var(--six-height-medium) * 0.8);line-height:calc(var(--six-height-medium) - var(--six-border-width) * 2);border-radius:var(--six-input-border-radius-medium);padding:0 var(--six-spacing-small)}.tag--medium .tag__clear{margin-left:var(--six-spacing-xx-small);margin-right:calc(-1 * var(--six-spacing-xx-small))}.tag--large{font-size:var(--six-button-font-size-large);height:calc(var(--six-height-large) * 0.8);line-height:calc(var(--six-height-large) - var(--six-border-width) * 2);border-radius:var(--six-input-border-radius-large);padding:0 var(--six-spacing-medium)}.tag--large .tag__clear{margin-left:var(--six-spacing-xx-small);margin-right:calc(-1 * var(--six-spacing-x-small))}.tag--pill{border-radius:var(--six-border-radius-pill)}";
|
|
9
|
+
const SixTagStyle0 = sixTagCss;
|
|
10
|
+
|
|
11
|
+
const SixTag$1 = /*@__PURE__*/ proxyCustomElement(class SixTag extends HTMLElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.__registerHost();
|
|
15
|
+
this.__attachShadow();
|
|
16
|
+
this.sixClear = createEvent(this, "six-tag-clear", 7);
|
|
17
|
+
this.resizeObserver = new ResizeObserver(debounce(() => this.updateTooltip()));
|
|
18
|
+
this.updateTooltip = () => {
|
|
19
|
+
if (this.tooltipElement != null && this.contentSlotElement != null && this.contentElement != null) {
|
|
20
|
+
this.tooltipElement.content = getTextContent(this.contentSlotElement);
|
|
21
|
+
this.tooltipElement.disabled = !(this.contentElement.offsetWidth < this.contentElement.scrollWidth);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
this.handleClearClick = () => {
|
|
25
|
+
this.sixClear.emit();
|
|
26
|
+
};
|
|
27
|
+
this.type = 'primary';
|
|
28
|
+
this.size = 'medium';
|
|
29
|
+
this.pill = false;
|
|
30
|
+
this.clearable = false;
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
if (this.contentElement != null) {
|
|
34
|
+
this.resizeObserver.observe(this.contentElement);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
componentDidLoad() {
|
|
38
|
+
if (this.contentElement != null) {
|
|
39
|
+
this.resizeObserver.observe(this.contentElement);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
this.resizeObserver.disconnect();
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
return (h("span", { key: '6a02aa0235a9b590604bc92647ac73e22e304136', part: "base", class: {
|
|
47
|
+
tag: true,
|
|
48
|
+
// Types
|
|
49
|
+
'tag--primary': this.type === 'primary',
|
|
50
|
+
'tag--success': this.type === 'success',
|
|
51
|
+
'tag--info': this.type === 'info',
|
|
52
|
+
'tag--warning': this.type === 'warning',
|
|
53
|
+
'tag--danger': this.type === 'danger',
|
|
54
|
+
'tag--action': this.type === 'action',
|
|
55
|
+
'tag--text': this.type === 'text',
|
|
56
|
+
// Sizes
|
|
57
|
+
'tag--small': this.size === 'small',
|
|
58
|
+
'tag--medium': this.size === 'medium',
|
|
59
|
+
'tag--large': this.size === 'large',
|
|
60
|
+
// Modifers
|
|
61
|
+
'tag--pill': this.pill,
|
|
62
|
+
'tag--clear': this.clearable,
|
|
63
|
+
} }, h("six-tooltip", { key: 'e42c81922948e9b944bb828479351e8e3ba87a3b', ref: (el) => (this.tooltipElement = el) }, h("span", { key: '84b8a6a071f9c45c5aaec65c0667df111a357562', ref: (el) => (this.contentElement = el), part: "content", class: "tag__content" }, h("slot", { key: '757dcb510fef07b947876706c8a53e07d28bdc7f', ref: (el) => (this.contentSlotElement = el) }))), this.clearable && (h("six-icon-button", { exportparts: "base:clear-button", size: "xSmall", name: "clear", class: "tag__clear", onClick: this.handleClearClick }))));
|
|
64
|
+
}
|
|
65
|
+
static get style() { return SixTagStyle0; }
|
|
66
|
+
}, [1, "six-tag", {
|
|
67
|
+
"type": [513],
|
|
68
|
+
"size": [513],
|
|
69
|
+
"pill": [516],
|
|
70
|
+
"clearable": [516]
|
|
71
|
+
}]);
|
|
72
|
+
function defineCustomElement$1() {
|
|
73
|
+
if (typeof customElements === "undefined") {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const components = ["six-tag", "six-icon", "six-icon-button", "six-tooltip"];
|
|
77
|
+
components.forEach(tagName => { switch (tagName) {
|
|
78
|
+
case "six-tag":
|
|
79
|
+
if (!customElements.get(tagName)) {
|
|
80
|
+
customElements.define(tagName, SixTag$1);
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
case "six-icon":
|
|
84
|
+
if (!customElements.get(tagName)) {
|
|
85
|
+
defineCustomElement$4();
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
case "six-icon-button":
|
|
89
|
+
if (!customElements.get(tagName)) {
|
|
90
|
+
defineCustomElement$3();
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
case "six-tooltip":
|
|
94
|
+
if (!customElements.get(tagName)) {
|
|
95
|
+
defineCustomElement$2();
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
} });
|
|
99
|
+
}
|
|
2
100
|
|
|
3
101
|
const SixTag = SixTag$1;
|
|
4
102
|
const defineCustomElement = defineCustomElement$1;
|