q2-tecton-elements 1.70.2 → 1.71.0
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/bundle-report.json +556 -231
- package/dist/cjs/click-elsewhere_3.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-action-sheet.cjs.entry.js +4 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +17 -8
- package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-calendar.cjs.entry.js +8 -6
- package/dist/cjs/q2-card-image.cjs.entry.js +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +108 -74
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +3 -3
- package/dist/cjs/q2-example.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-form.cjs.entry.js +1 -1
- package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-link_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-meter.cjs.entry.js +1 -1
- package/dist/cjs/q2-modal.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-otp.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +18 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
- package/dist/cjs/q2-search.cjs.entry.js +2 -2
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +32 -9
- package/dist/cjs/q2-stepper.cjs.entry.js +18 -4
- package/dist/cjs/q2-surface.cjs.entry.js +3 -3
- package/dist/cjs/q2-tab-container.cjs.entry.js +89 -20
- package/dist/cjs/q2-tab-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q2-toast.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +26 -15
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -3
- package/dist/collection/components/q2-action-group/q2-action-group.css +22 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +24 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
- package/dist/collection/components/q2-avatar/q2-avatar.css +23 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js +13 -1
- package/dist/collection/components/q2-badge/q2-badge.css +26 -4
- package/dist/collection/components/q2-badge/test/q2-badge-test.vr.js +13 -1
- package/dist/collection/components/q2-btn/q2-btn.css +53 -9
- package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js +19 -1
- package/dist/collection/components/q2-calendar/q2-calendar.css +26 -4
- package/dist/collection/components/q2-calendar/q2-calendar.js +7 -5
- package/dist/collection/components/q2-calendar/q2-month-picker.css +22 -0
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +34 -1
- package/dist/collection/components/q2-card/q2-card.css +23 -1
- package/dist/collection/components/q2-card/test/q2-card-test.vr.js +10 -1
- package/dist/collection/components/q2-card-image/q2-card-image.css +23 -1
- package/dist/collection/components/q2-card-image/test/q2-card-image-test.vr.js +9 -1
- package/dist/collection/components/q2-carousel/q2-carousel.css +29 -39
- package/dist/collection/components/q2-carousel/q2-carousel.js +122 -69
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js +5 -4
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.css +22 -0
- package/dist/collection/components/q2-chart-area/q2-chart-area.css +22 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +22 -0
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +24 -2
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js +13 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.css +23 -1
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.vr.js +11 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +23 -1
- package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.vr.js +11 -1
- package/dist/collection/components/q2-currency/q2-currency.css +25 -3
- package/dist/collection/components/q2-currency/test/q2-currency-test.vr.js +13 -1
- package/dist/collection/components/q2-data-table/q2-data-table.css +24 -2
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js +11 -1
- package/dist/collection/components/q2-detail/q2-detail.css +32 -10
- package/dist/collection/components/q2-dropdown/q2-dropdown.css +22 -0
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +22 -0
- package/dist/collection/components/q2-editable-field/q2-editable-field.css +22 -0
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +2 -2
- package/dist/collection/components/q2-example/q2-example.css +23 -0
- package/dist/collection/components/q2-file-picker/q2-file-picker.css +57 -10
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.vr.js +14 -1
- package/dist/collection/components/q2-form/q2-form.css +22 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +25 -3
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.vr.js +13 -1
- package/dist/collection/components/q2-icon/assets/standard.symbol.svg +1 -1
- package/dist/collection/components/q2-icon/q2-icon.css +22 -0
- package/dist/collection/components/q2-input/q2-input.css +26 -4
- package/dist/collection/components/q2-input/q2-input.js +39 -7
- package/dist/collection/components/q2-input/test/q2-input-test.vr.js +36 -1
- package/dist/collection/components/q2-item/q2-item.css +46 -2
- package/dist/collection/components/q2-item/test/q2-item-test.vr.js +12 -1
- package/dist/collection/components/q2-legend/q2-legend.css +24 -2
- package/dist/collection/components/q2-link/q2-link.css +22 -0
- package/dist/collection/components/q2-list/q2-list.css +46 -2
- package/dist/collection/components/q2-list/test/q2-list-test.vr.js +12 -1
- package/dist/collection/components/q2-loading/q2-loading.css +23 -0
- package/dist/collection/components/q2-message/q2-message.css +22 -0
- package/dist/collection/components/q2-meter/q2-meter.css +25 -3
- package/dist/collection/components/q2-meter/test/q2-meter-test.vr.js +12 -1
- package/dist/collection/components/q2-modal/q2-modal.css +23 -1
- package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js +12 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.css +23 -1
- package/dist/collection/components/q2-option/q2-option.css +22 -0
- package/dist/collection/components/q2-option-list/q2-option-list.css +22 -0
- package/dist/collection/components/q2-otp/q2-otp.css +27 -4
- package/dist/collection/components/q2-otp/test/q2-otp-test.vr.js +12 -1
- package/dist/collection/components/q2-pagination/q2-pagination.css +22 -0
- package/dist/collection/components/q2-pill/q2-pill.css +42 -2
- package/dist/collection/components/q2-pill/q2-pill.js +18 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js +27 -1
- package/dist/collection/components/q2-popover/q2-popover.css +22 -7
- package/dist/collection/components/q2-radio/q2-radio.css +24 -2
- package/dist/collection/components/q2-radio/test/q2-radio-test.vr.js +12 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +23 -1
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.vr.js +11 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.css +22 -0
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.css +22 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-search/q2-search.css +22 -0
- package/dist/collection/components/q2-search/q2-search.js +1 -1
- package/dist/collection/components/q2-section/q2-section.css +23 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-section/test/q2-section-test.vr.js +11 -1
- package/dist/collection/components/q2-select/q2-select.css +22 -0
- package/dist/collection/components/q2-stepper/q2-stepper.css +38 -4
- package/dist/collection/components/q2-stepper/q2-stepper.js +17 -3
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.vr.js +12 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.css +22 -0
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.css +39 -5
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +31 -8
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.vr.js +16 -1
- package/dist/collection/components/q2-surface/q2-surface.css +71 -32
- package/dist/collection/components/q2-surface/q2-surface.js +7 -7
- package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +54 -0
- package/dist/collection/components/q2-tab-container/q2-tab-container.css +112 -6
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +114 -21
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.vr.js +24 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.css +22 -0
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.css +25 -2
- package/dist/collection/components/q2-tag/q2-tag.js +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.vr.js +21 -1
- package/dist/collection/components/q2-textarea/q2-textarea.css +24 -2
- package/dist/collection/components/q2-textarea/q2-textarea.js +2 -2
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.vr.js +16 -1
- package/dist/collection/components/q2-toast/q2-toast.css +22 -0
- package/dist/collection/components/q2-tooltip/q2-tooltip.css +27 -19
- package/dist/collection/components/q2-tooltip/q2-tooltip.js +32 -21
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js +13 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.css +22 -0
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/helpers.js +29 -6
- package/dist/collection/utils/test/vr-helpers.js +7 -0
- package/dist/components/q2-action-group2.js +1 -1
- package/dist/components/q2-action-sheet.js +21 -18
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-badge2.js +1 -1
- package/dist/components/q2-btn2.js +15 -15
- package/dist/components/q2-calendar.js +306 -301
- package/dist/components/q2-card-image.js +6 -6
- package/dist/components/q2-card.js +14 -14
- package/dist/components/q2-carousel-pane2.js +1 -1
- package/dist/components/q2-carousel.js +633 -585
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +70 -70
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox-group.js +42 -42
- package/dist/components/q2-checkbox2.js +1 -1
- package/dist/components/q2-currency.js +32 -32
- package/dist/components/q2-data-table.js +34 -34
- package/dist/components/q2-detail.js +5 -5
- package/dist/components/q2-dropdown-item2.js +11 -11
- package/dist/components/q2-dropdown.js +17 -17
- package/dist/components/q2-editable-field.js +12 -11
- package/dist/components/q2-example.js +15 -15
- package/dist/components/q2-file-picker.js +25 -25
- package/dist/components/q2-form.js +11 -11
- package/dist/components/q2-formatted-text.js +5 -5
- package/dist/components/q2-icon2.js +1 -1
- package/dist/components/q2-input2.js +24 -13
- package/dist/components/q2-item2.js +1 -1
- package/dist/components/q2-legend2.js +56 -56
- package/dist/components/q2-link2.js +6 -6
- package/dist/components/q2-list2.js +22 -22
- package/dist/components/q2-loading2.js +1 -1
- package/dist/components/q2-message2.js +20 -20
- package/dist/components/q2-meter.js +1 -1
- package/dist/components/q2-modal.js +3 -3
- package/dist/components/q2-month-picker.js +10 -10
- package/dist/components/q2-optgroup2.js +7 -7
- package/dist/components/q2-option-list2.js +34 -34
- package/dist/components/q2-option2.js +13 -13
- package/dist/components/q2-otp.js +5 -5
- package/dist/components/q2-pagination.js +58 -58
- package/dist/components/q2-pill.js +66 -54
- package/dist/components/q2-popover2.js +1 -1
- package/dist/components/q2-radio-group.js +5 -5
- package/dist/components/q2-radio.js +14 -14
- package/dist/components/q2-relative-time.js +10 -10
- package/dist/components/q2-resize-observer2.js +9 -9
- package/dist/components/q2-search.js +5 -5
- package/dist/components/q2-section.js +22 -22
- package/dist/components/q2-select2.js +1 -1
- package/dist/components/q2-stepper-pane.js +33 -33
- package/dist/components/q2-stepper-vertical.js +84 -60
- package/dist/components/q2-stepper.js +79 -65
- package/dist/components/q2-surface.js +14 -14
- package/dist/components/q2-tab-container.js +110 -55
- package/dist/components/q2-tab-pane.js +7 -7
- package/dist/components/q2-tag2.js +39 -39
- package/dist/components/q2-textarea.js +16 -16
- package/dist/components/q2-toast.js +22 -22
- package/dist/components/q2-tooltip2.js +26 -25
- package/dist/components/tecton-tab-pane.js +11 -11
- package/dist/esm/click-elsewhere_3.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group_2.entry.js +3 -3
- package/dist/esm/q2-action-sheet.entry.js +4 -3
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_2.entry.js +17 -8
- package/dist/esm/q2-btn_2.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js +8 -6
- package/dist/esm/q2-card-image.entry.js +1 -1
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +104 -70
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox_2.entry.js +3 -3
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +1 -1
- package/dist/esm/q2-detail.entry.js +1 -1
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +3 -3
- package/dist/esm/q2-example.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +1 -1
- package/dist/esm/q2-form.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-item.entry.js +1 -1
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-link_2.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-meter.entry.js +1 -1
- package/dist/esm/q2-modal.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-otp.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +18 -2
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +2 -2
- package/dist/esm/q2-search.entry.js +2 -2
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +32 -9
- package/dist/esm/q2-stepper.entry.js +18 -4
- package/dist/esm/q2-surface.entry.js +3 -3
- package/dist/esm/q2-tab-container.entry.js +89 -20
- package/dist/esm/q2-tab-pane.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +3 -3
- package/dist/esm/q2-toast.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +27 -16
- package/dist/esm/tecton-tab-pane.entry.js +3 -3
- package/dist/q2-tecton-elements/assets/standard.symbol.svg +1 -1
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-action-group_2.entry.js +42 -42
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +21 -18
- package/dist/q2-tecton-elements/q2-avatar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +25 -15
- package/dist/q2-tecton-elements/q2-btn_2.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-calendar.entry.js +120 -115
- package/dist/q2-tecton-elements/q2-card-image.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-carousel.entry.js +572 -540
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +166 -166
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +190 -190
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-currency.entry.js +40 -40
- package/dist/q2-tecton-elements/q2-data-table.entry.js +64 -64
- package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +18 -17
- package/dist/q2-tecton-elements/q2-example.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-form.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-legend.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-link_2.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-message.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-meter.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-modal.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +39 -39
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-option.entry.js +22 -22
- package/dist/q2-tecton-elements/q2-otp.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-pill.entry.js +30 -18
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +24 -24
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-search.entry.js +12 -12
- package/dist/q2-tecton-elements/q2-section.entry.js +25 -25
- package/dist/q2-tecton-elements/q2-select.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +16 -16
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +77 -53
- package/dist/q2-tecton-elements/q2-stepper.entry.js +44 -30
- package/dist/q2-tecton-elements/q2-surface.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +109 -56
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-toast.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +25 -24
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +11 -11
- package/dist/types/components/q2-carousel/q2-carousel.d.ts +14 -0
- package/dist/types/components/q2-input/q2-input.d.ts +7 -1
- package/dist/types/components/q2-pill/q2-pill.d.ts +2 -0
- package/dist/types/components/q2-stepper/q2-stepper.d.ts +1 -0
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +3 -2
- package/dist/types/components/q2-surface/q2-surface.d.ts +3 -3
- package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +17 -3
- package/dist/types/components/q2-tooltip/q2-tooltip.d.ts +2 -1
- package/dist/types/components.d.ts +50 -21
- package/dist/types/utils/helpers.d.ts +16 -1
- package/dist/types/utils/test/vr-helpers.d.ts +11 -0
- package/package.json +12 -5
|
@@ -18,18 +18,37 @@ export class Q2TabContainer {
|
|
|
18
18
|
// #region State Properties
|
|
19
19
|
this.hasLeft = false;
|
|
20
20
|
this.hasRight = false;
|
|
21
|
+
this.isNarrowViewport = false;
|
|
21
22
|
this.scrollEnabled = false;
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
23
|
+
this.showScrollBack = false;
|
|
24
|
+
this.showScrollForward = false;
|
|
24
25
|
/** Controls visibility of tab list in a print view. Tab content will still be visible even if `noPrint` is true. */
|
|
25
26
|
this.noPrint = false;
|
|
27
|
+
/**
|
|
28
|
+
* The orientation of the tab strip.
|
|
29
|
+
* - `horizontal` (default) — tabs run left-to-right above the panel content.
|
|
30
|
+
* - `vertical` — tabs stack top-to-bottom beside the panel content.
|
|
31
|
+
*
|
|
32
|
+
* @info
|
|
33
|
+
* Vertical orientation is intended for wider layouts (e.g. admin consoles).
|
|
34
|
+
* At viewports narrower than 768px, the component falls back to horizontal.
|
|
35
|
+
*/
|
|
36
|
+
this.orientation = 'horizontal';
|
|
26
37
|
this.checkScrollState = () => {
|
|
27
38
|
if (!this.listElement)
|
|
28
39
|
return;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
if (this.computedOrientation === 'vertical') {
|
|
41
|
+
const { scrollTop, scrollHeight, clientHeight } = this.listElement;
|
|
42
|
+
this.scrollEnabled = scrollHeight > clientHeight;
|
|
43
|
+
this.showScrollBack = scrollTop > 0;
|
|
44
|
+
this.showScrollForward = scrollHeight > Math.ceil(scrollTop) + clientHeight;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
const { scrollLeft, scrollWidth, clientWidth } = this.listElement;
|
|
48
|
+
this.scrollEnabled = scrollWidth > clientWidth;
|
|
49
|
+
this.showScrollBack = scrollLeft > 0;
|
|
50
|
+
this.showScrollForward = scrollWidth > Math.ceil(scrollLeft) + clientWidth;
|
|
51
|
+
}
|
|
33
52
|
};
|
|
34
53
|
this.moveToAdjacentTab = (value, direction) => {
|
|
35
54
|
const index = this.tabs.map(({ value }) => value).indexOf(value);
|
|
@@ -58,23 +77,40 @@ export class Q2TabContainer {
|
|
|
58
77
|
if (shouldFocus) {
|
|
59
78
|
focusedTab.focus({ preventScroll: true });
|
|
60
79
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
80
|
+
if (this.computedOrientation === 'vertical') {
|
|
81
|
+
const top = focusedTab.offsetTop - this.listElement.clientHeight / 2;
|
|
82
|
+
this.listElement.scrollTo({ top, behavior: 'smooth' });
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
const left = focusedTab.offsetLeft - this.listElement.clientWidth / 2;
|
|
86
|
+
this.listElement.scrollTo({ left, behavior: 'smooth' });
|
|
87
|
+
}
|
|
66
88
|
};
|
|
67
89
|
this.onScrollBtnClick = (direction) => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
90
|
+
if (this.computedOrientation === 'vertical') {
|
|
91
|
+
const { scrollTop, scrollHeight, clientHeight } = this.listElement;
|
|
92
|
+
const halfHeight = Math.floor(clientHeight / 2);
|
|
93
|
+
let scrollAmount = 0;
|
|
94
|
+
if (direction === 'back') {
|
|
95
|
+
scrollAmount = -Math.min(halfHeight, Math.abs(scrollTop));
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
scrollAmount = Math.min(halfHeight, Math.abs(scrollHeight - scrollTop - clientHeight));
|
|
99
|
+
}
|
|
100
|
+
this.listElement.scrollBy({ top: scrollAmount, behavior: 'smooth' });
|
|
73
101
|
}
|
|
74
102
|
else {
|
|
75
|
-
|
|
103
|
+
const { scrollLeft, scrollWidth, clientWidth } = this.listElement;
|
|
104
|
+
const halfWidth = Math.floor(clientWidth / 2);
|
|
105
|
+
let scrollAmount = 0;
|
|
106
|
+
if (direction === 'back') {
|
|
107
|
+
scrollAmount = -Math.min(halfWidth, Math.abs(scrollLeft));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
scrollAmount = Math.min(halfWidth, Math.abs(scrollWidth - scrollLeft - clientWidth));
|
|
111
|
+
}
|
|
112
|
+
this.listElement.scrollBy({ left: scrollAmount, behavior: 'smooth' });
|
|
76
113
|
}
|
|
77
|
-
this.listElement.scrollBy({ left: scrollAmount, behavior: 'smooth' });
|
|
78
114
|
};
|
|
79
115
|
this.onSlotChange = () => {
|
|
80
116
|
this.checkScrollState();
|
|
@@ -92,11 +128,27 @@ export class Q2TabContainer {
|
|
|
92
128
|
this.onTabKeyDown = (event) => {
|
|
93
129
|
const value = event.target.dataset.value;
|
|
94
130
|
switch (event.key) {
|
|
131
|
+
case 'ArrowDown':
|
|
132
|
+
if (this.computedOrientation !== 'vertical')
|
|
133
|
+
break;
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
this.moveToAdjacentTab(value, 'next');
|
|
136
|
+
break;
|
|
95
137
|
case 'ArrowRight':
|
|
138
|
+
if (this.computedOrientation !== 'horizontal')
|
|
139
|
+
break;
|
|
96
140
|
event.preventDefault();
|
|
97
141
|
this.moveToAdjacentTab(value, 'next');
|
|
98
142
|
break;
|
|
143
|
+
case 'ArrowUp':
|
|
144
|
+
if (this.computedOrientation !== 'vertical')
|
|
145
|
+
break;
|
|
146
|
+
event.preventDefault();
|
|
147
|
+
this.moveToAdjacentTab(value, 'prev');
|
|
148
|
+
break;
|
|
99
149
|
case 'ArrowLeft':
|
|
150
|
+
if (this.computedOrientation !== 'horizontal')
|
|
151
|
+
break;
|
|
100
152
|
event.preventDefault();
|
|
101
153
|
this.moveToAdjacentTab(value, 'prev');
|
|
102
154
|
break;
|
|
@@ -152,6 +204,9 @@ export class Q2TabContainer {
|
|
|
152
204
|
this.resizeObserver = null;
|
|
153
205
|
(_b = this.mutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
154
206
|
this.mutationObserver = null;
|
|
207
|
+
if (this.narrowViewportMedia && this.narrowViewportListener) {
|
|
208
|
+
this.narrowViewportMedia.removeEventListener('change', this.narrowViewportListener);
|
|
209
|
+
}
|
|
155
210
|
}
|
|
156
211
|
componentWillLoad() {
|
|
157
212
|
if (!hasValidChildren(this.hostElement, ['q2-tab-pane', 'tecton-tab-pane'])) {
|
|
@@ -161,6 +216,10 @@ export class Q2TabContainer {
|
|
|
161
216
|
observer.observe(this.hostElement, { childList: true, attributes: true });
|
|
162
217
|
this.mutationObserver = observer;
|
|
163
218
|
this.resizeObserver = new ResizeObserver(() => this.checkScrollState());
|
|
219
|
+
if (typeof window !== 'undefined') {
|
|
220
|
+
this.narrowViewportMedia = window.matchMedia('(max-width: 767px)');
|
|
221
|
+
this.isNarrowViewport = this.narrowViewportMedia.matches;
|
|
222
|
+
}
|
|
164
223
|
this.updateTabs();
|
|
165
224
|
}
|
|
166
225
|
componentDidLoad() {
|
|
@@ -169,6 +228,12 @@ export class Q2TabContainer {
|
|
|
169
228
|
this.checkScrollState();
|
|
170
229
|
overrideFocus(this.hostElement);
|
|
171
230
|
this.scheduledAfterRender.push(() => this.determineTabMove());
|
|
231
|
+
if (this.narrowViewportMedia) {
|
|
232
|
+
this.narrowViewportListener = event => {
|
|
233
|
+
this.isNarrowViewport = event.matches;
|
|
234
|
+
};
|
|
235
|
+
this.narrowViewportMedia.addEventListener('change', this.narrowViewportListener);
|
|
236
|
+
}
|
|
172
237
|
}
|
|
173
238
|
componentDidRender() {
|
|
174
239
|
this.scheduledAfterRender.forEach(fn => fn());
|
|
@@ -220,6 +285,9 @@ export class Q2TabContainer {
|
|
|
220
285
|
}
|
|
221
286
|
// #endregion
|
|
222
287
|
// #region Local Methods
|
|
288
|
+
get computedOrientation() {
|
|
289
|
+
return this.isNarrowViewport ? 'horizontal' : this.orientation;
|
|
290
|
+
}
|
|
223
291
|
get selectedTabValue() {
|
|
224
292
|
return this.value || '';
|
|
225
293
|
}
|
|
@@ -266,7 +334,8 @@ export class Q2TabContainer {
|
|
|
266
334
|
return (h("div", { class: "tab-pane-badge", "aria-label": `${tab.label}, ${tab.badgeCount} ${description}` }, tab.label, h("q2-badge", { value: tab.badgeCount, theme: theme, status: tab.badgeStatus })));
|
|
267
335
|
}
|
|
268
336
|
render() {
|
|
269
|
-
|
|
337
|
+
const isVertical = this.computedOrientation === 'vertical';
|
|
338
|
+
return (h(Fragment, { key: '710b889bd81a28f6ba7c0deb43abe49a269baec4' }, h("div", { key: '444efee6412d2440c99bd1e9b123fe385f2453a5', class: "tab-container" }, this.scrollEnabled && (h(Fragment, { key: '56c9916fb99dd3434a8305721d03e85c0f5fb370' }, h("div", { key: 'c506eb6690b60194b50171ad5139cc65b4fabedd', class: "gradient-left", hidden: !this.showScrollBack }), h("div", { key: '7af01eb18190e0af6fb80364fb73dcf6145d979d', class: "gradient-right", hidden: !this.showScrollForward }), h("q2-btn", { key: '8cb5f49e48c119d32b196e3ecc7e8a018acc7aa0', class: "btn-left", hidden: !this.showScrollBack, onTctClick: () => this.onScrollBtnClick('back') }, h("q2-icon", { key: '65f3caea2251c7ce96861718df064f230ec6e02e', type: isVertical ? 'chevron-up' : 'chevron-left', label: isVertical ? 'scroll up' : 'scroll left' })), h("q2-btn", { key: '07b833fe0e6b3030255374e4dd323fc99379a293', class: "btn-right", hidden: !this.showScrollForward, onTctClick: () => this.onScrollBtnClick('forward') }, h("q2-icon", { key: 'e446b55822239e657ab10c50694a9756ec8b030b', type: isVertical ? 'chevron-down' : 'chevron-right', label: isVertical ? 'scroll down' : 'scroll right' })))), h("ul", { key: '20d4f371b80b2515b762e80b88574938783e9252', onScroll: this.checkScrollState, ref: el => (this.listElement = el), class: this.noPrint ? 'no-print' : null, role: "tablist", "aria-orientation": this.computedOrientation }, this.tabs.map((tab, index) => this.renderTab(tab, index)))), h("div", { key: '9eaba5d408629dc548a9c57428b801293f642172', class: "tab-content" }, h("slot", { key: '811737fa0e22c994299c9164a6401209e6ecf418', onSlotchange: () => this.onSlotChange() }))));
|
|
270
339
|
}
|
|
271
340
|
static get is() { return "q2-tab-container"; }
|
|
272
341
|
static get encapsulation() { return "shadow"; }
|
|
@@ -343,6 +412,29 @@ export class Q2TabContainer {
|
|
|
343
412
|
"attribute": "no-print",
|
|
344
413
|
"defaultValue": "false"
|
|
345
414
|
},
|
|
415
|
+
"orientation": {
|
|
416
|
+
"type": "string",
|
|
417
|
+
"mutable": false,
|
|
418
|
+
"complexType": {
|
|
419
|
+
"original": "'horizontal' | 'vertical'",
|
|
420
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
421
|
+
"references": {}
|
|
422
|
+
},
|
|
423
|
+
"required": false,
|
|
424
|
+
"optional": false,
|
|
425
|
+
"docs": {
|
|
426
|
+
"tags": [{
|
|
427
|
+
"name": "info",
|
|
428
|
+
"text": "Vertical orientation is intended for wider layouts (e.g. admin consoles).\nAt viewports narrower than 768px, the component falls back to horizontal."
|
|
429
|
+
}],
|
|
430
|
+
"text": "The orientation of the tab strip.\n- `horizontal` (default) \u2014 tabs run left-to-right above the panel content.\n- `vertical` \u2014 tabs stack top-to-bottom beside the panel content."
|
|
431
|
+
},
|
|
432
|
+
"getter": false,
|
|
433
|
+
"setter": false,
|
|
434
|
+
"reflect": true,
|
|
435
|
+
"attribute": "orientation",
|
|
436
|
+
"defaultValue": "'horizontal'"
|
|
437
|
+
},
|
|
346
438
|
"type": {
|
|
347
439
|
"type": "string",
|
|
348
440
|
"mutable": false,
|
|
@@ -387,9 +479,10 @@ export class Q2TabContainer {
|
|
|
387
479
|
return {
|
|
388
480
|
"hasLeft": {},
|
|
389
481
|
"hasRight": {},
|
|
482
|
+
"isNarrowViewport": {},
|
|
390
483
|
"scrollEnabled": {},
|
|
391
|
-
"
|
|
392
|
-
"
|
|
484
|
+
"showScrollBack": {},
|
|
485
|
+
"showScrollForward": {},
|
|
393
486
|
"tabs": {}
|
|
394
487
|
};
|
|
395
488
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expect } from "@playwright/test";
|
|
2
2
|
import { test } from "@stencil/playwright";
|
|
3
|
-
import { setupPage, THEMES } from "../../../utils/test/vr-helpers";
|
|
3
|
+
import { setupPage, THEMES, FONT_SCALE_PX, FONT_SCALE_SUFFIX } from "../../../utils/test/vr-helpers";
|
|
4
4
|
const PANES = (name) => `
|
|
5
5
|
<q2-tab-pane name="${name}" value="1" label="Tab One"><p>Content one</p></q2-tab-pane>
|
|
6
6
|
<q2-tab-pane name="${name}" value="2" label="Tab Two"><p>Content two</p></q2-tab-pane>
|
|
@@ -75,3 +75,26 @@ test.describe('q2-tab-container — variants × themes', () => {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
+
const VERTICAL_HTML = `<q2-tab-container name="vertical-tabs" value="1" orientation="vertical">${PANES('vertical-tabs')}</q2-tab-container>`;
|
|
79
|
+
test.describe('q2-tab-container — orientation-vertical × themes', () => {
|
|
80
|
+
for (const theme of THEMES) {
|
|
81
|
+
test(`q2-tab-container--orientation-vertical--resting — ${theme}`, async ({ page }) => {
|
|
82
|
+
await page.setViewportSize({ width: 900, height: 600 });
|
|
83
|
+
await setupPage(page, VERTICAL_HTML, { theme });
|
|
84
|
+
await expect(page).toHaveScreenshot(`q2-tab-container--orientation-vertical--resting--${theme}.png`);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
// 'default-main' exercises --tct-tab-font-size (default tab button text).
|
|
89
|
+
// 'type-section' exercises --tct-tab-section-font-size (section-style tab button text).
|
|
90
|
+
const TAB_FONT_SCALE_VARIANTS = VARIANTS.filter(v => v.name === 'default-main' || v.name === 'type-section');
|
|
91
|
+
test.describe(`q2-tab-container — scaled font size × themes`, () => {
|
|
92
|
+
for (const variant of TAB_FONT_SCALE_VARIANTS) {
|
|
93
|
+
for (const theme of THEMES) {
|
|
94
|
+
test(`q2-tab-container--${variant.name}--resting--${FONT_SCALE_SUFFIX} — ${theme}`, async ({ page }) => {
|
|
95
|
+
await setupPage(page, variant.html, { theme, fontSizePx: FONT_SCALE_PX });
|
|
96
|
+
await expect(page).toHaveScreenshot(`q2-tab-container--${variant.name}--resting--${FONT_SCALE_SUFFIX}--${theme}.png`);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
@@ -65,6 +65,28 @@ button {
|
|
|
65
65
|
visibility: hidden;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
@container style(--t-prefers-motion: "reduced") {
|
|
69
|
+
*,
|
|
70
|
+
*::before,
|
|
71
|
+
*::after {
|
|
72
|
+
animation-duration: 0.01ms !important;
|
|
73
|
+
transition-duration: 0.01ms !important;
|
|
74
|
+
animation-delay: 0ms !important;
|
|
75
|
+
transition-delay: 0ms !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")) {
|
|
79
|
+
@media (prefers-reduced-motion: reduce) {
|
|
80
|
+
*,
|
|
81
|
+
*::before,
|
|
82
|
+
*::after {
|
|
83
|
+
animation-duration: 0.01ms !important;
|
|
84
|
+
transition-duration: 0.01ms !important;
|
|
85
|
+
animation-delay: 0ms !important;
|
|
86
|
+
transition-delay: 0ms !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
68
90
|
.tab-pane[aria-hidden=true] {
|
|
69
91
|
display: none;
|
|
70
92
|
}
|
|
@@ -19,7 +19,7 @@ export class Q2TabPane {
|
|
|
19
19
|
// #endregion
|
|
20
20
|
// #region Render Methods
|
|
21
21
|
render() {
|
|
22
|
-
return (h("div", { key: '
|
|
22
|
+
return (h("div", { key: '1957cbeca0ca1f0b5f840701286ebeb6b69565ce', id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, h("slot", { key: '6772ac75d219ebc30209907468a9fb801cd5db0d' })));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "q2-tab-pane"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -65,6 +65,28 @@ button {
|
|
|
65
65
|
visibility: hidden;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
@container style(--t-prefers-motion: "reduced") {
|
|
69
|
+
*,
|
|
70
|
+
*::before,
|
|
71
|
+
*::after {
|
|
72
|
+
animation-duration: 0.01ms !important;
|
|
73
|
+
transition-duration: 0.01ms !important;
|
|
74
|
+
animation-delay: 0ms !important;
|
|
75
|
+
transition-delay: 0ms !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")) {
|
|
79
|
+
@media (prefers-reduced-motion: reduce) {
|
|
80
|
+
*,
|
|
81
|
+
*::before,
|
|
82
|
+
*::after {
|
|
83
|
+
animation-duration: 0.01ms !important;
|
|
84
|
+
transition-duration: 0.01ms !important;
|
|
85
|
+
animation-delay: 0ms !important;
|
|
86
|
+
transition-delay: 0ms !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
68
90
|
/**
|
|
69
91
|
* @prop --tct-tag-background: (<color>) Controls the background color of the tag in its default state.
|
|
70
92
|
* @prop --tct-tag-color: (<color>) Controls the text color of the tag in its default state.
|
|
@@ -114,7 +136,7 @@ button {
|
|
|
114
136
|
border-width: var(--tct-tag-border-width, 0);
|
|
115
137
|
border-style: var(--tct-tag-border-style, none);
|
|
116
138
|
border-color: var(--comp-tag-border-color);
|
|
117
|
-
font-size: var(--tct-tag-font-size, 14px);
|
|
139
|
+
font-size: var(--tct-tag-font-size, var(--const-px-14, 14px));
|
|
118
140
|
font-weight: var(--tct-tag-font-weight, inherit);
|
|
119
141
|
position: relative;
|
|
120
142
|
}
|
|
@@ -143,6 +165,7 @@ button {
|
|
|
143
165
|
width: max-content;
|
|
144
166
|
gap: 6px;
|
|
145
167
|
height: var(--tct-tag-height, var(--t-tag-height, var(--app-scale-5x, 25px)));
|
|
168
|
+
/* stylelint-disable-next-line tecton/require-t-px-fallback */
|
|
146
169
|
line-height: var(--tct-tag-height, var(--t-tag-height, var(--app-scale-5x, 25px)));
|
|
147
170
|
padding-inline: var(--tct-tag-padding-inline, var(--t-tag-padding-inline, var(--app-scale-2x, 10px)));
|
|
148
171
|
}
|
|
@@ -157,7 +180,7 @@ button {
|
|
|
157
180
|
}
|
|
158
181
|
.tag ::slotted(q2-badge[slot=decorator]) {
|
|
159
182
|
--tct-badge-height: 1em;
|
|
160
|
-
--tct-badge-line-height: 25px;
|
|
183
|
+
--tct-badge-line-height: var(--const-px-25, 25px);
|
|
161
184
|
}
|
|
162
185
|
|
|
163
186
|
.tag.has-options {
|
|
@@ -194,7 +194,7 @@ export class Q2Tag {
|
|
|
194
194
|
if (this.optionCount)
|
|
195
195
|
wrapperClassNames.push('has-options');
|
|
196
196
|
const shouldShowOptions = this.optionCount > 0;
|
|
197
|
-
return (h(Host, { key: '
|
|
197
|
+
return (h(Host, { key: 'b7b199109ef756942f6cf76aff904a21ba406998' }, h("click-elsewhere", { key: 'f4a5ec911c582d480e5d7d91638d681ba6c054c8', onChange: this.onClickElsewhere }, shouldShowOptions ? (h(Fragment, null, h("button", { class: "tag-wrapper", ref: el => (this.dropdownBtn = el), "test-id": "btn-control", type: "button", role: "combobox", onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, "aria-controls": "option-list", "aria-expanded": open ? 'true' : 'false', "aria-describedby": "option-description", "aria-label": loc(this.label) }, h("div", { class: wrapperClassNames.join(' ') }, loc(this.label)), h("q2-icon", { type: "options" })), this.renderHiddenElement())) : (h("div", { class: "tag-wrapper", onClick: e => e.stopPropagation() }, h("div", { class: wrapperClassNames.join(' ') }, h("slot", { name: "decorator" }), loc(this.label)))), shouldShowOptions && (h("q2-popover", { key: '046a9aae077ed9800b081ce70aa5d03f0d919cff', ref: el => (this.popoverElement = el), controlElement: this.dropdownBtn, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: '63899f97a13db69ed8776214ca6670e825663c5a', id: "option-list", ref: el => (this.optionList = el), onChange: this.handleChange, type: "menu", align: "right", label: loc('tecton.element.optionList.label', [this.optionListLabel]), "no-select": true }, h("slot", { key: '40fa7c27a8b27ae2c5f894bbe1ae6e51ab1b55f0' })))))));
|
|
198
198
|
}
|
|
199
199
|
static get is() { return "q2-tag"; }
|
|
200
200
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expect } from "@playwright/test";
|
|
2
2
|
import { test } from "@stencil/playwright";
|
|
3
|
-
import { setupPage, THEMES } from "../../../utils/test/vr-helpers";
|
|
3
|
+
import { setupPage, THEMES, FONT_SCALE_PX, FONT_SCALE_SUFFIX } from "../../../utils/test/vr-helpers";
|
|
4
4
|
const OPTIONS = `
|
|
5
5
|
<q2-option value="1">Option 1</q2-option>
|
|
6
6
|
<q2-option value="2">Option 2</q2-option>
|
|
@@ -80,3 +80,23 @@ test.describe('q2-tag — variants × themes', () => {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
+
const FONT_SCALE_VARIANTS = [
|
|
84
|
+
{
|
|
85
|
+
name: 'default',
|
|
86
|
+
html: `<q2-tag label="My Tag"></q2-tag>`,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'with-badge',
|
|
90
|
+
html: `<q2-tag label="My Tag"><q2-badge slot="decorator" value="TCT" theme="primary"></q2-badge></q2-tag>`,
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
test.describe(`q2-tag — font scale ${FONT_SCALE_PX}px × themes`, () => {
|
|
94
|
+
for (const variant of FONT_SCALE_VARIANTS) {
|
|
95
|
+
for (const theme of THEMES) {
|
|
96
|
+
test(`q2-tag--${variant.name}--resting--${FONT_SCALE_SUFFIX} — ${theme}`, async ({ page }) => {
|
|
97
|
+
await setupPage(page, variant.html, { theme, fontSizePx: FONT_SCALE_PX });
|
|
98
|
+
await expect(page).toHaveScreenshot(`q2-tag--${variant.name}--resting--${FONT_SCALE_SUFFIX}--${theme}.png`);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
@@ -65,6 +65,28 @@ button {
|
|
|
65
65
|
visibility: hidden;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
@container style(--t-prefers-motion: "reduced") {
|
|
69
|
+
*,
|
|
70
|
+
*::before,
|
|
71
|
+
*::after {
|
|
72
|
+
animation-duration: 0.01ms !important;
|
|
73
|
+
transition-duration: 0.01ms !important;
|
|
74
|
+
animation-delay: 0ms !important;
|
|
75
|
+
transition-delay: 0ms !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")) {
|
|
79
|
+
@media (prefers-reduced-motion: reduce) {
|
|
80
|
+
*,
|
|
81
|
+
*::before,
|
|
82
|
+
*::after {
|
|
83
|
+
animation-duration: 0.01ms !important;
|
|
84
|
+
transition-duration: 0.01ms !important;
|
|
85
|
+
animation-delay: 0ms !important;
|
|
86
|
+
transition-delay: 0ms !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
68
90
|
/**
|
|
69
91
|
* @prop --tct-textarea-margin: (<length-percentage>+) Controls the outer margin of the textarea host.
|
|
70
92
|
* @prop --tct-textarea-margin-top: (<length-percentage>) Controls the top margin of the textarea host when --tct-textarea-margin is not set.
|
|
@@ -190,7 +212,7 @@ label {
|
|
|
190
212
|
--comp-label-optional-margin: var(--tct-textarea-label-optional-margin, 0 0 0 var(--tct-textarea-label-optional-margin-left, var(--t-textarea-label-optional-margin-left, var(--tct-scale-1x, var(--app-scale-1x, 5px)))));
|
|
191
213
|
margin: var(--comp-label-optional-margin);
|
|
192
214
|
color: var(--tct-textarea-label-optional-font-color, var(--t-textarea-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));
|
|
193
|
-
font-size: var(--tct-textarea-label-optional-font-size, var(--t-textarea-label-optional-font-size, 12px));
|
|
215
|
+
font-size: var(--tct-textarea-label-optional-font-size, var(--t-textarea-label-optional-font-size, var(--const-px-12, 12px)));
|
|
194
216
|
font-weight: var(--tct-textarea-label-optional-font-weight, var(--t-textarea-label-optional-font-weight, 400));
|
|
195
217
|
}
|
|
196
218
|
|
|
@@ -353,7 +375,7 @@ q2-icon {
|
|
|
353
375
|
|
|
354
376
|
.max-length {
|
|
355
377
|
color: var(--tct-textarea-max-length-color, var(--t-textarea-max-length-color, var(--t-textA, rgba(77, 77, 77, 0.77))));
|
|
356
|
-
font-size: var(--tct-textarea-max-length-font-size, var(--t-textarea-max-length-font-size, var(--tct-font-size-small, var(--app-font-size-small, 12px))));
|
|
378
|
+
font-size: var(--tct-textarea-max-length-font-size, var(--t-textarea-max-length-font-size, var(--tct-font-size-small, var(--app-font-size-small, var(--const-px-12, 12px)))));
|
|
357
379
|
position: absolute;
|
|
358
380
|
right: 0;
|
|
359
381
|
}
|
|
@@ -267,7 +267,7 @@ export class Q2Textarea {
|
|
|
267
267
|
// #region Render Methods
|
|
268
268
|
renderInput() {
|
|
269
269
|
const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';
|
|
270
|
-
return (h("div", { class: "input-container" }, h("textarea", { id: this.inputId, class: textareaClasses, placeholder: (this.placeholder && loc(this.placeholder)) || undefined, "test-id": "inputField", maxLength: this.maxlength, "aria-describedby": this.inputDescribedBy, "aria-invalid": `${this.hasError}`, "aria-required": `${!this.optional}`, "aria-label": this.hideLabel && this.label, spellcheck: this.spellcheck, rows: this.rows || 3, cols: this.cols, value: this.value, ref: el => (this.textareaField = el), readonly: !!this.readonly, disabled: !!this.disabled, maxlength: this.maxlength, onInput: this.onTextareaInput, onChange: this.onTextareaChange, onFocus: this.onTextareaFocus, onBlur: this.onTextareaBlur }), this.hasError ? (h("q2-icon", { type: "error", class: "icon-error" })) : (''), this.showResize && (h("button", { onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart, class: "btn-resize", "aria-
|
|
270
|
+
return (h("div", { class: "input-container" }, h("textarea", { id: this.inputId, class: textareaClasses, placeholder: (this.placeholder && loc(this.placeholder)) || undefined, "test-id": "inputField", maxLength: this.maxlength, "aria-describedby": this.inputDescribedBy, "aria-invalid": `${this.hasError}`, "aria-required": `${!this.optional}`, "aria-label": this.hideLabel && this.label, spellcheck: this.spellcheck, rows: this.rows || 3, cols: this.cols, value: this.value, ref: el => (this.textareaField = el), readonly: !!this.readonly, disabled: !!this.disabled, maxlength: this.maxlength, onInput: this.onTextareaInput, onChange: this.onTextareaChange, onFocus: this.onTextareaFocus, onBlur: this.onTextareaBlur }), this.hasError ? (h("q2-icon", { type: "error", class: "icon-error" })) : (''), this.showResize && (h("button", { onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart, class: "btn-resize", "aria-hidden": "true", tabIndex: -1 }, h("svg", { "aria-hidden": "true", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11", fill: "none", "stroke-stroke-linecap": "square" }))))));
|
|
271
271
|
}
|
|
272
272
|
renderMaxLength() {
|
|
273
273
|
var _a;
|
|
@@ -277,7 +277,7 @@ export class Q2Textarea {
|
|
|
277
277
|
]))));
|
|
278
278
|
}
|
|
279
279
|
render() {
|
|
280
|
-
return (h("div", { key: '
|
|
280
|
+
return (h("div", { key: '9b3eb74c84edd99af52a0ec71ba8b2fd8adbd1f2', class: this.wrapperClasses }, renderLabel(this), h("div", { key: 'a00772502ea6c1fde5af5bf4c12f0606a629252a', class: "content-container", ref: el => (this.contentContainer = el) }, this.renderInput(), this.maxlength ? this.renderMaxLength() : '', renderMessages(this))));
|
|
281
281
|
}
|
|
282
282
|
static get is() { return "q2-textarea"; }
|
|
283
283
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expect } from "@playwright/test";
|
|
2
2
|
import { test } from "@stencil/playwright";
|
|
3
|
-
import { setupPage, THEMES } from "../../../utils/test/vr-helpers";
|
|
3
|
+
import { setupPage, THEMES, FONT_SCALE_PX, FONT_SCALE_SUFFIX } from "../../../utils/test/vr-helpers";
|
|
4
4
|
const VARIANTS = [
|
|
5
5
|
{
|
|
6
6
|
name: 'default',
|
|
@@ -99,3 +99,18 @@ test.describe('q2-textarea — variants × themes', () => {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
+
// 'optional' exercises --tct-textarea-font-size, --tct-textarea-label-font-size,
|
|
103
|
+
// and --tct-textarea-label-optional-font-size.
|
|
104
|
+
// 'with-maxlength' exercises --tct-textarea-max-length-font-size.
|
|
105
|
+
const TEXTAREA_FONT_SCALE_VARIANTS = VARIANTS.filter(v => v.name === 'optional' || v.name === 'with-maxlength');
|
|
106
|
+
test.describe(`q2-textarea — scaled font size × themes`, () => {
|
|
107
|
+
for (const variant of TEXTAREA_FONT_SCALE_VARIANTS) {
|
|
108
|
+
for (const theme of THEMES) {
|
|
109
|
+
test(`q2-textarea--${variant.name}--resting--${FONT_SCALE_SUFFIX} — ${theme}`, async ({ page }) => {
|
|
110
|
+
await setupPage(page, variant.html, { theme, fontSizePx: FONT_SCALE_PX });
|
|
111
|
+
await applySetup(page, variant.setup);
|
|
112
|
+
await expect(page).toHaveScreenshot(`q2-textarea--${variant.name}--resting--${FONT_SCALE_SUFFIX}--${theme}.png`);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
@@ -65,6 +65,28 @@ button {
|
|
|
65
65
|
visibility: hidden;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
@container style(--t-prefers-motion: "reduced") {
|
|
69
|
+
*,
|
|
70
|
+
*::before,
|
|
71
|
+
*::after {
|
|
72
|
+
animation-duration: 0.01ms !important;
|
|
73
|
+
transition-duration: 0.01ms !important;
|
|
74
|
+
animation-delay: 0ms !important;
|
|
75
|
+
transition-delay: 0ms !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")) {
|
|
79
|
+
@media (prefers-reduced-motion: reduce) {
|
|
80
|
+
*,
|
|
81
|
+
*::before,
|
|
82
|
+
*::after {
|
|
83
|
+
animation-duration: 0.01ms !important;
|
|
84
|
+
transition-duration: 0.01ms !important;
|
|
85
|
+
animation-delay: 0ms !important;
|
|
86
|
+
transition-delay: 0ms !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
68
90
|
/**
|
|
69
91
|
* @prop --tct-toast-background: (<color>) Controls the background color of the toast container.
|
|
70
92
|
* @prop --tct-toast-text: (<color>) Controls the primary text color of the toast.
|
|
@@ -65,6 +65,28 @@ button {
|
|
|
65
65
|
visibility: hidden;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
@container style(--t-prefers-motion: "reduced") {
|
|
69
|
+
*,
|
|
70
|
+
*::before,
|
|
71
|
+
*::after {
|
|
72
|
+
animation-duration: 0.01ms !important;
|
|
73
|
+
transition-duration: 0.01ms !important;
|
|
74
|
+
animation-delay: 0ms !important;
|
|
75
|
+
transition-delay: 0ms !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")) {
|
|
79
|
+
@media (prefers-reduced-motion: reduce) {
|
|
80
|
+
*,
|
|
81
|
+
*::before,
|
|
82
|
+
*::after {
|
|
83
|
+
animation-duration: 0.01ms !important;
|
|
84
|
+
transition-duration: 0.01ms !important;
|
|
85
|
+
animation-delay: 0ms !important;
|
|
86
|
+
transition-delay: 0ms !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
68
90
|
/**
|
|
69
91
|
* @prop --tct-tooltip-background: (<color>) Controls the background color of the tooltip bubble and arrow.
|
|
70
92
|
* @prop --tct-tooltip-color: (<color>) Controls the text color of the tooltip bubble.
|
|
@@ -78,6 +100,7 @@ button {
|
|
|
78
100
|
* @prop --tct-tooltip-position: (<length-percentage>) Controls the distance the tooltip bubble sits away from its target.
|
|
79
101
|
* @prop --tct-tooltip-max-width: (<length-percentage>) Controls the maximum width of the tooltip bubble in multiline mode.
|
|
80
102
|
* @prop --tct-tooltip-transition-duration: (<time>) Controls the show/hide transition duration of the tooltip.
|
|
103
|
+
* @prop --tct-tooltip-hover-delay: (<time>) Controls the delay before the tooltip appears on hover.
|
|
81
104
|
* @prop --tct-tooltip-transition-delay: (<time>) Controls the show/hide transition delay of the tooltip.
|
|
82
105
|
* @prop --tct-tooltip-transition-visible-duration: (<time>) Controls how long the tooltip remains visible after appearing via focus.
|
|
83
106
|
*/
|
|
@@ -105,7 +128,7 @@ button {
|
|
|
105
128
|
position: relative;
|
|
106
129
|
}
|
|
107
130
|
.tooltip:hover {
|
|
108
|
-
--comp-delay: var(--tct-tooltip-
|
|
131
|
+
--comp-delay: var(--tct-tooltip-hover-delay, var(--tct-tooltip-transition-delay, 1s));
|
|
109
132
|
}
|
|
110
133
|
:host([immediate]:not([immediate=false])) .tooltip:hover {
|
|
111
134
|
--comp-delay: 0s;
|
|
@@ -126,7 +149,7 @@ button {
|
|
|
126
149
|
z-index: 1;
|
|
127
150
|
padding: var(--tct-tooltip-padding, var(--t-tooltip-padding, var(--comp-padding)));
|
|
128
151
|
font-weight: var(--tct-tooltip-font-weight, var(--t-tooltip-font-weight, 600));
|
|
129
|
-
font-size: var(--tct-tooltip-font-size, var(--t-tooltip-font-size, var(--app-font-size-small, 12px)));
|
|
152
|
+
font-size: var(--tct-tooltip-font-size, var(--t-tooltip-font-size, var(--app-font-size-small, var(--const-px-12, 12px))));
|
|
130
153
|
line-height: 1.5;
|
|
131
154
|
color: var(--tct-tooltip-color, var(--t-tooltip-color, var(--app-white, #ffffff)));
|
|
132
155
|
text-align: center;
|
|
@@ -166,7 +189,7 @@ button {
|
|
|
166
189
|
opacity: 1;
|
|
167
190
|
}
|
|
168
191
|
}
|
|
169
|
-
.tooltip.has-
|
|
192
|
+
.tooltip.has-touch-click:before, .tooltip.has-touch-click:after {
|
|
170
193
|
visibility: visible;
|
|
171
194
|
opacity: 0;
|
|
172
195
|
transition: none;
|
|
@@ -177,26 +200,11 @@ button {
|
|
|
177
200
|
animation-duration: var(--comp-duration);
|
|
178
201
|
animation-delay: 0ms, calc(var(--comp-visible-duration) + var(--comp-duration));
|
|
179
202
|
}
|
|
180
|
-
.tooltip.has-
|
|
181
|
-
animation-name: tooltippedFade;
|
|
182
|
-
animation-direction: normal;
|
|
183
|
-
animation-delay: 0ms;
|
|
184
|
-
}
|
|
185
|
-
:host([persist-on-hover]:not([persist-on-hover=false])) .tooltip.has-generic-focus:focus-within:before, :host([persist-on-hover]:not([persist-on-hover=false])) .tooltip.has-generic-focus:focus-within:after {
|
|
203
|
+
.tooltip.has-touch-click:hover:before, .tooltip.has-touch-click:hover:after {
|
|
186
204
|
animation-name: tooltippedFade;
|
|
187
205
|
animation-direction: normal;
|
|
188
206
|
animation-delay: 0ms;
|
|
189
207
|
}
|
|
190
|
-
.tooltip.has-generic-focus-out:before, .tooltip.has-generic-focus-out:after {
|
|
191
|
-
visibility: visible;
|
|
192
|
-
opacity: 0;
|
|
193
|
-
transition: none;
|
|
194
|
-
animation-timing-function: ease-in-out;
|
|
195
|
-
animation-fill-mode: forwards;
|
|
196
|
-
animation-name: tooltippedFade;
|
|
197
|
-
animation-direction: reverse;
|
|
198
|
-
animation-duration: var(--comp-duration);
|
|
199
|
-
}
|
|
200
208
|
.tooltip.dismissed:before, .tooltip.dismissed:after {
|
|
201
209
|
visibility: hidden;
|
|
202
210
|
opacity: 0;
|