@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,8 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as getSlot } from './slot.js';
|
|
2
3
|
import { d as defineCustomElement$3 } from './six-icon2.js';
|
|
3
4
|
import { d as defineCustomElement$2 } from './six-icon-button2.js';
|
|
4
5
|
|
|
5
|
-
const sixAlertCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:
|
|
6
|
+
const sixAlertCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:contents;margin:0}.alert{position:relative;display:flex;align-items:stretch;background-color:var(--six-color-white);border:solid 1px var(--six-color-web-rock-200);border-top-width:3px;border-radius:var(--six-border-radius-medium);box-shadow:var(--box-shadow);font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:1.6;color:var(--six-color-web-rock-700);opacity:0;transform:scale(0.9);transition:var(--six-transition-medium) opacity ease, var(--six-transition-medium) transform ease;margin:inherit}.alert:not(.alert--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.alert--shadow{box-shadow:var(--six-shadow-medium)}.alert--open{opacity:1;transform:none}.alert__icon{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-large)}.alert__icon ::slotted(*){margin-left:var(--six-spacing-large)}.alert--primary{border-top-color:var(--six-color-web-rock-900)}.alert--primary .alert__icon{color:var(--six-color-web-rock-900)}.alert--success{border-top-color:var(--six-color-success-600)}.alert--success .alert__icon{color:var(--six-color-success-600)}.alert--info{border-top-color:var(--six-color-action-500)}.alert--info .alert__icon{color:var(--six-color-action-500)}.alert--warning{border-top-color:var(--six-color-warning-800)}.alert--warning .alert__icon{color:var(--six-color-warning-800)}.alert--danger{border-top-color:var(--six-color-danger-900)}.alert--danger .alert__icon{color:var(--six-color-danger-900)}.alert__message{flex:1 1 auto;padding:var(--six-spacing-large);overflow:hidden}.alert__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-large);padding-right:var(--six-spacing-medium)}";
|
|
7
|
+
const SixAlertStyle0 = sixAlertCss;
|
|
6
8
|
|
|
7
9
|
const toastStack = Object.assign(document.createElement('div'), { className: 'six-toast-stack' });
|
|
8
10
|
const SixAlert$1 = /*@__PURE__*/ proxyCustomElement(class SixAlert extends HTMLElement {
|
|
@@ -17,8 +19,11 @@ const SixAlert$1 = /*@__PURE__*/ proxyCustomElement(class SixAlert extends HTMLE
|
|
|
17
19
|
this.handleCloseClick = () => {
|
|
18
20
|
this.hide();
|
|
19
21
|
};
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
+
this.handleMouseEnter = () => {
|
|
23
|
+
this.pauseAutoHide();
|
|
24
|
+
};
|
|
25
|
+
this.handleMouseLeave = () => {
|
|
26
|
+
this.resetAutoHide();
|
|
22
27
|
};
|
|
23
28
|
this.handleTransitionEnd = (event) => {
|
|
24
29
|
const target = event.target;
|
|
@@ -82,13 +87,33 @@ const SixAlert$1 = /*@__PURE__*/ proxyCustomElement(class SixAlert extends HTMLE
|
|
|
82
87
|
* Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when
|
|
83
88
|
* dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by
|
|
84
89
|
* calling this method again. The returned promise will resolve after the alert is hidden.
|
|
90
|
+
* @param adjustPosition If true, the top and right position of the toast stack is shifted according to the
|
|
91
|
+
* six-root header's height and the presence of a vertical scrollbar.
|
|
85
92
|
*/
|
|
86
|
-
async toast() {
|
|
93
|
+
async toast(adjustPosition = true) {
|
|
87
94
|
return new Promise((resolve) => {
|
|
95
|
+
var _a;
|
|
88
96
|
if (!toastStack.parentElement) {
|
|
89
97
|
document.body.append(toastStack);
|
|
90
98
|
}
|
|
91
99
|
toastStack.append(this.host);
|
|
100
|
+
if (adjustPosition) {
|
|
101
|
+
const sixRoot = document.querySelector('six-root');
|
|
102
|
+
const headerSlot = getSlot(sixRoot, 'header');
|
|
103
|
+
const mainSlot = (_a = sixRoot === null || sixRoot === void 0 ? void 0 : sixRoot.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('host main');
|
|
104
|
+
if (mainSlot != null && mainSlot instanceof HTMLElement) {
|
|
105
|
+
const scrollbarWidth = mainSlot.offsetWidth - mainSlot.clientWidth;
|
|
106
|
+
toastStack.style.right = `${scrollbarWidth}px`;
|
|
107
|
+
}
|
|
108
|
+
if (headerSlot != null) {
|
|
109
|
+
const rect = headerSlot === null || headerSlot === void 0 ? void 0 : headerSlot.getBoundingClientRect();
|
|
110
|
+
toastStack.style.top = `${rect.top + rect.height}px`;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
toastStack.style.top = '0';
|
|
115
|
+
toastStack.style.right = '0';
|
|
116
|
+
}
|
|
92
117
|
requestAnimationFrame(() => this.show());
|
|
93
118
|
this.host.addEventListener('six-alert-after-hide', () => {
|
|
94
119
|
this.host.remove();
|
|
@@ -100,14 +125,21 @@ const SixAlert$1 = /*@__PURE__*/ proxyCustomElement(class SixAlert extends HTMLE
|
|
|
100
125
|
}, { once: true });
|
|
101
126
|
});
|
|
102
127
|
}
|
|
103
|
-
|
|
128
|
+
pauseAutoHide() {
|
|
104
129
|
clearTimeout(this.autoHideTimeout);
|
|
130
|
+
}
|
|
131
|
+
resetAutoHide() {
|
|
105
132
|
if (this.open && this.duration < Infinity) {
|
|
106
133
|
this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);
|
|
107
134
|
}
|
|
108
135
|
}
|
|
136
|
+
restartAutoHide() {
|
|
137
|
+
this.pauseAutoHide();
|
|
138
|
+
this.resetAutoHide();
|
|
139
|
+
}
|
|
109
140
|
render() {
|
|
110
|
-
|
|
141
|
+
const asToast = this.host.closest('.six-toast-stack') != null;
|
|
142
|
+
return (h("div", { key: 'cd9d14bef5923cf2ec8add1f61e92733aa9dd59f', part: "base", class: {
|
|
111
143
|
alert: true,
|
|
112
144
|
'alert--open': this.open,
|
|
113
145
|
'alert--visible': this.isVisible,
|
|
@@ -117,14 +149,15 @@ const SixAlert$1 = /*@__PURE__*/ proxyCustomElement(class SixAlert extends HTMLE
|
|
|
117
149
|
'alert--info': this.type === 'info',
|
|
118
150
|
'alert--warning': this.type === 'warning',
|
|
119
151
|
'alert--danger': this.type === 'danger',
|
|
120
|
-
|
|
152
|
+
'alert--shadow': asToast,
|
|
153
|
+
}, role: "alert", "aria-live": "assertive", "aria-atomic": "true", "aria-hidden": this.open ? 'false' : 'true', onTransitionEnd: this.handleTransitionEnd, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("span", { key: 'fb6e8cf52eb87ddb1a81a797482457b3afccaa98', part: "icon", class: "alert__icon" }, h("slot", { key: '3d97a399ac05620214ef8a4d6a19c37a103f76a2', name: "icon" })), h("span", { key: '3984ce04838d33a688b6cfafb7827646e0e9d582', part: "message", class: "alert__message" }, h("slot", { key: 'f84ff31b7b74571b2ff9f074b617cb344313939e' })), this.closable && (h("span", { class: "alert__close" }, h("six-icon-button", { name: "clear", exportparts: "base:close-button", onClick: this.handleCloseClick })))));
|
|
121
154
|
}
|
|
122
155
|
get host() { return this; }
|
|
123
156
|
static get watchers() { return {
|
|
124
157
|
"open": ["handleOpenChange"],
|
|
125
158
|
"duration": ["handleDurationChange"]
|
|
126
159
|
}; }
|
|
127
|
-
static get style() { return
|
|
160
|
+
static get style() { return SixAlertStyle0; }
|
|
128
161
|
}, [1, "six-alert", {
|
|
129
162
|
"open": [1540],
|
|
130
163
|
"closable": [516],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-alert.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,u1DAAu1D;;ACG32D,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,EAAE,SAA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;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixAlert"],"sources":["src/components/six-alert/six-alert.scss?tag=six-alert&encapsulation=shadow","src/components/six-alert/six-alert.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --box-shadow: The alert's box shadow.\n */\n:host {\n display: contents;\n\n // For better DX, we'll reset the margin here so the base part can inherit it\n margin: 0;\n}\n\n.alert {\n position: relative;\n display: flex;\n align-items: stretch;\n background-color: var(--six-color-white);\n border: solid 1px var(--six-color-web-rock-200);\n border-top-width: 3px;\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--box-shadow);\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: 1.6;\n color: var(--six-color-web-rock-700);\n opacity: 0;\n transform: scale(0.9);\n transition: var(--six-transition-medium) opacity ease, var(--six-transition-medium) transform ease;\n margin: inherit;\n\n &:not(.alert--visible) {\n @include hidden;\n }\n}\n\n.alert--open {\n opacity: 1;\n transform: none;\n}\n\n.alert__icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-large);\n\n ::slotted(*) {\n margin-left: var(--six-spacing-large);\n }\n}\n\n.alert--primary {\n border-top-color: var(--six-color-web-rock-900);\n\n .alert__icon {\n color: var(--six-color-web-rock-900);\n }\n}\n\n.alert--success {\n border-top-color: var(--six-color-success-600);\n\n .alert__icon {\n color: var(--six-color-success-600);\n }\n}\n\n.alert--info {\n border-top-color: var(--six-color-action-500);\n\n .alert__icon {\n color: var(--six-color-action-500);\n }\n}\n\n.alert--warning {\n border-top-color: var(--six-color-warning-800);\n\n .alert__icon {\n color: var(--six-color-warning-800);\n }\n}\n\n.alert--danger {\n border-top-color: var(--six-color-danger-900);\n\n .alert__icon {\n color: var(--six-color-danger-900);\n }\n}\n\n.alert__message {\n flex: 1 1 auto;\n padding: var(--six-spacing-large);\n overflow: hidden;\n}\n\n.alert__close {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-large);\n padding-right: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\n\nconst toastStack = Object.assign(document.createElement('div'), { className: 'six-toast-stack' });\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 alert's content.\n * @slot icon - An icon to show in the alert.\n *\n * @part base - The component's base wrapper.\n * @part icon - The container that wraps the alert icon.\n * @part message - The alert message.\n * @part close-button - The close button.\n */\n\n@Component({\n tag: 'six-alert',\n styleUrl: 'six-alert.scss',\n shadow: true,\n})\nexport class SixAlert {\n private autoHideTimeout?: number;\n\n @Element() host!: HTMLSixAlertElement;\n\n @State() isVisible = false;\n\n /** Indicates whether or not the alert is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Set to true to make the alert closable. */\n @Prop({ reflect: true }) closable = false;\n\n /** The type of alert. */\n @Prop({ reflect: true }) type: 'primary' | 'success' | 'info' | 'warning' | 'danger' = 'primary';\n\n /**\n * The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with the\n * alert before it closes (e.g. moves the mouse over it), the timer will restart.\n */\n @Prop() duration = Infinity;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n @Watch('duration')\n handleDurationChange() {\n this.restartAutoHide();\n }\n\n /** Emitted when the alert opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-alert-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the alert opens and all transitions are complete. */\n @Event({ eventName: 'six-alert-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the alert closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-alert-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the alert closes and all transitions are complete. */\n @Event({ eventName: 'six-alert-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n /** Shows the alert. */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.isVisible = true;\n this.open = true;\n\n if (this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n /** Hides the alert */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n clearTimeout(this.autoHideTimeout);\n this.isVisible = false;\n this.open = false;\n }\n\n /**\n * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when\n * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by\n * calling this method again. The returned promise will resolve after the alert is hidden.\n */\n @Method()\n async toast() {\n return new Promise<void>((resolve) => {\n if (!toastStack.parentElement) {\n document.body.append(toastStack);\n }\n\n toastStack.append(this.host);\n requestAnimationFrame(() => this.show());\n\n this.host.addEventListener(\n 'six-alert-after-hide',\n () => {\n this.host.remove();\n resolve();\n\n // Remove the toast stack from the DOM when there are no more alerts\n if (toastStack.querySelector('six-alert') === null) {\n toastStack.remove();\n }\n },\n { once: true }\n );\n });\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleMouseMove = () => {\n this.restartAutoHide();\n };\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'opacity' && target.classList.contains('alert')) {\n this.isVisible = this.open;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n };\n\n private restartAutoHide() {\n clearTimeout(this.autoHideTimeout);\n if (this.open && this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n render() {\n return (\n <div\n part=\"base\"\n class={{\n alert: true,\n 'alert--open': this.open,\n 'alert--visible': this.isVisible,\n 'alert--closable': this.closable,\n 'alert--primary': this.type === 'primary',\n 'alert--success': this.type === 'success',\n 'alert--info': this.type === 'info',\n 'alert--warning': this.type === 'warning',\n 'alert--danger': this.type === 'danger',\n }}\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n onMouseMove={this.handleMouseMove}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <span part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\" />\n </span>\n\n <span part=\"message\" class=\"alert__message\">\n <slot />\n </span>\n\n {this.closable && (\n <span class=\"alert__close\">\n <six-icon-button\n name=\"clear\"\n exportparts=\"base:close-button\"\n onClick={this.handleCloseClick}\n ></six-icon-button>\n </span>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"six-alert.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,64DAA64D,CAAC;AACl6D,uBAAe,WAAW;;ACG1B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC;MAsBrFA,UAAQ;;;;;;;;;QA8JX,qBAAgB,GAAG;YACzB,IAAI,CAAC,IAAI,EAAE,CAAC;SACb,CAAC;QAEM,qBAAgB,GAAG;YACzB,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB,CAAC;QAEM,qBAAgB,GAAG;YACzB,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB,CAAC;QAEM,wBAAmB,GAAG,CAAC,KAAsB;YACnD,MAAM,MAAM,GA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AAE,IAAI,CAAC,QAAQ;gBAChC,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,MAAM;gBACnC,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,eAAe,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACvC,eAAe,EAAE,OAAO;aACzB,EACD,IAAI,EAAC,OAAO,eACF,WAAW,iBACT,MAAM,iBACL,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,EACzC,eAAe,EAAE,IAAI,CAAC,mBAAmB,EACzC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,YAAY,EAAE,IAAI,CAAC,gBAAgB,IAEnC,6DAAM,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa,IACnC,6DAAM,IAAI,EAAC,MAAM,GAAG,CACf,EAEP,6DAAM,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,gBAAgB,IACzC,8DAAQ,CACH,EAEN,IAAI,CAAC,QAAQ,KACZ,YAAM,KAAK,EAAC,cAAc,IACxB,uBACE,IAAI,EAAC,OAAO,EACZ,WAAW,EAAC,mBAAmB,EAC/B,OAAO,EAAE,IAAI,CAAC,gBAAgB,GACb,CACd,CACR,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixAlert"],"sources":["src/components/six-alert/six-alert.scss?tag=six-alert&encapsulation=shadow","src/components/six-alert/six-alert.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --box-shadow: The alert's box shadow.\n */\n:host {\n display: contents;\n\n // For better DX, we'll reset the margin here so the base part can inherit it\n margin: 0;\n}\n\n.alert {\n position: relative;\n display: flex;\n align-items: stretch;\n background-color: var(--six-color-white);\n border: solid 1px var(--six-color-web-rock-200);\n border-top-width: 3px;\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--box-shadow);\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: 1.6;\n color: var(--six-color-web-rock-700);\n opacity: 0;\n transform: scale(0.9);\n transition: var(--six-transition-medium) opacity ease, var(--six-transition-medium) transform ease;\n margin: inherit;\n\n &:not(.alert--visible) {\n @include hidden;\n }\n}\n\n.alert--shadow {\n box-shadow: var(--six-shadow-medium);\n}\n\n.alert--open {\n opacity: 1;\n transform: none;\n}\n\n.alert__icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-large);\n\n ::slotted(*) {\n margin-left: var(--six-spacing-large);\n }\n}\n\n.alert--primary {\n border-top-color: var(--six-color-web-rock-900);\n\n .alert__icon {\n color: var(--six-color-web-rock-900);\n }\n}\n\n.alert--success {\n border-top-color: var(--six-color-success-600);\n\n .alert__icon {\n color: var(--six-color-success-600);\n }\n}\n\n.alert--info {\n border-top-color: var(--six-color-action-500);\n\n .alert__icon {\n color: var(--six-color-action-500);\n }\n}\n\n.alert--warning {\n border-top-color: var(--six-color-warning-800);\n\n .alert__icon {\n color: var(--six-color-warning-800);\n }\n}\n\n.alert--danger {\n border-top-color: var(--six-color-danger-900);\n\n .alert__icon {\n color: var(--six-color-danger-900);\n }\n}\n\n.alert__message {\n flex: 1 1 auto;\n padding: var(--six-spacing-large);\n overflow: hidden;\n}\n\n.alert__close {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-large);\n padding-right: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { getSlot } from '../../utils/slot';\n\nconst toastStack = Object.assign(document.createElement('div'), { className: 'six-toast-stack' });\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 alert's content.\n * @slot icon - An icon to show in the alert.\n *\n * @part base - The component's base wrapper.\n * @part icon - The container that wraps the alert icon.\n * @part message - The alert message.\n * @part close-button - The close button.\n */\n\n@Component({\n tag: 'six-alert',\n styleUrl: 'six-alert.scss',\n shadow: true,\n})\nexport class SixAlert {\n private autoHideTimeout?: number;\n\n @Element() host!: HTMLSixAlertElement;\n\n @State() isVisible = false;\n\n /** Indicates whether or not the alert is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Set to true to make the alert closable. */\n @Prop({ reflect: true }) closable = false;\n\n /** The type of alert. */\n @Prop({ reflect: true }) type: AlertType = 'primary';\n\n /**\n * The length of time, in milliseconds, the alert will show before closing itself.\n * If the user hovers over the toast alert, the timer will pause.\n * On leaving the element with the mouse, the timer resets.\n */\n @Prop() duration = Infinity;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n @Watch('duration')\n handleDurationChange() {\n this.restartAutoHide();\n }\n\n /** Emitted when the alert opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-alert-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the alert opens and all transitions are complete. */\n @Event({ eventName: 'six-alert-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the alert closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-alert-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the alert closes and all transitions are complete. */\n @Event({ eventName: 'six-alert-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n /** Shows the alert. */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.isVisible = true;\n this.open = true;\n\n if (this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n /** Hides the alert */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n clearTimeout(this.autoHideTimeout);\n this.isVisible = false;\n this.open = false;\n }\n\n /**\n * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when\n * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by\n * calling this method again. The returned promise will resolve after the alert is hidden.\n * @param adjustPosition If true, the top and right position of the toast stack is shifted according to the\n * six-root header's height and the presence of a vertical scrollbar.\n */\n @Method()\n async toast(adjustPosition = true) {\n return new Promise<void>((resolve) => {\n if (!toastStack.parentElement) {\n document.body.append(toastStack);\n }\n toastStack.append(this.host);\n\n if (adjustPosition) {\n const sixRoot = document.querySelector('six-root');\n const headerSlot = getSlot(sixRoot, 'header');\n const mainSlot = sixRoot?.shadowRoot?.querySelector('host main');\n if (mainSlot != null && mainSlot instanceof HTMLElement) {\n const scrollbarWidth = mainSlot.offsetWidth - mainSlot.clientWidth;\n toastStack.style.right = `${scrollbarWidth}px`;\n }\n if (headerSlot != null) {\n const rect = headerSlot?.getBoundingClientRect();\n toastStack.style.top = `${rect.top + rect.height}px`;\n }\n } else {\n toastStack.style.top = '0';\n toastStack.style.right = '0';\n }\n\n requestAnimationFrame(() => this.show());\n\n this.host.addEventListener(\n 'six-alert-after-hide',\n () => {\n this.host.remove();\n resolve();\n\n // Remove the toast stack from the DOM when there are no more alerts\n if (toastStack.querySelector('six-alert') === null) {\n toastStack.remove();\n }\n },\n { once: true }\n );\n });\n }\n\n private pauseAutoHide() {\n clearTimeout(this.autoHideTimeout);\n }\n\n private resetAutoHide() {\n if (this.open && this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n private restartAutoHide() {\n this.pauseAutoHide();\n this.resetAutoHide();\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleMouseEnter = () => {\n this.pauseAutoHide();\n };\n\n private handleMouseLeave = () => {\n this.resetAutoHide();\n };\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'opacity' && target.classList.contains('alert')) {\n this.isVisible = this.open;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n };\n\n render() {\n const asToast = this.host.closest('.six-toast-stack') != null;\n\n return (\n <div\n part=\"base\"\n class={{\n alert: true,\n 'alert--open': this.open,\n 'alert--visible': this.isVisible,\n 'alert--closable': this.closable,\n 'alert--primary': this.type === 'primary',\n 'alert--success': this.type === 'success',\n 'alert--info': this.type === 'info',\n 'alert--warning': this.type === 'warning',\n 'alert--danger': this.type === 'danger',\n 'alert--shadow': asToast,\n }}\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n onTransitionEnd={this.handleTransitionEnd}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n <span part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\" />\n </span>\n\n <span part=\"message\" class=\"alert__message\">\n <slot />\n </span>\n\n {this.closable && (\n <span class=\"alert__close\">\n <six-icon-button\n name=\"clear\"\n exportparts=\"base:close-button\"\n onClick={this.handleCloseClick}\n ></six-icon-button>\n </span>\n )}\n </div>\n );\n }\n}\n\nexport type AlertType = 'primary' | 'success' | 'info' | 'warning' | 'danger';\n"],"version":3}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './six-icon2.js';
|
|
3
3
|
|
|
4
|
-
const sixAvatarCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:
|
|
4
|
+
const sixAvatarCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;--size:2rem}.avatar{display:inline-flex;align-items:center;justify-content:center;position:relative;width:var(--size);height:var(--size);background-color:var(--six-avatar-background-color);font-family:var(--six-font-sans);font-size:calc(var(--size) * 0.5);font-weight:var(--six-font-weight-normal);color:var(--six-avatar-color);overflow:hidden;user-select:none;vertical-align:middle;cursor:pointer;outline:none}.avatar:hover{box-shadow:var(--six-shadow-medium)}.avatar--circle{border-radius:var(--six-border-radius-circle)}.avatar--rounded{border-radius:var(--six-border-radius-medium)}.avatar--square{border-radius:0}.avatar__icon{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%}.avatar__initials{line-height:1;text-transform:uppercase}.avatar__image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}";
|
|
5
|
+
const SixAvatarStyle0 = sixAvatarCss;
|
|
5
6
|
|
|
6
7
|
const SixAvatar$1 = /*@__PURE__*/ proxyCustomElement(class SixAvatar extends HTMLElement {
|
|
7
8
|
constructor() {
|
|
@@ -18,14 +19,14 @@ const SixAvatar$1 = /*@__PURE__*/ proxyCustomElement(class SixAvatar extends HTM
|
|
|
18
19
|
this.shape = 'circle';
|
|
19
20
|
}
|
|
20
21
|
render() {
|
|
21
|
-
return (h("div", { part: "base", class: {
|
|
22
|
+
return (h("div", { key: 'a34616731683542d8bbdc16778ab34093654d773', part: "base", class: {
|
|
22
23
|
avatar: true,
|
|
23
24
|
'avatar--circle': this.shape === 'circle',
|
|
24
25
|
'avatar--rounded': this.shape === 'rounded',
|
|
25
26
|
'avatar--square': this.shape === 'square',
|
|
26
27
|
}, role: "image", "aria-label": this.alt, tabIndex: 0 }, this.initials === '' && (h("div", { part: "icon", class: "avatar__icon" }, h("slot", { name: "icon" }, h("six-icon", null, "person")))), this.initials && (h("div", { part: "initials", class: "avatar__initials" }, this.initials)), this.image && !this.hasError && (h("img", { part: "image", class: "avatar__image", src: this.image, onError: this.handleImageError }))));
|
|
27
28
|
}
|
|
28
|
-
static get style() { return
|
|
29
|
+
static get style() { return SixAvatarStyle0; }
|
|
29
30
|
}, [1, "six-avatar", {
|
|
30
31
|
"image": [1],
|
|
31
32
|
"alt": [1],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-avatar.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,
|
|
1
|
+
{"file":"six-avatar.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,0/BAA0/B,CAAC;AAChhC,wBAAe,YAAY;;MCmBdA,WAAS;;;;;QAeZ,qBAAgB,GAAG;YACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;SACtB,CAAC;wBAhBkB,KAAK;qBAGT,EAAE;mBAGJ,EAAE;wBAGG,EAAE;qBAG4B,QAAQ;;IAMzD,MAAM;QACJ,QACE,4DACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE;gBACL,MAAM,EAAE,IAAI;gBACZ,gBAAgB,EAAE,IAAI,CAAC,KAAK,KAAK,QAAQ;gBACzC,iBAAiB,EAAE,IAAI,CAAC,KAAK,KAAK,SAAS;gBAC3C,gBAAgB,EAAE,IAAI,CAAC,KAAK,KAAK,QAAQ;aAC1C,EACD,IAAI,EAAC,OAAO,gBACA,IAAI,CAAC,GAAG,EACpB,QAAQ,EAAE,CAAC,IAEV,IAAI,CAAC,QAAQ,KAAK,EAAE,KACnB,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,IACnC,YAAM,IAAI,EAAC,MAAM,IACf,6BAA2B,CACtB,CACH,CACP,EAEA,IAAI,CAAC,QAAQ,KACZ,WAAK,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,kBAAkB,IAC1C,IAAI,CAAC,QAAQ,CACV,CACP,EAEA,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,KAC3B,WAAK,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAAI,CAC5F,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixAvatar"],"sources":["src/components/six-avatar/six-avatar.scss?tag=six-avatar&encapsulation=shadow","src/components/six-avatar/six-avatar.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --size: The size of the avatar.\n */\n:host {\n display: inline-block;\n\n --size: 2rem;\n}\n\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n background-color: var(--six-avatar-background-color);\n font-family: var(--six-font-sans);\n font-size: calc(var(--size) * 0.5);\n font-weight: var(--six-font-weight-normal);\n color: var(--six-avatar-color);\n overflow: hidden;\n user-select: none;\n vertical-align: middle;\n cursor: pointer;\n outline: none;\n\n &:hover {\n box-shadow: var(--six-shadow-medium);\n }\n}\n\n.avatar--circle {\n border-radius: var(--six-border-radius-circle);\n}\n\n.avatar--rounded {\n border-radius: var(--six-border-radius-medium);\n}\n\n.avatar--square {\n border-radius: 0;\n}\n\n.avatar__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.avatar__initials {\n line-height: 1;\n text-transform: uppercase;\n}\n\n.avatar__image {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n","import { Component, h, Prop, State } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot icon - The default icon to use when no image or initials are present.\n *\n * @part base - The component's base wrapper.\n * @part icon - The container that wraps the avatar icon.\n * @part initials - The container that wraps the avatar initials.\n * @part image - The avatar image.\n */\n@Component({\n tag: 'six-avatar',\n styleUrl: 'six-avatar.scss',\n shadow: true,\n})\nexport class SixAvatar {\n @State() hasError = false;\n\n /** The image source to use for the avatar. */\n @Prop() image = '';\n\n /** Alternative text for the image. */\n @Prop() alt = '';\n\n /** Initials to use as a fallback when no image is available (1-2 characters max recommended). */\n @Prop() initials = '';\n\n /** The shape of the avatar. */\n @Prop() shape: 'circle' | 'square' | 'rounded' = 'circle';\n\n private handleImageError = () => {\n this.hasError = true;\n };\n\n render() {\n return (\n <div\n part=\"base\"\n class={{\n avatar: true,\n 'avatar--circle': this.shape === 'circle',\n 'avatar--rounded': this.shape === 'rounded',\n 'avatar--square': this.shape === 'square',\n }}\n role=\"image\"\n aria-label={this.alt}\n tabIndex={0}\n >\n {this.initials === '' && (\n <div part=\"icon\" class=\"avatar__icon\">\n <slot name=\"icon\">\n <six-icon>person</six-icon>\n </slot>\n </div>\n )}\n\n {this.initials && (\n <div part=\"initials\" class=\"avatar__initials\">\n {this.initials}\n </div>\n )}\n\n {this.image && !this.hasError && (\n <img part=\"image\" class=\"avatar__image\" src={this.image} onError={this.handleImageError} />\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const sixBadgeCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:
|
|
3
|
+
const sixBadgeCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-flex}.badge{display:inline-flex;align-items:center;justify-content:center;font-family:var(--six-font-family);font-size:var(--six-font-size-x-small);font-weight:var(--six-font-weight-semibold);letter-spacing:var(--six-letter-spacing-normal);line-height:1;border-radius:var(--six-border-radius-small);white-space:nowrap;padding:3px 6px;user-select:none;cursor:inherit}.badge--info{background-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.badge--success{background-color:var(--six-color-success-500);color:var(--six-color-web-rock-900)}.badge--warning{background-color:var(--six-color-warning-700);color:var(--six-color-web-rock-900)}.badge--danger{background-color:var(--six-color-danger-800);color:var(--six-color-white)}.badge--action{background-color:var(--six-color-action-500);color:var(--six-color-white)}.badge--primary{background-color:var(--six-color-clay-50);color:var(--six-color-black)}.badge--pill{border-radius:var(--six-border-radius-pill)}.badge--pulse{animation:pulse 1.5s infinite}.badge--pulse.badge--info{--pulse-color:var(--six-color-web-rock-900)}.badge--pulse.badge--success{--pulse-color:var(--six-color-success-500)}.badge--pulse.badge--warning{--pulse-color:var(--six-color-warning-700)}.badge--pulse.badge--danger{--pulse-color:var(--six-color-danger-800)}.badge--pulse.badge--action{--pulse-color:var(--six-color-action-500)}.badge--pulse.badge--primary{--pulse-color:var(--six-color-clay-50)}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--pulse-color)}70%{box-shadow:0 0 0 0.5rem transparent}100%{box-shadow:0 0 0 0 transparent}}";
|
|
4
|
+
const SixBadgeStyle0 = sixBadgeCss;
|
|
4
5
|
|
|
5
6
|
const SixBadge$1 = /*@__PURE__*/ proxyCustomElement(class SixBadge extends HTMLElement {
|
|
6
7
|
constructor() {
|
|
@@ -12,7 +13,7 @@ const SixBadge$1 = /*@__PURE__*/ proxyCustomElement(class SixBadge extends HTMLE
|
|
|
12
13
|
this.pulse = false;
|
|
13
14
|
}
|
|
14
15
|
render() {
|
|
15
|
-
return (h("span", { part: "base", class: {
|
|
16
|
+
return (h("span", { key: '25b1dedcb8bc33ec21f80ce88ca7a30ea62181c0', part: "base", class: {
|
|
16
17
|
badge: true,
|
|
17
18
|
// Types
|
|
18
19
|
'badge--primary': this.type === 'primary',
|
|
@@ -24,9 +25,9 @@ const SixBadge$1 = /*@__PURE__*/ proxyCustomElement(class SixBadge extends HTMLE
|
|
|
24
25
|
'badge--info': this.type === 'info',
|
|
25
26
|
'badge--pill': this.pill,
|
|
26
27
|
'badge--pulse': this.pulse,
|
|
27
|
-
}, role: "status" }, h("slot",
|
|
28
|
+
}, role: "status" }, h("slot", { key: 'ac5c9645468d85700838f1cfaf71546bbb1b747b' })));
|
|
28
29
|
}
|
|
29
|
-
static get style() { return
|
|
30
|
+
static get style() { return SixBadgeStyle0; }
|
|
30
31
|
}, [1, "six-badge", {
|
|
31
32
|
"type": [1],
|
|
32
33
|
"pill": [4],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-badge.js","mappings":";;AAAA,MAAM,WAAW,GAAG,
|
|
1
|
+
{"file":"six-badge.js","mappings":";;AAAA,MAAM,WAAW,GAAG,sqDAAsqD,CAAC;AAC3rD,uBAAe,WAAW;;MCiBbA,UAAQ;;;;;oBAE4E,SAAS;oBAGzF,KAAK;qBAGJ,KAAK;;IAErB,MAAM;QACJ,QACE,6DACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI;;gBAGX,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,kBAAkB,EAAE,IAAI,CAAC,IAAI,KAAK,WAAW;gBAC7C,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,eAAe,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACvC,eAAe,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACvC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,MAAM;gBACnC,aAAa,EAAE,IAAI,CAAC,IAAI;gBACxB,cAAc,EAAE,IAAI,CAAC,KAAK;aAC3B,EACD,IAAI,EAAC,QAAQ,IAEb,8DAAQ,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixBadge"],"sources":["src/components/six-badge/six-badge.scss?tag=six-badge&encapsulation=shadow","src/components/six-badge/six-badge.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-flex;\n}\n\n.badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-family: var(--six-font-family);\n font-size: var(--six-font-size-x-small);\n font-weight: var(--six-font-weight-semibold);\n letter-spacing: var(--six-letter-spacing-normal);\n line-height: 1;\n border-radius: var(--six-border-radius-small);\n white-space: nowrap;\n padding: 3px 6px;\n user-select: none;\n cursor: inherit;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Type modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.badge--info {\n background-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n}\n\n.badge--success {\n background-color: var(--six-color-success-500);\n color: var(--six-color-web-rock-900);\n}\n\n.badge--warning {\n background-color: var(--six-color-warning-700);\n color: var(--six-color-web-rock-900);\n}\n\n.badge--danger {\n background-color: var(--six-color-danger-800);\n color: var(--six-color-white);\n}\n\n.badge--action {\n background-color: var(--six-color-action-500);\n color: var(--six-color-white);\n}\n\n.badge--primary {\n background-color: var(--six-color-clay-50);\n color: var(--six-color-black);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.badge--pill {\n border-radius: var(--six-border-radius-pill);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pulse modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.badge--pulse {\n animation: pulse 1.5s infinite;\n}\n\n.badge--pulse.badge--info {\n --pulse-color: var(--six-color-web-rock-900);\n}\n\n.badge--pulse.badge--success {\n --pulse-color: var(--six-color-success-500);\n}\n\n.badge--pulse.badge--warning {\n --pulse-color: var(--six-color-warning-700);\n}\n\n.badge--pulse.badge--danger {\n --pulse-color: var(--six-color-danger-800);\n}\n\n.badge--pulse.badge--action {\n --pulse-color: var(--six-color-action-500);\n}\n\n.badge--pulse.badge--primary {\n --pulse-color: var(--six-color-clay-50);\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: 0 0 0 0 var(--pulse-color);\n }\n 70% {\n box-shadow: 0 0 0 0.5rem transparent;\n }\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The badge's content.\n *\n * @part base - The base wrapper\n */\n\n@Component({\n tag: 'six-badge',\n styleUrl: 'six-badge.scss',\n shadow: true,\n})\nexport class SixBadge {\n /** The badge's type. */\n @Prop() type: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'action' = 'primary';\n\n /** Set to true to draw a pill-style badge with rounded edges. */\n @Prop() pill = false;\n\n /** Set to true to make the badge pulsate to draw attention. */\n @Prop() pulse = false;\n\n render() {\n return (\n <span\n part=\"base\"\n class={{\n badge: true,\n\n // Types\n 'badge--primary': this.type === 'primary',\n 'badge--secondary': this.type === 'secondary',\n 'badge--success': this.type === 'success',\n 'badge--warning': this.type === 'warning',\n 'badge--danger': this.type === 'danger',\n 'badge--action': this.type === 'action',\n 'badge--info': this.type === 'info',\n 'badge--pill': this.pill,\n 'badge--pulse': this.pulse,\n }}\n role=\"status\"\n >\n <slot />\n </span>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,145 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as hasSlot } from './slot.js';
|
|
3
|
-
import { s as submitForm } from './form.js';
|
|
4
|
-
import { d as defineCustomElement$2 } from './six-spinner2.js';
|
|
5
|
-
|
|
6
|
-
const sixButtonCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block;width:auto;cursor:pointer}.button{display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--six-border-width);border-radius:0;font-family:var(--six-font-family);font-weight:var(--six-font-weight-semibold);text-decoration:none;user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;cursor:inherit}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button.button--disabled{pointer-events:none}.button ::slotted(six-icon){pointer-events:none}.button-wrapper--disabled{cursor:not-allowed}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center}.button:focus-visible{outline:var(--six-focus-ring);outline-offset:var(--six-focus-ring-offset)}.button.button--secondary{background-color:var(--six-color-white);border-color:var(--six-color-web-rock-900);color:var(--six-color-web-rock-900)}.button.button--secondary.button--disabled{background-color:var(--six-color-web-rock-400);border-color:var(--six-color-web-rock-400);color:var(--six-color-web-rock-700)}.button.button--secondary:hover:not(.button--disabled){background-color:var(--six-color-web-rock-100)}.button.button--secondary:focus:not(.button--disabled){background-color:var(--six-color-web-rock-100);border-color:var(--six-color-web-rock-400)}.button.button--secondary:active:not(.button--disabled){background-color:var(--six-color-web-rock-300);border-color:var(--six-color-web-rock-900);border-width:1px}.button.button--primary{background-color:var(--six-color-web-rock-900);border-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.button.button--primary.button--disabled{background-color:var(--six-color-web-rock-400);border-color:var(--six-color-web-rock-400);color:var(--six-color-web-rock-700)}.button.button--primary:hover:not(.button--disabled){background-color:var(--six-color-web-rock-800);border-color:var(--six-color-web-rock-800)}.button.button--primary:active:not(.button--disabled){background-color:var(--six-color-web-rock-900);border-color:var(--six-color-web-rock-900);opacity:70%}.button.button--link{background-color:transparent;border-color:transparent;color:var(--six-color-action-500)}.button.button--link.button--disabled{color:var(--six-color-web-rock-400)}.button.button--link:hover:not(.button--disabled){color:var(--six-color-action-600)}.button.button--link:active:not(.button--disabled){color:var(--six-color-action-light-to-be-defined)}.button.button--danger{background-color:var(--six-color-danger-800);border-color:var(--six-color-danger-800);color:var(--six-color-white)}.button.button--danger.button--disabled{background-color:var(--six-color-web-rock-400);border-color:var(--six-color-web-rock-400);color:var(--six-color-web-rock-700)}.button.button--danger:hover:not(.button--disabled){background-color:var(--six-color-danger-900);border-color:var(--six-color-danger-900)}.button.button--danger:active:not(.button--disabled){background-color:var(--six-color-danger-800);border-color:var(--six-color-danger-800);opacity:70%}.button.button--warning{background-color:var(--six-color-warning-700);border-color:var(--six-color-warning-700);color:var(--six-color-web-rock-900)}.button.button--warning.button--disabled{background-color:var(--six-color-web-rock-400);border-color:var(--six-color-web-rock-400);color:var(--six-color-web-rock-700)}.button.button--warning:hover:not(.button--disabled){background-color:var(--six-color-warning-800);border-color:var(--six-color-warning-800)}.button.button--warning:active:not(.button--disabled){background-color:var(--six-color-warning-700);border-color:var(--six-color-warning-700);opacity:70%}.button.button--success{background-color:var(--six-color-success-500);border-color:var(--six-color-success-500);color:var(--six-color-web-rock-900)}.button.button--success.button--disabled{background-color:var(--six-color-web-rock-400);border-color:var(--six-color-web-rock-400);color:var(--six-color-web-rock-700)}.button.button--success:hover:not(.button--disabled){background-color:var(--six-color-success-600);border-color:var(--six-color-success-600)}.button.button--success:active:not(.button--disabled){background-color:var(--six-color-success-500);border-color:var(--six-color-success-500);opacity:70%}.button.button--action{background-color:var(--six-color-action-500);border-color:var(--six-color-action-500);color:var(--six-color-white)}.button.button--action.button--disabled{background-color:var(--six-color-web-rock-400);border-color:var(--six-color-web-rock-400);color:var(--six-color-web-rock-700)}.button.button--action:hover:not(.button--disabled){background-color:var(--six-color-action-600);border-color:var(--six-color-action-600)}.button.button--action:active:not(.button--disabled){background-color:var(--six-color-action-500);border-color:var(--six-color-action-500);opacity:70%}.button--small{font-size:var(--six-button-font-size-small);height:var(--six-height-small);line-height:calc(var(--six-height-small) - var(--six-border-width) * 2)}.button--medium{font-size:var(--six-button-font-size-medium);height:var(--six-height-medium);line-height:calc(var(--six-height-medium) - var(--six-border-width) * 2)}.button--large{font-size:var(--six-button-font-size-large);height:var(--six-height-large);line-height:calc(var(--six-height-large) - var(--six-border-width) * 2)}.button--pill.button--small{border-radius:var(--six-height-small)}.button--pill.button--medium{border-radius:var(--six-height-medium)}.button--pill.button--large{border-radius:var(--six-height-large)}.button--circle{padding-left:0;padding-right:0;font-size:revert}.button--circle.button--small{width:var(--six-height-small);border-radius:50%}.button--circle.button--medium{width:var(--six-height-medium);border-radius:50%}.button--circle.button--large{width:var(--six-height-large);border-radius:50%}.button--circle .button__prefix,.button--circle .button__suffix,.button--circle .button__caret{display:none}.button--circle .button__prefix svg,.button--circle .button__suffix svg,.button--circle .button__caret svg{color:var(--six-color-web-rock-900)}.button--caret .button__suffix{display:none}.button--caret .button__caret{display:flex;align-items:center}.button--caret .button__caret svg{color:var(--six-color-web-rock-900);width:1em;height:1em}.button--primary .button__caret svg,.button--action .button__caret svg,.button--danger .button__caret svg{color:var(--six-color-white)}.button--loading{position:relative;cursor:wait}.button--loading .button__prefix,.button--loading .button__label,.button--loading .button__suffix,.button--loading .button__caret{visibility:hidden}.button--loading six-spinner{--indicator-color:currentColor;position:absolute;height:1em;width:1em;top:calc(50% - 0.5em);left:calc(50% - 0.5em)}.button ::slotted(six-badge){position:absolute;top:0;right:0;transform:translateY(-50%) translateX(50%);pointer-events:none}.button--has-label.button--small .button__label{padding:0 var(--six-spacing-small)}.button--has-label.button--medium .button__label{padding:0 var(--six-spacing-medium)}.button--has-label.button--large .button__label{padding:0 var(--six-spacing-large)}.button--has-prefix.button--small{padding-left:var(--six-spacing-x-small)}.button--has-prefix.button--small .button__label{padding-left:var(--six-spacing-x-small)}.button--has-prefix.button--medium{padding-left:var(--six-spacing-small)}.button--has-prefix.button--medium .button__label{padding-left:var(--six-spacing-small)}.button--has-prefix.button--large{padding-left:var(--six-spacing-small)}.button--has-prefix.button--large .button__label{padding-left:var(--six-spacing-small)}.button--has-suffix.button--small,.button--caret.button--small{padding-right:var(--six-spacing-x-small)}.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label{padding-right:var(--six-spacing-x-small)}.button--has-suffix.button--medium,.button--caret.button--medium{padding-right:var(--six-spacing-small)}.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-right:var(--six-spacing-small)}.button--has-suffix.button--large,.button--caret.button--large{padding-right:var(--six-spacing-small)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-right:var(--six-spacing-small)}";
|
|
7
|
-
|
|
8
|
-
const SixButton$1 = /*@__PURE__*/ proxyCustomElement(class SixButton extends HTMLElement {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
this.__registerHost();
|
|
12
|
-
this.__attachShadow();
|
|
13
|
-
this.sixBlur = createEvent(this, "six-button-blur", 7);
|
|
14
|
-
this.sixFocus = createEvent(this, "six-button-focus", 7);
|
|
15
|
-
this.handleSlotChange = () => {
|
|
16
|
-
this.hasLabel = hasSlot(this.host);
|
|
17
|
-
this.hasPrefix = hasSlot(this.host, 'prefix');
|
|
18
|
-
this.hasSuffix = hasSlot(this.host, 'suffix');
|
|
19
|
-
};
|
|
20
|
-
this.handleBlur = () => {
|
|
21
|
-
this.hasFocus = false;
|
|
22
|
-
this.sixBlur.emit();
|
|
23
|
-
};
|
|
24
|
-
this.handleFocus = () => {
|
|
25
|
-
this.hasFocus = true;
|
|
26
|
-
this.sixFocus.emit();
|
|
27
|
-
};
|
|
28
|
-
this.handleClick = (event) => {
|
|
29
|
-
if (this.disabled || this.loading) {
|
|
30
|
-
event.preventDefault();
|
|
31
|
-
event.stopPropagation();
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (this.submit) {
|
|
35
|
-
event.preventDefault();
|
|
36
|
-
submitForm(this.host);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
this.hasFocus = false;
|
|
40
|
-
this.hasLabel = false;
|
|
41
|
-
this.hasPrefix = false;
|
|
42
|
-
this.hasSuffix = false;
|
|
43
|
-
this.type = 'primary';
|
|
44
|
-
this.size = 'medium';
|
|
45
|
-
this.caret = false;
|
|
46
|
-
this.disabled = false;
|
|
47
|
-
this.loading = false;
|
|
48
|
-
this.pill = false;
|
|
49
|
-
this.circle = false;
|
|
50
|
-
this.submit = false;
|
|
51
|
-
this.reset = false;
|
|
52
|
-
this.name = '';
|
|
53
|
-
this.value = '';
|
|
54
|
-
this.href = undefined;
|
|
55
|
-
this.target = undefined;
|
|
56
|
-
this.download = undefined;
|
|
57
|
-
}
|
|
58
|
-
componentWillLoad() {
|
|
59
|
-
this.handleSlotChange();
|
|
60
|
-
}
|
|
61
|
-
/** Sets focus on the button. */
|
|
62
|
-
async setFocus(options) {
|
|
63
|
-
var _a;
|
|
64
|
-
(_a = this.nativeButton) === null || _a === void 0 ? void 0 : _a.focus(options);
|
|
65
|
-
}
|
|
66
|
-
/** Removes focus from the button. */
|
|
67
|
-
async removeFocus() {
|
|
68
|
-
var _a;
|
|
69
|
-
(_a = this.nativeButton) === null || _a === void 0 ? void 0 : _a.blur();
|
|
70
|
-
}
|
|
71
|
-
render() {
|
|
72
|
-
const isLink = this.href != null;
|
|
73
|
-
const isButton = !isLink;
|
|
74
|
-
const Button = isLink ? 'a' : 'button';
|
|
75
|
-
return (h("div", { onClick: this.handleClick, class: { 'button-wrapper--disabled': this.disabled } }, h(Button, { ref: (el) => (this.nativeButton = el), part: "base", class: {
|
|
76
|
-
button: true,
|
|
77
|
-
// Types
|
|
78
|
-
'button--secondary': this.type === 'secondary',
|
|
79
|
-
'button--primary': this.type === 'primary',
|
|
80
|
-
'button--link': this.type === 'link',
|
|
81
|
-
'button--success': this.type === 'success',
|
|
82
|
-
'button--warning': this.type === 'warning',
|
|
83
|
-
'button--danger': this.type === 'danger',
|
|
84
|
-
'button--action': this.type === 'action',
|
|
85
|
-
// Sizes
|
|
86
|
-
'button--small': this.size === 'small',
|
|
87
|
-
'button--medium': this.size === 'medium',
|
|
88
|
-
'button--large': this.size === 'large',
|
|
89
|
-
// Modifiers
|
|
90
|
-
'button--caret': this.caret,
|
|
91
|
-
'button--circle': this.circle,
|
|
92
|
-
'button--disabled': this.disabled,
|
|
93
|
-
'button--focused': this.hasFocus,
|
|
94
|
-
'button--loading': this.loading,
|
|
95
|
-
'button--pill': this.pill,
|
|
96
|
-
'button--has-label': this.hasLabel,
|
|
97
|
-
'button--has-prefix': this.hasPrefix,
|
|
98
|
-
'button--has-suffix': this.hasSuffix,
|
|
99
|
-
}, disabled: isButton ? this.disabled : undefined, tabindex: this.disabled ? '-1' : undefined, type: isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined, name: isButton ? this.name : undefined, value: isButton ? this.value : undefined, href: isLink ? this.href : undefined, target: isLink && this.target != null ? this.target : undefined, download: isLink && this.download != null ? this.download : undefined, rel: isLink && this.target != null ? 'noreferrer noopener' : undefined, onBlur: this.handleBlur, onFocus: this.handleFocus, "data-testid": "button" }, h("span", { part: "prefix", class: "button__prefix" }, h("slot", { onSlotchange: this.handleSlotChange, name: "prefix" })), h("span", { part: "label", class: "button__label" }, h("slot", { onSlotchange: this.handleSlotChange })), h("span", { part: "suffix", class: "button__suffix" }, h("slot", { onSlotchange: this.handleSlotChange, name: "suffix" })), this.caret && (h("span", { part: "caret", class: "button__caret" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { points: "6 9 12 15 18 9" })))), this.loading && h("six-spinner", null))));
|
|
100
|
-
}
|
|
101
|
-
get host() { return this; }
|
|
102
|
-
static get style() { return sixButtonCss; }
|
|
103
|
-
}, [1, "six-button", {
|
|
104
|
-
"type": [513],
|
|
105
|
-
"size": [513],
|
|
106
|
-
"caret": [4],
|
|
107
|
-
"disabled": [516],
|
|
108
|
-
"loading": [516],
|
|
109
|
-
"pill": [516],
|
|
110
|
-
"circle": [516],
|
|
111
|
-
"submit": [516],
|
|
112
|
-
"reset": [516],
|
|
113
|
-
"name": [1],
|
|
114
|
-
"value": [1],
|
|
115
|
-
"href": [1],
|
|
116
|
-
"target": [1],
|
|
117
|
-
"download": [1],
|
|
118
|
-
"hasFocus": [32],
|
|
119
|
-
"hasLabel": [32],
|
|
120
|
-
"hasPrefix": [32],
|
|
121
|
-
"hasSuffix": [32],
|
|
122
|
-
"setFocus": [64],
|
|
123
|
-
"removeFocus": [64]
|
|
124
|
-
}]);
|
|
125
|
-
function defineCustomElement$1() {
|
|
126
|
-
if (typeof customElements === "undefined") {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
const components = ["six-button", "six-spinner"];
|
|
130
|
-
components.forEach(tagName => { switch (tagName) {
|
|
131
|
-
case "six-button":
|
|
132
|
-
if (!customElements.get(tagName)) {
|
|
133
|
-
customElements.define(tagName, SixButton$1);
|
|
134
|
-
}
|
|
135
|
-
break;
|
|
136
|
-
case "six-spinner":
|
|
137
|
-
if (!customElements.get(tagName)) {
|
|
138
|
-
defineCustomElement$2();
|
|
139
|
-
}
|
|
140
|
-
break;
|
|
141
|
-
} });
|
|
142
|
-
}
|
|
1
|
+
import { S as SixButton$1, d as defineCustomElement$1 } from './six-button2.js';
|
|
143
2
|
|
|
144
3
|
const SixButton = SixButton$1;
|
|
145
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-button.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,06QAA06Q;;MC2Bl7QA,WAAS;;;;;;;QA2EZ,qBAAgB,GAAG;YACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC9C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;SAC/C,CAAC;QAEM,eAAU,GAAG;YACnB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;SACrB,CAAC;QAEM,gBAAW,GAAG;YACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,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"],"sources":["src/components/six-button/six-button.scss?tag=six-button&encapsulation=shadow","src/components/six-button/six-button.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n width: auto;\n cursor: pointer;\n}\n\n.button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--six-border-width);\n border-radius: 0;\n font-family: var(--six-font-family);\n font-weight: var(--six-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition: var(--six-transition-fast) background-color, var(--six-transition-fast) color,\n var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;\n cursor: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &.button--disabled {\n pointer-events: none;\n }\n\n // Clicks on icons shouldn't prevent the button from gaining focus\n ::slotted(six-icon) {\n pointer-events: none;\n }\n}\n\n.button-wrapper--disabled {\n cursor: not-allowed;\n}\n\n.button__prefix,\n.button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Standard buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button {\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: var(--six-focus-ring-offset);\n }\n\n &.button--secondary {\n background-color: var(--six-color-white);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n border-color: var(--six-color-web-rock-400);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-900);\n border-width: 1px;\n }\n }\n\n &.button--primary {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-800);\n border-color: var(--six-color-web-rock-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n opacity: 70%;\n }\n }\n\n &.button--link {\n background-color: transparent;\n border-color: transparent;\n color: var(--six-color-action-500);\n\n &.button--disabled {\n color: var(--six-color-web-rock-400);\n }\n\n &:hover:not(.button--disabled) {\n color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n color: var(--six-color-action-light-to-be-defined);\n }\n }\n\n &.button--danger {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-danger-900);\n border-color: var(--six-color-danger-900);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n opacity: 70%;\n }\n }\n\n &.button--warning {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-warning-800);\n border-color: var(--six-color-warning-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n opacity: 70%;\n }\n }\n\n &.button--success {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-success-600);\n border-color: var(--six-color-success-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n opacity: 70%;\n }\n }\n\n &.button--action {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-action-600);\n border-color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--small {\n font-size: var(--six-button-font-size-small);\n height: var(--six-height-small);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n}\n\n.button--medium {\n font-size: var(--six-button-font-size-medium);\n height: var(--six-height-medium);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n}\n\n.button--large {\n font-size: var(--six-button-font-size-large);\n height: var(--six-height-large);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--pill {\n &.button--small {\n border-radius: var(--six-height-small);\n }\n\n &.button--medium {\n border-radius: var(--six-height-medium);\n }\n\n &.button--large {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Circle modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--circle {\n padding-left: 0;\n padding-right: 0;\n font-size: revert;\n\n &.button--small {\n width: var(--six-height-small);\n border-radius: 50%;\n }\n\n &.button--medium {\n width: var(--six-height-medium);\n border-radius: 50%;\n }\n\n &.button--large {\n width: var(--six-height-large);\n border-radius: 50%;\n }\n\n .button__prefix,\n .button__suffix,\n .button__caret {\n display: none;\n\n svg {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Caret modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--caret {\n .button__suffix {\n display: none;\n }\n\n .button__caret {\n display: flex;\n align-items: center;\n\n svg {\n color: var(--six-color-web-rock-900);\n width: 1em;\n height: 1em;\n }\n }\n}\n\n.button--primary,\n.button--action,\n.button--danger {\n .button__caret {\n svg {\n color: var(--six-color-white);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Loading modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--loading {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n\n six-spinner {\n --indicator-color: currentColor;\n position: absolute;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Badges\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button ::slotted(six-badge) {\n position: absolute;\n top: 0;\n right: 0;\n transform: translateY(-50%) translateX(50%);\n pointer-events: none;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button spacing\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--has-label {\n &.button--small .button__label {\n padding: 0 var(--six-spacing-small);\n }\n\n &.button--medium .button__label {\n padding: 0 var(--six-spacing-medium);\n }\n\n &.button--large .button__label {\n padding: 0 var(--six-spacing-large);\n }\n}\n\n.button--has-prefix {\n &.button--small {\n padding-left: var(--six-spacing-x-small);\n\n .button__label {\n padding-left: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n}\n\n.button--has-suffix,\n.button--caret {\n &.button--small {\n padding-right: var(--six-spacing-x-small);\n\n .button__label {\n padding-right: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\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 button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'secondary' | 'primary' | 'link' | 'success' | 'warning' | 'danger' | 'action' =\n 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div onClick={this.handleClick} class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"six-button.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|