@six-group/ui-library 0.0.0-insider.b8b84f6 → 0.0.0-insider.c3b5116
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/README.md +9 -0
- package/dist/cjs/{form-control-d369af14.js → form-control-19303ed2.js} +11 -8
- package/dist/cjs/form-control-19303ed2.js.map +1 -0
- package/dist/cjs/{index-900437fc.js → index-7d73cbd6.js} +495 -122
- package/dist/cjs/index-7d73cbd6.js.map +1 -0
- package/dist/cjs/index.cjs.js +15 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{scroll-03678de1.js → scroll-2c4200dc.js} +1 -2
- package/dist/cjs/scroll-2c4200dc.js.map +1 -0
- package/dist/cjs/set-attributes_2.cjs.entry.js +1 -1
- package/dist/cjs/six-alert.cjs.entry.js +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +1 -1
- package/dist/cjs/six-badge.cjs.entry.js +1 -1
- package/dist/cjs/six-button.cjs.entry.js +4 -4
- package/dist/cjs/six-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-card.cjs.entry.js +1 -1
- package/dist/cjs/six-checkbox.cjs.entry.js +7 -4
- package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/six-datepicker.cjs.entry.js +3 -8
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +2 -2
- package/dist/cjs/six-details.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dialog.cjs.entry.js +2 -2
- package/dist/cjs/six-drawer.cjs.entry.js +3 -3
- package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error-page.cjs.entry.js +1 -1
- package/dist/cjs/six-error.cjs.entry.js +21 -0
- package/dist/cjs/six-error.cjs.entry.js.map +1 -0
- package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list.cjs.entry.js +1 -1
- package/dist/cjs/six-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/six-footer.cjs.entry.js +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +3 -3
- package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
- package/dist/cjs/six-header.cjs.entry.js +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon.cjs.entry.js +1 -1
- package/dist/cjs/six-input.cjs.entry.js +7 -4
- package/dist/cjs/six-input.cjs.entry.js.map +1 -1
- package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
- package/dist/cjs/six-picto.cjs.entry.js +1 -1
- package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +1 -1
- package/dist/cjs/six-range.cjs.entry.js +7 -4
- package/dist/cjs/six-range.cjs.entry.js.map +1 -1
- package/dist/cjs/six-root.cjs.entry.js +1 -1
- package/dist/cjs/six-search-field.cjs.entry.js +1 -1
- package/dist/cjs/six-select.cjs.entry.js +7 -4
- package/dist/cjs/six-select.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +14 -3
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item.cjs.entry.js +6 -4
- package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/six-spinner.cjs.entry.js +1 -1
- package/dist/cjs/six-switch.cjs.entry.js +23 -5
- package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-group.cjs.entry.js +46 -51
- package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +20 -4
- package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +24 -2
- package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/six-textarea.cjs.entry.js +7 -4
- package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tile.cjs.entry.js +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js +5 -10
- package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/ui-library.cjs.js +3 -3
- package/dist/cjs/ui-library.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/six-button/six-button.css +5 -30
- 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-checkbox/six-checkbox.css +4 -1
- package/dist/collection/components/six-checkbox/six-checkbox.js +25 -4
- package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
- package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js +6 -2
- package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js.map +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.js +22 -11
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
- package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js +1 -1
- package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js.map +1 -1
- package/dist/collection/components/six-details/six-details.css +3 -1
- package/dist/collection/components/six-drawer/six-drawer.js +1 -1
- package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
- package/dist/collection/components/six-drawer/test/six-drawer.spec.js +1 -1
- package/dist/collection/components/six-drawer/test/six-drawer.spec.js.map +1 -1
- package/dist/collection/components/six-dropdown/six-dropdown.css +2 -1
- package/dist/collection/components/six-error/six-error.css +5 -0
- package/dist/collection/components/six-error/six-error.js +25 -0
- package/dist/collection/components/six-error/six-error.js.map +1 -0
- package/dist/collection/components/six-group-label/six-group-label.css +4 -1
- package/dist/collection/components/six-group-label/test/six-group-label.spec.js +3 -1
- package/dist/collection/components/six-group-label/test/six-group-label.spec.js.map +1 -1
- package/dist/collection/components/six-icon-button/six-icon-button.css +4 -4
- package/dist/collection/components/six-input/six-input.css +4 -1
- package/dist/collection/components/six-input/six-input.js +27 -4
- package/dist/collection/components/six-input/six-input.js.map +1 -1
- package/dist/collection/components/six-input/test/six-input.spec.js +3 -1
- package/dist/collection/components/six-input/test/six-input.spec.js.map +1 -1
- package/dist/collection/components/six-range/six-range.css +4 -1
- package/dist/collection/components/six-range/six-range.js +24 -3
- package/dist/collection/components/six-range/six-range.js.map +1 -1
- package/dist/collection/components/six-range/test/six-range.spec.js +3 -1
- package/dist/collection/components/six-range/test/six-range.spec.js.map +1 -1
- package/dist/collection/components/six-select/six-select.css +4 -1
- package/dist/collection/components/six-select/six-select.js +24 -3
- package/dist/collection/components/six-select/six-select.js.map +1 -1
- package/dist/collection/components/six-select/test/six-select.spec.js +6 -2
- package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -1
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.css +6 -1
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +21 -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 +11 -0
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +29 -1
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
- package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js +2 -2
- package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js.map +1 -1
- package/dist/collection/components/six-switch/six-switch.css +4 -1
- package/dist/collection/components/six-switch/six-switch.js +45 -4
- package/dist/collection/components/six-switch/six-switch.js.map +1 -1
- package/dist/collection/components/six-switch/test/six-switch.spec.js +6 -2
- package/dist/collection/components/six-switch/test/six-switch.spec.js.map +1 -1
- package/dist/collection/components/six-tab/six-tab.css +54 -5
- package/dist/collection/components/six-tab/six-tab.js +18 -2
- package/dist/collection/components/six-tab/six-tab.js.map +1 -1
- package/dist/collection/components/six-tab-group/six-tab-group.css +0 -31
- package/dist/collection/components/six-tab-group/six-tab-group.js +10 -51
- package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
- package/dist/collection/components/six-tag/six-tag.js +23 -1
- package/dist/collection/components/six-tag/six-tag.js.map +1 -1
- package/dist/collection/components/six-tag/test/six-tag.spec.js +12 -0
- package/dist/collection/components/six-tag/test/six-tag.spec.js.map +1 -1
- package/dist/collection/components/six-textarea/six-textarea.css +4 -1
- package/dist/collection/components/six-textarea/six-textarea.js +25 -4
- package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
- package/dist/collection/components/six-textarea/test/six-textarea.spec.js +3 -1
- package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -1
- package/dist/collection/components/six-timepicker/six-timepicker.js +24 -12
- package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
- package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js +15 -15
- package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -1
- package/dist/collection/components/six-tooltip/six-tooltip.css +1 -1
- package/dist/collection/components/six-tooltip/six-tooltip.js +1 -1
- package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
- package/dist/collection/functional-components/form-control/form-control.js +8 -6
- package/dist/collection/functional-components/form-control/form-control.js.map +1 -1
- package/dist/collection/utils/animation.js +34 -0
- package/dist/collection/utils/animation.js.map +1 -0
- package/dist/collection/utils/error-messages.js +14 -0
- package/dist/collection/utils/error-messages.js.map +1 -1
- package/dist/components/form-control.js +9 -6
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +18 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/scroll.js +1 -1
- package/dist/components/set-attributes2.js +2 -0
- package/dist/components/set-attributes2.js.map +1 -1
- package/dist/components/six-alert.js +3 -0
- package/dist/components/six-alert.js.map +1 -1
- package/dist/components/six-button.js +3 -3
- package/dist/components/six-button.js.map +1 -1
- package/dist/components/six-checkbox.js +19 -3
- package/dist/components/six-checkbox.js.map +1 -1
- package/dist/components/six-datepicker.js +14 -9
- package/dist/components/six-datepicker.js.map +1 -1
- package/dist/components/six-details2.js +3 -1
- package/dist/components/six-details2.js.map +1 -1
- package/dist/components/six-dialog.js +2 -0
- package/dist/components/six-dialog.js.map +1 -1
- package/dist/components/six-drawer.js +3 -1
- package/dist/components/six-drawer.js.map +1 -1
- package/dist/components/six-dropdown2.js +15 -2
- package/dist/components/six-dropdown2.js.map +1 -1
- package/dist/components/six-error.d.ts +11 -0
- package/dist/components/six-error.js +8 -0
- package/dist/components/six-error.js.map +1 -0
- package/dist/components/six-error2.js +32 -0
- package/dist/components/six-error2.js.map +1 -0
- package/dist/components/six-group-label.js +11 -2
- package/dist/components/six-group-label.js.map +1 -1
- package/dist/components/six-header.js +10 -2
- package/dist/components/six-header.js.map +1 -1
- package/dist/components/six-icon-button2.js +1 -1
- package/dist/components/six-icon-button2.js.map +1 -1
- package/dist/components/six-input2.js +19 -3
- package/dist/components/six-input2.js.map +1 -1
- package/dist/components/six-item-picker2.js +4 -0
- package/dist/components/six-item-picker2.js.map +1 -1
- package/dist/components/six-language-switcher.js +2 -0
- package/dist/components/six-language-switcher.js.map +1 -1
- package/dist/components/six-layout-grid.js +2 -0
- package/dist/components/six-layout-grid.js.map +1 -1
- package/dist/components/six-progress-ring.js +2 -0
- package/dist/components/six-progress-ring.js.map +1 -1
- package/dist/components/six-radio.js +3 -0
- package/dist/components/six-radio.js.map +1 -1
- package/dist/components/six-range.js +21 -3
- package/dist/components/six-range.js.map +1 -1
- package/dist/components/six-root.js +2 -0
- package/dist/components/six-root.js.map +1 -1
- package/dist/components/six-search-field.js +9 -1
- package/dist/components/six-search-field.js.map +1 -1
- package/dist/components/six-select.js +40 -16
- package/dist/components/six-select.js.map +1 -1
- package/dist/components/six-sidebar-item-group.js +14 -2
- package/dist/components/six-sidebar-item-group.js.map +1 -1
- package/dist/components/six-sidebar-item.js +7 -4
- package/dist/components/six-sidebar-item.js.map +1 -1
- package/dist/components/six-sidebar.js +2 -0
- package/dist/components/six-sidebar.js.map +1 -1
- package/dist/components/six-switch.js +34 -4
- package/dist/components/six-switch.js.map +1 -1
- package/dist/components/six-tab-group.js +47 -50
- package/dist/components/six-tab-group.js.map +1 -1
- package/dist/components/six-tab.js +19 -3
- package/dist/components/six-tab.js.map +1 -1
- package/dist/components/six-tag2.js +33 -5
- package/dist/components/six-tag2.js.map +1 -1
- package/dist/components/six-textarea.js +20 -3
- package/dist/components/six-textarea.js.map +1 -1
- package/dist/components/six-timepicker2.js +15 -11
- package/dist/components/six-timepicker2.js.map +1 -1
- package/dist/components/six-tooltip2.js +4 -2
- package/dist/components/six-tooltip2.js.map +1 -1
- package/dist/components.json +475 -57
- package/dist/esm/{form-control-32cb533f.js → form-control-079f7fb6.js} +11 -8
- package/dist/esm/form-control-079f7fb6.js.map +1 -0
- package/dist/esm/{index-8a74f992.js → index-4ee8b33e.js} +495 -122
- package/dist/esm/index-4ee8b33e.js.map +1 -0
- package/dist/esm/index.js +15 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{scroll-3fb087a2.js → scroll-774762d6.js} +2 -2
- package/dist/esm/{scroll-3fb087a2.js.map → scroll-774762d6.js.map} +1 -1
- package/dist/esm/set-attributes_2.entry.js +1 -1
- package/dist/esm/six-alert.entry.js +1 -1
- package/dist/esm/six-avatar.entry.js +1 -1
- package/dist/esm/six-badge.entry.js +1 -1
- package/dist/esm/six-button.entry.js +4 -4
- package/dist/esm/six-button.entry.js.map +1 -1
- package/dist/esm/six-card.entry.js +1 -1
- package/dist/esm/six-checkbox.entry.js +7 -4
- package/dist/esm/six-checkbox.entry.js.map +1 -1
- package/dist/esm/six-datepicker.entry.js +3 -8
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +2 -2
- package/dist/esm/six-details.entry.js.map +1 -1
- package/dist/esm/six-dialog.entry.js +2 -2
- package/dist/esm/six-drawer.entry.js +3 -3
- package/dist/esm/six-drawer.entry.js.map +1 -1
- package/dist/esm/six-dropdown_2.entry.js +2 -2
- package/dist/esm/six-dropdown_2.entry.js.map +1 -1
- package/dist/esm/six-error-page.entry.js +1 -1
- package/dist/esm/six-error.entry.js +17 -0
- package/dist/esm/six-error.entry.js.map +1 -0
- package/dist/esm/six-file-list-item.entry.js +1 -1
- package/dist/esm/six-file-list.entry.js +1 -1
- package/dist/esm/six-file-upload.entry.js +1 -1
- package/dist/esm/six-footer.entry.js +1 -1
- package/dist/esm/six-group-label.entry.js +3 -3
- package/dist/esm/six-group-label.entry.js.map +1 -1
- package/dist/esm/six-header.entry.js +1 -1
- package/dist/esm/six-icon-button.entry.js +2 -2
- package/dist/esm/six-icon-button.entry.js.map +1 -1
- package/dist/esm/six-icon.entry.js +1 -1
- package/dist/esm/six-input.entry.js +7 -4
- package/dist/esm/six-input.entry.js.map +1 -1
- package/dist/esm/six-item-picker.entry.js +1 -1
- package/dist/esm/six-language-switcher.entry.js +1 -1
- package/dist/esm/six-layout-grid.entry.js +1 -1
- package/dist/esm/six-main-container.entry.js +1 -1
- package/dist/esm/six-menu-divider.entry.js +1 -1
- package/dist/esm/six-menu-item.entry.js +1 -1
- package/dist/esm/six-menu-label.entry.js +1 -1
- package/dist/esm/six-picto.entry.js +1 -1
- package/dist/esm/six-progress-bar.entry.js +1 -1
- package/dist/esm/six-progress-ring.entry.js +1 -1
- package/dist/esm/six-radio.entry.js +1 -1
- package/dist/esm/six-range.entry.js +7 -4
- package/dist/esm/six-range.entry.js.map +1 -1
- package/dist/esm/six-root.entry.js +1 -1
- package/dist/esm/six-search-field.entry.js +1 -1
- package/dist/esm/six-select.entry.js +7 -4
- package/dist/esm/six-select.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item-group.entry.js +14 -3
- package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item.entry.js +6 -4
- package/dist/esm/six-sidebar-item.entry.js.map +1 -1
- package/dist/esm/six-sidebar.entry.js +2 -2
- package/dist/esm/six-spinner.entry.js +1 -1
- package/dist/esm/six-switch.entry.js +23 -5
- package/dist/esm/six-switch.entry.js.map +1 -1
- package/dist/esm/six-tab-group.entry.js +46 -51
- package/dist/esm/six-tab-group.entry.js.map +1 -1
- package/dist/esm/six-tab-panel.entry.js +1 -1
- package/dist/esm/six-tab.entry.js +20 -4
- package/dist/esm/six-tab.entry.js.map +1 -1
- package/dist/esm/six-tag.entry.js +24 -2
- package/dist/esm/six-tag.entry.js.map +1 -1
- package/dist/esm/six-textarea.entry.js +7 -4
- package/dist/esm/six-textarea.entry.js.map +1 -1
- package/dist/esm/six-tile.entry.js +1 -1
- package/dist/esm/six-timepicker.entry.js +5 -10
- package/dist/esm/six-timepicker.entry.js.map +1 -1
- package/dist/esm/six-tooltip.entry.js +3 -3
- package/dist/esm/six-tooltip.entry.js.map +1 -1
- package/dist/esm/ui-library.js +4 -4
- package/dist/esm/ui-library.js.map +1 -1
- package/dist/types/components/six-checkbox/six-checkbox.d.ts +4 -1
- package/dist/types/components/six-datepicker/six-datepicker.d.ts +4 -2
- package/dist/types/components/six-error/six-error.d.ts +9 -0
- package/dist/types/components/six-input/six-input.d.ts +7 -2
- package/dist/types/components/six-range/six-range.d.ts +4 -1
- package/dist/types/components/six-select/six-select.d.ts +4 -1
- package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +5 -0
- package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +6 -0
- package/dist/types/components/six-switch/six-switch.d.ts +8 -1
- package/dist/types/components/six-tab-group/six-tab-group.d.ts +0 -3
- package/dist/types/components/six-tag/six-tag.d.ts +8 -0
- package/dist/types/components/six-textarea/six-textarea.d.ts +4 -1
- package/dist/types/components/six-timepicker/six-timepicker.d.ts +5 -2
- package/dist/types/components.d.ts +505 -16
- package/dist/types/functional-components/form-control/form-control.d.ts +6 -2
- package/dist/types/stencil-public-runtime.d.ts +26 -3
- package/dist/types/utils/animation.d.ts +12 -0
- package/dist/types/utils/error-messages.d.ts +2 -1
- package/dist/ui-library/index.esm.js +1 -1
- package/dist/ui-library/index.esm.js.map +1 -1
- package/dist/ui-library/{p-330a4988.entry.js → p-0416ec85.entry.js} +2 -2
- package/dist/ui-library/{p-1f18768a.js → p-052aa8d3.js} +2 -2
- package/dist/ui-library/{p-ae601a0f.entry.js → p-0d8154b1.entry.js} +2 -2
- package/dist/ui-library/p-120a1b66.entry.js +2 -0
- package/dist/ui-library/p-120a1b66.entry.js.map +1 -0
- package/dist/ui-library/{p-9c1be3fb.entry.js → p-16eb37cd.entry.js} +2 -2
- package/dist/ui-library/{p-878226a0.entry.js → p-1f7dac36.entry.js} +2 -2
- package/dist/ui-library/{p-a6a9ee96.entry.js → p-20cb60c9.entry.js} +2 -2
- package/dist/ui-library/{p-613283a7.entry.js → p-21606e14.entry.js} +2 -2
- package/dist/ui-library/{p-411ed539.entry.js → p-2280038f.entry.js} +2 -2
- package/dist/ui-library/p-24e80289.entry.js +2 -0
- package/dist/ui-library/p-24e80289.entry.js.map +1 -0
- package/dist/ui-library/{p-264d4ea8.entry.js → p-27987d45.entry.js} +2 -2
- package/dist/ui-library/{p-cd67da3d.entry.js → p-2945a132.entry.js} +2 -2
- package/dist/ui-library/{p-3cc5addb.entry.js → p-2e99f389.entry.js} +2 -2
- package/dist/ui-library/p-3d7678a8.entry.js +2 -0
- package/dist/ui-library/p-3d7678a8.entry.js.map +1 -0
- package/dist/ui-library/p-4196a75a.entry.js +2 -0
- package/dist/ui-library/p-4196a75a.entry.js.map +1 -0
- package/dist/ui-library/p-48b7c199.entry.js +2 -0
- package/dist/ui-library/p-48b7c199.entry.js.map +1 -0
- package/dist/ui-library/{p-37557787.entry.js → p-51630491.entry.js} +2 -2
- package/dist/ui-library/{p-ed381ad9.entry.js → p-5218986b.entry.js} +2 -2
- package/dist/ui-library/p-5218986b.entry.js.map +1 -0
- package/dist/ui-library/p-5904d3c3.entry.js +2 -0
- package/dist/ui-library/p-5904d3c3.entry.js.map +1 -0
- package/dist/ui-library/p-66a48dc4.entry.js +2 -0
- package/dist/ui-library/{p-d367f4f9.entry.js.map → p-66a48dc4.entry.js.map} +1 -1
- package/dist/ui-library/{p-91b51800.entry.js → p-66d1d93d.entry.js} +2 -2
- package/dist/ui-library/p-6aced322.entry.js +2 -0
- package/dist/ui-library/p-6aced322.entry.js.map +1 -0
- package/dist/ui-library/p-6e87aeea.entry.js +2 -0
- package/dist/ui-library/p-6e87aeea.entry.js.map +1 -0
- package/dist/ui-library/p-74179b03.entry.js +2 -0
- package/dist/ui-library/p-74179b03.entry.js.map +1 -0
- package/dist/ui-library/{p-1d5ee1a0.entry.js → p-77424c6b.entry.js} +2 -2
- package/dist/ui-library/{p-13b43e04.entry.js → p-7d00de3a.entry.js} +2 -2
- package/dist/ui-library/{p-cdaed936.entry.js → p-7e9257f3.entry.js} +2 -2
- package/dist/ui-library/p-8226e363.entry.js +2 -0
- package/dist/ui-library/p-8226e363.entry.js.map +1 -0
- package/dist/ui-library/{p-99e24daf.entry.js → p-8296e24c.entry.js} +2 -2
- package/dist/ui-library/{p-99e24daf.entry.js.map → p-8296e24c.entry.js.map} +1 -1
- package/dist/ui-library/{p-7e3ad38a.entry.js → p-93a9b693.entry.js} +2 -2
- package/dist/ui-library/{p-5af44076.entry.js → p-94bd8347.entry.js} +2 -2
- package/dist/ui-library/{p-ee950ce2.entry.js → p-9bec3e14.entry.js} +2 -2
- package/dist/ui-library/{p-9b354f5d.entry.js → p-a15928c4.entry.js} +2 -2
- package/dist/ui-library/p-a4348ad4.entry.js +2 -0
- package/dist/ui-library/p-a4348ad4.entry.js.map +1 -0
- package/dist/ui-library/{p-7afafb9d.entry.js → p-acd3ecfd.entry.js} +2 -2
- package/dist/ui-library/p-ae383f66.entry.js +2 -0
- package/dist/ui-library/p-ae383f66.entry.js.map +1 -0
- package/dist/ui-library/p-af0e163e.entry.js +2 -0
- package/dist/ui-library/p-af0e163e.entry.js.map +1 -0
- package/dist/ui-library/p-b3a14438.entry.js +2 -0
- package/dist/ui-library/p-b3a14438.entry.js.map +1 -0
- package/dist/ui-library/{p-dfed33c5.entry.js → p-b42fd9c3.entry.js} +2 -2
- package/dist/ui-library/p-b5fdfa6a.js +3 -0
- package/dist/ui-library/p-b5fdfa6a.js.map +1 -0
- package/dist/ui-library/p-b7597736.entry.js +2 -0
- package/dist/ui-library/p-b7597736.entry.js.map +1 -0
- package/dist/ui-library/{p-c03ebf7d.entry.js → p-b906a605.entry.js} +2 -2
- package/dist/ui-library/{p-ac099e6b.entry.js → p-b97764a1.entry.js} +2 -2
- package/dist/ui-library/p-bbefcec9.entry.js +2 -0
- package/dist/ui-library/p-bbefcec9.entry.js.map +1 -0
- package/dist/ui-library/{p-b351f889.entry.js → p-c75694df.entry.js} +2 -2
- package/dist/ui-library/p-cb32f8d2.entry.js +2 -0
- package/dist/ui-library/p-cb32f8d2.entry.js.map +1 -0
- package/dist/ui-library/{p-a0f290d0.entry.js → p-cd3281fb.entry.js} +2 -2
- package/dist/ui-library/{p-19ed7a4c.entry.js → p-cec8c149.entry.js} +2 -2
- package/dist/ui-library/{p-724875b0.entry.js → p-d1ba2ad5.entry.js} +2 -2
- package/dist/ui-library/{p-346f9557.entry.js → p-d2196113.entry.js} +2 -2
- package/dist/ui-library/p-de7a9448.entry.js +2 -0
- package/dist/ui-library/p-de7a9448.entry.js.map +1 -0
- package/dist/ui-library/{p-a55c7258.entry.js → p-df1c4a1f.entry.js} +2 -2
- package/dist/ui-library/{p-95fbdd0b.entry.js → p-e740215a.entry.js} +2 -2
- package/dist/ui-library/p-f3fdc121.js +2 -0
- package/dist/ui-library/p-f3fdc121.js.map +1 -0
- package/dist/ui-library/ui-library.css +2 -2
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -1
- package/package.json +14 -11
- package/dist/cjs/form-control-d369af14.js.map +0 -1
- package/dist/cjs/index-900437fc.js.map +0 -1
- package/dist/cjs/scroll-03678de1.js.map +0 -1
- package/dist/collection/components/six-tab/test/six-tab.spec.js +0 -20
- package/dist/collection/components/six-tab/test/six-tab.spec.js.map +0 -1
- package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js +0 -45
- package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js.map +0 -1
- package/dist/esm/form-control-32cb533f.js.map +0 -1
- package/dist/esm/index-8a74f992.js.map +0 -1
- package/dist/ui-library/p-02981b91.entry.js +0 -2
- package/dist/ui-library/p-02981b91.entry.js.map +0 -1
- package/dist/ui-library/p-1256cc0a.entry.js +0 -2
- package/dist/ui-library/p-1256cc0a.entry.js.map +0 -1
- package/dist/ui-library/p-21b3b321.entry.js +0 -2
- package/dist/ui-library/p-21b3b321.entry.js.map +0 -1
- package/dist/ui-library/p-29ac3d7d.entry.js +0 -2
- package/dist/ui-library/p-29ac3d7d.entry.js.map +0 -1
- package/dist/ui-library/p-314b2096.entry.js +0 -2
- package/dist/ui-library/p-314b2096.entry.js.map +0 -1
- package/dist/ui-library/p-3d9de119.entry.js +0 -2
- package/dist/ui-library/p-3d9de119.entry.js.map +0 -1
- package/dist/ui-library/p-4705a51e.entry.js +0 -2
- package/dist/ui-library/p-4705a51e.entry.js.map +0 -1
- package/dist/ui-library/p-4abed9df.entry.js +0 -2
- package/dist/ui-library/p-4abed9df.entry.js.map +0 -1
- package/dist/ui-library/p-5d6b7353.entry.js +0 -2
- package/dist/ui-library/p-5d6b7353.entry.js.map +0 -1
- package/dist/ui-library/p-6153045b.js +0 -3
- package/dist/ui-library/p-6153045b.js.map +0 -1
- package/dist/ui-library/p-6197fe2f.entry.js +0 -2
- package/dist/ui-library/p-6197fe2f.entry.js.map +0 -1
- package/dist/ui-library/p-72254eef.entry.js +0 -2
- package/dist/ui-library/p-72254eef.entry.js.map +0 -1
- package/dist/ui-library/p-83864cfe.entry.js +0 -2
- package/dist/ui-library/p-83864cfe.entry.js.map +0 -1
- package/dist/ui-library/p-9f0b43f9.entry.js +0 -2
- package/dist/ui-library/p-9f0b43f9.entry.js.map +0 -1
- package/dist/ui-library/p-b550a258.entry.js +0 -2
- package/dist/ui-library/p-b550a258.entry.js.map +0 -1
- package/dist/ui-library/p-bf87464b.entry.js +0 -2
- package/dist/ui-library/p-bf87464b.entry.js.map +0 -1
- package/dist/ui-library/p-d367f4f9.entry.js +0 -2
- package/dist/ui-library/p-d42c2025.js +0 -2
- package/dist/ui-library/p-d42c2025.js.map +0 -1
- package/dist/ui-library/p-ed381ad9.entry.js.map +0 -1
- package/dist/ui-library/p-ee8342e1.entry.js +0 -2
- package/dist/ui-library/p-ee8342e1.entry.js.map +0 -1
- package/dist/ui-library/p-ff90ffd1.entry.js +0 -2
- package/dist/ui-library/p-ff90ffd1.entry.js.map +0 -1
- package/readme.md +0 -156
- /package/dist/ui-library/{p-330a4988.entry.js.map → p-0416ec85.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1f18768a.js.map → p-052aa8d3.js.map} +0 -0
- /package/dist/ui-library/{p-ae601a0f.entry.js.map → p-0d8154b1.entry.js.map} +0 -0
- /package/dist/ui-library/{p-9c1be3fb.entry.js.map → p-16eb37cd.entry.js.map} +0 -0
- /package/dist/ui-library/{p-878226a0.entry.js.map → p-1f7dac36.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a6a9ee96.entry.js.map → p-20cb60c9.entry.js.map} +0 -0
- /package/dist/ui-library/{p-613283a7.entry.js.map → p-21606e14.entry.js.map} +0 -0
- /package/dist/ui-library/{p-411ed539.entry.js.map → p-2280038f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-264d4ea8.entry.js.map → p-27987d45.entry.js.map} +0 -0
- /package/dist/ui-library/{p-cd67da3d.entry.js.map → p-2945a132.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3cc5addb.entry.js.map → p-2e99f389.entry.js.map} +0 -0
- /package/dist/ui-library/{p-37557787.entry.js.map → p-51630491.entry.js.map} +0 -0
- /package/dist/ui-library/{p-91b51800.entry.js.map → p-66d1d93d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1d5ee1a0.entry.js.map → p-77424c6b.entry.js.map} +0 -0
- /package/dist/ui-library/{p-13b43e04.entry.js.map → p-7d00de3a.entry.js.map} +0 -0
- /package/dist/ui-library/{p-cdaed936.entry.js.map → p-7e9257f3.entry.js.map} +0 -0
- /package/dist/ui-library/{p-7e3ad38a.entry.js.map → p-93a9b693.entry.js.map} +0 -0
- /package/dist/ui-library/{p-5af44076.entry.js.map → p-94bd8347.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ee950ce2.entry.js.map → p-9bec3e14.entry.js.map} +0 -0
- /package/dist/ui-library/{p-9b354f5d.entry.js.map → p-a15928c4.entry.js.map} +0 -0
- /package/dist/ui-library/{p-7afafb9d.entry.js.map → p-acd3ecfd.entry.js.map} +0 -0
- /package/dist/ui-library/{p-dfed33c5.entry.js.map → p-b42fd9c3.entry.js.map} +0 -0
- /package/dist/ui-library/{p-c03ebf7d.entry.js.map → p-b906a605.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ac099e6b.entry.js.map → p-b97764a1.entry.js.map} +0 -0
- /package/dist/ui-library/{p-b351f889.entry.js.map → p-c75694df.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a0f290d0.entry.js.map → p-cd3281fb.entry.js.map} +0 -0
- /package/dist/ui-library/{p-19ed7a4c.entry.js.map → p-cec8c149.entry.js.map} +0 -0
- /package/dist/ui-library/{p-724875b0.entry.js.map → p-d1ba2ad5.entry.js.map} +0 -0
- /package/dist/ui-library/{p-346f9557.entry.js.map → p-d2196113.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a55c7258.entry.js.map → p-df1c4a1f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-95fbdd0b.entry.js.map → p-e740215a.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sixButtonCss","SixButton","this","handleSlotChange","hasLabel","hasSlot","host","hasPrefix","hasSuffix","handleBlur","hasFocus","sixBlur","emit","handleFocus","sixFocus","handleClick","event","disabled","loading","preventDefault","stopPropagation","submit","submitForm","componentWillLoad","setFocus","options","_a","nativeButton","focus","removeFocus","blur","render","isLink","href","isButton","Button","h","class","ref","el","part","button","type","size","caret","circle","pill","undefined","reset","name","value","target","download","rel","onBlur","onFocus","onClick","onSlotchange","viewBox","fill","stroke","points"],"sources":["src/components/six-button/six-button.scss?tag=six-button&encapsulation=shadow","src/components/six-button/six-button.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n width: auto;\n cursor: pointer;\n}\n\n.button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--six-border-width);\n border-radius: 0;\n font-family: var(--six-font-family);\n font-weight: var(--six-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition: var(--six-transition-fast) background-color, var(--six-transition-fast) color,\n var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;\n cursor: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &.button--disabled {\n pointer-events: none;\n }\n\n // Clicks on icons shouldn't prevent the button from gaining focus\n ::slotted(six-icon) {\n pointer-events: none;\n }\n}\n\n.button-wrapper--disabled {\n cursor: not-allowed;\n}\n\n.button__prefix,\n.button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Standard buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button {\n &.button--secondary {\n background-color: var(--six-color-white);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n border-color: var(--six-color-web-rock-400);\n box-shadow: var(--six-button-focus-shadow);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-900);\n border-width: var(--six-focus-ring-width);\n }\n }\n\n &.button--primary {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-800);\n border-color: var(--six-color-web-rock-800);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-400);\n box-shadow: var(--six-button-focus-shadow);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n opacity: 70%;\n }\n }\n\n &.button--link {\n background-color: transparent;\n border-color: transparent;\n color: var(--six-color-action-500);\n\n &.button--disabled {\n color: var(--six-color-web-rock-400);\n }\n\n &:hover:not(.button--disabled) {\n color: var(--six-color-action-600);\n }\n\n &:focus:not(.button--disabled) {\n border-color: var(--six-color-web-rock-400);\n }\n\n &:active:not(.button--disabled) {\n color: var(--six-color-action-light-to-be-defined);\n }\n }\n\n &.button--danger {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-danger-900);\n border-color: var(--six-color-danger-900);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-web-rock-400);\n box-shadow: var(--six-button-focus-shadow);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n opacity: 70%;\n }\n }\n\n &.button--warning {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-warning-800);\n border-color: var(--six-color-warning-800);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-web-rock-400);\n box-shadow: var(--six-button-focus-shadow);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n opacity: 70%;\n }\n }\n\n &.button--success {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-success-600);\n border-color: var(--six-color-success-600);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-web-rock-400);\n box-shadow: var(--six-button-focus-shadow);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n opacity: 70%;\n }\n }\n\n &.button--action {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-action-600);\n border-color: var(--six-color-action-600);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-web-rock-400);\n box-shadow: var(--six-button-focus-shadow);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--small {\n font-size: var(--six-button-font-size-small);\n height: var(--six-height-small);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n}\n\n.button--medium {\n font-size: var(--six-button-font-size-medium);\n height: var(--six-height-medium);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n}\n\n.button--large {\n font-size: var(--six-button-font-size-large);\n height: var(--six-height-large);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--pill {\n &.button--small {\n border-radius: var(--six-height-small);\n }\n\n &.button--medium {\n border-radius: var(--six-height-medium);\n }\n\n &.button--large {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Circle modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--circle {\n padding-left: 0;\n padding-right: 0;\n font-size: revert;\n\n &.button--small {\n width: var(--six-height-small);\n border-radius: 50%;\n }\n\n &.button--medium {\n width: var(--six-height-medium);\n border-radius: 50%;\n }\n\n &.button--large {\n width: var(--six-height-large);\n border-radius: 50%;\n }\n\n .button__prefix,\n .button__suffix,\n .button__caret {\n display: none;\n\n svg {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Caret modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--caret {\n .button__suffix {\n display: none;\n }\n\n .button__caret {\n display: flex;\n align-items: center;\n\n svg {\n color: var(--six-color-web-rock-900);\n width: 1em;\n height: 1em;\n }\n }\n}\n\n.button--primary,\n.button--action,\n.button--danger {\n .button__caret {\n svg {\n color: var(--six-color-white);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Loading modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--loading {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n\n six-spinner {\n --indicator-color: currentColor;\n position: absolute;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Badges\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button ::slotted(six-badge) {\n position: absolute;\n top: 0;\n right: 0;\n transform: translateY(-50%) translateX(50%);\n pointer-events: none;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button spacing\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--has-label {\n &.button--small .button__label {\n padding: 0 var(--six-spacing-small);\n }\n\n &.button--medium .button__label {\n padding: 0 var(--six-spacing-medium);\n }\n\n &.button--large .button__label {\n padding: 0 var(--six-spacing-large);\n }\n}\n\n.button--has-prefix {\n &.button--small {\n padding-left: var(--six-spacing-x-small);\n\n .button__label {\n padding-left: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n}\n\n.button--has-suffix,\n.button--caret {\n &.button--small {\n padding-right: var(--six-spacing-x-small);\n\n .button__label {\n padding-right: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'secondary' | 'primary' | 'link' | 'success' | 'warning' | 'danger' | 'action' =\n 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,c as t,h as r,g as i}from"./p-6153045b.js";import{F as e}from"./p-d42c2025.js";import{h as a}from"./p-15559d38.js";import{E as s}from"./p-7d95def3.js";const l=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:"*"}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;color:var(--six-color-danger-800);margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{--thumb-size:14px;--tooltip-offset-y:10px;--track-color:var(--six-color-web-rock-900);--thumb-color:var(--six-color-web-rock-900);--track-height:3px;display:block}.range{position:relative}.range .range__control{-webkit-appearance:none;width:100%;height:var(--six-input-height-medium);background:transparent;line-height:var(--six-input-height-medium);vertical-align:middle}.range .range__control::-webkit-slider-runnable-track{width:100%;height:var(--track-height);border-radius:3px;border:none}.range .range__control::-webkit-slider-thumb{border:none;width:var(--thumb-size);height:var(--thumb-size);border-radius:50%;background-color:var(--thumb-color);-webkit-appearance:none;margin-top:calc(var(--thumb-size) / -2 + var(--track-height) / 2);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) box-shadow, var(--six-transition-fast) transform;cursor:pointer}.range .range__control:not(:disabled)::-webkit-slider-thumb:hover{background-color:var(--thumb-color)}.range .range__control:not(:disabled):focus::-webkit-slider-thumb{background-color:var(--thumb-color)}.range .range__control:not(:disabled)::-webkit-slider-thumb:active{background-color:var(--thumb-color);cursor:grabbing}.range .range__control::-moz-focus-outer{border:0}.range .range__control::-moz-range-track{width:100%;height:var(--track-height);background-color:var(--six-progress-track-color);border-radius:3px;border:none}.range .range__control::-moz-range-progress{height:var(--track-height);border-radius:3px;background-color:var(--track-color);border:none}.range .range__control::-moz-range-thumb{border:none;height:var(--thumb-size);width:var(--thumb-size);border-radius:50%;background-color:var(--thumb-color);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) box-shadow, var(--six-transition-fast) transform;cursor:pointer}.range .range__control:not(:disabled)::-moz-range-thumb:hover{background-color:var(--thumb-color)}.range .range__control:not(:disabled):focus::-moz-range-thumb{background-color:var(--thumb-color)}.range .range__control:not(:disabled)::-moz-range-thumb:active{background-color:var(--thumb-color);cursor:grabbing}.range .range__control:focus{outline:none}.range .range__control:disabled::-webkit-slider-thumb{cursor:not-allowed;color:var(--six-color-web-rock-300);border-color:var(--six-color-web-rock-300);background-color:var(--six-color-web-rock-300)}.range .range__control:disabled::-moz-range-thumb{cursor:not-allowed;color:var(--six-color-web-rock-300);border-color:var(--six-color-web-rock-300);background-color:var(--six-color-web-rock-300)}.range__tooltip{position:absolute;z-index:var(--six-z-index-tooltip);left:1px;border-radius:var(--six-border-radius-medium);background-color:var(--six-color-web-rock-900);font-family:var(--six-font-family);font-size:var(--six-tooltip-font-size);font-weight:var(--six-tooltip-font-weight);line-height:var(--six-tooltip-line-height);color:var(--six-color-white);opacity:0;padding:var(--six-spacing-xxx-small) var(--six-spacing-xx-small);transition:var(--six-transition-fast) opacity;pointer-events:none}.range__tooltip::after{content:"";position:absolute;width:0;height:0;left:50%;margin-left:calc(-1 * var(--six-tooltip-arrow-size))}.range--tooltip-visible .range__tooltip{opacity:1}.range--tooltip-top .range__tooltip{top:calc(-1 * var(--thumb-size) - var(--tooltip-offset-y))}.range--tooltip-top .range__tooltip::after{border-top:var(--six-tooltip-arrow-size) solid var(--six-color-web-rock-900);border-left:var(--six-tooltip-arrow-size) solid transparent;border-right:var(--six-tooltip-arrow-size) solid transparent;top:100%}.range--tooltip-bottom .range__tooltip{bottom:calc(-1 * var(--thumb-size) - var(--tooltip-offset-y))}.range--tooltip-bottom .range__tooltip::after{border-bottom:var(--six-tooltip-arrow-size) solid var(--six-color-web-rock-900);border-left:var(--six-tooltip-arrow-size) solid transparent;border-right:var(--six-tooltip-arrow-size) solid transparent;bottom:100%}';let n=0;const h=class{constructor(r){o(this,r);this.sixChange=t(this,"six-range-change",7);this.sixBlur=t(this,"six-range-blur",7);this.sixFocus=t(this,"six-range-focus",7);this.inputId=`input-${++n}`;this.labelId=`input-label-${n}`;this.helpTextId=`input-help-text-${n}`;this.errorTextId=`input-error-text-${n}`;this.eventListeners=new s;this.handleInput=()=>{if(this.nativeInput!=null){this.update(parseFloat(this.nativeInput.value))}requestAnimationFrame((()=>{this.sixChange.emit()}))};this.handleBlur=()=>{var o;this.hasFocus=false;this.hasTooltip=false;this.sixBlur.emit();if(this.nativeInput!=null){(o=this.resizeObserver)===null||o===void 0?void 0:o.unobserve(this.nativeInput)}};this.handleFocus=()=>{var o;this.hasFocus=true;this.hasTooltip=true;this.sixFocus.emit();if(this.nativeInput!=null){(o=this.resizeObserver)===null||o===void 0?void 0:o.observe(this.nativeInput)}};this.handleSlotChange=()=>{this.hasHelpTextSlot=a(this.host,"help-text");this.hasLabelSlot=a(this.host,"label")};this.handleTouchStart=()=>{this.setFocus()};this.hasFocus=false;this.hasHelpTextSlot=false;this.hasLabelSlot=false;this.hasTooltip=false;this.name="";this.value=0;this.required=false;this.helpText="";this.disabled=false;this.label="";this.errorText="";this.invalid=false;this.min=0;this.max=100;this.step=1;this.tooltip="top";this.tooltipFormatter=o=>o.toString()}handleLabelChange(){this.handleSlotChange()}handleValueChange(){this.update()}connectedCallback(){var o;(o=this.host.shadowRoot)===null||o===void 0?void 0:o.addEventListener("slotchange",this.handleSlotChange)}componentWillLoad(){this.update();this.handleSlotChange()}componentDidLoad(){const o=this.nativeInput;if(o==null){return}this.update();this.resizeObserver=new ResizeObserver((()=>this.update()))}disconnectedCallback(){var o;(o=this.host.shadowRoot)===null||o===void 0?void 0:o.removeEventListener("slotchange",this.handleSlotChange);this.eventListeners.removeAll()}async setFocus(o){var t;(t=this.nativeInput)===null||t===void 0?void 0:t.focus(o)}async removeFocus(){var o;(o=this.nativeInput)===null||o===void 0?void 0:o.blur()}syncTooltip(o,t,r){if(this.tooltip!=="none"&&this.nativeInput!=null&&this.output!=null){const i=Math.max(0,(r-o)/(t-o));const e=this.nativeInput.offsetWidth;const a=this.output.offsetWidth;const s=getComputedStyle(this.nativeInput).getPropertyValue("--thumb-size");const l=`calc(${e*i}px - calc(calc(${i} * ${s}) - calc(${s} / 2)))`;this.output.style.transform=`translateX(${l})`;this.output.style.marginLeft=`-${a/2}px`}}isFirefox(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}update(o){var t,r;if(o!=null){this.value=o}const i=(t=Number(this.min))!==null&&t!==void 0?t:0;const e=(r=Number(this.max))!==null&&r!==void 0?r:0;let a;const s=parseFloat(this.value);if(isNaN(s)){a=this.getDefaultValue(i,e)}else{a=s}if(this.nativeInput!=null){this.nativeInput.value=a.toString();this.value=parseFloat(this.nativeInput.value)}else{this.value=a}this.calculateColorRunnableTrack(i,e,this.value);this.syncTooltip(i,e,this.value)}getDefaultValue(o,t){return t<o?o:o+(t-o)/2}calculateColorRunnableTrack(o,t,r){if(!this.isFirefox()&&this.nativeInput!=null){const i=Math.ceil((r-o)/(t-o)*100);this.nativeInput.style.background="-webkit-linear-gradient(left, var(--track-color) 0%, var(--track-color) "+i+"%, var(--six-color-web-rock-300) "+i+"%)"}}render(){return r(e,{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,disabled:this.disabled,required:this.required,displayError:this.invalid},r("div",{part:"base",class:{range:true,"range--disabled":this.disabled,"range--focused":this.hasFocus,"range--tooltip-visible":this.hasTooltip,"range--tooltip-top":this.tooltip==="top","range--tooltip-bottom":this.tooltip==="bottom"},onTouchStart:this.handleTouchStart},r("input",{part:"input",ref:o=>this.nativeInput=o,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"&&r("output",{part:"tooltip",ref:o=>this.output=o,class:"range__tooltip"},this.tooltipFormatter(this.value))))}get host(){return i(this)}static get watchers(){return{label:["handleLabelChange"],errorText:["handleLabelChange"],helpText:["handleLabelChange"],value:["handleValueChange"],min:["handleValueChange"],max:["handleValueChange"]}}};h.style=l;export{h as six_range};
|
|
2
|
-
//# sourceMappingURL=p-ff90ffd1.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sixRangeCss","id","SixRange","this","inputId","labelId","helpTextId","errorTextId","eventListeners","EventListeners","handleInput","nativeInput","update","parseFloat","value","requestAnimationFrame","sixChange","emit","handleBlur","hasFocus","hasTooltip","sixBlur","_a","resizeObserver","unobserve","handleFocus","sixFocus","observe","handleSlotChange","hasHelpTextSlot","hasSlot","host","hasLabelSlot","handleTouchStart","setFocus","toString","handleLabelChange","handleValueChange","connectedCallback","shadowRoot","addEventListener","componentWillLoad","componentDidLoad","ResizeObserver","disconnectedCallback","removeEventListener","removeAll","options","focus","removeFocus","blur","syncTooltip","min","max","tooltip","output","percent","Math","inputWidth","offsetWidth","tooltipWidth","thumbSize","getComputedStyle","getPropertyValue","x","style","transform","marginLeft","isFirefox","navigator","userAgent","toLowerCase","indexOf","updateValue","Number","_b","parsedValue","isNaN","getDefaultValue","calculateColorRunnableTrack","ceil","background","render","h","FormControl","label","helpText","size","errorText","disabled","required","displayError","invalid","part","class","range","onTouchStart","ref","el","type","name","step","onInput","onFocus","onBlur","tooltipFormatter"],"sources":["src/components/six-range/six-range.scss?tag=six-range&encapsulation=shadow","src/components/six-range/six-range.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n:host {\n --thumb-size: 14px;\n --tooltip-offset-y: 10px;\n --track-color: var(--six-color-web-rock-900);\n --thumb-color: var(--six-color-web-rock-900);\n --track-height: 3px;\n\n display: block;\n}\n\n.range {\n position: relative;\n\n .range__control {\n -webkit-appearance: none;\n width: 100%;\n height: var(--six-input-height-medium);\n background: transparent;\n line-height: var(--six-input-height-medium);\n vertical-align: middle;\n\n &::-webkit-slider-runnable-track {\n width: 100%;\n height: var(--track-height);\n border-radius: 3px;\n border: none;\n }\n\n &::-webkit-slider-thumb {\n border: none;\n width: var(--thumb-size);\n height: var(--thumb-size);\n border-radius: 50%;\n background-color: var(--thumb-color);\n -webkit-appearance: none;\n margin-top: calc(var(--thumb-size) / -2 + var(--track-height) / 2);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color,\n var(--six-transition-fast) color, var(--six-transition-fast) box-shadow, var(--six-transition-fast) transform;\n cursor: pointer;\n }\n\n &:not(:disabled)::-webkit-slider-thumb:hover {\n background-color: var(--thumb-color);\n }\n\n &:not(:disabled):focus::-webkit-slider-thumb {\n background-color: var(--thumb-color);\n }\n\n &:not(:disabled)::-webkit-slider-thumb:active {\n background-color: var(--thumb-color);\n cursor: grabbing;\n }\n\n // Firefox\n &::-moz-focus-outer {\n border: 0;\n }\n\n &::-moz-range-track {\n width: 100%;\n height: var(--track-height);\n background-color: var(--six-progress-track-color);\n border-radius: 3px;\n border: none;\n }\n\n &::-moz-range-progress {\n height: var(--track-height);\n border-radius: 3px;\n background-color: var(--track-color);\n border: none;\n }\n\n &::-moz-range-thumb {\n border: none;\n height: var(--thumb-size);\n width: var(--thumb-size);\n border-radius: 50%;\n background-color: var(--thumb-color);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color,\n var(--six-transition-fast) color, var(--six-transition-fast) box-shadow, var(--six-transition-fast) transform;\n cursor: pointer;\n }\n\n &:not(:disabled)::-moz-range-thumb:hover {\n background-color: var(--thumb-color);\n }\n\n &:not(:disabled):focus::-moz-range-thumb {\n background-color: var(--thumb-color);\n }\n\n &:not(:disabled)::-moz-range-thumb:active {\n background-color: var(--thumb-color);\n cursor: grabbing;\n }\n\n // States\n &:focus {\n outline: none;\n }\n\n &:disabled {\n &::-webkit-slider-thumb {\n cursor: not-allowed;\n color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-300);\n background-color: var(--six-color-web-rock-300);\n }\n\n &::-moz-range-thumb {\n cursor: not-allowed;\n color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-300);\n background-color: var(--six-color-web-rock-300);\n }\n }\n }\n}\n\n// Tooltip\n.range__tooltip {\n position: absolute;\n z-index: var(--six-z-index-tooltip);\n left: 1px;\n border-radius: var(--six-border-radius-medium);\n background-color: var(--six-color-web-rock-900);\n font-family: var(--six-font-family);\n font-size: var(--six-tooltip-font-size);\n font-weight: var(--six-tooltip-font-weight);\n line-height: var(--six-tooltip-line-height);\n color: var(--six-color-white);\n opacity: 0;\n padding: var(--six-spacing-xxx-small) var(--six-spacing-xx-small);\n transition: var(--six-transition-fast) opacity;\n pointer-events: none;\n\n &::after {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n left: 50%;\n margin-left: calc(-1 * var(--six-tooltip-arrow-size));\n }\n}\n\n.range--tooltip-visible .range__tooltip {\n opacity: 1;\n}\n\n// Tooltip on top\n.range--tooltip-top .range__tooltip {\n top: calc(-1 * var(--thumb-size) - var(--tooltip-offset-y));\n\n &::after {\n border-top: var(--six-tooltip-arrow-size) solid var(--six-color-web-rock-900);\n border-left: var(--six-tooltip-arrow-size) solid transparent;\n border-right: var(--six-tooltip-arrow-size) solid transparent;\n top: 100%;\n }\n}\n\n// Tooltip on bottom\n.range--tooltip-bottom .range__tooltip {\n bottom: calc(-1 * var(--thumb-size) - var(--tooltip-offset-y));\n\n &::after {\n border-bottom: var(--six-tooltip-arrow-size) solid var(--six-color-web-rock-900);\n border-left: var(--six-tooltip-arrow-size) solid transparent;\n border-right: var(--six-tooltip-arrow-size) solid transparent;\n bottom: 100%;\n }\n}\n","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() 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 = '';\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 };\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 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"],"mappings":"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"}
|
package/readme.md
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
# Six UI Components
|
|
4
|
-
|
|
5
|
-
This is the actual UI components library.
|
|
6
|
-
|
|
7
|
-
The Webcomponents in this library are built with Stencil.
|
|
8
|
-
|
|
9
|
-
## Stencil
|
|
10
|
-
|
|
11
|
-
Stencil is a compiler for building fast web apps using Web Components.
|
|
12
|
-
|
|
13
|
-
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
|
|
14
|
-
|
|
15
|
-
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
|
|
16
|
-
|
|
17
|
-
## Getting Started
|
|
18
|
-
|
|
19
|
-
To start building a new webcomponent using Stencil:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm run generate six-name-of-new-component
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
This will create a new folder containing everything necessary for you to develop a new component
|
|
26
|
-
|
|
27
|
-
To run the unit tests for the components, run:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npm test
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
|
|
34
|
-
|
|
35
|
-
## Testing
|
|
36
|
-
|
|
37
|
-
To run all unit and e2e tests simply execute
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm run teste2e
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
If you want to run a specific file, simply add the filename ad the end to the command above:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm run test:2e components/six-button/test/six-button.e2e.ts
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
For debugging stencil provides the `--devtools` flag. This will slow down chrome and open the devtools automatically.
|
|
50
|
-
|
|
51
|
-
Simply add a `debugger;` statement in the code where you want the test to stop and run:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm run test:debug components/six-button/test/six-button.e2e.ts
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
If you need evaluation at a certain breakpoint the easiest is to open the `ui-library` folder in vscode. The provided
|
|
58
|
-
`launch.json` automatically adds the correct runconfigurations to debug tests in vscode
|
|
59
|
-
|
|
60
|
-
If you want to do some more advanced debugging you can also use `page.evaluate`. Add the following in your code:
|
|
61
|
-
|
|
62
|
-
```javascript
|
|
63
|
-
await page.evaluate(() => {
|
|
64
|
-
console.log('this is some evaluation');
|
|
65
|
-
debugger;
|
|
66
|
-
});
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
and run the same command as above:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
npm run test:debug components/six-button/test/six-button.e2e.ts
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
FYI: There seems to be some weird bug when using `page.evaluate` where the browser first stops in a ghost breakpoint and
|
|
76
|
-
you have to reload the browser (Ctrl + R) to get to your evaluation endpoint.
|
|
77
|
-
|
|
78
|
-
### Visual Diff Testing
|
|
79
|
-
|
|
80
|
-
The flag `--screenshot` allows to run visual diff e2e tests. When we run these tests we will make a screenshot of the
|
|
81
|
-
component and compare it with previous screenshots. You can find the screenshots in [this image folder](./screenshot/images).
|
|
82
|
-
|
|
83
|
-
When a screenshot test fails you can open the [compare.html](./screenshot/compare.html) which will present you what changed.
|
|
84
|
-
|
|
85
|
-
When you actually redesigned the component and expect the changes simply delete the old images.
|
|
86
|
-
|
|
87
|
-
The screenshot tests are not run in the build because the tests seem to always fail in the build and it's very hard to
|
|
88
|
-
figure out what exactly differs there. So if you want to validate the components are still working properly run it locally:
|
|
89
|
-
|
|
90
|
-
`npm run test:inclScrnsht`
|
|
91
|
-
|
|
92
|
-
## Adding documentation
|
|
93
|
-
|
|
94
|
-
To see the documentation for your component you need to do the following:
|
|
95
|
-
|
|
96
|
-
- add an `index.html` to your component folder
|
|
97
|
-
- the `index.html` should have the following structure, where a div with the `container` class surrounds all your examples.
|
|
98
|
-
And the code examples are wrapped in `<div class="container"></div>`:
|
|
99
|
-
`html
|
|
100
|
-
<!DOCTYPE html>
|
|
101
|
-
<html dir="ltr" lang="en">
|
|
102
|
-
<head>
|
|
103
|
-
<meta charset="utf-8"/>
|
|
104
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"/>
|
|
105
|
-
<script type="module" src="/build/ui-library.esm.js"></script>
|
|
106
|
-
<script nomodule src="/build/ui-library.js"></script>
|
|
107
|
-
<link rel="stylesheet" href="/build/ui-library.css">
|
|
108
|
-
<title>MyComponent</title>
|
|
109
|
-
</head>
|
|
110
|
-
<body>
|
|
111
|
-
<div class="container">
|
|
112
|
-
<h1>MyComponent</h1>
|
|
113
|
-
<p>MyComponent is used for blablabla</p>
|
|
114
|
-
<section class="demo">
|
|
115
|
-
<my-component></my-component>
|
|
116
|
-
</section>
|
|
117
|
-
</div>
|
|
118
|
-
</body>
|
|
119
|
-
</html>
|
|
120
|
-
`
|
|
121
|
-
- additionally you need to have an `EXAMPLES` comment in your readme.md:
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
<!-- EXAMPLES -->
|
|
125
|
-
|
|
126
|
-
<!-- Auto Generated Below -->
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Prepare
|
|
130
|
-
|
|
131
|
-
Before creating a new version make sure that:
|
|
132
|
-
|
|
133
|
-
- you built the projects to be publish (dist folder should be updated)
|
|
134
|
-
- you updated [CHANGELOG.md](CHANGELOG.md)
|
|
135
|
-
- you know which version to update to
|
|
136
|
-
- our library follows [Semantic Versioning](https://semver.org/) so follow this guide to decide what kind of version update you will bring:
|
|
137
|
-
- <b>MAJOR</b> version when you make incompatible API changes
|
|
138
|
-
- <b>=></b> Users of the SIX Web Components Library must adapt their code to use the new version.
|
|
139
|
-
- <b>MINOR</b> version when you add functionality in a backwards compatible manner, and
|
|
140
|
-
- <b>=></b> Users of the SIX Web Component Library can use new features but must not adapt their existing code.
|
|
141
|
-
- <b>PATCH</b> version when you make backwards compatible bug fixes.
|
|
142
|
-
- <b>=></b> Users of the SIX Web Component Library get a bug fixed but must not adapt their existing code.
|
|
143
|
-
|
|
144
|
-
There are different ways how to create a new version:
|
|
145
|
-
|
|
146
|
-
- manually increase the version in the `package.json` and `package-lock.json`
|
|
147
|
-
- use `npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]`
|
|
148
|
-
- [see here for more details](https://docs.npmjs.com/updating-your-published-package-version-number)
|
|
149
|
-
- [use lerna publish](https://lerna.js.org/)
|
|
150
|
-
|
|
151
|
-
No matter what kind of method you use to bump the version make sure that the different packages are in sync - always publish these together:
|
|
152
|
-
|
|
153
|
-
- ui-library
|
|
154
|
-
|
|
155
|
-
* ui-library-react
|
|
156
|
-
* ui-library-vue
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|