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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host, Fragment, } from "@stencil/core";
|
|
2
2
|
import { createGuid, getAriaValueFromProp, renderLabel, loc, renderMessages, setMessageHeight, handleAriaLabel, overrideFocus, isEventFromElement, isMobile, hasSlotContent, nextPaint, } from "../../utils/index";
|
|
3
3
|
import mirrorEmit from "../../utils/mirror-emit";
|
|
4
|
-
import formatCurrency from "./formatting/currency";
|
|
4
|
+
import formatCurrency, { currencyFormats } from "./formatting/currency";
|
|
5
5
|
import formatPhoneNumber from "./formatting/phone";
|
|
6
6
|
import formatSSN from "./formatting/ssn";
|
|
7
7
|
import formatTIN from "./formatting/tin";
|
|
@@ -60,8 +60,6 @@ export class Q2Input {
|
|
|
60
60
|
// #region State Properties
|
|
61
61
|
this.checkSlotCount = 0;
|
|
62
62
|
this.isSmall = false;
|
|
63
|
-
// #endregion
|
|
64
|
-
// #region Public Property API
|
|
65
63
|
/**
|
|
66
64
|
* Sets readonly to true on the input without adding the "read only" label.
|
|
67
65
|
*
|
|
@@ -87,7 +85,7 @@ export class Q2Input {
|
|
|
87
85
|
/**
|
|
88
86
|
* Displays a toggle button at the end of the input field which shows or hides the actual value.
|
|
89
87
|
* @info
|
|
90
|
-
*
|
|
88
|
+
* Applicable when `type` is `text`, `password`, `ssn`, or `tin`, or when `visibleLastCount` is set.
|
|
91
89
|
*/
|
|
92
90
|
this.showVisibilityToggle = false;
|
|
93
91
|
/** Specifies the field's expected [input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types), and provides the optimal keyboard on mobile devices. */
|
|
@@ -123,6 +121,7 @@ export class Q2Input {
|
|
|
123
121
|
mirrorEmit(this, ['clear', 'tctClear'], { source: 'input' });
|
|
124
122
|
}
|
|
125
123
|
this.setCursorPosition(cursorPosition);
|
|
124
|
+
this.scheduleVisibleLastScrollSync();
|
|
126
125
|
};
|
|
127
126
|
this.initMutationObserver = () => {
|
|
128
127
|
if (!('MutationObserver' in window))
|
|
@@ -158,6 +157,7 @@ export class Q2Input {
|
|
|
158
157
|
this.onInputClick = () => {
|
|
159
158
|
if (this.shouldCursorStayAtEnd)
|
|
160
159
|
this.placeCursorAtEnd();
|
|
160
|
+
this.scheduleVisibleLastScrollSync();
|
|
161
161
|
};
|
|
162
162
|
this.onInputFocus = () => {
|
|
163
163
|
if (this.inputField.tagName === 'INPUT') {
|
|
@@ -169,6 +169,7 @@ export class Q2Input {
|
|
|
169
169
|
this.setCursorPosition(this.calculateCursorPositionOnFocus());
|
|
170
170
|
}
|
|
171
171
|
this.isClickEvent = false;
|
|
172
|
+
this.syncVisibleLastScroll();
|
|
172
173
|
});
|
|
173
174
|
}
|
|
174
175
|
this.hasFocus = true;
|
|
@@ -211,6 +212,9 @@ export class Q2Input {
|
|
|
211
212
|
this.handleDataInput(newFormattedValue);
|
|
212
213
|
}
|
|
213
214
|
};
|
|
215
|
+
this.onInputScroll = () => {
|
|
216
|
+
this.syncVisibleLastScroll();
|
|
217
|
+
};
|
|
214
218
|
this.onMutationObserved = () => {
|
|
215
219
|
// Updating checkSlotCount to force re-render when slot content changes
|
|
216
220
|
this.checkSlotCount = this.checkSlotCount + 1;
|
|
@@ -223,8 +227,18 @@ export class Q2Input {
|
|
|
223
227
|
};
|
|
224
228
|
this.onToggleVisibility = () => {
|
|
225
229
|
this.hostElement.dispatchEvent(new FocusEvent('focus'));
|
|
230
|
+
if (this.normalizedVisibleLastCount !== undefined) {
|
|
231
|
+
this.value = this.formattedValueObject.value;
|
|
232
|
+
}
|
|
226
233
|
this.textHidden = !this.textHidden;
|
|
227
234
|
};
|
|
235
|
+
this.syncVisibleLastScroll = () => {
|
|
236
|
+
var _a, _b;
|
|
237
|
+
if (!this.visibleLastContentRef)
|
|
238
|
+
return;
|
|
239
|
+
const scrollLeft = (_b = (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.scrollLeft) !== null && _b !== void 0 ? _b : 0;
|
|
240
|
+
this.visibleLastContentRef.style.setProperty('--tct-input-visible-last-count-scroll-left', `${scrollLeft}px`);
|
|
241
|
+
};
|
|
228
242
|
this.validateInput = () => {
|
|
229
243
|
var _a, _b, _c;
|
|
230
244
|
this.validity = (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.validity;
|
|
@@ -268,6 +282,7 @@ export class Q2Input {
|
|
|
268
282
|
componentDidRender() {
|
|
269
283
|
this.scheduledAfterRender.forEach(fn => fn());
|
|
270
284
|
this.scheduledAfterRender = [];
|
|
285
|
+
this.syncVisibleLastScroll();
|
|
271
286
|
}
|
|
272
287
|
// #endregion
|
|
273
288
|
// #region Listeners
|
|
@@ -371,6 +386,16 @@ export class Q2Input {
|
|
|
371
386
|
hintsObserver() {
|
|
372
387
|
this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));
|
|
373
388
|
}
|
|
389
|
+
textHiddenObserver() {
|
|
390
|
+
if (!this.textHidden) {
|
|
391
|
+
this.scheduledAfterRender.push(() => {
|
|
392
|
+
this.inputField.value = this.formattedValueObject.formattedValue;
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
this.scheduleVisibleLastScrollSync();
|
|
397
|
+
}
|
|
398
|
+
}
|
|
374
399
|
typeObserver() {
|
|
375
400
|
this.formatAndUpdateValueFromProp();
|
|
376
401
|
}
|
|
@@ -434,13 +459,34 @@ export class Q2Input {
|
|
|
434
459
|
return this.iconLeft;
|
|
435
460
|
}
|
|
436
461
|
get computedType() {
|
|
437
|
-
if (
|
|
462
|
+
if (this.textHidden &&
|
|
463
|
+
(['password', 'text', 'ssn', 'tin'].includes(this.type) || this.normalizedVisibleLastCount !== undefined)) {
|
|
438
464
|
return 'password';
|
|
439
465
|
}
|
|
440
|
-
|
|
441
|
-
|
|
466
|
+
return (this.type && inputTypeMap[this.type]) || 'text';
|
|
467
|
+
}
|
|
468
|
+
get currencyCode() {
|
|
469
|
+
if (this.type !== 'currency')
|
|
470
|
+
return;
|
|
471
|
+
const formatModifier = this.formatModifier === undefined ? 'USD' : this.formatModifier || '';
|
|
472
|
+
const currencyCode = formatModifier.includes('-integer') ? formatModifier.split('-integer')[0] : formatModifier;
|
|
473
|
+
return currencyFormats[currencyCode] ? currencyCode : undefined;
|
|
474
|
+
}
|
|
475
|
+
get currencyDescription() {
|
|
476
|
+
const currencyCode = this.currencyCode;
|
|
477
|
+
if (!currencyCode)
|
|
478
|
+
return;
|
|
479
|
+
try {
|
|
480
|
+
const locale = document.documentElement.lang || 'en-US';
|
|
481
|
+
return new Intl.DisplayNames(locale, { type: 'currency' }).of(currencyCode) || currencyCode;
|
|
482
|
+
}
|
|
483
|
+
catch (_a) {
|
|
484
|
+
return currencyCode;
|
|
442
485
|
}
|
|
443
486
|
}
|
|
487
|
+
get currencyDescriptionId() {
|
|
488
|
+
return `${this.inputId}-currency-description`;
|
|
489
|
+
}
|
|
444
490
|
get hasCustomDisplaySlot() {
|
|
445
491
|
return hasSlotContent(this.hostElement, 'custom-display');
|
|
446
492
|
}
|
|
@@ -457,7 +503,14 @@ export class Q2Input {
|
|
|
457
503
|
return this.valid && !this.hasError;
|
|
458
504
|
}
|
|
459
505
|
get inputDescribedBy() {
|
|
460
|
-
|
|
506
|
+
const descriptions = [];
|
|
507
|
+
if (this.currencyDescription)
|
|
508
|
+
descriptions.push(this.currencyDescriptionId);
|
|
509
|
+
if (this._ariaDescription)
|
|
510
|
+
descriptions.push(`${this.inputId}-aria-description`);
|
|
511
|
+
if (this.showMessages || this.hasError)
|
|
512
|
+
descriptions.push(`${this.inputId}-description`);
|
|
513
|
+
return descriptions.length ? descriptions.join(' ') : undefined;
|
|
461
514
|
}
|
|
462
515
|
get inputField() {
|
|
463
516
|
return this.hostElement.shadowRoot.querySelector('.input-field');
|
|
@@ -498,11 +551,44 @@ export class Q2Input {
|
|
|
498
551
|
];
|
|
499
552
|
return maskedTypes.includes(this.type);
|
|
500
553
|
}
|
|
554
|
+
get maskedDisplayParts() {
|
|
555
|
+
var _a, _b;
|
|
556
|
+
if (!this.textHidden)
|
|
557
|
+
return { maskedCharacters: [], visibleValue: '' };
|
|
558
|
+
const visibleCount = this.normalizedVisibleLastCount;
|
|
559
|
+
const value = (_b = (_a = this.formattedValueObject) === null || _a === void 0 ? void 0 : _a.formattedValue) !== null && _b !== void 0 ? _b : '';
|
|
560
|
+
if (visibleCount === undefined || !value)
|
|
561
|
+
return { maskedCharacters: [], visibleValue: '' };
|
|
562
|
+
const characters = Array.from(value);
|
|
563
|
+
if (visibleCount >= characters.length)
|
|
564
|
+
return { maskedCharacters: [], visibleValue: value };
|
|
565
|
+
const visibleStart = characters.length - visibleCount;
|
|
566
|
+
return {
|
|
567
|
+
maskedCharacters: characters.slice(0, visibleStart),
|
|
568
|
+
visibleValue: characters.slice(visibleStart).join(''),
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
get maskedDisplayValue() {
|
|
572
|
+
const { maskedCharacters, visibleValue } = this.maskedDisplayParts;
|
|
573
|
+
return `${'*'.repeat(maskedCharacters.length)}${visibleValue}`;
|
|
574
|
+
}
|
|
501
575
|
get messages() {
|
|
502
576
|
return ((this.errors && this.errors.length > 0 && this.errors) ||
|
|
503
577
|
(this.hints && this.hints.length > 0 && this.hints) ||
|
|
504
578
|
[]);
|
|
505
579
|
}
|
|
580
|
+
get normalizedVisibleLastCount() {
|
|
581
|
+
const unsupportedTypes = ['currency', 'password', 'date'];
|
|
582
|
+
if (unsupportedTypes.includes(this.type))
|
|
583
|
+
return;
|
|
584
|
+
const visibleLastCountProp = this.visibleLastCount;
|
|
585
|
+
if (visibleLastCountProp === undefined || visibleLastCountProp === null || visibleLastCountProp === '')
|
|
586
|
+
return;
|
|
587
|
+
const visibleLastCount = Number(visibleLastCountProp);
|
|
588
|
+
if (!Number.isFinite(visibleLastCount) || visibleLastCount < 0)
|
|
589
|
+
return;
|
|
590
|
+
return Math.floor(visibleLastCount);
|
|
591
|
+
}
|
|
506
592
|
get shouldCursorStartAtEnd() {
|
|
507
593
|
return this.type === 'currency';
|
|
508
594
|
}
|
|
@@ -515,6 +601,10 @@ export class Q2Input {
|
|
|
515
601
|
get showMessages() {
|
|
516
602
|
return this.messages.length > 0 && !this.hideMessages;
|
|
517
603
|
}
|
|
604
|
+
get showVisibilityToggleButton() {
|
|
605
|
+
return (this.showVisibilityToggle &&
|
|
606
|
+
(['password', 'text', 'ssn', 'tin'].includes(this.type) || this.normalizedVisibleLastCount !== undefined));
|
|
607
|
+
}
|
|
518
608
|
get stringValue() {
|
|
519
609
|
const notCoercable = Object.prototype.toString.call(this.value) === '[object Object]';
|
|
520
610
|
return notCoercable ? '' : (this.value && String(this.value)) || '';
|
|
@@ -693,6 +783,11 @@ export class Q2Input {
|
|
|
693
783
|
const { inputField } = this;
|
|
694
784
|
inputField.selectionStart = inputField.selectionEnd = inputField.value.length;
|
|
695
785
|
}
|
|
786
|
+
scheduleVisibleLastScrollSync() {
|
|
787
|
+
if (!this.maskedDisplayValue)
|
|
788
|
+
return;
|
|
789
|
+
nextPaint(this.syncVisibleLastScroll);
|
|
790
|
+
}
|
|
696
791
|
setCursorPosition(cursorData) {
|
|
697
792
|
if (this.canSetSelection && !cursorData.hasSelection) {
|
|
698
793
|
const input = this.inputField;
|
|
@@ -724,7 +819,7 @@ export class Q2Input {
|
|
|
724
819
|
}
|
|
725
820
|
renderInputContainerDOM() {
|
|
726
821
|
const { hasInputLeftSlot, hasInputRightSlot } = this;
|
|
727
|
-
return (h("div", { class: "input-container", tabindex: -1, "test-id": "inputContainer" }, h("div", { class: "input-icons-container-left" }, this.formattedValueObject.prefix && (h("div", { class: "input-prefix" }, this.formattedValueObject.prefix)), this.computedIconLeft && (h("div", null, h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft }))), hasInputLeftSlot && h("slot", { name: "input-left" }), this.showIconSeparator && h("div", { class: "vertical-separator" }), this.hasError && this.type === 'currency' && (h("div", { "test-id": "divIconError", onClick: this.onRefocusInput }, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" }))), this.hasValidState && this.type === 'currency' && (h("div", { class: "input-valid-icon-container", "test-id": "divIconValid" }, h("q2-icon", { type: "success", class: "icon-valid", "test-id": "iconValid" })))), this.pseudo ? this.renderPseudoInputDOM() : this.renderStandardInputDOM(), h("div", { class: "input-icons-container-right" }, h("q2-btn", { class: this.clearClasses.join(' '), label: loc('tecton.element.input.clear', [this.label]), hideLabel: true, "test-id": "clearButton", onMouseDown: e => e.preventDefault(), onClick: this.onClearInput, onKeyDown: e => e.stopPropagation() }, h("q2-icon", { type: "close", class: "icon-clear" })),
|
|
822
|
+
return (h("div", { class: "input-container", tabindex: -1, "test-id": "inputContainer" }, h("div", { class: "input-icons-container-left" }, this.formattedValueObject.prefix && (h("div", { class: "input-prefix", "aria-hidden": this.type === 'currency' ? 'true' : undefined }, this.formattedValueObject.prefix)), this.computedIconLeft && (h("div", null, h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft }))), hasInputLeftSlot && h("slot", { name: "input-left" }), this.showIconSeparator && h("div", { class: "vertical-separator" }), this.hasError && this.type === 'currency' && (h("div", { "test-id": "divIconError", onClick: this.onRefocusInput }, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" }))), this.hasValidState && this.type === 'currency' && (h("div", { class: "input-valid-icon-container", "test-id": "divIconValid" }, h("q2-icon", { type: "success", class: "icon-valid", "test-id": "iconValid" })))), this.pseudo ? this.renderPseudoInputDOM() : this.renderStandardInputDOM(), h("div", { class: "input-icons-container-right" }, h("q2-btn", { class: this.clearClasses.join(' '), label: loc('tecton.element.input.clear', [this.label]), hideLabel: true, "test-id": "clearButton", onMouseDown: e => e.preventDefault(), onClick: this.onClearInput, onKeyDown: e => e.stopPropagation() }, h("q2-icon", { type: "close", class: "icon-clear" })), this.showVisibilityToggleButton && (h("q2-btn", { class: "btn-visibility-toggle", "test-id": "toggleVisibilityButton", onClick: this.onToggleVisibility, label: loc(this.visibilityToggleAriaLabel, { label: this.label }), "hide-label": true }, this.visibilityToggleText)), this.formattedValueObject.suffix && (h("span", { class: "input-suffix", "aria-hidden": this.type === 'currency' ? 'true' : undefined }, this.formattedValueObject.suffix)), this.badgeValue && (h("q2-badge", { size: "large", theme: this.badgeTheme }, this.badgeValue)), this.hasValidState && this.type !== 'currency' && (h("div", { class: "input-valid-icon-container", "test-id": "divIconValid" }, h("q2-icon", { type: "success", class: "icon-valid", "test-id": "iconValid" }))), this.hasError && this.type !== 'currency' && (h("div", { "test-id": "divIconError", onClick: this.onRefocusInput }, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" }))), this.iconRight && !this.formattedValueObject.suffix && (h("div", null, h("q2-icon", { type: this.iconRight, class: "icon-right" }))), hasInputRightSlot && h("slot", { name: "input-right" })), this.currencyDescription && (h("span", { id: this.currencyDescriptionId, class: "sr" }, this.currencyDescription))));
|
|
728
823
|
}
|
|
729
824
|
renderPseudoInputDOM() {
|
|
730
825
|
const showPlaceholder = !this.value && !!this.placeholder;
|
|
@@ -735,13 +830,16 @@ export class Q2Input {
|
|
|
735
830
|
const { hasCustomDisplaySlot } = this;
|
|
736
831
|
const inputClasses = ['input-field'];
|
|
737
832
|
const { ariaOwns, ariaHaspopup, ariaActivedescendant, ariaExpanded } = this.ariaAttributes;
|
|
833
|
+
const { maskedCharacters, visibleValue } = this.maskedDisplayParts;
|
|
738
834
|
if (hasCustomDisplaySlot)
|
|
739
835
|
inputClasses.push('sr');
|
|
740
|
-
|
|
836
|
+
if (this.maskedDisplayValue)
|
|
837
|
+
inputClasses.push('has-visible-last-count');
|
|
838
|
+
return (h(Fragment, null, hasCustomDisplaySlot && (h("div", { class: "custom-display-container" }, h("slot", { name: "custom-display" }))), h("div", { class: "standard-input-container" }, this.maskedDisplayValue && (h("span", { class: "visible-last-count-value", "aria-hidden": "true" }, h("span", { ref: el => (this.visibleLastContentRef = el), class: "visible-last-count-content" }, maskedCharacters.map(character => (h("span", { class: "visible-last-count-character", "data-character": character }, h("span", { class: "visible-last-count-mask" }, "*")))), h("span", { class: "visible-last-count-visible-value" }, visibleValue)))), h("input", { ref: el => (this.inputRef = el), class: inputClasses.join(' '), id: this.inputId, type: this.computedType, size: this.formattedValueObject.prefix ? 10 : undefined, maxlength: ['date', 'currency'].includes(this.type) ? undefined : this.maxlength || undefined, max: this.max, min: this.min, step: this.step, "aria-current": this.current || undefined, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-owns": ariaOwns, "aria-haspopup": ariaHaspopup, "aria-activedescendant": ariaActivedescendant, "aria-expanded": ariaExpanded || undefined, role: this._role || undefined, autocomplete: this.computedAutocomplete, autocapitalize: this.autocapitalize, autocorrect: this.autocorrect === 'on' ? 'on' : 'off', autofocus: this.autofocus, placeholder: (this.placeholder && loc(this.placeholder)) || undefined, "test-id": "inputField", readonly: this.readonly || this._preventEntry, disabled: !!this.disabled, onFocus: this.onInputFocus, onBlur: this.onInputBlur, onClick: this.onInputClick, onKeyDown: this.onInputKeydown, onMouseDown: this.onInputMousedown, onInput: this.onInputInput, onScroll: this.onInputScroll, onPaste: this.onInputPaste, inputmode: this.inputMode, pattern: this.pattern || undefined }))));
|
|
741
839
|
}
|
|
742
840
|
render() {
|
|
743
841
|
const { ariaControls, ariaExpanded } = this.ariaAttributes;
|
|
744
|
-
return (h(Host, { key: '
|
|
842
|
+
return (h(Host, { key: '5cce451eef90d5ef5cef8020105b725d76265eeb', role: this._role, "aria-controls": ariaControls, "aria-expanded": ariaExpanded }, h("div", { key: '6c014e6884ceabb3a0ceb7d667d7a9496221419c', class: this.wrapperClasses }, this._ariaDescription && (h("span", { key: '0a4eba6052c45e24e6babcfa9abbe587c46484c4', id: `${this.inputId}-aria-description`, class: "sr" }, this._ariaDescription)), h("div", { key: 'd93a7a1e3b0f8638c23f2922429b458d5b249e9f', class: "label-wrapper" }, renderLabel(this), this.renderCountDOM()), this.renderInputContainerDOM(), renderMessages(this))));
|
|
745
843
|
}
|
|
746
844
|
static get is() { return "q2-input"; }
|
|
747
845
|
static get encapsulation() { return "shadow"; }
|
|
@@ -757,6 +855,28 @@ export class Q2Input {
|
|
|
757
855
|
}
|
|
758
856
|
static get properties() {
|
|
759
857
|
return {
|
|
858
|
+
"_ariaDescription": {
|
|
859
|
+
"type": "string",
|
|
860
|
+
"mutable": false,
|
|
861
|
+
"complexType": {
|
|
862
|
+
"original": "string",
|
|
863
|
+
"resolved": "string",
|
|
864
|
+
"references": {}
|
|
865
|
+
},
|
|
866
|
+
"required": false,
|
|
867
|
+
"optional": false,
|
|
868
|
+
"docs": {
|
|
869
|
+
"tags": [{
|
|
870
|
+
"name": "private",
|
|
871
|
+
"text": undefined
|
|
872
|
+
}],
|
|
873
|
+
"text": "Provides additional descriptive text for the native input."
|
|
874
|
+
},
|
|
875
|
+
"getter": false,
|
|
876
|
+
"setter": false,
|
|
877
|
+
"reflect": false,
|
|
878
|
+
"attribute": "_aria-description"
|
|
879
|
+
},
|
|
760
880
|
"_preventEntry": {
|
|
761
881
|
"type": "boolean",
|
|
762
882
|
"mutable": true,
|
|
@@ -1180,9 +1300,9 @@ export class Q2Input {
|
|
|
1180
1300
|
"docs": {
|
|
1181
1301
|
"tags": [{
|
|
1182
1302
|
"name": "warning",
|
|
1183
|
-
"text": "
|
|
1303
|
+
"text": "Hides the label visually. `label` text is still required for screenreader compliance."
|
|
1184
1304
|
}],
|
|
1185
|
-
"text": "
|
|
1305
|
+
"text": "Hides the field's `<label>` element from view."
|
|
1186
1306
|
},
|
|
1187
1307
|
"getter": false,
|
|
1188
1308
|
"setter": false,
|
|
@@ -1295,6 +1415,9 @@ export class Q2Input {
|
|
|
1295
1415
|
"optional": false,
|
|
1296
1416
|
"docs": {
|
|
1297
1417
|
"tags": [{
|
|
1418
|
+
"name": "warning",
|
|
1419
|
+
"text": "Required for screen reader compliance even when `hideLabel` is `true`."
|
|
1420
|
+
}, {
|
|
1298
1421
|
"name": "localizable",
|
|
1299
1422
|
"text": undefined
|
|
1300
1423
|
}],
|
|
@@ -1526,7 +1649,7 @@ export class Q2Input {
|
|
|
1526
1649
|
"docs": {
|
|
1527
1650
|
"tags": [{
|
|
1528
1651
|
"name": "info",
|
|
1529
|
-
"text": "
|
|
1652
|
+
"text": "Applicable when `type` is `text`, `password`, `ssn`, or `tin`, or when `visibleLastCount` is set."
|
|
1530
1653
|
}],
|
|
1531
1654
|
"text": "Displays a toggle button at the end of the input field which shows or hides the actual value."
|
|
1532
1655
|
},
|
|
@@ -1570,7 +1693,7 @@ export class Q2Input {
|
|
|
1570
1693
|
"optional": false,
|
|
1571
1694
|
"docs": {
|
|
1572
1695
|
"tags": [],
|
|
1573
|
-
"text": "Controls visibility of the value
|
|
1696
|
+
"text": "Controls visibility of the value. When `visibleLastCount` is set, hidden values keep the specified number of\ntrailing characters visible.\nWhen the input type is `password`, it will default to `true`, hiding the text."
|
|
1574
1697
|
},
|
|
1575
1698
|
"getter": false,
|
|
1576
1699
|
"setter": false,
|
|
@@ -1666,6 +1789,25 @@ export class Q2Input {
|
|
|
1666
1789
|
"setter": false,
|
|
1667
1790
|
"reflect": false,
|
|
1668
1791
|
"attribute": "value"
|
|
1792
|
+
},
|
|
1793
|
+
"visibleLastCount": {
|
|
1794
|
+
"type": "number",
|
|
1795
|
+
"mutable": false,
|
|
1796
|
+
"complexType": {
|
|
1797
|
+
"original": "number",
|
|
1798
|
+
"resolved": "number",
|
|
1799
|
+
"references": {}
|
|
1800
|
+
},
|
|
1801
|
+
"required": false,
|
|
1802
|
+
"optional": false,
|
|
1803
|
+
"docs": {
|
|
1804
|
+
"tags": [],
|
|
1805
|
+
"text": "Controls the number of trailing characters that remain visible when the field value is masked by `textHidden`\nor the visibility toggle. The element's `value` and emitted event details remain unmasked."
|
|
1806
|
+
},
|
|
1807
|
+
"getter": false,
|
|
1808
|
+
"setter": false,
|
|
1809
|
+
"reflect": true,
|
|
1810
|
+
"attribute": "visible-last-count"
|
|
1669
1811
|
}
|
|
1670
1812
|
};
|
|
1671
1813
|
}
|
|
@@ -2008,6 +2150,9 @@ export class Q2Input {
|
|
|
2008
2150
|
}, {
|
|
2009
2151
|
"propName": "hints",
|
|
2010
2152
|
"methodName": "hintsObserver"
|
|
2153
|
+
}, {
|
|
2154
|
+
"propName": "textHidden",
|
|
2155
|
+
"methodName": "textHiddenObserver"
|
|
2011
2156
|
}, {
|
|
2012
2157
|
"propName": "type",
|
|
2013
2158
|
"methodName": "typeObserver"
|
|
@@ -5,6 +5,18 @@ const HINTS = ['Save more than you spend.', 'Wear sunscreen.', 'Hug a panda.'];
|
|
|
5
5
|
const ERRORS = ['This field is required.', 'The value entered is invalid.', 'The value offends me.'];
|
|
6
6
|
const VARIANTS = [
|
|
7
7
|
{ name: 'default', html: '<q2-input label="My input" placeholder="Enter text here"></q2-input>' },
|
|
8
|
+
{
|
|
9
|
+
name: 'letter-spacing-override',
|
|
10
|
+
html: `<style>
|
|
11
|
+
q2-input {
|
|
12
|
+
--tct-input-label-letter-spacing: initial;
|
|
13
|
+
letter-spacing: 0.12em !important;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
<div style="width: 220px">
|
|
17
|
+
<q2-input label="Account holder full legal name" placeholder="Enter a name" optional></q2-input>
|
|
18
|
+
</div>`,
|
|
19
|
+
},
|
|
8
20
|
{
|
|
9
21
|
name: 'type-credit-card',
|
|
10
22
|
html: '<q2-input label="My input" placeholder="Enter text here" type="credit-card"></q2-input>',
|
|
@@ -21,6 +33,14 @@ const VARIANTS = [
|
|
|
21
33
|
name: 'visibility-toggle',
|
|
22
34
|
html: '<q2-input label="My input" placeholder="Enter text here" type="password" show-visibility-toggle="true" value="hunter2"></q2-input>',
|
|
23
35
|
},
|
|
36
|
+
{
|
|
37
|
+
name: 'clearable',
|
|
38
|
+
html: '<q2-input label="My input" clearable value="Clearable value"></q2-input>',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'visible-last-count',
|
|
42
|
+
html: '<q2-input label="Account number" type="numeric" visible-last-count="4" text-hidden show-visibility-toggle="true" value="1234567890"></q2-input>',
|
|
43
|
+
},
|
|
24
44
|
{
|
|
25
45
|
name: 'slotted',
|
|
26
46
|
html: `<q2-input label="My input" placeholder="Enter text here" optional>
|
|
@@ -102,6 +122,21 @@ test.describe('q2-input — variants × themes', () => {
|
|
|
102
122
|
}
|
|
103
123
|
}
|
|
104
124
|
});
|
|
125
|
+
test.describe('q2-input — single messages', () => {
|
|
126
|
+
for (const property of ['hints', 'errors']) {
|
|
127
|
+
test(`q2-input--single-${property}--focus`, async ({ page }) => {
|
|
128
|
+
await setupPage(page, '<q2-input label="My input"></q2-input>', {
|
|
129
|
+
theme: 'default-2026',
|
|
130
|
+
setupLoc: true,
|
|
131
|
+
});
|
|
132
|
+
await page.locator('q2-input').evaluate((element, messageProperty) => {
|
|
133
|
+
element[messageProperty] = ['A single message.'];
|
|
134
|
+
}, property);
|
|
135
|
+
await page.locator('q2-input input').first().focus();
|
|
136
|
+
await expect(page).toHaveScreenshot(`q2-input--single-${property}--focus--default-2026.png`);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
});
|
|
105
140
|
// 'optional' exercises --tct-input-font-size + --tct-input-label-font-size + --tct-input-label-optional-font-size.
|
|
106
141
|
// 'visibility-toggle' exercises --tct-input-visibility-toggle-font-size.
|
|
107
142
|
// New inline variants cover the remaining tokens:
|
|
@@ -245,7 +245,6 @@ button {
|
|
|
245
245
|
.action {
|
|
246
246
|
--tct-radio-label-hidden-columns: 18px;
|
|
247
247
|
--tct-radio-label-margin-right: 0;
|
|
248
|
-
--tct-radio-margin: 0;
|
|
249
248
|
align-items: var(--tct-item-action-align-items, center);
|
|
250
249
|
display: flex;
|
|
251
250
|
grid-row: 1;
|
|
@@ -261,6 +260,9 @@ button {
|
|
|
261
260
|
--tct-icon-size: var(--tct-item-action-icon-size, var(--app-scale-6x, 30px));
|
|
262
261
|
--tct-btn-icon-padding: var(--tct-item-action-btn-icon-padding, 0);
|
|
263
262
|
}
|
|
263
|
+
.action ::slotted(q2-icon) {
|
|
264
|
+
--tct-icon-size: var(--const-px-18, 18px);
|
|
265
|
+
}
|
|
264
266
|
|
|
265
267
|
.body {
|
|
266
268
|
color: var(--tct-item-body-color, inherit);
|
|
@@ -27,6 +27,21 @@ export class Q2Item {
|
|
|
27
27
|
this.renderTrigger = 0;
|
|
28
28
|
/** Controls the vertical alignment of the item decorator and single content slot. */
|
|
29
29
|
this.verticalAlign = 'top';
|
|
30
|
+
this.handleKeydown = (event) => {
|
|
31
|
+
if (!this.clickable || event.target !== this.itemElement)
|
|
32
|
+
return;
|
|
33
|
+
if (event.key === 'Enter' || this.isSpaceKey(event)) {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.handleKeyup = (event) => {
|
|
38
|
+
if (!this.clickable || event.target !== this.itemElement)
|
|
39
|
+
return;
|
|
40
|
+
if (event.key === 'Enter' || this.isSpaceKey(event)) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
this.itemElement.click();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
30
45
|
}
|
|
31
46
|
// #endregion
|
|
32
47
|
// #region Component Lifecycle Events
|
|
@@ -138,11 +153,14 @@ export class Q2Item {
|
|
|
138
153
|
const contentSlotCount = [this.hasHeaderSlotContent, this.hasBodySlotContent, this.hasFooterSlotContent].filter(Boolean).length;
|
|
139
154
|
return this.verticalAlign !== 'top' && contentSlotCount === 1;
|
|
140
155
|
}
|
|
156
|
+
isSpaceKey(event) {
|
|
157
|
+
return event.code === 'Space' || event.key === ' ' || event.key === 'Space' || event.key === 'Spacebar';
|
|
158
|
+
}
|
|
141
159
|
// #endregion
|
|
142
160
|
// #region Render Methods
|
|
143
161
|
render() {
|
|
144
162
|
const { clickable } = this;
|
|
145
|
-
return (h("div", { key: '
|
|
163
|
+
return (h("div", { key: '42ea022dfbebe50fc94e275c95f83f7cc3bbc3fd', "test-id": "itemContainer", class: this.itemClasses, ref: el => (this.itemElement = el), role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined, onKeyDown: this.handleKeydown, onKeyUp: this.handleKeyup }, this.hasDecoratorSlotContent && (h("div", { key: '5ea5749d40d3fe53b28278272160e093cab9a7f6', class: this.decoratorClasses }, h("slot", { key: 'f69f67d5fd71dc36fab1e9a7014dd05c89a4250f', name: "decorator" }, h("slot", { key: '12e97e5492803c40e7e56785f69e18e8d27aa099', name: "bullet" })))), h("div", { key: '6a58cdcfba08332b36317fa072be51f90a24b03b', class: this.mainClasses }, this.hasHeaderSlotContent && (h("div", { key: '557085b4064d2ef20db3cb0f91388feb5737f83a', class: "header" }, h("slot", { key: '455ae71c71174ff1591e7ce5e83c1c6104261e81', name: "header" }))), this.hasBodySlotContent && (h("div", { key: 'e003fa668b6640cebd7c0faaca2eb740a77944fc', class: "body" }, h("slot", { key: 'aa0d5b552db0d4e3ca1692c7798feade76e0e89d', name: "body" })))), this.hasActionSlotContent && (h("div", { key: '7c606e2cb0593b03844e2ddb48cbd9c4225f4d8d', class: this.actionClasses }, h("slot", { key: '9fb61fea2a775d011c3185d403a19877e8b558ba', name: "action" }))), this.hasFooterSlotContent && (h("div", { key: '2cab76f4d546f73365dcc7e1a5ea773b933e355e', class: this.footerClasses }, h("slot", { key: 'c7b603097d0272199604ec53dce5c99caf37a3d5', name: "footer" })))));
|
|
146
164
|
}
|
|
147
165
|
static get is() { return "q2-item"; }
|
|
148
166
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,8 +9,9 @@ const DROPDOWN_OPTIONS = `
|
|
|
9
9
|
<q2-option value="fourth">Fourth</q2-option>
|
|
10
10
|
`;
|
|
11
11
|
const DROPDOWN_ACTION = `<q2-dropdown slot="action" type="icon" label="My dropdown" icon="options" popover-alignment="left" hide-label="">${DROPDOWN_OPTIONS}</q2-dropdown>`;
|
|
12
|
-
const BUTTON_ACTION = `<q2-btn intent="
|
|
13
|
-
const
|
|
12
|
+
const BUTTON_ACTION = `<q2-btn intent="primary" slot="action">Action</q2-btn>`;
|
|
13
|
+
const ICON_ACTION = `<q2-icon slot="action" type="options"></q2-icon>`;
|
|
14
|
+
const ICON_BUTTON_ACTION = `<q2-btn slot="action" intent="primary"><q2-icon type="edit"></q2-icon></q2-btn>`;
|
|
14
15
|
const CHECKBOX_ACTION = `<q2-checkbox label="Item checkbox" hide-label slot="action"></q2-checkbox>`;
|
|
15
16
|
const PILL_ACTION = `<q2-pill label="Item pill" slot="action"></q2-pill>`;
|
|
16
17
|
const AVATAR_DECORATOR = `<q2-avatar icon="home" slot="decorator"></q2-avatar>`;
|
|
@@ -46,6 +47,11 @@ const VARIANTS = [
|
|
|
46
47
|
html: `<q2-item>${AVATAR_DECORATOR}${FULL_CONTENT}${ICON_BUTTON_ACTION}</q2-item>`,
|
|
47
48
|
states: ['resting'],
|
|
48
49
|
},
|
|
50
|
+
{
|
|
51
|
+
name: 'action-icon',
|
|
52
|
+
html: `<q2-item>${ICON_DECORATOR}${FULL_CONTENT}${ICON_ACTION}</q2-item>`,
|
|
53
|
+
states: ['resting'],
|
|
54
|
+
},
|
|
49
55
|
{
|
|
50
56
|
name: 'action-checkbox',
|
|
51
57
|
html: `<q2-item>${AVATAR_DECORATOR}${FULL_CONTENT}${CHECKBOX_ACTION}</q2-item>`,
|
|
@@ -109,7 +109,7 @@ export class Q2Legend {
|
|
|
109
109
|
// #endregion
|
|
110
110
|
// #region Render Methods
|
|
111
111
|
render() {
|
|
112
|
-
return (h("click-elsewhere", { key: '
|
|
112
|
+
return (h("click-elsewhere", { key: '4072c6510e6d0820051d31eb2e031f05b6f4b71e', onChange: () => this.onClickElsewhere(this) }, h("ul", { key: 'd823017f42f22efe3fdedbb1484b0a7f749022ae' }, this.dataWithClasses.map(item => (h("li", { class: "item" }, h("button", { "test-id": "item", "aria-label": `${item.name} ${this.formatValue(item.value)}`, class: item.classes, onClick: event => this.onClick(event, item), onMouseEnter: event => this.onMouseEnter(event, item), onMouseLeave: event => this.onMouseLeave(event, item) }, h("span", { "test-id": "itemColor", class: "item-color-indicator", style: { backgroundColor: item.color }, "aria-hidden": "true" }), h("span", { "test-id": "itemName", class: "item-name" }, item.name), h("span", { id: `item-${item.id}`, "test-id": "itemValue", class: "item-value" }, this.formatValue(item.value)))))))));
|
|
113
113
|
}
|
|
114
114
|
static get is() { return "q2-legend"; }
|
|
115
115
|
static get encapsulation() { return "shadow"; }
|
|
@@ -69,7 +69,7 @@ export class Q2List {
|
|
|
69
69
|
// #endregion
|
|
70
70
|
// #region Render Methods
|
|
71
71
|
render() {
|
|
72
|
-
return (h("div", { key: '
|
|
72
|
+
return (h("div", { key: '83755626545a0f51c29343772b4ac3bfe3affb44', class: this.listClasses, ref: el => (this.listElement = el) }, (this.hasFilterSlot || this.hasLabelContent) && (h("div", { key: 'ac297dfd9016aa8c7e3ee7664cf82bfbdbb1a18c', class: this.headerClasses }, h("div", { key: 'bce3d15f585ce2ab6d1db0d1e17d95018dc237cd', class: "label" }, this.label), this.hasFilterSlot && h("slot", { key: '373811d46b5adbc711017b816147c12008f142d4', name: "filter" }))), h("div", { key: '47818e442a69e5d3af55730b51c8aa2d73cc26b8', role: "list" }, h("slot", { key: 'b0061fb86511665ecf5217f817135bc1533608ae' }))));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "q2-list"; }
|
|
75
75
|
static get encapsulation() { return "shadow"; }
|
|
@@ -132,7 +132,7 @@ button {
|
|
|
132
132
|
display: grid;
|
|
133
133
|
gap: var(--tct-message-gap, 8px);
|
|
134
134
|
align-items: flex-start;
|
|
135
|
-
background: var(--comp-message-background
|
|
135
|
+
background: var(--comp-message-background);
|
|
136
136
|
color: var(--tct-message-font-color, var(--t-message-font-color, inherit));
|
|
137
137
|
box-shadow: var(--tct-message-box-shadow, var(--t-message-box-shadow, var(--app-shadow-1, inherit)));
|
|
138
138
|
border-radius: var(--tct-message-border-radius, var(--t-message-border-radius, var(--app-border-radius-1, inherit)));
|
|
@@ -204,7 +204,7 @@ button {
|
|
|
204
204
|
:host([type=info]) {
|
|
205
205
|
--comp-info-color: #0079c1;
|
|
206
206
|
--comp-bar-color: var(--tct-message-info-bar-color, var(--const-stoplight-info, var(--comp-info-color)));
|
|
207
|
-
--comp-message-background: var(--tct-message-info-background, #
|
|
207
|
+
--comp-message-background: var(--tct-message-info-background, var(--tct-message-background, color-mix(in srgb, var(--t-base, #FFFFFF), var(--comp-bar-color) 10%)));
|
|
208
208
|
}
|
|
209
209
|
:host(:not([type])) .message-icon,
|
|
210
210
|
:host(:not([type])) .message-icon,
|
|
@@ -217,7 +217,7 @@ button {
|
|
|
217
217
|
:host([type=success]) {
|
|
218
218
|
--comp-success-color: #0e8a00;
|
|
219
219
|
--comp-bar-color: var(--tct-message-success-bar-color, var(--const-stoplight-success, var(--comp-success-color)));
|
|
220
|
-
--comp-message-background: var(--tct-message-success-background, #
|
|
220
|
+
--comp-message-background: var(--tct-message-success-background, var(--tct-message-background, color-mix(in srgb, var(--t-base, #FFFFFF), var(--comp-bar-color) 10%)));
|
|
221
221
|
}
|
|
222
222
|
:host([type=success]) .message-icon {
|
|
223
223
|
--tct-icon-stroke-primary: var(--tct-stoplight-success, var(--const-stoplight-success, var(--comp-success-color)));
|
|
@@ -227,7 +227,7 @@ button {
|
|
|
227
227
|
:host([type=warning]) {
|
|
228
228
|
--comp-warning-color: #c35500;
|
|
229
229
|
--comp-bar-color: var(--tct-message-warning-bar-color, var(--const-stoplight-warning, var(--comp-warning-color)));
|
|
230
|
-
--comp-message-background: var(--tct-message-warning-background, #
|
|
230
|
+
--comp-message-background: var(--tct-message-warning-background, var(--tct-message-background, color-mix(in srgb, var(--t-base, #FFFFFF), var(--comp-bar-color) 10%)));
|
|
231
231
|
}
|
|
232
232
|
:host([type=warning]) .message-icon {
|
|
233
233
|
--tct-icon-stroke-primary: var(--tct-stoplight-warning, var(--const-stoplight-warning, var(--comp-warning-color)));
|
|
@@ -238,7 +238,7 @@ button {
|
|
|
238
238
|
:host([type=danger]) {
|
|
239
239
|
--comp-error-color: #d20a0a;
|
|
240
240
|
--comp-bar-color: var(--tct-message-error-bar-color, var(--const-stoplight-alert, var(--comp-error-color)));
|
|
241
|
-
--comp-message-background: var(--tct-message-error-background, #
|
|
241
|
+
--comp-message-background: var(--tct-message-error-background, var(--tct-message-background, color-mix(in srgb, var(--t-base, #FFFFFF), var(--comp-bar-color) 10%)));
|
|
242
242
|
}
|
|
243
243
|
:host([type=error]) .message-icon,
|
|
244
244
|
:host([type=error]) .message-icon,
|
|
@@ -66,7 +66,7 @@ export class Q2Message {
|
|
|
66
66
|
const addDivForAriaLive = !isFirefox && this.presentToggle;
|
|
67
67
|
const { description } = this;
|
|
68
68
|
const messageLabel = loc(`tecton.element.message.type.${this.type ? this.type : 'info'}`);
|
|
69
|
-
return (h("div", { key: '
|
|
69
|
+
return (h("div", { key: 'eb6b6c3d9ae10d3f87a9c7be63780f582216ded1', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, h("div", { key: 'e2dc68dc1da013553997ee459dede038f773a5e6', class: "bar", "test-id": "bar" }), this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: 'cc73afe11cda6117a222a15f3977152e2d22228e', class: "sr" }), h("div", { key: 'e92d1fff9c917176b2aded0fc9198fe819e4496c', class: "sr message-label" }, messageLabel), h("div", { key: 'f5ee65aa207ccf68b7cb3abda8ffed78b39937f8', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: '493608040edc25dbccfe63c2907a42dc43c023a9' }))));
|
|
70
70
|
}
|
|
71
71
|
static get is() { return "q2-message"; }
|
|
72
72
|
static get encapsulation() { return "shadow"; }
|
|
@@ -114,7 +114,7 @@ export class Q2Meter {
|
|
|
114
114
|
}
|
|
115
115
|
render() {
|
|
116
116
|
const [completed, suggested] = this.convertToPercentage(this.completedValue, this.suggestedValue, this.maxValue);
|
|
117
|
-
return (h("div", { key: '
|
|
117
|
+
return (h("div", { key: '046777b3fb3bbfe58ad5ff97878d9c37008dd68d', class: "meter-container", "aria-label": this.ariaLabel, role: "group" }, this.label && (h("div", { key: '8b4b84a18e9b91b72cf0b5135136f09e6327fa27', class: "label", "aria-label": loc(this.label) }, loc(this.label))), this.description && (h("div", { key: '85019eed37e6f346846e71bab7351460f5549bd0', class: "description", "aria-label": loc(this.description) }, loc(this.description))), this.renderBar(completed, suggested), h("div", { key: 'c6f111962764a49032e645cab917f11ccc2b3cea', class: "legends" }, h("div", { key: 'c63885e8690d61355867a6d9dc64575dc43bd22b', class: "left" }, this.completedValue || this.completedLabel ? (h("div", { class: "completed" }, h("div", { class: "dot" }), h("div", { class: "legend-label" }, this.completedValue, " ", loc(this.completedLabel)))) : (''), this.suggestedValue || this.suggestedLabel ? (h("div", { class: "suggested" }, h("div", { class: "dot" }), h("div", { class: "legend-label" }, this.suggestedValue, " ", loc(this.suggestedLabel)))) : ('')), h("div", { key: 'fd33a6d780d62b72081006d2bc81bce5942cfac7', class: "right" }, h("div", { key: '02fa74993895707294400edf76cc9a4882c9b55d', class: "max" }, this.maxValue, " ", loc(this.maxLabel))))));
|
|
118
118
|
}
|
|
119
119
|
static get is() { return "q2-meter"; }
|
|
120
120
|
static get encapsulation() { return "shadow"; }
|