@six-group/ui-library 0.0.0-insider.daba936 → 0.0.0-insider.dd46619
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/{form-control-72186fcc.js → form-control-de259450.js} +2 -2
- package/dist/cjs/{form-control-72186fcc.js.map → form-control-de259450.js.map} +1 -1
- package/dist/cjs/{index-5dd19c4b.js → index-1f707a55.js} +76 -44
- package/dist/cjs/index-1f707a55.js.map +1 -0
- 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/six-alert.cjs.entry.js +17 -7
- package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +4 -3
- package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-badge.cjs.entry.js +5 -4
- package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/six-button.cjs.entry.js +5 -4
- package/dist/cjs/six-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-card.cjs.entry.js +4 -3
- package/dist/cjs/six-card.cjs.entry.js.map +1 -1
- package/dist/cjs/six-checkbox_2.cjs.entry.js +11 -9
- package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-datepicker.cjs.entry.js +30 -4
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +6 -5
- package/dist/cjs/six-details.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dialog.cjs.entry.js +14 -30
- package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/six-drawer.cjs.entry.js +13 -30
- package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dropdown_2.cjs.entry.js +17 -13
- 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 +5 -4
- 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 +4 -3
- package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +5 -4
- package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
- package/dist/cjs/six-header.cjs.entry.js +13 -12
- package/dist/cjs/six-header.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +6 -5
- package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon.cjs.entry.js +5 -4
- package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/six-input.cjs.entry.js +7 -6
- package/dist/cjs/six-input.cjs.entry.js.map +1 -1
- package/dist/cjs/six-item-picker.cjs.entry.js +6 -5
- 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 +4 -3
- package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/six-menu-label.cjs.entry.js +4 -3
- 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 +5 -4
- package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-progress-ring.cjs.entry.js +4 -3
- package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +5 -4
- package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/six-range.cjs.entry.js +17 -6
- 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 +4 -3
- package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
- package/dist/cjs/six-select.cjs.entry.js +13 -9
- package/dist/cjs/six-select.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +4 -3
- 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 +5 -4
- package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-spinner.cjs.entry.js +3 -2
- 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 +6 -5
- package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-group.cjs.entry.js +34 -8
- package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js +4 -3
- package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +5 -4
- package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +5 -4
- package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/six-textarea.cjs.entry.js +6 -5
- package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tile.cjs.entry.js +6 -5
- package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js +4 -3
- package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +5 -4
- package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/ui-library.cjs.js +6 -4
- package/dist/cjs/ui-library.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +4 -5
- package/dist/collection/components/six-alert/six-alert.js +15 -6
- package/dist/collection/components/six-alert/six-alert.js.map +1 -1
- 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.js +2 -2
- package/dist/collection/components/six-badge/six-badge.js.map +1 -1
- package/dist/collection/components/six-button/six-button.js +2 -2
- 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.js +1 -1
- package/dist/collection/components/six-card/six-card.js.map +1 -1
- package/dist/collection/components/six-checkbox/six-checkbox.css +2 -0
- package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
- package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.js +4 -4
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
- 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.js +10 -28
- package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
- 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.js +10 -8
- package/dist/collection/components/six-dropdown/six-dropdown.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.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 +11 -0
- 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.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.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.js +10 -10
- package/dist/collection/components/six-header/six-header.js.map +1 -1
- package/dist/collection/components/six-header/test/six-header.spec.js +4 -4
- package/dist/collection/components/six-header/test/six-header.spec.js.map +1 -1
- 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.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.js +3 -3
- package/dist/collection/components/six-input/six-input.js.map +1 -1
- package/dist/collection/components/six-item-picker/six-item-picker.js +3 -3
- package/dist/collection/components/six-item-picker/six-item-picker.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.js +2 -2
- package/dist/collection/components/six-menu/six-menu.js.map +1 -1
- package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
- 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.js +2 -2
- package/dist/collection/components/six-menu-item/six-menu-item.js.map +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.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.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.js +2 -2
- package/dist/collection/components/six-radio/six-radio.js.map +1 -1
- package/dist/collection/components/six-range/six-range.css +1 -1
- package/dist/collection/components/six-range/six-range.js +12 -2
- 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.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.js +9 -6
- package/dist/collection/components/six-select/six-select.js.map +1 -1
- package/dist/collection/components/six-select/util.js.map +1 -1
- package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
- 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 +1 -0
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
- package/dist/collection/components/six-switch/six-switch.js +2 -2
- package/dist/collection/components/six-switch/six-switch.js.map +1 -1
- package/dist/collection/components/six-tab/six-tab.js +2 -2
- package/dist/collection/components/six-tab/six-tab.js.map +1 -1
- package/dist/collection/components/six-tab-group/six-tab-group.js +33 -7
- package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
- package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +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.js +2 -2
- 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.js +3 -3
- package/dist/collection/components/six-tile/six-tile.js.map +1 -1
- package/dist/collection/components/six-timepicker/six-timepicker.js +1 -1
- 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.js +2 -2
- package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
- package/dist/collection/utils/alert.js.map +1 -1
- 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.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.map +1 -1
- package/dist/collection/utils/scroll.js.map +1 -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 +0 -2
- 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 +16 -6
- package/dist/components/six-alert.js.map +1 -1
- package/dist/components/six-avatar.js +3 -2
- package/dist/components/six-avatar.js.map +1 -1
- package/dist/components/six-badge.js +4 -3
- package/dist/components/six-badge.js.map +1 -1
- package/dist/components/six-button2.js +4 -3
- package/dist/components/six-button2.js.map +1 -1
- package/dist/components/six-card.js +3 -2
- package/dist/components/six-card.js.map +1 -1
- package/dist/components/six-checkbox2.js +5 -4
- package/dist/components/six-checkbox2.js.map +1 -1
- package/dist/components/six-datepicker.js +29 -3
- package/dist/components/six-datepicker.js.map +1 -1
- package/dist/components/six-details2.js +5 -4
- package/dist/components/six-details2.js.map +1 -1
- package/dist/components/six-dialog.js +13 -29
- package/dist/components/six-dialog.js.map +1 -1
- package/dist/components/six-drawer.js +12 -29
- package/dist/components/six-drawer.js.map +1 -1
- package/dist/components/six-dropdown2.js +12 -9
- 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 +4 -3
- 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 +3 -2
- package/dist/components/six-footer.js.map +1 -1
- package/dist/components/six-group-label.js +3 -2
- package/dist/components/six-group-label.js.map +1 -1
- package/dist/components/six-header.js +12 -11
- package/dist/components/six-header.js.map +1 -1
- package/dist/components/six-icon-button2.js +5 -4
- package/dist/components/six-icon-button2.js.map +1 -1
- package/dist/components/six-icon2.js +4 -3
- package/dist/components/six-icon2.js.map +1 -1
- package/dist/components/six-input2.js +5 -4
- package/dist/components/six-input2.js.map +1 -1
- package/dist/components/six-item-picker2.js +5 -4
- 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 +3 -2
- package/dist/components/six-menu-divider.js.map +1 -1
- package/dist/components/six-menu-item2.js +4 -3
- package/dist/components/six-menu-item2.js.map +1 -1
- package/dist/components/six-menu-label.js +3 -2
- package/dist/components/six-menu-label.js.map +1 -1
- package/dist/components/six-menu2.js +4 -3
- 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 +4 -3
- package/dist/components/six-progress-bar.js.map +1 -1
- package/dist/components/six-progress-ring.js +3 -2
- package/dist/components/six-progress-ring.js.map +1 -1
- package/dist/components/six-radio.js +4 -3
- 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 +3 -2
- package/dist/components/six-search-field.js.map +1 -1
- package/dist/components/six-select.js +11 -7
- 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 +4 -3
- package/dist/components/six-sidebar.js.map +1 -1
- package/dist/components/six-spinner2.js +2 -1
- package/dist/components/six-spinner2.js.map +1 -1
- package/dist/components/six-stage-indicator2.js +2 -1
- package/dist/components/six-stage-indicator2.js.map +1 -1
- package/dist/components/six-switch.js +4 -3
- package/dist/components/six-switch.js.map +1 -1
- package/dist/components/six-tab-group.js +35 -8
- package/dist/components/six-tab-group.js.map +1 -1
- package/dist/components/six-tab-panel.js +3 -2
- package/dist/components/six-tab-panel.js.map +1 -1
- package/dist/components/six-tab.js +4 -3
- package/dist/components/six-tab.js.map +1 -1
- package/dist/components/six-tag.js +4 -3
- package/dist/components/six-tag.js.map +1 -1
- package/dist/components/six-textarea.js +4 -3
- package/dist/components/six-textarea.js.map +1 -1
- package/dist/components/six-tile.js +5 -4
- package/dist/components/six-tile.js.map +1 -1
- package/dist/components/six-timepicker2.js +3 -2
- package/dist/components/six-timepicker2.js.map +1 -1
- package/dist/components/six-tooltip2.js +4 -3
- package/dist/components/six-tooltip2.js.map +1 -1
- package/dist/components.json +116 -114
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/{form-control-77fcccd0.js → form-control-30c5bd8b.js} +2 -2
- package/dist/esm/{form-control-77fcccd0.js.map → form-control-30c5bd8b.js.map} +1 -1
- package/dist/esm/{index-6c10d50b.js → index-5390c1d6.js} +76 -44
- package/dist/esm/index-5390c1d6.js.map +1 -0
- 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/six-alert.entry.js +17 -7
- package/dist/esm/six-alert.entry.js.map +1 -1
- package/dist/esm/six-avatar.entry.js +4 -3
- package/dist/esm/six-avatar.entry.js.map +1 -1
- package/dist/esm/six-badge.entry.js +5 -4
- package/dist/esm/six-badge.entry.js.map +1 -1
- package/dist/esm/six-button.entry.js +5 -4
- package/dist/esm/six-button.entry.js.map +1 -1
- package/dist/esm/six-card.entry.js +4 -3
- package/dist/esm/six-card.entry.js.map +1 -1
- package/dist/esm/six-checkbox_2.entry.js +11 -9
- package/dist/esm/six-checkbox_2.entry.js.map +1 -1
- package/dist/esm/six-datepicker.entry.js +30 -4
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +6 -5
- package/dist/esm/six-details.entry.js.map +1 -1
- package/dist/esm/six-dialog.entry.js +14 -30
- package/dist/esm/six-dialog.entry.js.map +1 -1
- package/dist/esm/six-drawer.entry.js +13 -30
- package/dist/esm/six-drawer.entry.js.map +1 -1
- package/dist/esm/six-dropdown_2.entry.js +17 -13
- 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 +5 -4
- 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 +4 -3
- package/dist/esm/six-footer.entry.js.map +1 -1
- package/dist/esm/six-group-label.entry.js +5 -4
- package/dist/esm/six-group-label.entry.js.map +1 -1
- package/dist/esm/six-header.entry.js +13 -12
- package/dist/esm/six-header.entry.js.map +1 -1
- package/dist/esm/six-icon-button.entry.js +6 -5
- package/dist/esm/six-icon-button.entry.js.map +1 -1
- package/dist/esm/six-icon.entry.js +5 -4
- package/dist/esm/six-icon.entry.js.map +1 -1
- package/dist/esm/six-input.entry.js +7 -6
- package/dist/esm/six-input.entry.js.map +1 -1
- package/dist/esm/six-item-picker.entry.js +6 -5
- 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 +4 -3
- package/dist/esm/six-menu-divider.entry.js.map +1 -1
- package/dist/esm/six-menu-label.entry.js +4 -3
- 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 +5 -4
- package/dist/esm/six-progress-bar.entry.js.map +1 -1
- package/dist/esm/six-progress-ring.entry.js +4 -3
- package/dist/esm/six-progress-ring.entry.js.map +1 -1
- package/dist/esm/six-radio.entry.js +5 -4
- package/dist/esm/six-radio.entry.js.map +1 -1
- package/dist/esm/six-range.entry.js +17 -6
- 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 +4 -3
- package/dist/esm/six-search-field.entry.js.map +1 -1
- package/dist/esm/six-select.entry.js +13 -9
- package/dist/esm/six-select.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item-group.entry.js +4 -3
- 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 +5 -4
- package/dist/esm/six-sidebar.entry.js.map +1 -1
- package/dist/esm/six-spinner.entry.js +3 -2
- 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 +6 -5
- package/dist/esm/six-switch.entry.js.map +1 -1
- package/dist/esm/six-tab-group.entry.js +34 -8
- package/dist/esm/six-tab-group.entry.js.map +1 -1
- package/dist/esm/six-tab-panel.entry.js +4 -3
- package/dist/esm/six-tab-panel.entry.js.map +1 -1
- package/dist/esm/six-tab.entry.js +5 -4
- package/dist/esm/six-tab.entry.js.map +1 -1
- package/dist/esm/six-tag.entry.js +5 -4
- package/dist/esm/six-tag.entry.js.map +1 -1
- package/dist/esm/six-textarea.entry.js +6 -5
- package/dist/esm/six-textarea.entry.js.map +1 -1
- package/dist/esm/six-tile.entry.js +6 -5
- package/dist/esm/six-tile.entry.js.map +1 -1
- package/dist/esm/six-timepicker.entry.js +4 -3
- package/dist/esm/six-timepicker.entry.js.map +1 -1
- package/dist/esm/six-tooltip.entry.js +5 -4
- package/dist/esm/six-tooltip.entry.js.map +1 -1
- 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 +8 -4
- 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-file-upload/six-file-upload.d.ts +10 -0
- 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-tab-group/six-tab-group.d.ts +4 -1
- package/dist/types/components.d.ts +28 -54
- package/dist/types/utils/date-util.d.ts +9 -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-2cd674e0.entry.js → p-03d1b956.entry.js} +2 -2
- 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-1431a2a8.entry.js → p-060069d4.entry.js} +2 -2
- 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-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-16fb5aad.entry.js +2 -0
- package/dist/ui-library/p-16fb5aad.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-a036cc6f.entry.js → p-2386627e.entry.js} +2 -2
- 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-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-1b135e1c.entry.js → p-3b5a76ea.entry.js} +2 -2
- 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-88767c27.entry.js → p-4963f03c.entry.js} +2 -2
- 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-67496e8c.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-4a3ba956.entry.js → p-6f9153be.entry.js} +2 -2
- package/dist/ui-library/p-6f9153be.entry.js.map +1 -0
- package/dist/ui-library/p-73be87a7.entry.js +2 -0
- package/dist/ui-library/p-73be87a7.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-89db9a8b.entry.js +2 -0
- package/dist/ui-library/p-89db9a8b.entry.js.map +1 -0
- package/dist/ui-library/{p-831517cd.entry.js → p-8f1d3461.entry.js} +2 -2
- package/dist/ui-library/p-8f1d3461.entry.js.map +1 -0
- package/dist/ui-library/{p-e340a0ad.entry.js → p-9bc1639b.entry.js} +2 -2
- 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-d702b6ec.entry.js → p-a8863197.entry.js} +2 -2
- 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-2132da0a.entry.js → p-ac00076d.entry.js} +2 -2
- 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-b60c632a.entry.js +2 -0
- package/dist/ui-library/p-b60c632a.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-8c38a7bd.entry.js → p-cf109cbf.entry.js} +2 -2
- 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-021f6da9.entry.js → p-d42f1ea9.entry.js} +2 -2
- package/dist/ui-library/p-d42f1ea9.entry.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-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/p-ff2339a6.entry.js +2 -0
- package/dist/ui-library/p-ff2339a6.entry.js.map +1 -0
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -1
- package/package.json +6 -6
- package/dist/cjs/index-5dd19c4b.js.map +0 -1
- package/dist/cjs/modal-3ce015be.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/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/esm/index-6c10d50b.js.map +0 -1
- package/dist/esm/modal-96526245.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/types/utils/support.d.ts +0 -1
- package/dist/types/wrappers/set-attributes/set-attributes.d.ts +0 -9
- package/dist/ui-library/p-01ae4500.entry.js +0 -2
- package/dist/ui-library/p-01ae4500.entry.js.map +0 -1
- package/dist/ui-library/p-021f6da9.entry.js.map +0 -1
- package/dist/ui-library/p-0274c52c.entry.js +0 -2
- package/dist/ui-library/p-0274c52c.entry.js.map +0 -1
- package/dist/ui-library/p-0cb135aa.entry.js +0 -2
- package/dist/ui-library/p-0cb135aa.entry.js.map +0 -1
- package/dist/ui-library/p-1431a2a8.entry.js.map +0 -1
- package/dist/ui-library/p-1aa28025.entry.js +0 -2
- package/dist/ui-library/p-1aa28025.entry.js.map +0 -1
- package/dist/ui-library/p-1b135e1c.entry.js.map +0 -1
- package/dist/ui-library/p-1be990f9.entry.js +0 -2
- package/dist/ui-library/p-1be990f9.entry.js.map +0 -1
- package/dist/ui-library/p-2008636b.entry.js +0 -2
- package/dist/ui-library/p-2008636b.entry.js.map +0 -1
- package/dist/ui-library/p-2132da0a.entry.js.map +0 -1
- package/dist/ui-library/p-2cd674e0.entry.js.map +0 -1
- package/dist/ui-library/p-2d86ba99.entry.js +0 -2
- package/dist/ui-library/p-2d86ba99.entry.js.map +0 -1
- package/dist/ui-library/p-31a4a74c.entry.js +0 -2
- package/dist/ui-library/p-31a4a74c.entry.js.map +0 -1
- package/dist/ui-library/p-391f10f1.entry.js +0 -2
- package/dist/ui-library/p-391f10f1.entry.js.map +0 -1
- package/dist/ui-library/p-3dd28dc0.entry.js +0 -2
- package/dist/ui-library/p-3dd28dc0.entry.js.map +0 -1
- package/dist/ui-library/p-46ee280d.entry.js +0 -2
- package/dist/ui-library/p-46ee280d.entry.js.map +0 -1
- package/dist/ui-library/p-4752a63c.entry.js +0 -2
- package/dist/ui-library/p-4752a63c.entry.js.map +0 -1
- package/dist/ui-library/p-4772a9d3.entry.js +0 -2
- package/dist/ui-library/p-4772a9d3.entry.js.map +0 -1
- package/dist/ui-library/p-4a3ba956.entry.js.map +0 -1
- package/dist/ui-library/p-4b154936.entry.js +0 -2
- package/dist/ui-library/p-4b154936.entry.js.map +0 -1
- package/dist/ui-library/p-5a5f6869.entry.js +0 -2
- package/dist/ui-library/p-5a5f6869.entry.js.map +0 -1
- package/dist/ui-library/p-621c2742.entry.js +0 -2
- package/dist/ui-library/p-621c2742.entry.js.map +0 -1
- package/dist/ui-library/p-65778e3d.entry.js +0 -2
- package/dist/ui-library/p-65778e3d.entry.js.map +0 -1
- package/dist/ui-library/p-66cd3b0c.entry.js +0 -2
- package/dist/ui-library/p-66cd3b0c.entry.js.map +0 -1
- package/dist/ui-library/p-78529c8c.entry.js +0 -2
- package/dist/ui-library/p-78529c8c.entry.js.map +0 -1
- package/dist/ui-library/p-7eb592a8.entry.js +0 -2
- package/dist/ui-library/p-7eb592a8.entry.js.map +0 -1
- package/dist/ui-library/p-831517cd.entry.js.map +0 -1
- package/dist/ui-library/p-87e197ee.entry.js +0 -2
- package/dist/ui-library/p-87e197ee.entry.js.map +0 -1
- package/dist/ui-library/p-88767c27.entry.js.map +0 -1
- package/dist/ui-library/p-8c38a7bd.entry.js.map +0 -1
- package/dist/ui-library/p-943ce0f2.entry.js +0 -2
- package/dist/ui-library/p-943ce0f2.entry.js.map +0 -1
- package/dist/ui-library/p-979eabb5.entry.js +0 -2
- package/dist/ui-library/p-979eabb5.entry.js.map +0 -1
- package/dist/ui-library/p-98ce9502.entry.js +0 -2
- package/dist/ui-library/p-98ce9502.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-a036cc6f.entry.js.map +0 -1
- package/dist/ui-library/p-a29f6a0e.entry.js +0 -2
- package/dist/ui-library/p-a29f6a0e.entry.js.map +0 -1
- package/dist/ui-library/p-a3fd8c74.entry.js +0 -2
- package/dist/ui-library/p-a3fd8c74.entry.js.map +0 -1
- package/dist/ui-library/p-a919b557.entry.js +0 -2
- package/dist/ui-library/p-a919b557.entry.js.map +0 -1
- package/dist/ui-library/p-ace4ec84.entry.js +0 -2
- package/dist/ui-library/p-ace4ec84.entry.js.map +0 -1
- package/dist/ui-library/p-adf5a4da.entry.js +0 -2
- package/dist/ui-library/p-adf5a4da.entry.js.map +0 -1
- package/dist/ui-library/p-b5f844f7.entry.js +0 -2
- package/dist/ui-library/p-b5f844f7.entry.js.map +0 -1
- package/dist/ui-library/p-b8ea574b.entry.js +0 -2
- package/dist/ui-library/p-b8ea574b.entry.js.map +0 -1
- package/dist/ui-library/p-bff679fa.entry.js +0 -2
- package/dist/ui-library/p-bff679fa.entry.js.map +0 -1
- package/dist/ui-library/p-ca63a6fa.js +0 -3
- package/dist/ui-library/p-ca63a6fa.js.map +0 -1
- package/dist/ui-library/p-d221d86a.entry.js +0 -2
- package/dist/ui-library/p-d221d86a.entry.js.map +0 -1
- package/dist/ui-library/p-d702b6ec.entry.js.map +0 -1
- package/dist/ui-library/p-db9d2fde.entry.js +0 -2
- package/dist/ui-library/p-db9d2fde.entry.js.map +0 -1
- package/dist/ui-library/p-e0dd0307.entry.js +0 -2
- package/dist/ui-library/p-e0dd0307.entry.js.map +0 -1
- package/dist/ui-library/p-e340a0ad.entry.js.map +0 -1
- package/dist/ui-library/p-f640731b.entry.js +0 -2
- package/dist/ui-library/p-f640731b.entry.js.map +0 -1
- package/dist/ui-library/p-fce214eb.entry.js +0 -2
- package/dist/ui-library/p-fce214eb.entry.js.map +0 -1
- package/dist/ui-library/p-fe87f64b.entry.js +0 -2
- package/dist/ui-library/p-fe87f64b.entry.js.map +0 -1
- /package/dist/ui-library/{p-67496e8c.js.map → p-605bdd81.js.map} +0 -0
|
@@ -9,7 +9,7 @@ import { h } from "@stencil/core";
|
|
|
9
9
|
*/
|
|
10
10
|
export class SixMenuDivider {
|
|
11
11
|
render() {
|
|
12
|
-
return h("div", { part: "base", class: "menu-divider", role: "separator", "aria-hidden": "true" });
|
|
12
|
+
return h("div", { key: '41a61bd4110bfb44f10211c350afcebe5c5971df', part: "base", class: "menu-divider", role: "separator", "aria-hidden": "true" });
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "six-menu-divider"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-menu-divider.js","sourceRoot":"","sources":["../../../src/components/six-menu-divider/six-menu-divider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;GAOG;AAOH,MAAM,OAAO,cAAc;IACzB,MAAM;QACJ,OAAO,
|
|
1
|
+
{"version":3,"file":"six-menu-divider.js","sourceRoot":"","sources":["../../../src/components/six-menu-divider/six-menu-divider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;GAOG;AAOH,MAAM,OAAO,cAAc;IACzB,MAAM;QACJ,OAAO,4DAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,WAAW,iBAAa,MAAM,GAAG,CAAC;IACtF,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-menu-divider',\n styleUrl: 'six-menu-divider.scss',\n shadow: true,\n})\nexport class SixMenuDivider {\n render() {\n return <div part=\"base\" class=\"menu-divider\" role=\"separator\" aria-hidden=\"true\" />;\n }\n}\n"]}
|
|
@@ -63,13 +63,13 @@ export class SixMenuItem {
|
|
|
63
63
|
this.hasFocus = false;
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
return (h("div", { ref: (el) => (this.menuItem = el), part: "base", class: {
|
|
66
|
+
return (h("div", { key: 'd8c10ca0fc9bd795b87790337f2cc0c792999685', ref: (el) => (this.menuItem = el), part: "base", class: {
|
|
67
67
|
'menu-item': true,
|
|
68
68
|
'menu-item--checked': this.checked,
|
|
69
69
|
'menu-item--disabled': this.disabled,
|
|
70
70
|
'menu-item--focused': this.hasFocus,
|
|
71
71
|
'menu-item--active': this.active,
|
|
72
|
-
}, role: "menuitem", "aria-disabled": this.disabled ? 'true' : 'false', "aria-checked": this.checked ? 'true' : 'false', tabIndex: !this.disabled ? 0 : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, this.checkType === 'checkbox' && (h("span", { class: "menu-item__checkbox" }, h("six-checkbox", { "onSix-checkbox-change": this.handleCheckboxChange, disabled: this.disabled, checked: this.checked }))), h("span", { part: "prefix", class: "menu-item__prefix" }, h("slot", { name: "prefix" })), h("span", { part: "label", class: "menu-item__label" }, h("slot", { ref: (el) => (this.defaultSlot = el) })), h("span", { part: "suffix", class: "menu-item__suffix" }, h("slot", { name: "suffix" })), this.checkType === 'check' && (h("span", { part: "checked-icon", class: "menu-item__check" }, h("six-icon", { size: "small", "aria-hidden": "true" }, "check")))));
|
|
72
|
+
}, role: "menuitem", "aria-disabled": this.disabled ? 'true' : 'false', "aria-checked": this.checked ? 'true' : 'false', tabIndex: !this.disabled ? 0 : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, this.checkType === 'checkbox' && (h("span", { class: "menu-item__checkbox" }, h("six-checkbox", { "onSix-checkbox-change": this.handleCheckboxChange, disabled: this.disabled, checked: this.checked }))), h("span", { key: '470f2fee47a4120c0dead3b7996220af9e5274d1', part: "prefix", class: "menu-item__prefix" }, h("slot", { key: 'fdddb68cb266d02f6a6a2b46ffcdecb1d8eb32db', name: "prefix" })), h("span", { key: '6d9fe694ce0e07f2aac3604b905f9194f4764057', part: "label", class: "menu-item__label" }, h("slot", { key: 'ef2903a04191f78955802da5edefd32583305068', ref: (el) => (this.defaultSlot = el) })), h("span", { key: 'd4f6ee6c2789c33deaf08eb585ec7ca283b59170', part: "suffix", class: "menu-item__suffix" }, h("slot", { key: '39a1d59be3d1f9deda4c55b1575a72c647600783', name: "suffix" })), this.checkType === 'check' && (h("span", { part: "checked-icon", class: "menu-item__check" }, h("six-icon", { size: "small", "aria-hidden": "true" }, "check")))));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "six-menu-item"; }
|
|
75
75
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-menu-item.js","sourceRoot":"","sources":["../../../src/components/six-menu-item/six-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AAOH,MAAM,OAAO,WAAW;;QAkEd,yBAAoB,GAAG,GAAG,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACnF,CAAC,CAAC;wBA9DkB,KAAK;sBAEP,KAAK;yBAGmB,OAAO;uBAId,KAAK;qBAGP,EAAE;wBAGC,KAAK;;IAEzC,iBAAiB;QACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CA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ACjB;YAEP,6DAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,kBAAkB;gBACzC,6DAAM,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAqB,CAAC,GAAI,CAC5D;YAEP,6DAAM,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,mBAAmB;gBAC3C,6DAAM,IAAI,EAAC,QAAQ,GAAG,CACjB;YAEN,IAAI,CAAC,SAAS,KAAK,OAAO,IAAI,CAC7B,YAAM,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,kBAAkB;gBAChD,gBAAU,IAAI,EAAC,OAAO,iBAAa,MAAM,YAE9B,CACN,CACR,CACG,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Method, Prop, State } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu item's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @part base - The component's base wrapper.\n * @part checked-icon - The container that wraps the checked icon.\n * @part prefix - The prefix container.\n * @part label - The menu item label.\n * @part suffix - The suffix container.\n */\n\n@Component({\n tag: 'six-menu-item',\n styleUrl: 'six-menu-item.scss',\n shadow: true,\n})\nexport class SixMenuItem {\n private menuItem?: HTMLElement;\n private defaultSlot?: HTMLSlotElement;\n\n @Element() host!: HTMLSixMenuItemElement;\n\n @State() hasFocus = false;\n\n @State() active = false;\n\n /** Defines if the checked state is displayed as a checkbox or a check-icon */\n @Prop() checkType: 'checkbox' | 'check' = 'check';\n\n /** Internal: Draws the item in a checked state. CheckType needs to be set to 'checkbox' or 'check' to show the\n * checked state */\n @Prop({ reflect: true }) checked = false;\n\n /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the menu item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n connectedCallback() {\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.handleCheckboxChange = this.handleCheckboxChange.bind(this);\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.menuItem?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.menuItem?.blur();\n }\n\n /** Returns a text label based on the contents of the menu item's default slot. */\n @Method()\n getTextLabel() {\n return Promise.resolve(getTextContent(this.defaultSlot));\n }\n\n private handleBlur() {\n this.hasFocus = false;\n }\n\n private handleFocus() {\n this.hasFocus = true;\n }\n\n private handleMouseEnter() {\n this.active = true;\n }\n\n private handleMouseLeave() {\n this.active = false;\n this.hasFocus = false;\n }\n\n private handleCheckboxChange = () => {\n this.host.dispatchEvent(new Event('click', { bubbles: true, cancelable: true }));\n };\n\n render() {\n return (\n <div\n ref={(el) => (this.menuItem = el)}\n part=\"base\"\n class={{\n 'menu-item': true,\n 'menu-item--checked': this.checked,\n 'menu-item--disabled': this.disabled,\n 'menu-item--focused': this.hasFocus,\n 'menu-item--active': this.active,\n }}\n role=\"menuitem\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-checked={this.checked ? 'true' : 'false'}\n tabIndex={!this.disabled ? 0 : undefined}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n {this.checkType === 'checkbox' && (\n <span class=\"menu-item__checkbox\">\n <six-checkbox\n onSix-checkbox-change={this.handleCheckboxChange}\n disabled={this.disabled}\n checked={this.checked}\n ></six-checkbox>\n </span>\n )}\n\n <span part=\"prefix\" class=\"menu-item__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <span part=\"label\" class=\"menu-item__label\">\n <slot ref={(el) => (this.defaultSlot = el as HTMLSlotElement)} />\n </span>\n\n <span part=\"suffix\" class=\"menu-item__suffix\">\n <slot name=\"suffix\" />\n </span>\n\n {this.checkType === 'check' && (\n <span part=\"checked-icon\" class=\"menu-item__check\">\n <six-icon size=\"small\" aria-hidden=\"true\">\n check\n </six-icon>\n </span>\n )}\n </div>\n );\n }\n}\n"]}
|
|
@@ -11,7 +11,7 @@ import { h } from "@stencil/core";
|
|
|
11
11
|
*/
|
|
12
12
|
export class SixMenuLabel {
|
|
13
13
|
render() {
|
|
14
|
-
return (h("div", { part: "base", class: "menu-label" }, h("slot",
|
|
14
|
+
return (h("div", { key: '5183d165a877bd2ca0c25d4ff61d55200b66132d', part: "base", class: "menu-label" }, h("slot", { key: '5adecf55a82a78de5eee401aeec442f7e60e0874' })));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "six-menu-label"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-menu-label.js","sourceRoot":"","sources":["../../../src/components/six-menu-label/six-menu-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;;;GASG;AAOH,MAAM,OAAO,YAAY;IACvB,MAAM;QACJ,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"six-menu-label.js","sourceRoot":"","sources":["../../../src/components/six-menu-label/six-menu-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;;;GASG;AAOH,MAAM,OAAO,YAAY;IACvB,MAAM;QACJ,OAAO,CACL,4DAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,YAAY;YACjC,8DAAQ,CACJ,CACP,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu label's content.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-menu-label',\n styleUrl: 'six-menu-label.scss',\n shadow: true,\n})\nexport class SixMenuLabel {\n render() {\n return (\n <div part=\"base\" class=\"menu-label\">\n <slot />\n </div>\n );\n }\n}\n"]}
|
|
@@ -12,7 +12,7 @@ export class SixPicto {
|
|
|
12
12
|
render() {
|
|
13
13
|
var _a;
|
|
14
14
|
const iconName = (_a = this.host.innerHTML) === null || _a === void 0 ? void 0 : _a.trim();
|
|
15
|
-
return (h(Host,
|
|
15
|
+
return (h(Host, { key: 'adec8f35b8501390c0831495ea9f915f6616aa04' }, h("div", { key: '92bcee923694c027ed93554d4d93924b58803b82', part: "icon", class: {
|
|
16
16
|
[`is-size-${this.size}`]: typeof this.size != null || this.size.trim() !== '',
|
|
17
17
|
[`${iconName}`]: true,
|
|
18
18
|
} })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-picto.js","sourceRoot":"","sources":["../../../src/components/six-picto/six-picto.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElE;;;;;GAKG;AAOH,MAAM,OAAO,QAAQ;;oBAMiF,QAAQ;;IAE5G,MAAM;;QACJ,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,IAAI,CAAC,SAAS,0CAAE,IAAI,EAAE,CAAC;QAC7C,OAAO,CACL,EAAC,IAAI;YACH,
|
|
1
|
+
{"version":3,"file":"six-picto.js","sourceRoot":"","sources":["../../../src/components/six-picto/six-picto.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElE;;;;;GAKG;AAOH,MAAM,OAAO,QAAQ;;oBAMiF,QAAQ;;IAE5G,MAAM;;QACJ,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,IAAI,CAAC,SAAS,0CAAE,IAAI,EAAE,CAAC;QAC7C,OAAO,CACL,EAAC,IAAI;YACH,4DACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE;oBACL,CAAC,WAAW,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;oBAC7E,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,IAAI;iBACtB,GACD,CACG,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * @since 1.1\n * @status stable\n *\n * @part icon - The component's icon wrapper.\n */\n\n@Component({\n tag: 'six-picto',\n styleUrl: 'six-picto.scss',\n shadow: true,\n})\nexport class SixPicto {\n @Element() host!: HTMLSixPictoElement;\n\n /**\n * Defines the size of the icon.\n */\n @Prop() size: 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge' | 'xxxLarge' | '4xl' = 'medium';\n\n render() {\n const iconName = this.host.innerHTML?.trim();\n return (\n <Host>\n <div\n part=\"icon\"\n class={{\n [`is-size-${this.size}`]: typeof this.size != null || this.size.trim() !== '',\n [`${iconName}`]: true,\n }}\n />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -17,10 +17,10 @@ export class SixProgressBar {
|
|
|
17
17
|
this.indeterminate = false;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h("div", { part: "base", class: {
|
|
20
|
+
return (h("div", { key: '5361da7a78cfcaa6375e078da88209dcd725d832', part: "base", class: {
|
|
21
21
|
'progress-bar': true,
|
|
22
22
|
'progress-bar--indeterminate': this.indeterminate,
|
|
23
|
-
}, role: "progressbar", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": this.indeterminate ? null : this.percentage }, h("div", { part: "indicator", class: "progress-bar__indicator", style: {
|
|
23
|
+
}, role: "progressbar", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": this.indeterminate ? null : this.percentage }, h("div", { key: 'a3dea20c3afea5be2c6c02adf9e6f98cdb038cbb', part: "indicator", class: "progress-bar__indicator", style: {
|
|
24
24
|
width: `${this.percentage}%`,
|
|
25
25
|
} }, !this.indeterminate && (h("span", { part: "label", class: "progress-bar__label" }, h("slot", null))))));
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-progress-bar.js","sourceRoot":"","sources":["../../../src/components/six-progress-bar/six-progress-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;;;;;GAWG;AAOH,MAAM,OAAO,cAAc;;0BAEJ,CAAC;6BAGE,KAAK;;IAE7B,MAAM;QACJ,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"six-progress-bar.js","sourceRoot":"","sources":["../../../src/components/six-progress-bar/six-progress-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;;;;;GAWG;AAOH,MAAM,OAAO,cAAc;;0BAEJ,CAAC;6BAGE,KAAK;;IAE7B,MAAM;QACJ,OAAO,CACL,4DACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE;gBACL,cAAc,EAAE,IAAI;gBACpB,6BAA6B,EAAE,IAAI,CAAC,aAAa;aAClD,EACD,IAAI,EAAC,aAAa,mBACJ,GAAG,mBACH,KAAK,mBACJ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU;YAE1D,4DACE,IAAI,EAAC,WAAW,EAChB,KAAK,EAAC,yBAAyB,EAC/B,KAAK,EAAE;oBACL,KAAK,EAAE,GAAG,IAAI,CAAC,UAAU,GAAG;iBAC7B,IAEA,CAAC,IAAI,CAAC,aAAa,IAAI,CACtB,YAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,qBAAqB;gBAC5C,eAAQ,CACH,CACR,CACG,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } 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 - A label to show inside the indicator.\n *\n * @part base - The component's base wrapper.\n * @part indicator - The progress bar indicator.\n * @part label - The progress bar label.\n */\n\n@Component({\n tag: 'six-progress-bar',\n styleUrl: 'six-progress-bar.scss',\n shadow: true,\n})\nexport class SixProgressBar {\n /** The progress bar's percentage, 0 to 100. */\n @Prop() percentage = 0;\n\n /** When true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state. */\n @Prop() indeterminate = false;\n\n render() {\n return (\n <div\n part=\"base\"\n class={{\n 'progress-bar': true,\n 'progress-bar--indeterminate': this.indeterminate,\n }}\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={this.indeterminate ? null : this.percentage}\n >\n <div\n part=\"indicator\"\n class=\"progress-bar__indicator\"\n style={{\n width: `${this.percentage}%`,\n }}\n >\n {!this.indeterminate && (\n <span part=\"label\" class=\"progress-bar__label\">\n <slot />\n </span>\n )}\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -33,7 +33,7 @@ export class SixProgressRing {
|
|
|
33
33
|
this.indicator.style.strokeDashoffset = `${offset}`;
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h("div", { part: "base", class: "progress-ring" }, h("svg", { class: "progress-ring__image", width: this.size, height: this.size }, h("circle", { class: "progress-ring__track", "stroke-width": this.strokeWidth, "stroke-linecap": "round", fill: "transparent", r: this.size / 2 - this.strokeWidth * 2, cx: this.size / 2, cy: this.size / 2 }), h("circle", { ref: (el) => (this.indicator = el), class: "progress-ring__indicator", "stroke-width": this.strokeWidth, "stroke-linecap": "round", fill: "transparent", r: this.size / 2 - this.strokeWidth * 2, cx: this.size / 2, cy: this.size / 2 })), h("span", { part: "label", class: "progress-ring__label" }, h("slot",
|
|
36
|
+
return (h("div", { key: 'e502ccf39d3b246d03122b446949ee8380e1a2fa', part: "base", class: "progress-ring" }, h("svg", { key: 'd37581863e5a67e9f8a9cd058954581ee7e86a4a', class: "progress-ring__image", width: this.size, height: this.size }, h("circle", { key: '022eeb124e217d93479cf7ead2cabb9169b9afd4', class: "progress-ring__track", "stroke-width": this.strokeWidth, "stroke-linecap": "round", fill: "transparent", r: this.size / 2 - this.strokeWidth * 2, cx: this.size / 2, cy: this.size / 2 }), h("circle", { key: 'bc0fbfc9f1c872243ae2169d6412db47fb554e19', ref: (el) => (this.indicator = el), class: "progress-ring__indicator", "stroke-width": this.strokeWidth, "stroke-linecap": "round", fill: "transparent", r: this.size / 2 - this.strokeWidth * 2, cx: this.size / 2, cy: this.size / 2 })), h("span", { key: '9320211edc9c0b9b24124ffc7ffdac9d6d2f86a7', part: "label", class: "progress-ring__label" }, h("slot", { key: 'e7c3ce7e12a7691e461b73e6cbd2912dde27ac75' }))));
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "six-progress-ring"; }
|
|
39
39
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-progress-ring.js","sourceRoot":"","sources":["../../../src/components/six-progress-ring/six-progress-ring.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1D;;;;;;;;;;GAUG;AAOH,MAAM,OAAO,eAAe;;oBAIX,GAAG;2BAGI,CAAC;0BAGF,CAAC;;IAGtB,sBAAsB;QACpB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAEO,cAAc;;QACpB,IAAI,CAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,CAAC,KAAI,IAAI;YAAE,OAAO;QAEtC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QAC9C,MAAM,aAAa,GAAG,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAG,aAAa,GAAG,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,aAAa,CAAC;QAEvE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,eAAe,GAAG,GAAG,aAAa,IAAI,aAAa,EAAE,CAAC;QAC3E,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,gBAAgB,GAAG,GAAG,MAAM,EAAE,CAAC;IACtD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"six-progress-ring.js","sourceRoot":"","sources":["../../../src/components/six-progress-ring/six-progress-ring.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1D;;;;;;;;;;GAUG;AAOH,MAAM,OAAO,eAAe;;oBAIX,GAAG;2BAGI,CAAC;0BAGF,CAAC;;IAGtB,sBAAsB;QACpB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED,g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aAAa,EAClB,CAAC,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,EACvC,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,EACjB,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,GACjB,CACE;YAEN,6DAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,sBAAsB;gBAC7C,8DAAQ,CACH,CACH,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Watch } 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 - A label to show inside the ring.\n *\n * @part base - The component's base wrapper.\n * @part label - The progress ring label.\n */\n\n@Component({\n tag: 'six-progress-ring',\n styleUrl: 'six-progress-ring.scss',\n shadow: true,\n})\nexport class SixProgressRing {\n private indicator?: SVGCircleElement;\n\n /** The size of the progress ring in pixels. */\n @Prop() size = 128;\n\n /** The stroke width of the progress ring in pixels. */\n @Prop() strokeWidth = 4;\n\n /** The current progress percentage, 0 - 100. */\n @Prop() percentage = 0;\n\n @Watch('percentage')\n handlePercentageChange() {\n this.updateProgress();\n }\n\n componentDidLoad() {\n this.updateProgress();\n }\n\n private updateProgress() {\n if (this.indicator?.r == null) return;\n\n const radius = this.indicator.r.baseVal.value;\n const circumference = radius * 2 * Math.PI;\n const offset = circumference - (this.percentage / 100) * circumference;\n\n this.indicator.style.strokeDasharray = `${circumference} ${circumference}`;\n this.indicator.style.strokeDashoffset = `${offset}`;\n }\n\n render() {\n return (\n <div part=\"base\" class=\"progress-ring\">\n <svg class=\"progress-ring__image\" width={this.size} height={this.size}>\n <circle\n class=\"progress-ring__track\"\n stroke-width={this.strokeWidth}\n stroke-linecap=\"round\"\n fill=\"transparent\"\n r={this.size / 2 - this.strokeWidth * 2}\n cx={this.size / 2}\n cy={this.size / 2}\n />\n\n <circle\n ref={(el) => (this.indicator = el as SVGCircleElement)}\n class=\"progress-ring__indicator\"\n stroke-width={this.strokeWidth}\n stroke-linecap=\"round\"\n fill=\"transparent\"\n r={this.size / 2 - this.strokeWidth * 2}\n cx={this.size / 2}\n cy={this.size / 2}\n />\n </svg>\n\n <span part=\"label\" class=\"progress-ring__label\">\n <slot />\n </span>\n </div>\n );\n }\n}\n"]}
|
|
@@ -103,12 +103,12 @@ export class SixRadio {
|
|
|
103
103
|
return this.getAllRadios().filter((radio) => radio !== this.host);
|
|
104
104
|
}
|
|
105
105
|
render() {
|
|
106
|
-
return (h("label", { part: "base", class: {
|
|
106
|
+
return (h("label", { key: '11d5d7c460cf62b2fc73435137998c3b424ab58f', part: "base", class: {
|
|
107
107
|
radio: true,
|
|
108
108
|
'radio--checked': this.checked,
|
|
109
109
|
'radio--disabled': this.disabled,
|
|
110
110
|
'radio--focused': this.hasFocus,
|
|
111
|
-
}, htmlFor: this.inputId, onKeyDown: this.handleKeyDown, onMouseDown: this.handleMouseDown }, h("span", { part: "control", class: "radio__control" }, h("span", { part: "checked-icon", class: "radio__icon" }, h("svg", { viewBox: "0 0 16 16" }, h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, h("g", { fill: "currentColor" }, h("circle", { cx: "8", cy: "8", r: "5" }))))), h("input", { ref: (el) => (this.nativeInput = el), id: this.inputId, type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, role: "radio", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus })), h("span", { part: "label", id: this.labelId, class: "radio__label" }, h("slot",
|
|
111
|
+
}, htmlFor: this.inputId, onKeyDown: this.handleKeyDown, onMouseDown: this.handleMouseDown }, h("span", { key: 'e6ca5e0308ed109262b995b9831f32f5c5829cbc', part: "control", class: "radio__control" }, h("span", { key: 'c201309a8ef4def676aa48cf9dd66b94da28db10', part: "checked-icon", class: "radio__icon" }, h("svg", { key: '0e003d8db64fb73c54e95fffb9005d434d2b114e', viewBox: "0 0 16 16" }, h("g", { key: '374a33afe42003445cb91630754007f7057ff755', stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, h("g", { key: '2b85fcbdf694e18c9234819a0a20ffd793be0102', fill: "currentColor" }, h("circle", { key: '45842bd37b3dcea164b972c9ff6e461fc866536d', cx: "8", cy: "8", r: "5" }))))), h("input", { key: '924cbd7890627bbf79201b68a989f894e26d9579', ref: (el) => (this.nativeInput = el), id: this.inputId, type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, role: "radio", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus })), h("span", { key: 'f00e3fbac022d2be55117448df3e8ff908dd4cd5', part: "label", id: this.labelId, class: "radio__label" }, h("slot", { key: '0fa728701561580e0d06f0568a001d1d234ed867' }))));
|
|
112
112
|
}
|
|
113
113
|
static get is() { return "six-radio"; }
|
|
114
114
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-radio.js","sourceRoot":"","sources":["../../../src/components/six-radio/six-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;GAYG;AAOH,MAAM,OAAO,QAAQ;;QACX,YAAO,GAAG,SAAS,EAAE,EAAE,EAAE,CAAC;QAC1B,YAAO,GAAG,eAAe,EAAE,EAAE,CAAC;QAE9B,mBAAc,GAA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K,EAAC,cAAc;gBACvD,eAAQ,CACH,CACD,CACT,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The radio's label.\n *\n * @part base - The component's base wrapper.\n * @part control - The radio control.\n * @part checked-icon - The container the wraps the checked icon.\n * @part label - The radio label.\n */\n\n@Component({\n tag: 'six-radio',\n styleUrl: 'six-radio.scss',\n shadow: true,\n})\nexport class SixRadio {\n private inputId = `radio-${++id}`;\n private labelId = `radio-label-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixRadioElement;\n\n @State() hasFocus = false;\n\n /** The radio's name attribute. */\n @Prop() name = '';\n\n /** The radio's value attribute. */\n @Prop({ reflect: true }) value = 'on';\n\n /** Set to true to disable the radio. */\n @Prop() disabled = false;\n\n /** Set to true to draw the radio in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n @Watch('checked')\n handleCheckedChange() {\n if (this.checked) {\n this.getSiblingRadios().forEach((radio) => (radio.checked = false));\n }\n if (this.nativeInput != null) {\n this.nativeInput.checked = this.checked;\n }\n }\n\n @Watch('name')\n handleNameChange(name: string) {\n if (this.nativeInput != null) {\n this.nativeInput.name = name;\n }\n }\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-radio-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-radio-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-radio-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.eventListeners.forward('six-radio-change', 'change', this.host);\n this.eventListeners.forward('six-radio-blur', 'blur', this.host);\n this.eventListeners.forward('six-radio-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the radio. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the radio. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n private getAllRadios() {\n const form = this.host.closest('form') || document.body;\n\n if (this.name === '') return [];\n\n return [...form.querySelectorAll('six-radio')].filter(\n (radio: HTMLSixRadioElement) => radio.name === this.name\n ) as HTMLSixRadioElement[];\n }\n\n private getSiblingRadios() {\n return this.getAllRadios().filter((radio) => radio !== this.host) as HTMLSixRadioElement[];\n }\n\n private handleClick = () => {\n if (this.nativeInput != null) {\n this.checked = this.nativeInput.checked;\n this.sixChange.emit();\n }\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 handleKeyDown = (keyboardEvent: KeyboardEvent) => {\n if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(keyboardEvent.key)) {\n const radios = this.getAllRadios().filter((radio) => !radio.disabled);\n const incr = ['ArrowUp', 'ArrowLeft'].includes(keyboardEvent.key) ? -1 : 1;\n let index = radios.indexOf(this.host) + incr;\n if (index < 0) index = radios.length - 1;\n if (index > radios.length - 1) index = 0;\n\n this.getAllRadios().forEach((radio) => (radio.checked = false));\n radios[index].setFocus();\n radios[index].checked = true;\n radios[index].dispatchEvent(new CustomEvent('six-radio-change', { bubbles: true, cancelable: true }));\n keyboardEvent.preventDefault();\n }\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.nativeInput?.focus();\n };\n\n render() {\n return (\n <label\n part=\"base\"\n class={{\n radio: true,\n 'radio--checked': this.checked,\n 'radio--disabled': this.disabled,\n 'radio--focused': this.hasFocus,\n }}\n htmlFor={this.inputId}\n onKeyDown={this.handleKeyDown}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"radio__control\">\n <span part=\"checked-icon\" class=\"radio__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"currentColor\">\n <circle cx=\"8\" cy=\"8\" r=\"5\"></circle>\n </g>\n </g>\n </svg>\n </span>\n\n <input\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n type=\"radio\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n role=\"radio\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n />\n </span>\n\n <span part=\"label\" id={this.labelId} class=\"radio__label\">\n <slot />\n </span>\n </label>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"six-radio.js","sourceRoot":"","sources":["../../../src/components/six-radio/six-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,IAAI,EAAE,G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,CAAC,CAAC,CAAC,OAAO,qBAC5B,IAAI,CAAC,OAAO,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,OAAO,EAAE,IAAI,CAAC,WAAW,GACzB,CACG;YAEP,6DAAM,IAAI,EAAC,OAAO,EAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAC,cAAc;gBACvD,8DAAQ,CACH,CACD,CACT,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The radio's label.\n *\n * @part base - The component's base wrapper.\n * @part control - The radio control.\n * @part checked-icon - The container the wraps the checked icon.\n * @part label - The radio label.\n */\n\n@Component({\n tag: 'six-radio',\n styleUrl: 'six-radio.scss',\n shadow: true,\n})\nexport class SixRadio {\n private inputId = `radio-${++id}`;\n private labelId = `radio-label-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixRadioElement;\n\n @State() hasFocus = false;\n\n /** The radio's name attribute. */\n @Prop() name = '';\n\n /** The radio's value attribute. */\n @Prop({ reflect: true }) value = 'on';\n\n /** Set to true to disable the radio. */\n @Prop() disabled = false;\n\n /** Set to true to draw the radio in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n @Watch('checked')\n handleCheckedChange() {\n if (this.checked) {\n this.getSiblingRadios().forEach((radio) => (radio.checked = false));\n }\n if (this.nativeInput != null) {\n this.nativeInput.checked = this.checked;\n }\n }\n\n @Watch('name')\n handleNameChange(name: string) {\n if (this.nativeInput != null) {\n this.nativeInput.name = name;\n }\n }\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-radio-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-radio-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-radio-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.eventListeners.forward('six-radio-change', 'change', this.host);\n this.eventListeners.forward('six-radio-blur', 'blur', this.host);\n this.eventListeners.forward('six-radio-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the radio. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the radio. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n private getAllRadios() {\n const form = this.host.closest('form') || document.body;\n\n if (this.name === '') return [];\n\n return [...form.querySelectorAll('six-radio')].filter(\n (radio: HTMLSixRadioElement) => radio.name === this.name\n ) as HTMLSixRadioElement[];\n }\n\n private getSiblingRadios() {\n return this.getAllRadios().filter((radio) => radio !== this.host) as HTMLSixRadioElement[];\n }\n\n private handleClick = () => {\n if (this.nativeInput != null) {\n this.checked = this.nativeInput.checked;\n this.sixChange.emit();\n }\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 handleKeyDown = (keyboardEvent: KeyboardEvent) => {\n if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(keyboardEvent.key)) {\n const radios = this.getAllRadios().filter((radio) => !radio.disabled);\n const incr = ['ArrowUp', 'ArrowLeft'].includes(keyboardEvent.key) ? -1 : 1;\n let index = radios.indexOf(this.host) + incr;\n if (index < 0) index = radios.length - 1;\n if (index > radios.length - 1) index = 0;\n\n this.getAllRadios().forEach((radio) => (radio.checked = false));\n radios[index].setFocus();\n radios[index].checked = true;\n radios[index].dispatchEvent(new CustomEvent('six-radio-change', { bubbles: true, cancelable: true }));\n keyboardEvent.preventDefault();\n }\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.nativeInput?.focus();\n };\n\n render() {\n return (\n <label\n part=\"base\"\n class={{\n radio: true,\n 'radio--checked': this.checked,\n 'radio--disabled': this.disabled,\n 'radio--focused': this.hasFocus,\n }}\n htmlFor={this.inputId}\n onKeyDown={this.handleKeyDown}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"radio__control\">\n <span part=\"checked-icon\" class=\"radio__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"currentColor\">\n <circle cx=\"8\" cy=\"8\" r=\"5\"></circle>\n </g>\n </g>\n </svg>\n </span>\n\n <input\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n type=\"radio\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n role=\"radio\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n />\n </span>\n\n <span part=\"label\" id={this.labelId} class=\"radio__label\">\n <slot />\n </span>\n </label>\n );\n }\n}\n"]}
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
.range__tooltip {
|
|
188
188
|
position: absolute;
|
|
189
189
|
z-index: var(--six-z-index-tooltip);
|
|
190
|
-
left:
|
|
190
|
+
left: 2px;
|
|
191
191
|
border-radius: var(--six-border-radius-medium);
|
|
192
192
|
background-color: var(--six-color-web-rock-900);
|
|
193
193
|
font-family: var(--six-font-family);
|
|
@@ -105,6 +105,16 @@ export class SixRange {
|
|
|
105
105
|
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('slotchange', this.handleSlotChange);
|
|
106
106
|
this.eventListeners.removeAll();
|
|
107
107
|
}
|
|
108
|
+
componentDidUpdate() {
|
|
109
|
+
const { min, max } = this.getMinMax();
|
|
110
|
+
this.syncTooltip(min, max, this.value);
|
|
111
|
+
}
|
|
112
|
+
getMinMax() {
|
|
113
|
+
var _a, _b;
|
|
114
|
+
const min = (_a = Number(this.min)) !== null && _a !== void 0 ? _a : 0;
|
|
115
|
+
const max = (_b = Number(this.max)) !== null && _b !== void 0 ? _b : 0;
|
|
116
|
+
return { min, max };
|
|
117
|
+
}
|
|
108
118
|
/** Sets focus on the input. */
|
|
109
119
|
async setFocus(options) {
|
|
110
120
|
var _a;
|
|
@@ -178,7 +188,7 @@ export class SixRange {
|
|
|
178
188
|
}
|
|
179
189
|
}
|
|
180
190
|
render() {
|
|
181
|
-
return (h(FormControl, { inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, helpTextId: this.helpTextId, helpText: this.helpText, hasHelpTextSlot: this.hasHelpTextSlot, size: "medium", errorTextId: this.errorTextId, errorText: this.errorText, hasErrorTextSlot: this.hasErrorTextSlot, errorTextCount: this.errorTextCount, disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { part: "base", class: {
|
|
191
|
+
return (h(FormControl, { key: 'cf23b46a8ca2596e962810d3528163ab9add32c3', inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, helpTextId: this.helpTextId, helpText: this.helpText, hasHelpTextSlot: this.hasHelpTextSlot, size: "medium", errorTextId: this.errorTextId, errorText: this.errorText, hasErrorTextSlot: this.hasErrorTextSlot, errorTextCount: this.errorTextCount, disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { key: '370f20143ac3c9325b7cc99ceb3c3a6720a50b1c', part: "base", class: {
|
|
182
192
|
range: true,
|
|
183
193
|
// States
|
|
184
194
|
'range--disabled': this.disabled,
|
|
@@ -186,7 +196,7 @@ export class SixRange {
|
|
|
186
196
|
'range--tooltip-visible': this.hasTooltip,
|
|
187
197
|
'range--tooltip-top': this.tooltip === 'top',
|
|
188
198
|
'range--tooltip-bottom': this.tooltip === 'bottom',
|
|
189
|
-
}, onTouchStart: this.handleTouchStart }, h("input", { part: "input", ref: (el) => (this.nativeInput = el), type: "range", class: "range__control", name: this.name, disabled: this.disabled, min: this.min, max: this.max, step: this.step, value: this.value, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur }), this.tooltip !== 'none' && (h("output", { part: "tooltip", ref: (el) => (this.output = el), class: "range__tooltip" }, this.tooltipFormatter(this.value))))));
|
|
199
|
+
}, onTouchStart: this.handleTouchStart }, h("input", { key: '74380f56888930992b753f905cd6e9256c24d106', part: "input", ref: (el) => (this.nativeInput = el), type: "range", class: "range__control", name: this.name, disabled: this.disabled, min: this.min, max: this.max, step: this.step, value: this.value, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur }), this.tooltip !== 'none' && (h("output", { part: "tooltip", ref: (el) => (this.output = el), class: "range__tooltip" }, this.tooltipFormatter(this.value))))));
|
|
190
200
|
}
|
|
191
201
|
static get is() { return "six-range"; }
|
|
192
202
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-range.js","sourceRoot":"","sources":["../../../src/components/six-range/six-range.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,E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,EAAC,gBAAgB,IAC3E,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAC3B,CACV,CACG,CACM,CACf,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The input's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part input - The native range input.\n * @part tooltip - The range tooltip.\n */\n@Component({\n tag: 'six-range',\n styleUrl: 'six-range.scss',\n shadow: true,\n})\nexport class SixRange {\n private inputId = `input-${++id}`;\n private labelId = `input-label-${id}`;\n private helpTextId = `input-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private eventListeners = new EventListeners();\n private resizeObserver?: ResizeObserver;\n\n private output?: HTMLElement;\n private nativeInput?: HTMLInputElement;\n\n @Element() host!: HTMLSixRangeElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasErrorTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasTooltip = false;\n\n /** The input's name attribute. */\n @Prop() name = '';\n\n /** The input's value attribute. */\n @Prop({ mutable: true }) value = 0;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The range's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** Set to true to disable the input. */\n @Prop() disabled = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The input's min attribute. */\n @Prop() min = 0;\n\n /** The input's max attribute. */\n @Prop() max = 100;\n\n /** The input's step attribute. */\n @Prop() step = 1;\n\n /** The preferred placedment of the tooltip. */\n @Prop() tooltip: 'top' | 'bottom' | 'none' = 'top';\n\n /** A function used to format the tooltip's value. */\n @Prop() tooltipFormatter = (value: number) => value.toString();\n\n /** Emitted when the control's value changes. */\n @Event({ eventName: 'six-range-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-range-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-range-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n @Watch('label')\n @Watch('errorText')\n @Watch('helpText')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('value')\n @Watch('min')\n @Watch('max')\n handleValueChange() {\n this.update();\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n componentWillLoad() {\n this.update();\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n const nativeInput = this.nativeInput;\n if (nativeInput == null) {\n return;\n }\n this.update();\n this.resizeObserver = new ResizeObserver(() => this.update());\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the input. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n private handleInput = () => {\n if (this.nativeInput != null) {\n this.update(parseFloat(this.nativeInput.value));\n }\n requestAnimationFrame(() => {\n this.sixChange.emit();\n });\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.hasTooltip = false;\n this.sixBlur.emit();\n if (this.nativeInput != null) {\n this.resizeObserver?.unobserve(this.nativeInput);\n }\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.hasTooltip = true;\n this.sixFocus.emit();\n if (this.nativeInput != null) {\n this.resizeObserver?.observe(this.nativeInput);\n }\n };\n\n private handleSlotChange = () => {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n private handleTouchStart = () => {\n this.setFocus();\n };\n\n private syncTooltip(min: number, max: number, value: number) {\n if (this.tooltip !== 'none' && this.nativeInput != null && this.output != null) {\n const percent = Math.max(0, (value - min) / (max - min));\n const inputWidth = this.nativeInput.offsetWidth;\n const tooltipWidth = this.output.offsetWidth;\n const thumbSize = getComputedStyle(this.nativeInput).getPropertyValue('--thumb-size');\n const x = `calc(${inputWidth * percent}px - calc(calc(${percent} * ${thumbSize}) - calc(${thumbSize} / 2)))`;\n this.output.style.transform = `translateX(${x})`;\n this.output.style.marginLeft = `-${tooltipWidth / 2}px`;\n }\n }\n\n private isFirefox() {\n return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n }\n\n private update(updateValue?: number) {\n if (updateValue != null) {\n this.value = updateValue;\n }\n\n const min = Number(this.min) ?? 0;\n const max = Number(this.max) ?? 0;\n let value;\n const parsedValue = parseFloat(this.value as never);\n if (isNaN(parsedValue)) {\n value = this.getDefaultValue(min, max);\n } else {\n value = parsedValue;\n }\n\n if (this.nativeInput != null) {\n // The value may have constraints, so we set the native control's\n // value and sync it back to ensure it adheres to min, max, and step\n // properly.\n this.nativeInput.value = value.toString();\n this.value = parseFloat(this.nativeInput.value);\n } else {\n this.value = value;\n }\n this.calculateColorRunnableTrack(min, max, this.value);\n this.syncTooltip(min, max, this.value);\n }\n\n /**\n * from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#value\n */\n private getDefaultValue(min: number, max: number): number {\n return max < min ? min : min + (max - min) / 2;\n }\n\n /**\n * For Firefox this functionality is not needed because it is supported by standard CSS.\n */\n private calculateColorRunnableTrack(min: number, max: number, value: number) {\n if (!this.isFirefox() && this.nativeInput != null) {\n const percent = Math.ceil(((value - min) / (max - min)) * 100);\n this.nativeInput.style.background =\n '-webkit-linear-gradient(left, var(--track-color) 0%, var(--track-color) ' +\n percent +\n '%, var(--six-color-web-rock-300) ' +\n percent +\n '%)';\n }\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n size=\"medium\"\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n hasErrorTextSlot={this.hasErrorTextSlot}\n errorTextCount={this.errorTextCount}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n range: true,\n\n // States\n 'range--disabled': this.disabled,\n 'range--focused': this.hasFocus,\n 'range--tooltip-visible': this.hasTooltip,\n 'range--tooltip-top': this.tooltip === 'top',\n 'range--tooltip-bottom': this.tooltip === 'bottom',\n }}\n onTouchStart={this.handleTouchStart}\n >\n <input\n part=\"input\"\n ref={(el) => (this.nativeInput = el)}\n type=\"range\"\n class=\"range__control\"\n name={this.name}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.value}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n {this.tooltip !== 'none' && (\n <output part=\"tooltip\" ref={(el) => (this.output = el)} class=\"range__tooltip\">\n {this.tooltipFormatter(this.value)}\n </output>\n )}\n </div>\n </FormControl>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"six-range.js","sourceRoot":"","sources":["../../../src/components/six-range/six-range.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,WAAW,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;GAaG;AAMH,MAAM,OAAO,QAAQ;;QACX,YAAO,GAAG,SAAS,EAAE,EAAE,EAAE,CAAC;QAC1B,YAAO,GAAG,eAAe,EAAE,EAAE,CAAC;QAC9B,eAAU,GAAG,mBAAmB,EAAE,EAAE,CAAC;QACrC,gBAAW,GAAG,oBAAoB,EAAE,EAAE,CAAC;QACvC,mBAAc,GAAG,IAAI,cAAc,EAAE,CAAC;QA6HtC,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;gBAC7B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YAClD,CAAC;YACD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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The input's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input. Alternatively, you can use the help-text prop.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part input - The native range input.\n * @part tooltip - The range tooltip.\n */\n@Component({\n tag: 'six-range',\n styleUrl: 'six-range.scss',\n shadow: true,\n})\nexport class SixRange {\n private inputId = `input-${++id}`;\n private labelId = `input-label-${id}`;\n private helpTextId = `input-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private eventListeners = new EventListeners();\n private resizeObserver?: ResizeObserver;\n\n private output?: HTMLElement;\n private nativeInput?: HTMLInputElement;\n\n @Element() host!: HTMLSixRangeElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasErrorTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasTooltip = false;\n\n /** The input's name attribute. */\n @Prop() name = '';\n\n /** The input's value attribute. */\n @Prop({ mutable: true }) value = 0;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The range's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** Set to true to disable the input. */\n @Prop() disabled = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The input's min attribute. */\n @Prop() min = 0;\n\n /** The input's max attribute. */\n @Prop() max = 100;\n\n /** The input's step attribute. */\n @Prop() step = 1;\n\n /** The preferred placedment of the tooltip. */\n @Prop() tooltip: 'top' | 'bottom' | 'none' = 'top';\n\n /** A function used to format the tooltip's value. */\n @Prop() tooltipFormatter = (value: number) => value.toString();\n\n /** Emitted when the control's value changes. */\n @Event({ eventName: 'six-range-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-range-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-range-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n @Watch('label')\n @Watch('errorText')\n @Watch('helpText')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('value')\n @Watch('min')\n @Watch('max')\n handleValueChange() {\n this.update();\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n componentWillLoad() {\n this.update();\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n const nativeInput = this.nativeInput;\n if (nativeInput == null) {\n return;\n }\n this.update();\n this.resizeObserver = new ResizeObserver(() => this.update());\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n componentDidUpdate() {\n const { min, max } = this.getMinMax();\n this.syncTooltip(min, max, this.value);\n }\n\n private getMinMax() {\n const min = Number(this.min) ?? 0;\n const max = Number(this.max) ?? 0;\n return { min, max };\n }\n\n /** Sets focus on the input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the input. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n private handleInput = () => {\n if (this.nativeInput != null) {\n this.update(parseFloat(this.nativeInput.value));\n }\n requestAnimationFrame(() => {\n this.sixChange.emit();\n });\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.hasTooltip = false;\n this.sixBlur.emit();\n if (this.nativeInput != null) {\n this.resizeObserver?.unobserve(this.nativeInput);\n }\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.hasTooltip = true;\n this.sixFocus.emit();\n if (this.nativeInput != null) {\n this.resizeObserver?.observe(this.nativeInput);\n }\n };\n\n private handleSlotChange = () => {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n private handleTouchStart = () => {\n this.setFocus();\n };\n\n private syncTooltip(min: number, max: number, value: number) {\n if (this.tooltip !== 'none' && this.nativeInput != null && this.output != null) {\n const percent = Math.max(0, (value - min) / (max - min));\n const inputWidth = this.nativeInput.offsetWidth;\n const tooltipWidth = this.output.offsetWidth;\n const thumbSize = getComputedStyle(this.nativeInput).getPropertyValue('--thumb-size');\n const x = `calc(${inputWidth * percent}px - calc(calc(${percent} * ${thumbSize}) - calc(${thumbSize} / 2)))`;\n this.output.style.transform = `translateX(${x})`;\n this.output.style.marginLeft = `-${tooltipWidth / 2}px`;\n }\n }\n\n private isFirefox() {\n return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n }\n\n private update(updateValue?: number) {\n if (updateValue != null) {\n this.value = updateValue;\n }\n\n const min = Number(this.min) ?? 0;\n const max = Number(this.max) ?? 0;\n let value;\n const parsedValue = parseFloat(this.value as never);\n if (isNaN(parsedValue)) {\n value = this.getDefaultValue(min, max);\n } else {\n value = parsedValue;\n }\n\n if (this.nativeInput != null) {\n // The value may have constraints, so we set the native control's\n // value and sync it back to ensure it adheres to min, max, and step\n // properly.\n this.nativeInput.value = value.toString();\n this.value = parseFloat(this.nativeInput.value);\n } else {\n this.value = value;\n }\n this.calculateColorRunnableTrack(min, max, this.value);\n this.syncTooltip(min, max, this.value);\n }\n\n /**\n * from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#value\n */\n private getDefaultValue(min: number, max: number): number {\n return max < min ? min : min + (max - min) / 2;\n }\n\n /**\n * For Firefox this functionality is not needed because it is supported by standard CSS.\n */\n private calculateColorRunnableTrack(min: number, max: number, value: number) {\n if (!this.isFirefox() && this.nativeInput != null) {\n const percent = Math.ceil(((value - min) / (max - min)) * 100);\n this.nativeInput.style.background =\n '-webkit-linear-gradient(left, var(--track-color) 0%, var(--track-color) ' +\n percent +\n '%, var(--six-color-web-rock-300) ' +\n percent +\n '%)';\n }\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n size=\"medium\"\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n hasErrorTextSlot={this.hasErrorTextSlot}\n errorTextCount={this.errorTextCount}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n range: true,\n\n // States\n 'range--disabled': this.disabled,\n 'range--focused': this.hasFocus,\n 'range--tooltip-visible': this.hasTooltip,\n 'range--tooltip-top': this.tooltip === 'top',\n 'range--tooltip-bottom': this.tooltip === 'bottom',\n }}\n onTouchStart={this.handleTouchStart}\n >\n <input\n part=\"input\"\n ref={(el) => (this.nativeInput = el)}\n type=\"range\"\n class=\"range__control\"\n name={this.name}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.value}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n {this.tooltip !== 'none' && (\n <output part=\"tooltip\" ref={(el) => (this.output = el)} class=\"range__tooltip\">\n {this.tooltipFormatter(this.value)}\n </output>\n )}\n </div>\n </FormControl>\n );\n }\n}\n"]}
|
|
@@ -11,27 +11,12 @@ import { h } from "@stencil/core";
|
|
|
11
11
|
*/
|
|
12
12
|
export class SixRoot {
|
|
13
13
|
constructor() {
|
|
14
|
-
this.resizeObserver = new ResizeObserver(([host]) => {
|
|
15
|
-
const { width } = host.contentRect;
|
|
16
|
-
this.collapse = width < this.breakpoint;
|
|
17
|
-
});
|
|
18
|
-
this.breakpoint = 1024;
|
|
19
14
|
this.padded = true;
|
|
20
15
|
this.stage = null;
|
|
21
16
|
this.version = '';
|
|
22
|
-
this.collapse = false;
|
|
23
|
-
}
|
|
24
|
-
handleCollapsed(collapsed) {
|
|
25
|
-
this.collapsedEvent.emit({ collapsed });
|
|
26
|
-
}
|
|
27
|
-
componentWillLoad() {
|
|
28
|
-
this.resizeObserver.observe(this.host);
|
|
29
|
-
}
|
|
30
|
-
disconnectedCallback() {
|
|
31
|
-
this.resizeObserver.disconnect();
|
|
32
17
|
}
|
|
33
18
|
render() {
|
|
34
|
-
return (h("host", { class: "six-root" }, h("header", { part: "header" }, this.stage && h("six-stage-indicator", { stage: this.stage }, this.version), h("slot", { name: "header" })), h("nav", { class: "six-root__left-sidebar", part: "left-sidebar" }, h("
|
|
19
|
+
return (h("host", { key: 'f4b3cb516ce1b70a834903c00a56ca7edf5364dc', class: "six-root" }, h("header", { key: '88ec66c2af58e55621563f600cb8c1589467218c', part: "header" }, this.stage && h("six-stage-indicator", { stage: this.stage }, this.version), h("slot", { key: '072a0e92b9203149a9823fdf83aa45b39494559f', name: "header" })), h("nav", { key: '58d18ca9b9ebf9db5981b3c82cce657f73ef5f13', class: "six-root__left-sidebar", part: "left-sidebar" }, h("slot", { key: '62643ef967da9d303380b4d4d26ec5e026a86ac3', name: "left-sidebar" })), h("main", { key: '0b059f2814c4485dd03a3a166529d78999baa699', part: "main" }, h("div", { key: '74ce003ff9d45945b9bdc43b170c99300856544b', class: { 'six-root__container': true, 'six-root__container--padded': this.padded }, part: "container" }, h("slot", { key: '5ea05c471c96fd47cf27749accd1c551f16d69d2', name: "main" })), h("div", { key: '5dd7796754df4238f61f1ee8cc3cee9589f1f40f', class: "six-root__footer" }, h("slot", { key: '5c4036b9fb4d36f69b617a2e6ee7fce62c80fa08', name: "footer" }))), h("nav", { key: '36c76008c9dc36b7fef9f8a6a79e6508d1764ede', class: "six-root__right-sidebar", part: "right-sidebar" }, h("slot", { key: '66cdae8a60d251063e4c8a710a36d0be07dedf0e', name: "right-sidebar" }))));
|
|
35
20
|
}
|
|
36
21
|
static get is() { return "six-root"; }
|
|
37
22
|
static get encapsulation() { return "shadow"; }
|
|
@@ -47,24 +32,6 @@ export class SixRoot {
|
|
|
47
32
|
}
|
|
48
33
|
static get properties() {
|
|
49
34
|
return {
|
|
50
|
-
"breakpoint": {
|
|
51
|
-
"type": "number",
|
|
52
|
-
"mutable": false,
|
|
53
|
-
"complexType": {
|
|
54
|
-
"original": "number",
|
|
55
|
-
"resolved": "number",
|
|
56
|
-
"references": {}
|
|
57
|
-
},
|
|
58
|
-
"required": false,
|
|
59
|
-
"optional": false,
|
|
60
|
-
"docs": {
|
|
61
|
-
"tags": [],
|
|
62
|
-
"text": "Breakpoint for smaller screens when the right sidebar is collapsed by default."
|
|
63
|
-
},
|
|
64
|
-
"attribute": "breakpoint",
|
|
65
|
-
"reflect": false,
|
|
66
|
-
"defaultValue": "1024"
|
|
67
|
-
},
|
|
68
35
|
"padded": {
|
|
69
36
|
"type": "boolean",
|
|
70
37
|
"mutable": false,
|
|
@@ -127,41 +94,6 @@ export class SixRoot {
|
|
|
127
94
|
}
|
|
128
95
|
};
|
|
129
96
|
}
|
|
130
|
-
static get states() {
|
|
131
|
-
return {
|
|
132
|
-
"collapse": {}
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
static get events() {
|
|
136
|
-
return [{
|
|
137
|
-
"method": "collapsedEvent",
|
|
138
|
-
"name": "six-root-collapsed",
|
|
139
|
-
"bubbles": true,
|
|
140
|
-
"cancelable": true,
|
|
141
|
-
"composed": true,
|
|
142
|
-
"docs": {
|
|
143
|
-
"tags": [],
|
|
144
|
-
"text": "Emitted when display size is updated."
|
|
145
|
-
},
|
|
146
|
-
"complexType": {
|
|
147
|
-
"original": "SixRootCollapsedPayload",
|
|
148
|
-
"resolved": "SixRootCollapsedPayload",
|
|
149
|
-
"references": {
|
|
150
|
-
"SixRootCollapsedPayload": {
|
|
151
|
-
"location": "local",
|
|
152
|
-
"path": "/home/runner/work/six-webcomponents/six-webcomponents/libraries/ui-library/src/components/six-root/six-root.tsx",
|
|
153
|
-
"id": "src/components/six-root/six-root.tsx::SixRootCollapsedPayload"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}];
|
|
158
|
-
}
|
|
159
97
|
static get elementRef() { return "host"; }
|
|
160
|
-
static get watchers() {
|
|
161
|
-
return [{
|
|
162
|
-
"propName": "collapse",
|
|
163
|
-
"methodName": "handleCollapsed"
|
|
164
|
-
}];
|
|
165
|
-
}
|
|
166
98
|
}
|
|
167
99
|
//# sourceMappingURL=six-root.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-root.js","sourceRoot":"","sources":["../../../src/components/six-root/six-root.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"six-root.js","sourceRoot":"","sources":["../../../src/components/six-root/six-root.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG5D;;;;;;;;;GASG;AAOH,MAAM,OAAO,OAAO;;sBAKD,IAAI;qBAGM,IAAI;uBAGb,EAAE;;IAEpB,MAAM;QACJ,OAAO,CACL,6DAAM,KAAK,EAAC,UAAU;YACpB,+DAAQ,IAAI,EAAC,QAAQ;gBAClB,IAAI,CAAC,KAAK,IAAI,2BAAqB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAG,IAAI,CAAC,OAAO,CAAuB;gBAC3F,6DAAM,IAAI,EAAC,QAAQ,GAAG,CACf;YACT,4DAAK,KAAK,EAAC,wBAAwB,EAAC,IAAI,EAAC,cAAc;gBACrD,6DAAM,IAAI,EAAC,cAAc,GAAG,CACxB;YACN,6DAAM,IAAI,EAAC,MAAM;gBACf,4DAAK,KAAK,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,6BAA6B,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAC,WAAW;oBACvG,6DAAM,IAAI,EAAC,MAAM,GAAG,CAChB;gBACN,4DAAK,KAAK,EAAC,kBAAkB;oBAC3B,6DAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACD;YACP,4DAAK,KAAK,EAAC,yBAAyB,EAAC,IAAI,EAAC,eAAe;gBACvD,6DAAM,IAAI,EAAC,eAAe,GAAG,CACzB,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop } from '@stencil/core';\nimport { StageType } from '../six-stage-indicator/six-stage-indicator';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot header - Used to define the header component.\n * @slot main - Used to define the components in the main area.\n * @slot left-sidebar - Used to define the sidebar on the left side.\n * @slot right-sidebar - Used to define the sidebar on the right side.\n * @slot footer - Used to define the footer component.\n */\n\n@Component({\n tag: 'six-root',\n styleUrl: 'six-root.scss',\n shadow: true,\n})\nexport class SixRoot {\n @Element() host!: HTMLSixRootElement;\n\n /** Defines whether the content section should be padded */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() padded = true;\n\n /** Defines the stage of the application*/\n @Prop() stage: StageType = null;\n\n /** Defines the version of the application*/\n @Prop() version = '';\n\n render() {\n return (\n <host class=\"six-root\">\n <header part=\"header\">\n {this.stage && <six-stage-indicator stage={this.stage}>{this.version}</six-stage-indicator>}\n <slot name=\"header\" />\n </header>\n <nav class=\"six-root__left-sidebar\" part=\"left-sidebar\">\n <slot name=\"left-sidebar\" />\n </nav>\n <main part=\"main\">\n <div class={{ 'six-root__container': true, 'six-root__container--padded': this.padded }} part=\"container\">\n <slot name=\"main\" />\n </div>\n <div class=\"six-root__footer\">\n <slot name=\"footer\" />\n </div>\n </main>\n <nav class=\"six-root__right-sidebar\" part=\"right-sidebar\">\n <slot name=\"right-sidebar\" />\n </nav>\n </host>\n );\n }\n}\n"]}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
2
|
import { SixRoot } from "../six-root";
|
|
3
|
-
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
4
|
-
observe: jest.fn(),
|
|
5
|
-
unobserve: jest.fn(),
|
|
6
|
-
disconnect: jest.fn(),
|
|
7
|
-
}));
|
|
8
3
|
describe('six-root', () => {
|
|
9
4
|
it('renders', async () => {
|
|
10
5
|
const page = await newSpecPage({
|
|
@@ -19,9 +14,7 @@ describe('six-root', () => {
|
|
|
19
14
|
<slot name="header"></slot>
|
|
20
15
|
</header>
|
|
21
16
|
<nav class="six-root__left-sidebar" part="left-sidebar">
|
|
22
|
-
<set-attributes>
|
|
23
17
|
<slot name="left-sidebar"></slot>
|
|
24
|
-
</set-attributes>
|
|
25
18
|
</nav>
|
|
26
19
|
<main part="main">
|
|
27
20
|
<div class="six-root__container six-root__container--padded" part="container">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-root.spec.js","sourceRoot":"","sources":["../../../../src/components/six-root/test/six-root.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,
|
|
1
|
+
{"version":3,"file":"six-root.spec.js","sourceRoot":"","sources":["../../../../src/components/six-root/test/six-root.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,uBAAuB;SAC9B,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;KAwB7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixRoot } from '../six-root';\n\ndescribe('six-root', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixRoot],\n html: `<six-root></six-root>`,\n });\n\n expect(page.root).toEqualHtml(`\n <six-root>\n <mock:shadow-root>\n <host class=\"six-root\">\n <header part=\"header\">\n <slot name=\"header\"></slot>\n </header>\n <nav class=\"six-root__left-sidebar\" part=\"left-sidebar\">\n <slot name=\"left-sidebar\"></slot>\n </nav>\n <main part=\"main\">\n <div class=\"six-root__container six-root__container--padded\" part=\"container\">\n <slot name=\"main\"></slot>\n </div>\n <div class=\"six-root__footer\">\n <slot name=\"footer\"></slot>\n </div>\n </main>\n <nav class=\"six-root__right-sidebar\" part=\"right-sidebar\">\n <slot name=\"right-sidebar\"></slot>\n </nav>\n </host>\n </mock:shadow-root>\n </six-root>\n `);\n });\n});\n"]}
|
|
@@ -42,7 +42,7 @@ export class SixSearchField {
|
|
|
42
42
|
this.eventListeners.removeAll();
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h("div", { class: "search-box" }, h("six-input", { ref: (el) => (this.inputElement = el), placeholder: this.placeholder, value: this.value, disabled: this.disabled, clearable: this.clearable }, h("six-icon", { class: "search-box__icon", slot: "prefix", size: "small", onClick: this.handleInputChange }, "search")), h("slot",
|
|
45
|
+
return (h("div", { key: 'f1a0e877abffb212e7876237a294256446ce9414', class: "search-box" }, h("six-input", { key: '371999a3d7a5063f1b29494763444bdb20317146', ref: (el) => (this.inputElement = el), placeholder: this.placeholder, value: this.value, disabled: this.disabled, clearable: this.clearable }, h("six-icon", { key: '8c9c517d8f6bbf45beae6c5af88a5b17967401b5', class: "search-box__icon", slot: "prefix", size: "small", onClick: this.handleInputChange }, "search")), h("slot", { key: 'f45bb3a2c075675f2216a17e2c28329196685f2e' })));
|
|
46
46
|
}
|
|
47
47
|
static get is() { return "six-search-field"; }
|
|
48
48
|
static get encapsulation() { return "shadow"; }
|