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
|
@@ -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
|
:host {
|
|
69
91
|
display: inline;
|
|
70
92
|
}
|
|
@@ -153,7 +153,7 @@ export class Q2RelativeTime {
|
|
|
153
153
|
// #region Render Methods
|
|
154
154
|
render() {
|
|
155
155
|
const { shouldShow, displayedMessage } = this;
|
|
156
|
-
return h(Fragment, { key: '
|
|
156
|
+
return h(Fragment, { key: '48a6ad8165ea3380500edb280142a47e0a7a6848' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
|
|
157
157
|
}
|
|
158
158
|
static get is() { return "q2-relative-time"; }
|
|
159
159
|
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
|
:host(:not([hidden])) {
|
|
69
91
|
display: block;
|
|
70
92
|
width: 100%;
|
|
@@ -76,7 +76,7 @@ export class Q2ResizeObserver {
|
|
|
76
76
|
// #endregion
|
|
77
77
|
// #region Render Methods
|
|
78
78
|
render() {
|
|
79
|
-
return h("slot", { key: '
|
|
79
|
+
return h("slot", { key: 'f5cc2cee6e979f047d3854d243ec3560ae5cb35d', onSlotchange: this.handleSlotChange });
|
|
80
80
|
}
|
|
81
81
|
static get is() { return "q2-resize-observer"; }
|
|
82
82
|
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
|
.q2-element-dropdown {
|
|
69
91
|
display: none;
|
|
70
92
|
position: absolute;
|
|
@@ -762,7 +762,7 @@ export class Q2Search {
|
|
|
762
762
|
return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: (_a = this.innerInputContainer) !== null && _a !== void 0 ? _a : undefined, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, align: useBlock ? undefined : this.popoverAlignment, block: useBlock }, h("div", { class: "popover-content", "data-loading": this.loading ? 'true' : 'false', "aria-busy": this.loading ? 'true' : null }, h("div", { class: "popover-top-container", hidden: !this.hasPopoverTop && !(this.multiple && this.showSelectedToggle), tabindex: "-1" }, h("slot", { name: "popover-top" }), !this.loading && this.renderMultiSelectHeader()), h("q2-option-list", { ref: el => (this.optionList = el), type: "listbox", id: this.optionListId, label: loc(this.listLabel), multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, showSelected: this.showSelected, customSearch: true, hidden: this.loading, onChange: (e) => e.stopPropagation(), onTctChange: this.onOptionListChange }, h("slot", null)), showEmpty && this.renderEmpty(), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" })), this.loading && (h("div", { class: "loading-overlay", "aria-hidden": "true" }, h("q2-loading", { type: "spinner" }))))));
|
|
763
763
|
}
|
|
764
764
|
render() {
|
|
765
|
-
return (h(Fragment, { key: '
|
|
765
|
+
return (h(Fragment, { key: '7639a6dccbd55360c35c03c357fd64552dd9d2ba' }, h("div", { key: 'bf893491af923c9c2dc404a137df754297bd3ad5', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("click-elsewhere", { key: '73e0045d7fc40c5d57fe26ed2993da24d5d42a04', class: this.wrapperClasses, role: "presentation", onChange: this.onClickElsewhere }, h("q2-input", { key: '5328d7d706f2f8bf3e8433d90c32e51b6abf4122', ref: el => (this.inputField = el), class: "q2-search-input", label: (this.label && loc(this.label)) || '', value: this.searchText, iconLeft: "search", clearable: this.clearable && !this.loading && !!this.searchText, disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder ? loc(this.placeholder) : undefined, hideLabel: this.hideLabel, errors: (Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map(e => loc(e))) ||
|
|
766
766
|
(this.invalid && ['tecton.element.search.invalid']) ||
|
|
767
767
|
[], ariaExpanded: this.isInputOnlyMode ? undefined : `${this.open}`, ariaControls: this.isInputOnlyMode ? undefined : this.optionListId, ariaHaspopup: this.isInputOnlyMode ? undefined : 'listbox', hideMessages: true, _role: this.isInputOnlyMode ? undefined : 'combobox', onTctInput: this.inputInputHandler, onInput: (e) => e.stopImmediatePropagation(), onChange: (e) => e.stopPropagation(), onTctChange: (e) => e.stopPropagation(), badgeValue: this.badgeValue }, this.renderCustomDisplay()), this.renderOptionsDropdown())));
|
|
768
768
|
}
|
|
@@ -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-section-background: (<color>) Controls the background color of the section host.
|
|
70
92
|
* @prop --tct-section-font-color: (<color>) Controls the text color of the section host.
|
|
@@ -153,7 +175,7 @@ header.has-header {
|
|
|
153
175
|
|
|
154
176
|
.title {
|
|
155
177
|
margin: var(--tct-section-title-margin, 0);
|
|
156
|
-
font-size: var(--tct-section-title-font-size, 20px);
|
|
178
|
+
font-size: var(--tct-section-title-font-size, var(--const-px-20, 20px));
|
|
157
179
|
font-weight: var(--tct-section-title-font-weight, 600);
|
|
158
180
|
text-transform: var(--tct-section-title-text-transform, none);
|
|
159
181
|
letter-spacing: var(--tct-section-title-letter-spacing, inherit);
|
|
@@ -186,9 +186,9 @@ export class Q2Section {
|
|
|
186
186
|
wrapperClasses.push('is-transitioning');
|
|
187
187
|
}
|
|
188
188
|
const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
|
|
189
|
-
return (h("section", { key: '
|
|
189
|
+
return (h("section", { key: '5dbed551d8571ef48b81fe7fc40b0c56db2d685a', class: "wrapper" }, h("header", { key: 'dfc3bc20a49856a2fcdee6b5cae1626e32ff5416', class: hasHeader ? 'has-header' : '' }, h("div", { key: 'b9073b701f1006f8048cac33b4cae9e44888c8e2', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: 'd701205c1808c6eaf2b7f3739c7488d934cf1cc0', class: "title" }, loc(this.label)), h("div", { key: '5428fcecafd6e84a884783c0cc1223cb91160f69', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: 'f7d873afc6f319c259e11db10e7cf2d3010ca3c6', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '6143342070b00156a36db039dee5e19a1a6cbe2f', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: '297304e09f1b60c2a3e4d8146ff7b75f14d64e5c', type: "chevron-up" })))), h("div", { key: '3a78d8a8ffde28f5e006fd988f6d01463758c4c1', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
|
|
190
190
|
height: this.contentHeight,
|
|
191
|
-
} }, h("div", { key: '
|
|
191
|
+
} }, h("div", { key: '0c7019101641ae7d05772a9ec4e8c16ca40e1112', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '49a17e0cd8279255eec0dc2d7344dc0fa260dc46', ref: (el) => (this.contentSlot = el) })))));
|
|
192
192
|
}
|
|
193
193
|
static get is() { return "q2-section"; }
|
|
194
194
|
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',
|
|
@@ -65,3 +65,13 @@ test.describe('q2-section — variants × themes', () => {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
+
// 'default' renders the section title, exercising --tct-section-title-font-size.
|
|
69
|
+
const DEFAULT_SECTION_VARIANT = VARIANTS.find(v => v.name === 'default');
|
|
70
|
+
test.describe(`q2-section — scaled font size × themes`, () => {
|
|
71
|
+
for (const theme of THEMES) {
|
|
72
|
+
test(`q2-section--default--resting--${FONT_SCALE_SUFFIX} — ${theme}`, async ({ page }) => {
|
|
73
|
+
await setupPage(page, DEFAULT_SECTION_VARIANT.html, { theme, fontSizePx: FONT_SCALE_PX });
|
|
74
|
+
await expect(page).toHaveScreenshot(`q2-section--default--resting--${FONT_SCALE_SUFFIX}--${theme}.png`);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
@@ -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
|
.q2-element-dropdown {
|
|
69
91
|
display: none;
|
|
70
92
|
position: absolute;
|
|
@@ -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-stepper-min-height: (<length>) Controls the minimum height of each step list item.
|
|
70
92
|
* @prop --tct-stepper-list-padding: (<length-percentage>+) Controls the inner padding of the step list.
|
|
@@ -106,17 +128,29 @@ button {
|
|
|
106
128
|
position: relative;
|
|
107
129
|
}
|
|
108
130
|
|
|
131
|
+
.sr-only {
|
|
132
|
+
border: 0;
|
|
133
|
+
clip: rect(0 0 0 0);
|
|
134
|
+
height: 1px;
|
|
135
|
+
margin: -1px;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
padding: 0;
|
|
138
|
+
position: absolute;
|
|
139
|
+
width: 1px;
|
|
140
|
+
white-space: nowrap;
|
|
141
|
+
}
|
|
142
|
+
|
|
109
143
|
ul {
|
|
110
144
|
--comp-bullet-background: var(--tct-stepper-bullet-active-background, var(--tct-stepper-bullet-active-bg, var(--t-stepper-bullet-active-bg, var(--t-primary, #0079c1))));
|
|
111
145
|
--comp-divider-color: var(--tct-stepper-bullet-active-divider-color, var(--comp-bullet-background));
|
|
112
146
|
--comp-bullet-font-color: var(--tct-stepper-bullet-active-font-color, var(--t-stepper-bullet-active-font-color, var(--t-primary-font-color, #ffffff)));
|
|
113
147
|
--comp-bullet-size: var(--tct-stepper-btn-icon-size, var(--t-stepper-btn-icon-size, 24px));
|
|
114
148
|
--comp-bullet-gap: var(--tct-stepper-btn-gap, var(--t-stepper-btn-gap, var(--app-scale-3x, 15px)));
|
|
115
|
-
--comp-bullet-font-size: var(--tct-stepper-btn-label-font-size, var(--t-stepper-btn-label-font-size, 16px));
|
|
149
|
+
--comp-bullet-font-size: var(--tct-stepper-btn-label-font-size, var(--t-stepper-btn-label-font-size, var(--const-px-16, 16px)));
|
|
116
150
|
--comp-step-width: var(--tct-stepper-step-width, var(--t-stepper-step-width, var(--t-stepper-step-width, 80px)));
|
|
117
151
|
--comp-step-gap: var(--tct-stepper-step-gap, var(--t-stepper-step-gap, 5px));
|
|
118
152
|
--comp-btn-icon-size: var(--tct-stepper-btn-icon-size, var(--t-stepper-btn-icon-size, 24px));
|
|
119
|
-
--comp-btn-label-font-size: var(--tct-stepper-btn-label-font-size, var(--t-stepper-btn-label-font-size, 16px));
|
|
153
|
+
--comp-btn-label-font-size: var(--tct-stepper-btn-label-font-size, var(--t-stepper-btn-label-font-size, var(--const-px-16, 16px)));
|
|
120
154
|
--comp-btn-icon-visibility: var(--tct-stepper-btn-icon-visibility, visible);
|
|
121
155
|
--comp-tween: var(--tct-stepper-tween, var(--t-stepper-tween, var(--app-tween-1, 0.2s ease)));
|
|
122
156
|
overflow-x: auto;
|
|
@@ -276,7 +310,7 @@ li {
|
|
|
276
310
|
|
|
277
311
|
.step-label {
|
|
278
312
|
color: var(--tct-stepper-label-color, var(--tct-stepper-title-color, var(--t-stepper-title-color, inherit)));
|
|
279
|
-
font-size: var(--tct-stepper-label-font-size, var(--tct-stepper-title-font-size, var(--t-stepper-title-font-size, var(--app-font-size-small, 12px))));
|
|
313
|
+
font-size: var(--tct-stepper-label-font-size, var(--tct-stepper-title-font-size, var(--t-stepper-title-font-size, var(--app-font-size-small, var(--const-px-12, 12px)))));
|
|
280
314
|
line-height: var(--tct-stepper-label-line-height, 1.5em);
|
|
281
315
|
text-overflow: ellipsis;
|
|
282
316
|
overflow: hidden;
|
|
@@ -291,7 +325,7 @@ li {
|
|
|
291
325
|
|
|
292
326
|
.step-description {
|
|
293
327
|
color: var(--tct-stepper-description-color, var(--t-stepper-description-color, inherit));
|
|
294
|
-
font-size: var(--tct-stepper-description-font-size, var(--t-stepper-description-font-size, var(--app-font-size-small, 12px)));
|
|
328
|
+
font-size: var(--tct-stepper-description-font-size, var(--t-stepper-description-font-size, var(--app-font-size-small, var(--const-px-12, 12px))));
|
|
295
329
|
text-overflow: ellipsis;
|
|
296
330
|
overflow: hidden;
|
|
297
331
|
display: -webkit-box;
|
|
@@ -208,6 +208,11 @@ export class Q2Stepper {
|
|
|
208
208
|
const slot = Array.from(pane.children).find(child => child.getAttribute('slot') === slotName);
|
|
209
209
|
return (_a = slot === null || slot === void 0 ? void 0 : slot.outerHTML) !== null && _a !== void 0 ? _a : loc(pane[slotName]);
|
|
210
210
|
}
|
|
211
|
+
getStatusLabel(status) {
|
|
212
|
+
const statusKey = `tecton.element.stepper.status.${status}`;
|
|
213
|
+
const statusLabel = loc(statusKey);
|
|
214
|
+
return statusLabel === statusKey ? status : statusLabel;
|
|
215
|
+
}
|
|
211
216
|
handleUndefinedStepProperties() {
|
|
212
217
|
const { currentStep, lastEnabledStep } = this;
|
|
213
218
|
if (currentStep && lastEnabledStep)
|
|
@@ -260,7 +265,16 @@ export class Q2Stepper {
|
|
|
260
265
|
const isCurrentStep = stepNumber === currentStep;
|
|
261
266
|
const labelId = !!label && `label-${id}`;
|
|
262
267
|
const descriptionId = !!label && !!description && `description-${id}`;
|
|
263
|
-
const
|
|
268
|
+
const positionId = `position-${id}`;
|
|
269
|
+
const statusId = `status-${id}`;
|
|
270
|
+
const accessibleStatus = status === 'complete' || status === 'error' ? status : 'pending';
|
|
271
|
+
const positionLabel = loc('tecton.element.stepper.number', {
|
|
272
|
+
step: `${stepNumber}`,
|
|
273
|
+
total: `${stepCount}`,
|
|
274
|
+
});
|
|
275
|
+
const statusLabel = this.getStatusLabel(accessibleStatus);
|
|
276
|
+
const labelledBy = label ? `${positionId} ${labelId} ${statusId}` : undefined;
|
|
277
|
+
const btnLabel = label ? undefined : `${positionLabel}, ${statusLabel}`;
|
|
264
278
|
let statusIcon;
|
|
265
279
|
if (status === 'complete')
|
|
266
280
|
statusIcon = 'success-filled';
|
|
@@ -274,14 +288,14 @@ export class Q2Stepper {
|
|
|
274
288
|
if (isPaneDisabled)
|
|
275
289
|
stepClasses.push('pane-disabled');
|
|
276
290
|
const disabled = isLocked || stepNumber > lastEnabledStep;
|
|
277
|
-
return (h("li", { role: "presentation" }, h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby":
|
|
291
|
+
return (h("li", { role: "presentation" }, h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby": labelledBy, "aria-describedBy": descriptionId, "aria-label": btnLabel, "aria-selected": `${isCurrentStep}`, "aria-disabled": disabled ? 'true' : undefined, role: "tab", tabIndex: isCurrentStep ? 0 : -1, onKeyDown: ev => this.onStepKeyDown(ev, stepNumber), onClick: ev => !isPaneDisabled && !disabled && this.onStepClick(ev, stepNumber) }, h(Fragment, null, label && (h(Fragment, null, h("span", { class: "sr-only", id: positionId }, positionLabel), h("span", { class: "sr-only", id: statusId }, statusLabel))), statusIcon ? (h("div", { class: "step-icon" }, h("q2-icon", { "aria-hidden": "true", type: statusIcon }))) : (h("div", { class: "step-bubble" }, stepNumber)), labelId && (h("div", { class: "step-label", id: labelId, innerHTML: sanitizeHTMLString(label) })), labelId && descriptionId && (h("div", { class: "step-description", id: descriptionId, innerHTML: sanitizeHTMLString(description) })))), stepIndex ? h("div", { class: "step-divider" }) : ''));
|
|
278
292
|
}
|
|
279
293
|
render() {
|
|
280
294
|
const { stepCount, scrollEnabled, showScrollLeft, showScrollRight } = this;
|
|
281
295
|
const containerClasses = ['step-container'];
|
|
282
296
|
if (scrollEnabled)
|
|
283
297
|
containerClasses.push('has-scroll');
|
|
284
|
-
return (h(Fragment, { key: '
|
|
298
|
+
return (h(Fragment, { key: 'cd7a09546e4b74cf98f5e27dbcf0efce71e02781' }, h("div", { key: 'aaa383584217da20fdd01174f4b136dfef0128b7', class: containerClasses.join(' ') }, scrollEnabled && (h(Fragment, { key: '6f7f38d768b274409606132cc62d36d48812f50c' }, h("div", { key: '98e26550803496a0edd0e7415b4ec9e16b501722', class: "gradient-left", hidden: !showScrollLeft }), h("div", { key: '58102ecd26dd3f6b36d530f36ecc109b287b4faa', class: "gradient-right", hidden: !showScrollRight }), h("q2-btn", { key: 'a475ba4a846ea5cf93a5ca46422a5473e0d266bd', class: "btn-left", hideLabel: true, hidden: !this.showScrollLeft, label: loc('tecton.element.stepper.scrollLeft'), onTctClick: () => this.onScrollBtnClick('left') }, h("q2-icon", { key: 'b040f724a926e5c07a81438e3586e0eb7a3c063b', type: "chevron-left" })), h("q2-btn", { key: '119dbcd49ce282cbccd58be097f8833e22df4fb4', class: "btn-right", hideLabel: true, hidden: !this.showScrollRight, label: loc('tecton.element.stepper.scrollRight'), onTctClick: () => this.onScrollBtnClick('right') }, h("q2-icon", { key: 'c656a9493134eb6a4ea0a008ee94829fc708ecfe', type: "chevron-right" })))), h("ul", { key: '09e1472989c7c2e6c40504072bca2790865e013a', onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, stepCount > 0 && [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))), h("div", { key: '0b25c172d585892aa9e286dac6080ce2bbb80e1a', role: "list" }, h("slot", { key: '507375368c8e89a94f8af0a44bf4951fd14d7466', onSlotchange: () => this.onSlotChange() }))));
|
|
285
299
|
}
|
|
286
300
|
static get is() { return "q2-stepper"; }
|
|
287
301
|
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 PANE = (label, body = 'Pane content') => `
|
|
5
5
|
<q2-stepper-pane label="${label}">${body}</q2-stepper-pane>
|
|
6
6
|
`;
|
|
@@ -83,3 +83,14 @@ test.describe('q2-stepper — variants × themes', () => {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
+
// 'with-descriptions' exercises --tct-stepper-btn-label-font-size (step bubble),
|
|
87
|
+
// --tct-stepper-label-font-size (step label), and --tct-stepper-description-font-size.
|
|
88
|
+
const WITH_DESCRIPTIONS_VARIANT = VARIANTS.find(v => v.name === 'with-descriptions');
|
|
89
|
+
test.describe(`q2-stepper — scaled font size × themes`, () => {
|
|
90
|
+
for (const theme of THEMES) {
|
|
91
|
+
test(`q2-stepper--with-descriptions--resting--${FONT_SCALE_SUFFIX} — ${theme}`, async ({ page }) => {
|
|
92
|
+
await setupPage(page, WITH_DESCRIPTIONS_VARIANT.html, { theme, fontSizePx: FONT_SCALE_PX });
|
|
93
|
+
await expect(page).toHaveScreenshot(`q2-stepper--with-descriptions--resting--${FONT_SCALE_SUFFIX}--${theme}.png`);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
});
|
|
@@ -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
|
:host {
|
|
69
91
|
display: block;
|
|
70
92
|
position: relative;
|
|
@@ -73,7 +73,7 @@ export class Q2StepperPane {
|
|
|
73
73
|
// #region Render Methods
|
|
74
74
|
render() {
|
|
75
75
|
const { label, isActive } = this;
|
|
76
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: '7acf643f717380c37eb25334534afbca81ac8ab6', role: "listitem" }, h(Fragment, { key: '0241a9ad68973eea81c961070d6171dab3241f79' }, h("div", { key: '25e9a406b8c0672eec836920706d44ed53906e1d', "aria-label": label && loc(label), tabindex: "0", hidden: !isActive && !(this.isChildActive && this.showWithChildren) }, h("slot", { key: '00f456ab21d2ecf58946de5df397bb3c81c2a749' })), h("div", { key: 'bdac4c2caf9b9bf5a6280258475afa552e578e7e', hidden: true }, h("slot", { key: '2ede75ad70c10eda1f8c6de4556bccc9c66e8b97', name: "label", onSlotchange: () => this.contentChange.emit() }), h("slot", { key: '990f2d44a0f9cb0437b63f3570a94874752a94da', name: "description", onSlotchange: () => this.contentChange.emit() })), h("slot", { key: '1f12d65608f73a3737abb7f987cab300ec1c9856', name: "children" }))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "q2-stepper-pane"; }
|
|
79
79
|
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-stepper-vertical-layout-gap: (<length-percentage>) Controls the gap between the step list and step content columns.
|
|
70
92
|
* @prop --tct-stepper-vertical-list-width: (<length-percentage>) Controls the width of the step list column.
|
|
@@ -102,6 +124,18 @@ button {
|
|
|
102
124
|
gap: var(--tct-stepper-vertical-layout-gap, var(--tct-advanced-stepper-layout-gap, var(--t-advanced-stepper-layout-gap, 120px)));
|
|
103
125
|
}
|
|
104
126
|
|
|
127
|
+
.sr-only {
|
|
128
|
+
border: 0;
|
|
129
|
+
clip: rect(0 0 0 0);
|
|
130
|
+
height: 1px;
|
|
131
|
+
margin: -1px;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
padding: 0;
|
|
134
|
+
position: absolute;
|
|
135
|
+
width: 1px;
|
|
136
|
+
white-space: nowrap;
|
|
137
|
+
}
|
|
138
|
+
|
|
105
139
|
.step-label,
|
|
106
140
|
.step-child-label {
|
|
107
141
|
color: var(--comp-btn-label-color);
|
|
@@ -135,7 +169,7 @@ button {
|
|
|
135
169
|
|
|
136
170
|
.step-description {
|
|
137
171
|
color: var(--tct-stepper-vertical-description-color, var(--tct-advanced-stepper-description-color, var(--t-advanced-stepper-description-color, inherit)));
|
|
138
|
-
font-size: var(--tct-stepper-vertical-description-font-size, var(--tct-advanced-stepper-description-font-size, var(--t-advanced-stepper-description-font-size, var(--app-font-size-small, 12px))));
|
|
172
|
+
font-size: var(--tct-stepper-vertical-description-font-size, var(--tct-advanced-stepper-description-font-size, var(--t-advanced-stepper-description-font-size, var(--app-font-size-small, var(--const-px-12, 12px)))));
|
|
139
173
|
padding-bottom: 0.2em;
|
|
140
174
|
}
|
|
141
175
|
|
|
@@ -144,7 +178,7 @@ ul {
|
|
|
144
178
|
--comp-btn-icon-size: var(--comp-top-btn-icon-size);
|
|
145
179
|
--comp-btn-icon-visibility: var(--tct-stepper-vertical-btn-icon-visibility, visible);
|
|
146
180
|
--comp-btn-content-gap: var(--tct-stepper-vertical-btn-gap, var(--tct-advanced-stepper-btn-gap, var(--t-advanced-stepper-btn-gap, var(--app-scale-3x, 15px))));
|
|
147
|
-
--comp-btn-label-font-size: var(--tct-stepper-vertical-btn-label-font-size, var(--tct-advanced-stepper-btn-label-font-size, var(--t-advanced-stepper-btn-label-font-size, 16px)));
|
|
181
|
+
--comp-btn-label-font-size: var(--tct-stepper-vertical-btn-label-font-size, var(--tct-advanced-stepper-btn-label-font-size, var(--t-advanced-stepper-btn-label-font-size, var(--const-px-16, 16px))));
|
|
148
182
|
--comp-btn-label-color: var(--tct-stepper-vertical-label-color, var(--tct-advanced-stepper-label-color, var(--t-advanced-stepper-label-color, inherit)));
|
|
149
183
|
--comp-tween: var(--tct-stepper-vertical-tween, var(--tct-advanced-stepper-tween, var(--t-advanced-stepper-tween, var(--app-tween-1, 0.2s ease))));
|
|
150
184
|
--comp-bullet-bg: var(--tct-stepper-vertical-bullet-active-background, var(--tct-advanced-stepper-bullet-active-bg, var(--t-advanced-stepper-bullet-active-bg, var(--t-primary, #0079c1))));
|
|
@@ -155,7 +189,7 @@ ul {
|
|
|
155
189
|
ul ul {
|
|
156
190
|
--comp-btn-icon-size: var(--tct-stepper-vertical-child-btn-icon-size, var(--tct-advanced-stepper-child-btn-icon-size, var(--t-advanced-stepper-child-btn-icon-size, 12px)));
|
|
157
191
|
--comp-btn-content-gap: var(--tct-stepper-vertical-btn-gap, var(--tct-advanced-stepper-btn-gap, var(--t-advanced-stepper-btn-gap, var(--app-scale-2x, 10px))));
|
|
158
|
-
--comp-btn-label-font-size: var(--tct-stepper-vertical-child-btn-label-font-size, var(--tct-advanced-stepper-child-btn-label-font-size, var(--t-advanced-stepper-child-btn-label-font-size, var(--app-font-size-small, 12px))));
|
|
192
|
+
--comp-btn-label-font-size: var(--tct-stepper-vertical-child-btn-label-font-size, var(--tct-advanced-stepper-child-btn-label-font-size, var(--t-advanced-stepper-child-btn-label-font-size, var(--app-font-size-small, var(--const-px-12, 12px)))));
|
|
159
193
|
}
|
|
160
194
|
ul ul[aria-hidden=true] {
|
|
161
195
|
display: none;
|
|
@@ -200,7 +234,7 @@ ul ul[aria-hidden=true] {
|
|
|
200
234
|
|
|
201
235
|
.step-btn {
|
|
202
236
|
min-height: var(--tct-stepper-vertical-btn-height, var(--tct-advanced-stepper-btn-height, var(--t-advanced-stepper-btn-height, 40px)));
|
|
203
|
-
font-size: var(--tct-stepper-vertical-btn-font-size, var(--tct-advanced-stepper-btn-font-size, var(--t-advanced-stepper-btn-font-size, 16px)));
|
|
237
|
+
font-size: var(--tct-stepper-vertical-btn-font-size, var(--tct-advanced-stepper-btn-font-size, var(--t-advanced-stepper-btn-font-size, var(--const-px-16, 16px))));
|
|
204
238
|
--comp-active-color: var(--comp-bullet-bg);
|
|
205
239
|
}
|
|
206
240
|
.step-btn.status-complete {
|
|
@@ -219,7 +253,7 @@ ul ul[aria-hidden=true] {
|
|
|
219
253
|
--comp-active-color: var(--comp-bullet-bg);
|
|
220
254
|
min-height: var(--tct-stepper-vertical-child-btn-height, var(--tct-advanced-stepper-child-btn-height, var(--t-advanced-stepper-child-btn-height, 30px)));
|
|
221
255
|
padding-left: var(--tct-stepper-vertical-child-btn-left-padding, var(--tct-advanced-stepper-child-btn-left-padding, var(--t-advanced-stepper-child-btn-left-padding, var(--app-scale-2x, 10px))));
|
|
222
|
-
font-size: var(--tct-stepper-vertical-child-btn-font-size, var(--tct-advanced-stepper-child-btn-font-size, var(--t-advanced-stepper-child-btn-font-size, 12px)));
|
|
256
|
+
font-size: var(--tct-stepper-vertical-child-btn-font-size, var(--tct-advanced-stepper-child-btn-font-size, var(--t-advanced-stepper-child-btn-font-size, var(--const-px-12, 12px))));
|
|
223
257
|
border-left-width: var(--tct-stepper-vertical-child-btn-left-border-width, var(--tct-advanced-stepper-child-btn-left-border-width, var(--t-advanced-stepper-child-btn-left-border-width, 3px)));
|
|
224
258
|
border-left-style: var(--tct-stepper-vertical-child-btn-left-border-style, var(--tct-advanced-stepper-child-btn-left-border-style, var(--t-advanced-stepper-child-btn-left-border-style, solid)));
|
|
225
259
|
border-left-color: transparent;
|
|
@@ -182,6 +182,11 @@ export class Q2StepperVertical {
|
|
|
182
182
|
const slot = Array.from(pane.children).find(child => child.getAttribute('slot') === slotName);
|
|
183
183
|
return (_a = slot === null || slot === void 0 ? void 0 : slot.outerHTML) !== null && _a !== void 0 ? _a : (pane[slotName] ? loc(pane[slotName]) : undefined);
|
|
184
184
|
}
|
|
185
|
+
getStatusLabel(status) {
|
|
186
|
+
const statusKey = `tecton.element.stepper.status.${status}`;
|
|
187
|
+
const statusLabel = loc(statusKey);
|
|
188
|
+
return statusLabel === statusKey ? status : statusLabel;
|
|
189
|
+
}
|
|
185
190
|
getStepId(currentStepId, goTo) {
|
|
186
191
|
const allEnabledStepBtns = Array.from(this.hostElement.shadowRoot.querySelectorAll('ul:not([aria-hidden="true"]) > li > button:not([aria-disabled="true"])'));
|
|
187
192
|
const currentStepIndex = allEnabledStepBtns.findIndex(btn => btn.getAttribute('id') === currentStepId);
|
|
@@ -251,14 +256,23 @@ export class Q2StepperVertical {
|
|
|
251
256
|
}
|
|
252
257
|
// #endregion
|
|
253
258
|
// #region Render Methods
|
|
254
|
-
renderChildStepBtn(pane, index, children
|
|
259
|
+
renderChildStepBtn(pane, index, children) {
|
|
255
260
|
const { currentStepId } = this;
|
|
256
261
|
const { id, label, status, disabled: isPaneDisabled } = pane;
|
|
257
262
|
const stepNumber = index + 1;
|
|
258
263
|
const labelId = label && `label-${id}`;
|
|
259
264
|
const isCurrentStep = id === currentStepId;
|
|
260
265
|
const isLocked = status === 'locked';
|
|
261
|
-
const
|
|
266
|
+
const positionId = `position-${id}`;
|
|
267
|
+
const statusId = `status-${id}`;
|
|
268
|
+
const accessibleStatus = status === 'complete' || status === 'error' ? status : 'pending';
|
|
269
|
+
const positionLabel = loc('tecton.element.stepper.number', {
|
|
270
|
+
step: `${stepNumber}`,
|
|
271
|
+
total: `${children}`,
|
|
272
|
+
});
|
|
273
|
+
const statusLabel = this.getStatusLabel(accessibleStatus);
|
|
274
|
+
const labelledBy = label ? `${positionId} ${labelId} ${statusId}` : undefined;
|
|
275
|
+
const btnLabel = label ? undefined : `${positionLabel}, ${statusLabel}`;
|
|
262
276
|
let statusIcon;
|
|
263
277
|
if (status === 'error')
|
|
264
278
|
statusIcon = 'warning-filled';
|
|
@@ -267,14 +281,14 @@ export class Q2StepperVertical {
|
|
|
267
281
|
stepClasses.push(`status-${status}`);
|
|
268
282
|
if (isPaneDisabled)
|
|
269
283
|
stepClasses.push('pane-disabled');
|
|
270
|
-
return (h("li", { role: "presentation" }, h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby":
|
|
284
|
+
return (h("li", { role: "presentation" }, h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby": labelledBy, "aria-label": btnLabel, "aria-selected": `${isCurrentStep}`, id: id, "aria-disabled": isLocked ? 'true' : null, role: "tab", tabIndex: isCurrentStep ? 0 : -1, onKeyDown: ev => !isLocked && this.onStepKeyDown(ev, id), onClick: ev => !isPaneDisabled && !isLocked && this.onStepClick(ev, id) }, label && (h(Fragment, null, h("span", { class: "sr-only", id: positionId }, positionLabel), h("span", { class: "sr-only", id: statusId }, statusLabel))), statusIcon && (h("div", { class: "step-child-icon" }, h("q2-icon", { "aria-hidden": "true", type: statusIcon }))), label && (h("div", { class: "step-child-label", id: labelId, innerHTML: sanitizeHTMLString(label) })))));
|
|
271
285
|
}
|
|
272
|
-
renderSpacer(pane,
|
|
286
|
+
renderSpacer(pane, isExpanded, isLastStep) {
|
|
273
287
|
const shouldRender = (isLastStep && !!pane.children.length) || !isLastStep;
|
|
274
288
|
const spacerClasses = ['spacer'];
|
|
275
289
|
if (!isLastStep)
|
|
276
290
|
spacerClasses.push('has-sibling');
|
|
277
|
-
return (shouldRender && (h("div", { class: spacerClasses.join(' ') }, !!pane.children.length && (h("ul", { ref: el => isExpanded && (this.expandedStepChildrenList = el), "aria-hidden": `${!isExpanded}` }, pane.children.map((child, index, children) => this.renderChildStepBtn(child, index, children.length
|
|
291
|
+
return (shouldRender && (h("div", { class: spacerClasses.join(' ') }, !!pane.children.length && (h("ul", { ref: el => isExpanded && (this.expandedStepChildrenList = el), "aria-hidden": `${!isExpanded}` }, pane.children.map((child, index, children) => this.renderChildStepBtn(child, index, children.length)))))));
|
|
278
292
|
}
|
|
279
293
|
renderStepBtn(pane, index) {
|
|
280
294
|
const { currentStepId, structuredPanes } = this;
|
|
@@ -286,7 +300,16 @@ export class Q2StepperVertical {
|
|
|
286
300
|
const isLocked = status === 'locked';
|
|
287
301
|
const stepLabel = label;
|
|
288
302
|
const descriptionId = label && description && `description-${id}`;
|
|
289
|
-
const
|
|
303
|
+
const positionId = `position-${id}`;
|
|
304
|
+
const statusId = `status-${id}`;
|
|
305
|
+
const accessibleStatus = status === 'complete' || status === 'error' ? status : 'pending';
|
|
306
|
+
const positionLabel = loc('tecton.element.stepper.number', {
|
|
307
|
+
step: `${stepNumber}`,
|
|
308
|
+
total: `${structuredPanes.length}`,
|
|
309
|
+
});
|
|
310
|
+
const statusLabel = this.getStatusLabel(accessibleStatus);
|
|
311
|
+
const labelledBy = label ? `${positionId} ${labelId} ${statusId}` : undefined;
|
|
312
|
+
const btnLabel = label ? undefined : `${positionLabel}, ${statusLabel}`;
|
|
290
313
|
let statusIcon;
|
|
291
314
|
if (status === 'complete')
|
|
292
315
|
statusIcon = 'success-filled';
|
|
@@ -299,10 +322,10 @@ export class Q2StepperVertical {
|
|
|
299
322
|
stepClasses.push('pane-disabled');
|
|
300
323
|
const childIds = pane.children.map(child => child.id);
|
|
301
324
|
const isExpanded = isCurrentStep || childIds.includes(currentStepId);
|
|
302
|
-
return (h("li", { role: "presentation" }, h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby":
|
|
325
|
+
return (h("li", { role: "presentation" }, h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby": labelledBy, "aria-describedBy": descriptionId, "aria-label": btnLabel, "aria-selected": `${isCurrentStep}`, "aria-expanded": !!pane.children.length ? `${isExpanded}` : null, id: id, "aria-disabled": isLocked ? 'true' : null, role: "tab", tabIndex: isCurrentStep ? 0 : -1, onKeyDown: ev => !isLocked && this.onStepKeyDown(ev, id), onClick: ev => !isPaneDisabled && !isLocked && this.onStepClick(ev, id) }, label && (h(Fragment, null, h("span", { class: "sr-only", id: positionId }, positionLabel), h("span", { class: "sr-only", id: statusId }, statusLabel))), statusIcon ? (h("div", { class: "step-icon" }, h("q2-icon", { "aria-hidden": "true", type: statusIcon }))) : (h("div", { class: "step-bubble" }, stepNumber)), label && (h("div", null, h("div", { class: "step-label", id: labelId, innerHTML: sanitizeHTMLString(stepLabel) }), description && (h("div", { class: "step-description", id: descriptionId, innerHTML: sanitizeHTMLString(description) }))))), this.renderSpacer(pane, isExpanded, isLastStep)));
|
|
303
326
|
}
|
|
304
327
|
render() {
|
|
305
|
-
return (h(Fragment, { key: '
|
|
328
|
+
return (h(Fragment, { key: 'eab8d8816aebfb5aa104a17b75dc0e8b4ed4ce68' }, h("ul", { key: 'f155624641313e8375e6ee448fed150ae0c62cf1', role: "tablist" }, this.structuredPanes.map((pane, index) => this.renderStepBtn(pane, index))), h("div", { key: '1ff078e00dcb1e4c861bc691ccc31ec5c1436fac', role: "list" }, h("slot", { key: 'adf07ae0725ccc7c1ce149052f2325e6bfc01677' }))));
|
|
306
329
|
}
|
|
307
330
|
static get is() { return "q2-stepper-vertical"; }
|
|
308
331
|
static get encapsulation() { return "shadow"; }
|