q2-tecton-elements 1.71.4 → 1.73.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 +32564 -26687
- package/dist/cjs/{charting-ClN1ldqv.js → charting-CdNTrVBe.js} +80 -0
- package/dist/cjs/click-elsewhere_3.cjs.entry.js +85 -20
- package/dist/cjs/{dataSample-BYR-wrOn.js → dataSample-B4blhlH4.js} +1 -1
- package/dist/cjs/date-picker-helpers-UYvPn98R.js +257 -0
- package/dist/cjs/{index-SpDCZABA.js → index-BqyWHpNu.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{q2-action-group_2.cjs.entry.js → q2-action-group.cjs.entry.js} +1 -89
- package/dist/cjs/q2-action-sheet.cjs.entry.js +98 -18
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +113 -12
- package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-calendar.cjs.entry.js +14 -7
- package/dist/cjs/q2-card-image.cjs.entry.js +4 -4
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +20 -6
- package/dist/cjs/q2-chart-area.cjs.entry.js +38 -7
- package/dist/cjs/q2-chart-bar.cjs.entry.js +39 -8
- package/dist/cjs/q2-chart-donut.cjs.entry.js +31 -13
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +9 -6
- package/dist/cjs/q2-context.cjs.entry.js +6 -5
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +7 -7
- package/dist/cjs/q2-date-calendar.cjs.entry.js +452 -0
- package/dist/cjs/q2-date-picker_2.cjs.entry.js +968 -0
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/q2-editable-field.cjs.entry.js +51 -37
- package/dist/cjs/q2-example.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +60 -4
- 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 +21 -3
- 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-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +3 -3
- package/dist/cjs/q2-meter.cjs.entry.js +2 -2
- package/dist/cjs/q2-modal.cjs.entry.js +59 -17
- package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
- package/dist/cjs/q2-mutation-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-otp.cjs.entry.js +5 -5
- package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
- package/dist/cjs/q2-pill.cjs.entry.js +8 -5
- package/dist/cjs/q2-radio-group.cjs.entry.js +22 -4
- package/dist/cjs/q2-radio.cjs.entry.js +3 -3
- package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
- package/dist/cjs/q2-resize-observer.cjs.entry.js +92 -0
- package/dist/cjs/q2-search.cjs.entry.js +4 -4
- package/dist/cjs/q2-section.cjs.entry.js +7 -7
- package/dist/cjs/q2-select.cjs.entry.js +41 -21
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-surface.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
- package/dist/cjs/q2-toast.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{sectorHelper-9TWL-3dw.js → sectorHelper-CxhDl5ql.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +5 -3
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +52 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +98 -18
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.vr.js +124 -0
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-btn/q2-btn.css +152 -146
- package/dist/collection/components/q2-btn/q2-btn.js +10 -4
- package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js +229 -20
- package/dist/collection/components/q2-calendar/q2-calendar.css +3 -0
- package/dist/collection/components/q2-calendar/q2-calendar.js +20 -7
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +26 -15
- package/dist/collection/components/q2-card/test/q2-card-test.vr.js +4 -0
- package/dist/collection/components/q2-card-image/q2-card-image.css +89 -134
- package/dist/collection/components/q2-card-image/q2-card-image.js +4 -4
- package/dist/collection/components/q2-card-image/test/q2-card-image-test.vr.js +4 -0
- package/dist/collection/components/q2-carousel/q2-carousel.js +19 -5
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js +45 -0
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.css +11 -0
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +53 -7
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.vr.js +14 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +11 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +50 -4
- package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.vr.js +14 -0
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +30 -10
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js +25 -0
- package/dist/collection/components/q2-checkbox/q2-checkbox.css +2 -2
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +6 -3
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +2 -0
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +6 -3
- package/dist/collection/components/q2-context/q2-context.css +5 -0
- package/dist/collection/components/q2-context/q2-context.js +4 -3
- package/dist/collection/components/q2-context/test/q2-context-test.vr.js +14 -4
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.css +6 -0
- package/dist/collection/components/q2-data-table/q2-data-table.js +5 -5
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js +52 -0
- package/dist/collection/components/q2-date-calendar/q2-date-calendar.css +393 -0
- package/dist/collection/components/q2-date-calendar/q2-date-calendar.js +1022 -0
- package/dist/collection/components/q2-date-calendar/test/q2-date-calendar-test.vr.js +111 -0
- package/dist/collection/components/q2-date-picker/q2-date-picker.css +138 -0
- package/dist/collection/components/q2-date-picker/q2-date-picker.js +2010 -0
- package/dist/collection/components/q2-date-picker/test/q2-date-picker-test.vr.js +179 -0
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.css +2 -0
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +5 -5
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.vr.js +30 -0
- package/dist/collection/components/q2-editable-field/q2-editable-field.css +2 -0
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +59 -45
- package/dist/collection/components/q2-example/q2-example.js +1 -1
- package/dist/collection/components/q2-file-picker/q2-file-picker.css +27 -0
- package/dist/collection/components/q2-file-picker/q2-file-picker.js +98 -2
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.vr.js +22 -0
- package/dist/collection/components/q2-form/q2-form.js +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-input/q2-input.css +67 -1
- package/dist/collection/components/q2-input/q2-input.js +160 -15
- package/dist/collection/components/q2-input/test/q2-input-test.vr.js +35 -0
- package/dist/collection/components/q2-item/q2-item.css +3 -1
- package/dist/collection/components/q2-item/q2-item.js +19 -1
- package/dist/collection/components/q2-item/test/q2-item-test.vr.js +8 -2
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-message/q2-message.css +5 -5
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-meter/q2-meter.js +1 -1
- package/dist/collection/components/q2-modal/q2-modal.css +40 -3
- package/dist/collection/components/q2-modal/q2-modal.js +100 -16
- package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js +32 -7
- package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +33 -4
- package/dist/collection/components/q2-otp/q2-otp.js +4 -4
- package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
- package/dist/collection/components/q2-pill/q2-pill.css +2 -2
- package/dist/collection/components/q2-pill/q2-pill.js +6 -3
- package/dist/collection/components/q2-popover/q2-popover.css +4 -2
- package/dist/collection/components/q2-popover/q2-popover.js +50 -14
- package/dist/collection/components/q2-radio/q2-radio.css +158 -104
- package/dist/collection/components/q2-radio/q2-radio.js +5 -2
- package/dist/collection/components/q2-radio/test/q2-radio-test.vr.js +25 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +39 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +73 -4
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.vr.js +43 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +2 -2
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-search/q2-search.css +2 -0
- package/dist/collection/components/q2-search/q2-search.js +6 -3
- package/dist/collection/components/q2-section/q2-section.css +2 -0
- package/dist/collection/components/q2-section/q2-section.js +6 -6
- package/dist/collection/components/q2-select/q2-select.css +3 -0
- package/dist/collection/components/q2-select/q2-select.js +48 -22
- package/dist/collection/components/q2-select/test/q2-select-test.vr.js +13 -0
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-surface/q2-surface.js +1 -1
- package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +2 -2
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +6 -3
- package/dist/collection/components/q2-textarea/q2-textarea.js +6 -3
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +5 -3
- package/dist/collection/utils/chart-keyboard.js +76 -0
- package/dist/collection/utils/date-picker/date-picker-helpers.js +239 -0
- package/dist/collection/utils/date-picker/date-picker-types.js +1 -0
- package/dist/collection/utils/index.js +2 -2
- package/dist/collection/utils/test/vr-helpers.js +16 -2
- package/dist/components/charting.js +1603 -1532
- package/dist/components/dataSample.js +7 -7
- package/dist/components/index.js +57 -53
- package/dist/components/index2.js +3 -3
- package/dist/components/q2-action-sheet.js +224 -103
- package/dist/components/q2-avatar2.js +8 -8
- package/dist/components/q2-btn2.js +2 -2
- package/dist/components/q2-calendar.js +15 -10
- package/dist/components/q2-card-image.js +24 -24
- package/dist/components/q2-carousel-pane2.js +3 -3
- package/dist/components/q2-carousel.js +37 -24
- package/dist/components/q2-chart-area.js +415 -369
- package/dist/components/q2-chart-bar.js +193 -148
- package/dist/components/q2-chart-donut.js +185 -158
- package/dist/components/q2-checkbox-group.js +12 -12
- package/dist/components/q2-checkbox2.js +12 -12
- package/dist/components/q2-context.js +30 -29
- package/dist/components/q2-currency.js +9 -9
- package/dist/components/q2-data-table.js +111 -111
- package/dist/components/q2-date-calendar.d.ts +11 -0
- package/dist/components/q2-date-calendar.js +5 -0
- package/dist/components/q2-date-calendar2.js +678 -0
- package/dist/components/q2-date-picker.d.ts +11 -0
- package/dist/components/q2-date-picker.js +5 -0
- package/dist/components/q2-date-picker2.js +875 -0
- package/dist/components/q2-detail.js +3 -3
- package/dist/components/q2-dropdown.js +13 -13
- package/dist/components/q2-editable-field.js +45 -36
- package/dist/components/q2-example.js +11 -11
- package/dist/components/q2-file-picker.js +71 -11
- package/dist/components/q2-form.js +6 -6
- package/dist/components/q2-formatted-text.js +2 -2
- package/dist/components/q2-input2.js +268 -163
- package/dist/components/q2-item2.js +33 -23
- package/dist/components/q2-legend2.js +7 -7
- package/dist/components/q2-list2.js +6 -6
- package/dist/components/q2-message2.js +29 -29
- package/dist/components/q2-meter.js +7 -7
- package/dist/components/q2-modal.js +94 -76
- package/dist/components/q2-month-picker.js +17 -17
- package/dist/components/q2-mutation-observer.js +1 -1
- package/dist/components/q2-optgroup2.js +7 -7
- package/dist/components/q2-option-list2.js +52 -32
- package/dist/components/q2-otp.js +8 -8
- package/dist/components/q2-pagination.js +67 -67
- package/dist/components/q2-pill.js +17 -15
- package/dist/components/q2-popover2.js +77 -53
- package/dist/components/q2-radio-group.js +70 -40
- package/dist/components/q2-radio.js +40 -55
- package/dist/components/q2-relative-time.js +5 -5
- package/dist/components/q2-resize-observer2.js +23 -23
- package/dist/components/q2-search.js +6 -6
- package/dist/components/q2-section.js +33 -33
- package/dist/components/q2-select2.js +47 -40
- package/dist/components/q2-stepper-pane.js +17 -13
- package/dist/components/q2-stepper-vertical.js +4 -4
- package/dist/components/q2-stepper.js +57 -57
- package/dist/components/q2-surface.js +3 -3
- package/dist/components/q2-tab-container.js +18 -18
- package/dist/components/q2-tab-pane.js +2 -2
- package/dist/components/q2-tag2.js +8 -6
- package/dist/components/q2-textarea.js +3 -3
- package/dist/components/sectorHelper.js +78 -78
- package/dist/components/tecton-tab-pane.js +12 -11
- package/dist/esm/{charting-DOZct-UB.js → charting-DFXJklqs.js} +79 -1
- package/dist/esm/click-elsewhere_3.entry.js +85 -20
- package/dist/esm/{dataSample-Dm1zpQNi.js → dataSample-CP_VKNqt.js} +1 -1
- package/dist/esm/date-picker-helpers-D8QnN_AS.js +242 -0
- package/dist/esm/{index-Cps4jSQM.js → index-CP8pXJ-l.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{q2-action-group_2.entry.js → q2-action-group.entry.js} +3 -90
- package/dist/esm/q2-action-sheet.entry.js +99 -19
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_2.entry.js +113 -12
- package/dist/esm/q2-btn_2.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js +14 -7
- package/dist/esm/q2-card-image.entry.js +4 -4
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +3 -3
- package/dist/esm/q2-carousel.entry.js +20 -6
- package/dist/esm/q2-chart-area.entry.js +38 -7
- package/dist/esm/q2-chart-bar.entry.js +39 -8
- package/dist/esm/q2-chart-donut.entry.js +31 -13
- package/dist/esm/q2-checkbox-group.entry.js +3 -3
- package/dist/esm/q2-checkbox_2.entry.js +9 -6
- package/dist/esm/q2-context.entry.js +6 -5
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +7 -7
- package/dist/esm/q2-date-calendar.entry.js +450 -0
- package/dist/esm/q2-date-picker_2.entry.js +965 -0
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +4 -4
- package/dist/esm/q2-editable-field.entry.js +51 -37
- package/dist/esm/q2-example.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +60 -4
- 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 +21 -3
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-link_2.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +3 -3
- package/dist/esm/q2-meter.entry.js +2 -2
- package/dist/esm/q2-modal.entry.js +59 -17
- package/dist/esm/q2-month-picker.entry.js +3 -3
- package/dist/esm/q2-mutation-observer.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-otp.entry.js +5 -5
- package/dist/esm/q2-pagination.entry.js +4 -4
- package/dist/esm/q2-pill.entry.js +8 -5
- package/dist/esm/q2-radio-group.entry.js +22 -4
- package/dist/esm/q2-radio.entry.js +3 -3
- package/dist/esm/q2-relative-time.entry.js +3 -3
- package/dist/esm/q2-resize-observer.entry.js +90 -0
- package/dist/esm/q2-search.entry.js +4 -4
- package/dist/esm/q2-section.entry.js +7 -7
- package/dist/esm/q2-select.entry.js +41 -21
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-surface.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +2 -2
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +2 -2
- package/dist/esm/q2-toast.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/{sectorHelper--RMGWGAy.js → sectorHelper-DBtkWtpl.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +5 -3
- package/dist/q2-tecton-elements/{charting-DOZct-UB.js → charting-DFXJklqs.js} +1625 -1554
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +98 -54
- package/dist/q2-tecton-elements/{dataSample-Dm1zpQNi.js → dataSample-CP_VKNqt.js} +33 -33
- package/dist/q2-tecton-elements/date-picker-helpers-D8QnN_AS.js +153 -0
- package/dist/q2-tecton-elements/{index-Cps4jSQM.js → index-CP8pXJ-l.js} +2 -2
- package/dist/q2-tecton-elements/{q2-action-group_2.entry.js → q2-action-group.entry.js} +35 -113
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +169 -84
- package/dist/q2-tecton-elements/q2-avatar.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +240 -140
- package/dist/q2-tecton-elements/q2-btn_2.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-calendar.entry.js +18 -13
- package/dist/q2-tecton-elements/q2-card-image.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-carousel.entry.js +24 -11
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +190 -144
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +382 -338
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +186 -160
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +21 -19
- package/dist/q2-tecton-elements/q2-context.entry.js +18 -17
- package/dist/q2-tecton-elements/q2-currency.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-data-table.entry.js +38 -38
- package/dist/q2-tecton-elements/q2-date-calendar.entry.js +438 -0
- package/dist/q2-tecton-elements/q2-date-picker_2.entry.js +792 -0
- package/dist/q2-tecton-elements/q2-detail.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +10 -10
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +50 -41
- package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +62 -7
- package/dist/q2-tecton-elements/q2-form.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +27 -17
- package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-link_2.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-message.entry.js +30 -30
- package/dist/q2-tecton-elements/q2-meter.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-modal.entry.js +61 -45
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-mutation-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-otp.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-pagination.entry.js +20 -20
- package/dist/q2-tecton-elements/q2-pill.entry.js +43 -41
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +55 -34
- package/dist/q2-tecton-elements/q2-radio.entry.js +38 -53
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +81 -0
- package/dist/q2-tecton-elements/q2-search.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-section.entry.js +25 -25
- package/dist/q2-tecton-elements/q2-select.entry.js +28 -21
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +19 -15
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-stepper.entry.js +45 -45
- package/dist/q2-tecton-elements/q2-surface.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +15 -15
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-toast.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/{sectorHelper--RMGWGAy.js → sectorHelper-DBtkWtpl.js} +56 -56
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +8 -7
- package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +21 -1
- package/dist/types/components/q2-action-sheet/test/q2-action-sheet-test.vr.d.ts +1 -0
- package/dist/types/components/q2-btn/q2-btn.d.ts +7 -3
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +10 -2
- package/dist/types/components/q2-card-image/q2-card-image.d.ts +1 -1
- package/dist/types/components/q2-carousel/q2-carousel.d.ts +5 -0
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +11 -2
- package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +9 -0
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +1 -0
- package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +4 -3
- package/dist/types/components/q2-checkbox-group/q2-checkbox-group.d.ts +4 -2
- package/dist/types/components/q2-date-calendar/q2-date-calendar.d.ts +122 -0
- package/dist/types/components/q2-date-calendar/test/q2-date-calendar-test.vr.d.ts +1 -0
- package/dist/types/components/q2-date-picker/q2-date-picker.d.ts +304 -0
- package/dist/types/components/q2-date-picker/test/q2-date-picker-test.vr.d.ts +1 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +3 -3
- package/dist/types/components/q2-dropdown/test/q2-dropdown-test.vr.d.ts +1 -0
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +20 -2
- package/dist/types/components/q2-file-picker/q2-file-picker.d.ts +20 -0
- package/dist/types/components/q2-input/q2-input.d.ts +32 -4
- package/dist/types/components/q2-item/q2-item.d.ts +3 -0
- package/dist/types/components/q2-modal/q2-modal.d.ts +10 -1
- package/dist/types/components/q2-option-list/q2-option-list.d.ts +1 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +4 -0
- package/dist/types/components/q2-radio/q2-radio.d.ts +3 -2
- package/dist/types/components/q2-radio-group/q2-radio-group.d.ts +18 -2
- package/dist/types/components/q2-search/q2-search.d.ts +3 -1
- package/dist/types/components/q2-select/q2-select.d.ts +12 -4
- package/dist/types/components/q2-textarea/q2-textarea.d.ts +4 -2
- package/dist/types/components.d.ts +1112 -195
- package/dist/types/global.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/chart-keyboard.d.ts +16 -0
- package/dist/types/utils/date-picker/date-picker-helpers.d.ts +47 -0
- package/dist/types/utils/date-picker/date-picker-types.d.ts +42 -0
- package/dist/types/utils/test/vr-helpers.d.ts +2 -0
- package/package.json +3 -3
- package/dist/cjs/q2-optgroup.cjs.entry.js +0 -70
- package/dist/esm/q2-optgroup.entry.js +0 -68
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +0 -88
|
@@ -540,7 +540,10 @@ export class Q2Btn {
|
|
|
540
540
|
"required": false,
|
|
541
541
|
"optional": false,
|
|
542
542
|
"docs": {
|
|
543
|
-
"tags": [
|
|
543
|
+
"tags": [{
|
|
544
|
+
"name": "warning",
|
|
545
|
+
"text": "Hides the label visually. `label` text is still required for screenreader compliance. Use for icon-only buttons."
|
|
546
|
+
}],
|
|
544
547
|
"text": "Hides the `label`, and assigns its value to the `aria-label` attribute on the `<button>` element."
|
|
545
548
|
},
|
|
546
549
|
"getter": false,
|
|
@@ -552,15 +555,15 @@ export class Q2Btn {
|
|
|
552
555
|
"type": "string",
|
|
553
556
|
"mutable": true,
|
|
554
557
|
"complexType": {
|
|
555
|
-
"original": "| 'coin'\n | 'neutral-text'\n | 'neutral'\n | 'workflow-destroy'\n | 'workflow-escape'\n | 'workflow-primary'\n | 'workflow-secondary'",
|
|
556
|
-
"resolved": "\"coin\" | \"neutral\" | \"neutral-text\" | \"workflow-destroy\" | \"workflow-escape\" | \"workflow-primary\" | \"workflow-secondary\"",
|
|
558
|
+
"original": "| 'coin'\n | 'destroy'\n | 'escape'\n | 'neutral-text'\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'workflow-destroy'\n | 'workflow-escape'\n | 'workflow-primary'\n | 'workflow-secondary'",
|
|
559
|
+
"resolved": "\"coin\" | \"destroy\" | \"escape\" | \"neutral\" | \"neutral-text\" | \"primary\" | \"secondary\" | \"workflow-destroy\" | \"workflow-escape\" | \"workflow-primary\" | \"workflow-secondary\"",
|
|
557
560
|
"references": {}
|
|
558
561
|
},
|
|
559
562
|
"required": false,
|
|
560
563
|
"optional": false,
|
|
561
564
|
"docs": {
|
|
562
565
|
"tags": [],
|
|
563
|
-
"text": "Indicates the
|
|
566
|
+
"text": "Indicates the intended action type, which applies the appropriate styling.\nUse unprefixed values by default. The legacy `workflow-` prefix remains supported for backward compatibility."
|
|
564
567
|
},
|
|
565
568
|
"getter": false,
|
|
566
569
|
"setter": false,
|
|
@@ -579,6 +582,9 @@ export class Q2Btn {
|
|
|
579
582
|
"optional": false,
|
|
580
583
|
"docs": {
|
|
581
584
|
"tags": [{
|
|
585
|
+
"name": "warning",
|
|
586
|
+
"text": "Required for screen reader compliance even when `hideLabel` is `true`."
|
|
587
|
+
}, {
|
|
582
588
|
"name": "localizable",
|
|
583
589
|
"text": undefined
|
|
584
590
|
}],
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { expect } from "@playwright/test";
|
|
2
2
|
import { test } from "@stencil/playwright";
|
|
3
3
|
import { setupPage, THEMES, FONT_SCALE_PX, FONT_SCALE_SUFFIX } from "../../../utils/test/vr-helpers";
|
|
4
|
-
const INTENTS = [
|
|
5
|
-
'workflow-primary',
|
|
6
|
-
'workflow-secondary',
|
|
7
|
-
'workflow-destroy',
|
|
8
|
-
'workflow-escape',
|
|
9
|
-
'neutral',
|
|
10
|
-
'neutral-text',
|
|
11
|
-
'coin',
|
|
12
|
-
];
|
|
4
|
+
const INTENTS = ['primary', 'secondary', 'destroy', 'escape', 'neutral', 'neutral-text', 'coin'];
|
|
13
5
|
const SIZES = ['small', 'medium', 'large', 'none'];
|
|
14
6
|
const coinHtml = () => `<q2-btn intent="coin" label="My Button"><q2-avatar icon="star"></q2-avatar></q2-btn>`;
|
|
15
7
|
const labelAndIconHtml = (intent) => intent === 'coin'
|
|
@@ -22,10 +14,10 @@ const sizeHtml = (intent, size) => {
|
|
|
22
14
|
};
|
|
23
15
|
const plainHtml = () => `<q2-btn><q2-icon type="edit"></q2-icon><span>My Button</span></q2-btn>`;
|
|
24
16
|
const SIZED_INTENTS = [
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
17
|
+
'primary',
|
|
18
|
+
'secondary',
|
|
19
|
+
'destroy',
|
|
20
|
+
'escape',
|
|
29
21
|
'neutral',
|
|
30
22
|
'neutral-text',
|
|
31
23
|
];
|
|
@@ -49,7 +41,7 @@ const focusCase = (name, html, theme) => {
|
|
|
49
41
|
await expect(page).toHaveScreenshot(`${name}--${theme}.png`);
|
|
50
42
|
});
|
|
51
43
|
};
|
|
52
|
-
const activeCase = (name, html, theme) => {
|
|
44
|
+
const activeCase = (name, html, theme, settleAfterMs = 50) => {
|
|
53
45
|
test(`${name} — ${theme}`, async ({ page }) => {
|
|
54
46
|
await setupPage(page, html, { theme });
|
|
55
47
|
const btn = page.locator('q2-btn');
|
|
@@ -58,7 +50,7 @@ const activeCase = (name, html, theme) => {
|
|
|
58
50
|
throw new Error('q2-btn bounding box unavailable');
|
|
59
51
|
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
|
|
60
52
|
await page.mouse.down();
|
|
61
|
-
await page.waitForTimeout(
|
|
53
|
+
await page.waitForTimeout(settleAfterMs);
|
|
62
54
|
await expect(page).toHaveScreenshot(`${name}--${theme}.png`);
|
|
63
55
|
await page.mouse.up();
|
|
64
56
|
});
|
|
@@ -69,7 +61,8 @@ test.describe('q2-btn label+icon — intents × states × themes', () => {
|
|
|
69
61
|
restingCase(`q2-btn--${intent}--resting`, labelAndIconHtml(intent), theme);
|
|
70
62
|
hoverCase(`q2-btn--${intent}--hover`, labelAndIconHtml(intent), theme);
|
|
71
63
|
focusCase(`q2-btn--${intent}--focus`, labelAndIconHtml(intent), theme);
|
|
72
|
-
|
|
64
|
+
const settleAfterMs = intent === 'primary' && theme === 'default-2026' ? 125 : 50;
|
|
65
|
+
activeCase(`q2-btn--${intent}--active`, labelAndIconHtml(intent), theme, settleAfterMs);
|
|
73
66
|
}
|
|
74
67
|
}
|
|
75
68
|
});
|
|
@@ -91,6 +84,222 @@ test.describe('q2-btn intents — sizes × themes (resting)', () => {
|
|
|
91
84
|
}
|
|
92
85
|
}
|
|
93
86
|
});
|
|
87
|
+
test.describe('q2-btn primary — updated states', () => {
|
|
88
|
+
for (const size of SIZES) {
|
|
89
|
+
activeCase(`q2-btn--primary--size-${size}--active`, sizeHtml('primary', size), 'default-2026', 125);
|
|
90
|
+
}
|
|
91
|
+
restingCase('q2-btn--primary--disabled', '<q2-btn intent="primary" disabled><span>My Button</span></q2-btn>', 'default-2026');
|
|
92
|
+
test('uses the proposed-primary pointer and active contract', async ({ page }) => {
|
|
93
|
+
await setupPage(page, labelAndIconHtml('primary'), {
|
|
94
|
+
theme: 'default-2026',
|
|
95
|
+
motion: 'normal',
|
|
96
|
+
});
|
|
97
|
+
const host = page.locator('q2-btn');
|
|
98
|
+
const button = host.locator('button');
|
|
99
|
+
await host.hover();
|
|
100
|
+
await page.waitForTimeout(125);
|
|
101
|
+
expect(await button.evaluate(element => getComputedStyle(element).backgroundColor)).toBe('rgb(94, 64, 139)');
|
|
102
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toBe('none');
|
|
103
|
+
await host.click();
|
|
104
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toBe('none');
|
|
105
|
+
const box = await host.boundingBox();
|
|
106
|
+
if (!box)
|
|
107
|
+
throw new Error('q2-btn bounding box unavailable');
|
|
108
|
+
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
|
|
109
|
+
await page.mouse.down();
|
|
110
|
+
await page.waitForTimeout(125);
|
|
111
|
+
expect(await button.evaluate(element => getComputedStyle(element).backgroundColor)).toBe('rgb(82, 53, 120)');
|
|
112
|
+
expect(await button.evaluate(element => getComputedStyle(element).transform)).toBe('matrix(0.97, 0, 0, 0.97, 0, 0)');
|
|
113
|
+
await page.mouse.up();
|
|
114
|
+
});
|
|
115
|
+
test('uses the proposed-primary keyboard focus contract', async ({ page }) => {
|
|
116
|
+
await setupPage(page, labelAndIconHtml('primary'), { theme: 'default-2026' });
|
|
117
|
+
const button = page.locator('q2-btn').locator('button');
|
|
118
|
+
await page.keyboard.press('Tab');
|
|
119
|
+
await expect(button).toBeFocused();
|
|
120
|
+
await page.waitForTimeout(125);
|
|
121
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toContain('rgb(106, 74, 158)');
|
|
122
|
+
});
|
|
123
|
+
test('removes the Flat hover ring', async ({ page }) => {
|
|
124
|
+
await setupPage(page, labelAndIconHtml('primary'), { theme: 'flat' });
|
|
125
|
+
const host = page.locator('q2-btn');
|
|
126
|
+
const button = host.locator('button');
|
|
127
|
+
await host.hover();
|
|
128
|
+
await page.waitForTimeout(125);
|
|
129
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toBe('none');
|
|
130
|
+
});
|
|
131
|
+
test('removes the active scale from intent buttons for reduced motion', async ({ page }) => {
|
|
132
|
+
await page.emulateMedia({ reducedMotion: 'reduce' });
|
|
133
|
+
await setupPage(page, labelAndIconHtml('secondary'), { theme: 'default-2026' });
|
|
134
|
+
const host = page.locator('q2-btn');
|
|
135
|
+
const button = host.locator('button');
|
|
136
|
+
const box = await host.boundingBox();
|
|
137
|
+
if (!box)
|
|
138
|
+
throw new Error('q2-btn bounding box unavailable');
|
|
139
|
+
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
|
|
140
|
+
await page.mouse.down();
|
|
141
|
+
await page.waitForTimeout(125);
|
|
142
|
+
expect(await button.evaluate(element => getComputedStyle(element).transform)).toBe('none');
|
|
143
|
+
await page.mouse.up();
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
test.describe('q2-btn intents — active press treatment', () => {
|
|
147
|
+
for (const intent of INTENTS) {
|
|
148
|
+
test(`scales ${intent} while pressed`, async ({ page }) => {
|
|
149
|
+
await setupPage(page, labelAndIconHtml(intent), {
|
|
150
|
+
theme: 'default-2026',
|
|
151
|
+
motion: 'normal',
|
|
152
|
+
});
|
|
153
|
+
const host = page.locator('q2-btn');
|
|
154
|
+
const button = host.locator('button');
|
|
155
|
+
const box = await host.boundingBox();
|
|
156
|
+
if (!box)
|
|
157
|
+
throw new Error('q2-btn bounding box unavailable');
|
|
158
|
+
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
|
|
159
|
+
await page.mouse.down();
|
|
160
|
+
await page.waitForTimeout(125);
|
|
161
|
+
const scale = await button.evaluate(element => new DOMMatrixReadOnly(getComputedStyle(element).transform).a);
|
|
162
|
+
expect(scale).toBeGreaterThanOrEqual(0.97);
|
|
163
|
+
expect(scale).toBeLessThan(0.99);
|
|
164
|
+
await page.mouse.up();
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
test.describe('q2-btn — no-aesthetic fallbacks', () => {
|
|
169
|
+
test('adds the fallback shadow to primary', async ({ page }) => {
|
|
170
|
+
await setupPage(page, labelAndIconHtml('workflow-primary'));
|
|
171
|
+
const button = page.locator('q2-btn').locator('button');
|
|
172
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).not.toBe('none');
|
|
173
|
+
});
|
|
174
|
+
for (const intent of ['workflow-secondary', 'workflow-destroy', 'neutral', 'neutral-text']) {
|
|
175
|
+
test(`changes the ${intent} background while pressed`, async ({ page }) => {
|
|
176
|
+
await setupPage(page, labelAndIconHtml(intent), { motion: 'normal' });
|
|
177
|
+
const host = page.locator('q2-btn');
|
|
178
|
+
const button = host.locator('button');
|
|
179
|
+
const restingBackground = await button.evaluate(element => getComputedStyle(element).backgroundColor);
|
|
180
|
+
const box = await host.boundingBox();
|
|
181
|
+
if (!box)
|
|
182
|
+
throw new Error('q2-btn bounding box unavailable');
|
|
183
|
+
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
|
|
184
|
+
await page.mouse.down();
|
|
185
|
+
await page.waitForTimeout(125);
|
|
186
|
+
expect(await button.evaluate(element => getComputedStyle(element).backgroundColor)).not.toBe(restingBackground);
|
|
187
|
+
await page.mouse.up();
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
test.describe('q2-btn coin — updated hover state', () => {
|
|
192
|
+
for (const theme of [
|
|
193
|
+
'default-2026',
|
|
194
|
+
'flat',
|
|
195
|
+
'high-visibility',
|
|
196
|
+
'minimalist',
|
|
197
|
+
'neo-brutalist',
|
|
198
|
+
'standard',
|
|
199
|
+
]) {
|
|
200
|
+
test(`does not add a ${theme} hover ring`, async ({ page }) => {
|
|
201
|
+
await setupPage(page, coinHtml(), { theme });
|
|
202
|
+
const host = page.locator('q2-btn');
|
|
203
|
+
const button = host.locator('button');
|
|
204
|
+
await host.hover();
|
|
205
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toBe('none');
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
test.describe('q2-btn coin — theme focus color × aesthetics', () => {
|
|
210
|
+
for (const theme of THEMES) {
|
|
211
|
+
test(`uses the theme focus color in ${theme}`, async ({ page }) => {
|
|
212
|
+
await setupPage(page, coinHtml(), { theme });
|
|
213
|
+
await page.locator('html').evaluate(element => element.style.setProperty('--t-focus-color', '#123456'));
|
|
214
|
+
const button = page.locator('q2-btn').locator('button');
|
|
215
|
+
await page.keyboard.press('Tab');
|
|
216
|
+
await expect(button).toBeFocused();
|
|
217
|
+
await page.waitForTimeout(125);
|
|
218
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toContain('rgb(18, 52, 86)');
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
test.describe('q2-btn intents — consistent focus ring', () => {
|
|
223
|
+
for (const intent of INTENTS) {
|
|
224
|
+
test(`uses the theme focus color for ${intent}`, async ({ page }) => {
|
|
225
|
+
await setupPage(page, labelAndIconHtml(intent), { theme: 'default-2026' });
|
|
226
|
+
await page.locator('html').evaluate(element => element.style.setProperty('--t-focus-color', '#123456'));
|
|
227
|
+
const button = page.locator('q2-btn').locator('button');
|
|
228
|
+
await page.keyboard.press('Tab');
|
|
229
|
+
await expect(button).toBeFocused();
|
|
230
|
+
await page.waitForTimeout(125);
|
|
231
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toContain('rgb(18, 52, 86)');
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
test('prefers the per-intent outer ring color', async ({ page }) => {
|
|
235
|
+
await setupPage(page, '<q2-btn intent="destroy" style="--tct-btn-destroy-focus-visible-outer-ring-color: #123456">My Button</q2-btn>', { theme: 'default-2026' });
|
|
236
|
+
const button = page.locator('q2-btn').locator('button');
|
|
237
|
+
await page.keyboard.press('Tab');
|
|
238
|
+
await expect(button).toBeFocused();
|
|
239
|
+
await page.waitForTimeout(125);
|
|
240
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toContain('rgb(18, 52, 86)');
|
|
241
|
+
});
|
|
242
|
+
test('uses the theme focus color without an intent', async ({ page }) => {
|
|
243
|
+
await setupPage(page, plainHtml(), { theme: 'default-2026' });
|
|
244
|
+
const button = page.locator('q2-btn').locator('button');
|
|
245
|
+
await page.keyboard.press('Tab');
|
|
246
|
+
await expect(button).toBeFocused();
|
|
247
|
+
await page.waitForTimeout(125);
|
|
248
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toContain('rgb(106, 74, 158)');
|
|
249
|
+
});
|
|
250
|
+
test('falls back to the constant focus color when the theme token is unavailable', async ({ page }) => {
|
|
251
|
+
await setupPage(page, '<q2-btn intent="primary">My Button</q2-btn>', { theme: 'default-2026' });
|
|
252
|
+
await page.locator('html').evaluate(element => element.style.setProperty('--t-focus-color', 'initial'));
|
|
253
|
+
const button = page.locator('q2-btn').locator('button');
|
|
254
|
+
await page.keyboard.press('Tab');
|
|
255
|
+
await expect(button).toBeFocused();
|
|
256
|
+
await page.waitForTimeout(125);
|
|
257
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toContain('rgb(0, 102, 204)');
|
|
258
|
+
});
|
|
259
|
+
test('uses the constant focus color fallback for coin', async ({ page }) => {
|
|
260
|
+
await setupPage(page, coinHtml(), { theme: 'default-2026' });
|
|
261
|
+
await page.locator('html').evaluate(element => element.style.setProperty('--t-focus-color', 'initial'));
|
|
262
|
+
const button = page.locator('q2-btn').locator('button');
|
|
263
|
+
await page.keyboard.press('Tab');
|
|
264
|
+
await expect(button).toBeFocused();
|
|
265
|
+
await page.waitForTimeout(125);
|
|
266
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toContain('rgb(0, 102, 204)');
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
test.describe('q2-btn intents — pointer focus', () => {
|
|
270
|
+
for (const intent of INTENTS) {
|
|
271
|
+
for (const theme of THEMES) {
|
|
272
|
+
test(`does not add a focus ring to ${intent} in ${theme}`, async ({ page }) => {
|
|
273
|
+
await setupPage(page, labelAndIconHtml(intent), { theme });
|
|
274
|
+
const host = page.locator('q2-btn');
|
|
275
|
+
const button = host.locator('button');
|
|
276
|
+
await page.waitForTimeout(125);
|
|
277
|
+
const restingShadow = await button.evaluate(element => getComputedStyle(element).boxShadow);
|
|
278
|
+
await host.click();
|
|
279
|
+
await page.mouse.move(0, 0);
|
|
280
|
+
await page.waitForTimeout(125);
|
|
281
|
+
await expect(button).toBeFocused();
|
|
282
|
+
expect(await button.evaluate(element => getComputedStyle(element).boxShadow)).toBe(restingShadow);
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
test.describe('q2-btn icon-only — pointer focus', () => {
|
|
288
|
+
for (const theme of THEMES) {
|
|
289
|
+
test(`does not keep the hover background after a click in ${theme}`, async ({ page }) => {
|
|
290
|
+
await setupPage(page, '<q2-btn><q2-icon type="edit"></q2-icon></q2-btn>', { theme });
|
|
291
|
+
const host = page.locator('q2-btn');
|
|
292
|
+
const button = host.locator('button');
|
|
293
|
+
const restingBackground = await button.evaluate(element => getComputedStyle(element).backgroundColor);
|
|
294
|
+
await host.click();
|
|
295
|
+
await page.mouse.move(0, 0);
|
|
296
|
+
await expect(button).toBeFocused();
|
|
297
|
+
await expect
|
|
298
|
+
.poll(() => button.evaluate(element => getComputedStyle(element).backgroundColor))
|
|
299
|
+
.toBe(restingBackground);
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
});
|
|
94
303
|
test.describe('q2-btn plain (no intent) — states × themes', () => {
|
|
95
304
|
for (const theme of THEMES) {
|
|
96
305
|
restingCase('q2-btn--plain--resting', plainHtml(), theme);
|
|
@@ -99,12 +308,12 @@ test.describe('q2-btn plain (no intent) — states × themes', () => {
|
|
|
99
308
|
}
|
|
100
309
|
});
|
|
101
310
|
// coin exercises --tct-btn-coin-label-font-size.
|
|
102
|
-
//
|
|
311
|
+
// primary at each size exercises --tct-btn-font-size-small/medium/large.
|
|
103
312
|
const BTN_FONT_SCALE_CASES = [
|
|
104
313
|
{ name: 'coin', html: coinHtml() },
|
|
105
|
-
{ name: '
|
|
106
|
-
{ name: '
|
|
107
|
-
{ name: '
|
|
314
|
+
{ name: 'primary--size-small', html: sizeHtml('primary', 'small') },
|
|
315
|
+
{ name: 'primary--size-medium', html: sizeHtml('primary', 'medium') },
|
|
316
|
+
{ name: 'primary--size-large', html: sizeHtml('primary', 'large') },
|
|
108
317
|
];
|
|
109
318
|
test.describe(`q2-btn — scaled font size × themes`, () => {
|
|
110
319
|
for (const { name, html } of BTN_FONT_SCALE_CASES) {
|
|
@@ -93,6 +93,7 @@ button {
|
|
|
93
93
|
* @prop --tct-calendar-margin-bottom: (<length-percentage>) Controls the bottom margin of the calendar host when --tct-calendar-margin is not set.
|
|
94
94
|
* @prop --tct-calendar-popover-padding: (<length-percentage>+) Controls the inner padding of the calendar popover.
|
|
95
95
|
* @prop --tct-calendar-label-padding: (<length-percentage>+) Controls the inner padding of the calendar input label.
|
|
96
|
+
* @prop --tct-calendar-icon-size: (<length>) Controls the size of the calendar input icon.
|
|
96
97
|
* @prop --tct-calendar-label-font-size: (<length-percentage>) Controls the font size of the calendar input label.
|
|
97
98
|
* @prop --tct-calendar-month-font-size: (<length-percentage>) Controls the font size of the calendar month heading.
|
|
98
99
|
* @prop --tct-calendar-month-font-weight: (<number>) Controls the font weight of the calendar month heading.
|
|
@@ -141,6 +142,8 @@ click-elsewhere {
|
|
|
141
142
|
q2-input {
|
|
142
143
|
margin: 0;
|
|
143
144
|
cursor: pointer;
|
|
145
|
+
letter-spacing: inherit;
|
|
146
|
+
--tct-input-icon-size: var(--tct-calendar-icon-size, var(--const-px-18, 18px));
|
|
144
147
|
--tct-input-btn-hover-background: var(--tct-calendar-btn-hover-background, var(--app-gray-l3, #f2f2f2));
|
|
145
148
|
--tct-input-btn-icon-stroke-primary: var(--tct-calendar-btn-icon-stroke-primary, var(--app-gray, #747474));
|
|
146
149
|
--tct-input-btn-icon-stroke-secondary: var(--tct-calendar-btn-icon-stroke-secondary, var(--app-gray, #747474));
|
|
@@ -351,6 +351,7 @@ export class Q2Calendar {
|
|
|
351
351
|
}
|
|
352
352
|
handleClear() {
|
|
353
353
|
mirrorEmit(this, ['change', 'tctChange'], { value: null });
|
|
354
|
+
this.internalError = '';
|
|
354
355
|
this.value = null;
|
|
355
356
|
this.typedValue = '';
|
|
356
357
|
}
|
|
@@ -370,8 +371,13 @@ export class Q2Calendar {
|
|
|
370
371
|
this.controlElement.shadowRoot.querySelector('.input-field').focus();
|
|
371
372
|
}
|
|
372
373
|
popoverStateHandler({ detail: { open } }) {
|
|
373
|
-
if (this.open
|
|
374
|
-
|
|
374
|
+
if (this.open === open)
|
|
375
|
+
return;
|
|
376
|
+
this.open = open;
|
|
377
|
+
if (open)
|
|
378
|
+
return;
|
|
379
|
+
const trigger = this.typeable ? this.btnCalendarToggle : this.innerInputField;
|
|
380
|
+
trigger === null || trigger === void 0 ? void 0 : trigger.focus();
|
|
375
381
|
}
|
|
376
382
|
defaultSuccessHandler(event) {
|
|
377
383
|
if (event.target !== this.hostElement) {
|
|
@@ -496,6 +502,7 @@ export class Q2Calendar {
|
|
|
496
502
|
// resetting by empty string
|
|
497
503
|
if (newValue === '') {
|
|
498
504
|
this.value = undefined;
|
|
505
|
+
this.internalError = '';
|
|
499
506
|
this.setHints({ isValid: true, message: this.defaultHintMessage, messageType: 'info' });
|
|
500
507
|
return;
|
|
501
508
|
}
|
|
@@ -801,12 +808,12 @@ export class Q2Calendar {
|
|
|
801
808
|
}
|
|
802
809
|
renderInputField() {
|
|
803
810
|
const { isTypeable, label } = this;
|
|
804
|
-
return (h("q2-input", { ref: el => (this.controlElement = el), class: "calendar-input-field", value: this.formattedValue, label: loc(label), hideLabel: this.hideLabel, disabled: !!this.disabled, readonly: !!this.readonly, clearable: this.canClear, placeholder: this.computedPlaceholder, optional: !!this.optional, valid: this.valid, ariaExpanded: `${!!this.open}`, ariaControls:
|
|
811
|
+
return (h("q2-input", { ref: el => (this.controlElement = el), class: "calendar-input-field", value: this.formattedValue, label: loc(label), hideLabel: this.hideLabel, disabled: !!this.disabled, readonly: !!this.readonly, clearable: this.canClear, placeholder: this.computedPlaceholder, optional: !!this.optional, valid: this.valid, ariaExpanded: isTypeable ? undefined : `${!!this.open}`, ariaControls: isTypeable ? undefined : 'calendar-popover', ariaHaspopup: isTypeable ? undefined : 'dialog', hints: this.hintList, errors: this.errorList, onClick: isTypeable ? undefined : this.onInputClick, onChange: e => e.stopImmediatePropagation(), onTctChange: e => e.stopImmediatePropagation(), onInput: e => e.stopImmediatePropagation(), onTctInput: this.onInputInput, onKeyDown: this.onInputKeydown, onKeyUp: this.onInputKeyup, onBlur: this.onInputBlur, onFocus: this.onInputFocus, "icon-right": isTypeable ? undefined : 'calendar', "format-modifier": isTypeable ? this.formatModifier : this.displayFormat || this.formatModifier, type: "date", "hide-messages": !isTypeable, "test-id": "inputAndCalendarToggle", pseudo: !isTypeable, _role: isTypeable ? undefined : 'combobox', _preventEntry: !isTypeable }, isTypeable && (h("q2-btn", { ref: el => (this.btnCalendarToggle = el), slot: "input-right", onClick: this.onInputClick, "test-id": "calendarToggle", label: loc('tecton.element.calendar.toggleAriaLabel', [
|
|
805
812
|
label ? loc(label) : loc('tecton.element.calendar.defaultLabel'),
|
|
806
|
-
]), ariaExpanded: `${!!this.open}`, "hide-label": true, disabled: !!this.disabled || !!this.readonly }, h("q2-icon", { type: "calendar" })))));
|
|
813
|
+
]), ariaExpanded: `${!!this.open}`, ariaHasPopup: "dialog", "hide-label": true, disabled: !!this.disabled || !!this.readonly }, h("q2-icon", { type: "calendar" })))));
|
|
807
814
|
}
|
|
808
815
|
render() {
|
|
809
|
-
return (h("click-elsewhere", { key: '
|
|
816
|
+
return (h("click-elsewhere", { key: '11162237137dc92ffc61d85ab9facb1e8844ac9f', class: this.open ? 'dropdown-open' : undefined, onChange: this.onClickElsewhere }, this.renderInputField(), h("q2-popover", { key: '00f6dbdec8323951b6e997b544d7581a3d70719c', ref: el => (this.popoverElement = el), id: "calendar-popover", controlElement: this.innerInputContainer, open: this.open, direction: this.popoverDirection, minHeight: this.popoverMinHeight, align: this.popoverAlignment, mode: this.popoverMode || undefined, block: true }, this.renderHintField(), this.renderCalendarPopover())));
|
|
810
817
|
}
|
|
811
818
|
static get is() { return "q2-calendar"; }
|
|
812
819
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1100,7 +1107,10 @@ export class Q2Calendar {
|
|
|
1100
1107
|
"required": false,
|
|
1101
1108
|
"optional": false,
|
|
1102
1109
|
"docs": {
|
|
1103
|
-
"tags": [
|
|
1110
|
+
"tags": [{
|
|
1111
|
+
"name": "warning",
|
|
1112
|
+
"text": "Hides the label visually. `label` text is still required for screenreader compliance."
|
|
1113
|
+
}],
|
|
1104
1114
|
"text": "Hide the input field's ` <label> ` element from view."
|
|
1105
1115
|
},
|
|
1106
1116
|
"getter": false,
|
|
@@ -1181,7 +1191,10 @@ export class Q2Calendar {
|
|
|
1181
1191
|
"required": false,
|
|
1182
1192
|
"optional": false,
|
|
1183
1193
|
"docs": {
|
|
1184
|
-
"tags": [
|
|
1194
|
+
"tags": [{
|
|
1195
|
+
"name": "warning",
|
|
1196
|
+
"text": "Required for screen reader compliance even when `hideLabel` is `true`."
|
|
1197
|
+
}],
|
|
1185
1198
|
"text": "The visible label for the `q2-calendar` input field."
|
|
1186
1199
|
},
|
|
1187
1200
|
"getter": false,
|
|
@@ -134,10 +134,10 @@ export class Q2MonthPicker {
|
|
|
134
134
|
// #endregion
|
|
135
135
|
// #region Render Methods
|
|
136
136
|
render() {
|
|
137
|
-
return (h("div", { key: '
|
|
137
|
+
return (h("div", { key: '6e90b90e7720649681c2e95debe81d823095ccd0', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: 'd1b83fce67fec3beacb73004a02d566f77a5729f', class: "navigation" }, h("q2-btn", { key: '0772d6553ee3a75ca829755b3abc7d75ac0fa1aa', class: "year-btn", onClick: () => this.viewChange.emit({
|
|
138
138
|
view: 'year',
|
|
139
139
|
selectedYear: this.year,
|
|
140
|
-
}) }, h("span", { key: '
|
|
140
|
+
}) }, h("span", { key: '689e2643923973447a38063260943bfaf98f673c', class: "year" }, this.year), h("q2-icon", { key: '590dcf2cf06e4980d70644b5be9e448cfe72abdc', class: "year-icon off", type: "chevron-down" })), h("div", { key: '3001ad6ece1c302809e27df855c921698b840c56', class: "month-controller" }, h("div", { key: '23397576c55f2f5ad32c248459ce986d38f25e5d', class: "cal-year-prev-next" }, h("q2-btn", { key: '8d38dd1bc2986e6c43b66c5cf3538adea921b259', label: loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, h("q2-icon", { key: '55f8e258f83c0209b76efb3798478409ee246133', type: "arrow-left" })), h("q2-btn", { key: '578e4c4cd87cf3e25a09d55cb2c20ef0967d44bb', label: loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, h("q2-icon", { key: 'f2814f78597a04fca5617b3b59271d6c11221a5c', type: "arrow-right" }))))), h("div", { key: '7843d1db40f82116c3f82f544ad045a1f7dabadb', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index) => (h("div", { class: "month" }, h("span", { role: "button", class: "month-button", "data-index": index, "aria-label": month.label, tabindex: index === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (h("div", { key: '71675483d7a2d770ad8f76b3540d47c10ebb0325', class: "today-label" }, loc('tecton.element.calendar.today'), ": ", this.today))));
|
|
141
141
|
}
|
|
142
142
|
static get is() { return "q2-month-picker"; }
|
|
143
143
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,6 +10,18 @@ const RESTING_VARIANTS = [
|
|
|
10
10
|
name: 'default',
|
|
11
11
|
html: `<q2-calendar label="My calendar" placeholder="My date"></q2-calendar>`,
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
name: 'letter-spacing-override',
|
|
15
|
+
html: `<style>
|
|
16
|
+
q2-calendar {
|
|
17
|
+
--tct-input-label-letter-spacing: initial;
|
|
18
|
+
letter-spacing: 0.12em !important;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
<div style="width: 220px">
|
|
22
|
+
<q2-calendar label="Scheduled transfer processing date" placeholder="My date" optional></q2-calendar>
|
|
23
|
+
</div>`,
|
|
24
|
+
},
|
|
13
25
|
{
|
|
14
26
|
name: 'typeable',
|
|
15
27
|
html: `<q2-calendar label="My calendar" placeholder="My date" typeable></q2-calendar>`,
|
|
@@ -104,6 +116,9 @@ const openPopoverViaKeyboard = async (page) => {
|
|
|
104
116
|
await page.keyboard.press('Tab');
|
|
105
117
|
await page.keyboard.press(' ');
|
|
106
118
|
await waitForDayCell(page, '2026-05-17');
|
|
119
|
+
// Two rAFs: nested q2-btn/q2-icon renders finish in the first frame; the second
|
|
120
|
+
// frame ensures the layout from those nested renders is committed before the screenshot.
|
|
121
|
+
await page.evaluate(() => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(() => r()))));
|
|
107
122
|
};
|
|
108
123
|
const expandedDefaultCase = (variant, theme) => {
|
|
109
124
|
test(`q2-calendar--${variant.name}--expanded-default — ${theme}`, async ({ page }) => {
|
|
@@ -118,20 +133,10 @@ const dayKeyboardFocusCase = (variant, theme) => {
|
|
|
118
133
|
await freezeClock(page);
|
|
119
134
|
await setupPage(page, variant.html, { theme, setupLoc: true });
|
|
120
135
|
await openPopoverViaKeyboard(page);
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
// no-op for the calendar grid. Programmatically focus today first so the
|
|
124
|
-
// calendarBody's onKeyDown handler is the one that receives ArrowRight.
|
|
125
|
-
await page.evaluate(() => {
|
|
126
|
-
var _a;
|
|
127
|
-
const cal = document.querySelector('q2-calendar');
|
|
128
|
-
const today = (_a = cal === null || cal === void 0 ? void 0 : cal.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('td[data-date="2026-05-17"]');
|
|
129
|
-
today === null || today === void 0 ? void 0 : today.focus();
|
|
130
|
-
});
|
|
136
|
+
// Opening and day navigation transfer focus after rendering and the next paint.
|
|
137
|
+
await expect(page.locator('q2-calendar td[data-date="2026-05-17"]')).toBeFocused();
|
|
131
138
|
await page.keyboard.press('ArrowRight');
|
|
132
|
-
|
|
133
|
-
// particularly in themes with thicker borders (neo-brutalist) and
|
|
134
|
-
// translucent backdrops (glassmorphism).
|
|
139
|
+
await expect(page.locator('q2-calendar td[data-date="2026-05-18"]')).toBeFocused();
|
|
135
140
|
await expect(page).toHaveScreenshot(`q2-calendar--${variant.name}--day-keyboard-focus--${theme}.png`);
|
|
136
141
|
});
|
|
137
142
|
};
|
|
@@ -147,8 +152,14 @@ const dayHoverCase = (variant, theme) => {
|
|
|
147
152
|
// the rect manually. Also blur the input so the today cell's keyboard
|
|
148
153
|
// focus ring isn't present in the snapshot.
|
|
149
154
|
await page.evaluate(() => { var _a; return (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.blur(); });
|
|
150
|
-
|
|
151
|
-
await
|
|
155
|
+
const hoveredDay = page.locator('td[data-date="2026-05-22"]');
|
|
156
|
+
await hoveredDay.hover();
|
|
157
|
+
await page.waitForFunction(() => {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
const calendar = document.querySelector('q2-calendar');
|
|
160
|
+
return (_b = (_a = calendar === null || calendar === void 0 ? void 0 : calendar.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('td[data-date="2026-05-22"]')) === null || _b === void 0 ? void 0 : _b.matches(':hover');
|
|
161
|
+
});
|
|
162
|
+
await page.evaluate(() => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(() => r()))));
|
|
152
163
|
await expect(page).toHaveScreenshot(`q2-calendar--${variant.name}--day-hover--${theme}.png`);
|
|
153
164
|
});
|
|
154
165
|
};
|
|
@@ -24,6 +24,10 @@ const VARIANTS = [
|
|
|
24
24
|
name: 'with-bar',
|
|
25
25
|
html: `<q2-card title="Card Title" description="${DESC}" bar="primary" avatar-icon="document"></q2-card>`,
|
|
26
26
|
},
|
|
27
|
+
{
|
|
28
|
+
name: 'with-action-icon',
|
|
29
|
+
html: `<q2-card><q2-item><q2-icon slot="decorator" type="document"></q2-icon><div slot="header">Card Title</div><div slot="body">${SHORT_DESC}</div><q2-icon slot="action" type="chevron-right"></q2-icon></q2-item></q2-card>`,
|
|
30
|
+
},
|
|
27
31
|
{
|
|
28
32
|
name: 'elevation-1',
|
|
29
33
|
html: `<q2-card title="Card Title" description="${SHORT_DESC}" elevation="1" avatar-icon="document"></q2-card>`,
|