q2-tecton-elements 1.50.1 → 1.51.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/cjs/click-elsewhere_2.cjs.entry.js +21 -12
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/index-9aa4a776.js +235 -0
- package/dist/cjs/index-9aa4a776.js.map +1 -0
- package/dist/cjs/{index-43010ce4.js → index-f69742cf.js} +1 -1
- package/dist/cjs/{index-43010ce4.js.map → index-f69742cf.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +50 -0
- package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1364 -3
- package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_7.cjs.entry.js +23 -13
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +16 -16
- package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +62 -62
- package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +77 -5
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-formatted-text.cjs.entry.js +72 -0
- package/dist/cjs/q2-formatted-text.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-legend.cjs.entry.js +2 -2
- package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-link.cjs.entry.js +64 -0
- package/dist/cjs/q2-link.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
- package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list.cjs.entry.js +9 -4
- package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +90 -9
- package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +26 -5
- package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
- package/dist/cjs/q2-resize-observer.cjs.entry.js +96 -0
- package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-section.cjs.entry.js +27 -3
- package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +7 -6
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +39 -3
- package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +3 -2
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +46 -11
- package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/q2-action-group/q2-action-group.css +99 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js +120 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +30 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +156 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js +14 -9
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +14 -9
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +14 -9
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +227 -223
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-card/test/q2-card-test.e2e.js +12 -7
- package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js +49 -45
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +12 -7
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +2 -2
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js +16 -11
- package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +15 -15
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +32 -26
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +12 -7
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +2 -2
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js +22 -17
- package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +12 -7
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +104 -104
- package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +42 -24
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js +12 -7
- package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +201 -4
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +305 -124
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +18 -13
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js +14 -18
- package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +94 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +230 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -0
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js +430 -0
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +14 -9
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input.css +9 -0
- package/dist/collection/components/q2-input/q2-input.js +7 -8
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +50 -33
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-item/test/q2-item-test.e2e.js +32 -7
- package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-legend/q2-legend.css +1 -1
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js +13 -8
- package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-link/q2-link.css +146 -0
- package/dist/collection/components/q2-link/q2-link.js +242 -0
- package/dist/collection/components/q2-link/q2-link.js.map +1 -0
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +145 -0
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-list/test/q2-list-test.e2e.js +12 -7
- package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js +14 -9
- package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js +14 -9
- package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +16 -11
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-message/test/q2-message-test.e2e.js +14 -9
- package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js +20 -13
- package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.js +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +28 -12
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +7 -5
- package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
- package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js +415 -405
- package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pagination/q2-pagination.js +230 -14
- package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +138 -15
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.css +12 -0
- package/dist/collection/components/q2-pill/q2-pill.js +43 -3
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +412 -212
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +37 -11
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +296 -236
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +3 -3
- package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
- package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js +21 -7
- package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js +32 -26
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js +12 -7
- package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.css +71 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +166 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js +83 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js +66 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -0
- package/dist/collection/components/q2-section/q2-section.js +78 -2
- package/dist/collection/components/q2-section/q2-section.js.map +1 -1
- package/dist/collection/components/q2-section/test/q2-section-test.e2e.js +39 -9
- package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.js +23 -5
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +695 -676
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +76 -2
- package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js +183 -87
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +2 -2
- package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js +20 -9
- package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +71 -67
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +50 -7
- package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js +89 -65
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js +14 -9
- package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +19 -1
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +47 -28
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +51 -13
- package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js +31 -10
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tooltip/q2-tooltip.css +5 -2
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js +51 -13
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js +18 -13
- package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
- package/dist/collection/utils/helpers.js +65 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/index.js +11 -11
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/sanitize-html-string.js +10 -0
- package/dist/collection/utils/sanitize-html-string.js.map +1 -0
- package/dist/collection/utils/sanitize-regex-string.js +4 -0
- package/dist/collection/utils/sanitize-regex-string.js.map +1 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +11 -1356
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.d.ts +11 -0
- package/dist/components/q2-action-group.js +75 -0
- package/dist/components/q2-action-group.js.map +1 -0
- package/dist/components/q2-action-sheet.js +1363 -2
- package/dist/components/q2-action-sheet.js.map +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-btn2.js +1 -1
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-area.js.map +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-bar.js.map +1 -1
- package/dist/components/q2-chart-donut.js +15 -15
- package/dist/components/q2-chart-donut.js.map +1 -1
- package/dist/components/q2-checkbox-group.js +2 -2
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-data-table.js +64 -64
- package/dist/components/q2-data-table.js.map +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown-item2.js +1 -1
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +82 -5
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-formatted-text.d.ts +11 -0
- package/dist/components/q2-formatted-text.js +101 -0
- package/dist/components/q2-formatted-text.js.map +1 -0
- package/dist/components/q2-input2.js +4 -5
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-legend2.js +2 -2
- package/dist/components/q2-legend2.js.map +1 -1
- package/dist/components/q2-link.d.ts +11 -0
- package/dist/components/q2-link.js +93 -0
- package/dist/components/q2-link.js.map +1 -0
- package/dist/components/q2-list.js +1 -1
- package/dist/components/q2-loc.js +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-option-list2.js +8 -3
- package/dist/components/q2-option-list2.js.map +1 -1
- package/dist/components/q2-option2.js +1 -1
- package/dist/components/q2-pagination.js +97 -10
- package/dist/components/q2-pagination.js.map +1 -1
- package/dist/components/q2-pill.js +29 -5
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +22 -12
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +2 -2
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer.d.ts +11 -0
- package/dist/components/q2-resize-observer.js +8 -0
- package/dist/components/q2-resize-observer.js.map +1 -0
- package/dist/components/q2-resize-observer2.js +112 -0
- package/dist/components/q2-resize-observer2.js.map +1 -0
- package/dist/components/q2-section.js +30 -4
- package/dist/components/q2-section.js.map +1 -1
- package/dist/components/q2-select2.js +7 -5
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +40 -3
- package/dist/components/q2-stepper.js.map +1 -1
- package/dist/components/q2-tab-container.js +20 -8
- package/dist/components/q2-tab-container.js.map +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +3 -1
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/q2-textarea.js +49 -12
- package/dist/components/q2-textarea.js.map +1 -1
- package/dist/components/q2-tooltip.js +1 -1
- package/dist/components/q2-tooltip.js.map +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +21 -12
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-c6d74f10.js → index-3184c760.js} +1 -1
- package/dist/esm/{index-c6d74f10.js.map → index-3184c760.js.map} +1 -1
- package/dist/esm/index-844fc010.js +211 -0
- package/dist/esm/index-844fc010.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +46 -0
- package/dist/esm/q2-action-group.entry.js.map +1 -0
- package/dist/esm/q2-action-sheet.entry.js +1363 -2
- package/dist/esm/q2-action-sheet.entry.js.map +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_7.entry.js +23 -13
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/q2-chart-area.entry.js +2 -2
- package/dist/esm/q2-chart-area.entry.js.map +1 -1
- package/dist/esm/q2-chart-bar.entry.js +2 -2
- package/dist/esm/q2-chart-bar.entry.js.map +1 -1
- package/dist/esm/q2-chart-donut.entry.js +16 -16
- package/dist/esm/q2-chart-donut.entry.js.map +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +62 -62
- package/dist/esm/q2-data-table.entry.js.map +1 -1
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +77 -5
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +68 -0
- package/dist/esm/q2-formatted-text.entry.js.map +1 -0
- package/dist/esm/q2-item.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js.map +1 -1
- package/dist/esm/q2-link.entry.js +60 -0
- package/dist/esm/q2-link.entry.js.map +1 -0
- package/dist/esm/q2-list.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-month-picker.entry.js +3 -3
- package/dist/esm/q2-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list.entry.js +9 -4
- package/dist/esm/q2-option-list.entry.js.map +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +90 -9
- package/dist/esm/q2-pagination.entry.js.map +1 -1
- package/dist/esm/q2-pill.entry.js +26 -5
- package/dist/esm/q2-pill.entry.js.map +1 -1
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js.map +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +3 -3
- package/dist/esm/q2-resize-observer.entry.js +92 -0
- package/dist/esm/q2-resize-observer.entry.js.map +1 -0
- package/dist/esm/q2-section.entry.js +27 -3
- package/dist/esm/q2-section.entry.js.map +1 -1
- package/dist/esm/q2-select.entry.js +7 -6
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +39 -3
- package/dist/esm/q2-stepper.entry.js.map +1 -1
- package/dist/esm/q2-tag.entry.js +3 -2
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +47 -12
- package/dist/esm/q2-textarea.entry.js.map +1 -1
- package/dist/esm/q2-tooltip.entry.js +2 -2
- package/dist/esm/q2-tooltip.entry.js.map +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/{p-0a3a804a.entry.js → p-06701928.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0a3a804a.entry.js.map → p-06701928.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-5d936af5.entry.js → p-07d1c3ae.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-15ac45d6.js +2 -0
- package/dist/q2-tecton-elements/p-15ac45d6.js.map +1 -0
- package/dist/q2-tecton-elements/{p-ce4e6b41.entry.js → p-16910682.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-16910682.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-188eb162.entry.js +3 -0
- package/dist/q2-tecton-elements/p-188eb162.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-58cafc0d.entry.js → p-1c760a89.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-074ae80c.entry.js → p-1c88d057.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-3b0d3cd4.entry.js → p-20a3d6ed.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js → p-2733583e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4116579f.entry.js → p-3e428290.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-3e428290.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-072c5877.entry.js → p-4774e5b3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-77272c4c.entry.js → p-490ef8e5.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0a1dff75.entry.js → p-4e10550d.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js → p-50f7328f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-5637c486.entry.js +2 -0
- package/dist/q2-tecton-elements/p-5637c486.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-56df21b0.entry.js +2 -0
- package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-34856c71.entry.js → p-5a834214.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-34856c71.entry.js.map → p-5a834214.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +2 -0
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-72d948b4.entry.js +2 -0
- package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-3c7be0bb.entry.js → p-7903cd15.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-7903cd15.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-d2e1631a.entry.js → p-7906f49e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d2e1631a.entry.js.map → p-7906f49e.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js → p-7aef0c08.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-8a4b106d.entry.js → p-7c9a0122.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +2 -0
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-cf32b5db.entry.js → p-81fbe718.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-6237c775.entry.js → p-896c7008.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-395904b4.entry.js → p-8d07cf91.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-fffb54e9.entry.js → p-8d2b02e1.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-6e6d9793.entry.js → p-95a7c042.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-45407ecc.entry.js → p-96b1406c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-cb3f48de.entry.js → p-a47597dd.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js +2 -0
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-2c26295e.entry.js → p-ac6aa392.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-376a0589.entry.js → p-ad057d10.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-ad798287.entry.js +2 -0
- package/dist/q2-tecton-elements/p-ad798287.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-ad998f71.entry.js → p-b0e5e9dc.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-34696e3f.entry.js → p-b1784be3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-259b728a.entry.js → p-b7de110e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-8111547c.entry.js → p-c235ab3f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js +2 -0
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-c81d299a.entry.js → p-e216ef3f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js +2 -0
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-f135b265.entry.js +2 -0
- package/dist/q2-tecton-elements/p-f135b265.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-721365be.js → p-f1e887f5.js} +1 -1
- package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js → p-f5f23659.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js +2 -0
- package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +2 -0
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js +2 -0
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/types/components/q2-action-group/q2-action-group.d.ts +30 -0
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +1 -1
- package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +1 -1
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +2 -0
- package/dist/types/components/q2-data-table/q2-data-table.d.ts +15 -13
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +36 -0
- package/dist/types/components/q2-formatted-text/q2-formatted-text.d.ts +34 -0
- package/dist/types/components/q2-input/q2-input.d.ts +10 -9
- package/dist/types/components/q2-legend/q2-legend.d.ts +1 -0
- package/dist/types/components/q2-link/q2-link.d.ts +36 -0
- package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -3
- package/dist/types/components/q2-pill/q2-pill.d.ts +11 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +7 -1
- package/dist/types/components/q2-resize-observer/q2-resize-observer.d.ts +28 -0
- package/dist/types/components/q2-section/q2-section.d.ts +12 -0
- package/dist/types/components/q2-select/q2-select.d.ts +5 -0
- package/dist/types/components/q2-stepper/q2-stepper.d.ts +10 -1
- package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +8 -2
- package/dist/types/components/q2-tag/q2-tag.d.ts +5 -0
- package/dist/types/components/q2-textarea/q2-textarea.d.ts +8 -3
- package/dist/types/components.d.ts +394 -18
- package/dist/types/utils/helpers.d.ts +28 -0
- package/dist/types/utils/index.d.ts +3 -3
- package/dist/types/utils/sanitize-html-string.d.ts +1 -0
- package/dist/types/utils/sanitize-regex-string.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cjs/index-64d8b839.js +0 -1580
- package/dist/cjs/index-64d8b839.js.map +0 -1
- package/dist/esm/index-4a80972c.js +0 -1556
- package/dist/esm/index-4a80972c.js.map +0 -1
- package/dist/q2-tecton-elements/p-0a1dff75.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-3b0d3cd4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-3c7be0bb.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-403bf3d4.entry.js +0 -2
- package/dist/q2-tecton-elements/p-403bf3d4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4116579f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-661ed976.entry.js +0 -2
- package/dist/q2-tecton-elements/p-661ed976.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-9a1a4bc0.js +0 -3
- package/dist/q2-tecton-elements/p-9a1a4bc0.js.map +0 -1
- package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-aa57b657.entry.js +0 -2
- package/dist/q2-tecton-elements/p-aa57b657.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad998f71.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-adec9275.entry.js +0 -2
- package/dist/q2-tecton-elements/p-adec9275.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-adf0a7c9.entry.js +0 -2
- package/dist/q2-tecton-elements/p-adf0a7c9.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b72fd065.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b72fd065.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-c0c658d1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c0c658d1.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cb3f48de.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ce4e6b41.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cf32b5db.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cf966a0f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-cf966a0f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-dc77bf66.entry.js +0 -2
- package/dist/q2-tecton-elements/p-dc77bf66.entry.js.map +0 -1
- /package/dist/q2-tecton-elements/{p-5d936af5.entry.js.map → p-07d1c3ae.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-58cafc0d.entry.js.map → p-1c760a89.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-074ae80c.entry.js.map → p-1c88d057.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js.map → p-2733583e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-072c5877.entry.js.map → p-4774e5b3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-77272c4c.entry.js.map → p-490ef8e5.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js.map → p-50f7328f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js.map → p-7aef0c08.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-8a4b106d.entry.js.map → p-7c9a0122.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6237c775.entry.js.map → p-896c7008.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-395904b4.entry.js.map → p-8d07cf91.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-fffb54e9.entry.js.map → p-8d2b02e1.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6e6d9793.entry.js.map → p-95a7c042.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-45407ecc.entry.js.map → p-96b1406c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2c26295e.entry.js.map → p-ac6aa392.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-376a0589.entry.js.map → p-ad057d10.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-34696e3f.entry.js.map → p-b1784be3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-259b728a.entry.js.map → p-b7de110e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-8111547c.entry.js.map → p-c235ab3f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-c81d299a.entry.js.map → p-e216ef3f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-721365be.js.map → p-f1e887f5.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js.map → p-f5f23659.entry.js.map} +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { createGuid, isEventFromElement,
|
|
1
|
+
import { Fragment, h, } from "@stencil/core";
|
|
2
|
+
import { createGuid, debounce, isEventFromElement, renderLabel, loc, renderMessages, overrideFocus, setMessageHeight, } from "../../utils/index";
|
|
3
3
|
export class Q2Textarea {
|
|
4
4
|
constructor() {
|
|
5
|
+
this.debouncedScreenReaderCharacterCount = debounce(() => {
|
|
6
|
+
this.updateScreenReaderCharacterCount();
|
|
7
|
+
}, 2000);
|
|
8
|
+
this.describeByScreenReaderCharacterCount = true;
|
|
5
9
|
this.guid = createGuid();
|
|
6
10
|
this.scheduledAfterRender = [];
|
|
7
11
|
this.checkCols = () => {
|
|
@@ -55,6 +59,7 @@ export class Q2Textarea {
|
|
|
55
59
|
};
|
|
56
60
|
this.onTextareaBlur = () => {
|
|
57
61
|
const { valueOnFocus, textareaField: { value }, } = this;
|
|
62
|
+
this.describeByScreenReaderCharacterCount = true;
|
|
58
63
|
this.hasFocus = false;
|
|
59
64
|
setMessageHeight(this);
|
|
60
65
|
if (valueOnFocus !== value)
|
|
@@ -73,7 +78,10 @@ export class Q2Textarea {
|
|
|
73
78
|
this.onTextareaInput = (event) => {
|
|
74
79
|
event.stopPropagation();
|
|
75
80
|
const value = event.target.value;
|
|
81
|
+
this.describeByScreenReaderCharacterCount = false;
|
|
76
82
|
this.increaseHeightIfOverflowing();
|
|
83
|
+
if (this.maxlength)
|
|
84
|
+
this.debouncedScreenReaderCharacterCount();
|
|
77
85
|
this.input.emit({ value });
|
|
78
86
|
};
|
|
79
87
|
this.onTouchMove = (event) => {
|
|
@@ -95,8 +103,13 @@ export class Q2Textarea {
|
|
|
95
103
|
document.addEventListener('touchmove', this.onTouchMove);
|
|
96
104
|
document.addEventListener('touchend', this.onTouchMove);
|
|
97
105
|
};
|
|
106
|
+
this.updateScreenReaderCharacterCount = () => {
|
|
107
|
+
var _a;
|
|
108
|
+
this.screenReaderCharacterCount = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
109
|
+
};
|
|
98
110
|
this.downParams = undefined;
|
|
99
111
|
this.hasFocus = undefined;
|
|
112
|
+
this.screenReaderCharacterCount = undefined;
|
|
100
113
|
this.cols = undefined;
|
|
101
114
|
this.disabled = undefined;
|
|
102
115
|
this.errors = undefined;
|
|
@@ -119,6 +132,9 @@ export class Q2Textarea {
|
|
|
119
132
|
if (isNaN(this.maxlength)) {
|
|
120
133
|
this.maxlength = undefined;
|
|
121
134
|
}
|
|
135
|
+
if (this.maxlength) {
|
|
136
|
+
this.updateScreenReaderCharacterCount();
|
|
137
|
+
}
|
|
122
138
|
}
|
|
123
139
|
componentDidLoad() {
|
|
124
140
|
overrideFocus(this.hostElement);
|
|
@@ -172,6 +188,11 @@ export class Q2Textarea {
|
|
|
172
188
|
hintsObserver() {
|
|
173
189
|
this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));
|
|
174
190
|
}
|
|
191
|
+
maxlengthObserver() {
|
|
192
|
+
if (this.maxlength) {
|
|
193
|
+
this.updateScreenReaderCharacterCount();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
175
196
|
rowsObserver() {
|
|
176
197
|
this.contentContainer.style.height = null;
|
|
177
198
|
}
|
|
@@ -190,7 +211,17 @@ export class Q2Textarea {
|
|
|
190
211
|
return Array.isArray(this.errors) && this.errors.length > 0;
|
|
191
212
|
}
|
|
192
213
|
get inputDescribedBy() {
|
|
193
|
-
|
|
214
|
+
let describedBy = undefined;
|
|
215
|
+
if (this.showMessages) {
|
|
216
|
+
describedBy = `${this.inputId}-description`;
|
|
217
|
+
}
|
|
218
|
+
// Remove screen reader character count from described by after typing
|
|
219
|
+
// starts to avoid double announcement. It's needed on focus to announce
|
|
220
|
+
// the character count when field gains focus.
|
|
221
|
+
if (this.maxlength && this.describeByScreenReaderCharacterCount) {
|
|
222
|
+
describedBy = describedBy ? `${describedBy} ${this.inputId}-max-length` : `${this.inputId}-max-length`;
|
|
223
|
+
}
|
|
224
|
+
return describedBy;
|
|
194
225
|
}
|
|
195
226
|
get inputId() {
|
|
196
227
|
return `input-guid-${this.guid}`;
|
|
@@ -213,14 +244,6 @@ export class Q2Textarea {
|
|
|
213
244
|
const focusClass = this.hasFocus ? ' has-focus' : '';
|
|
214
245
|
return `field-container${errorClass}${valueClass}${focusClass}`;
|
|
215
246
|
}
|
|
216
|
-
inputDOM() {
|
|
217
|
-
const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';
|
|
218
|
-
return (h("div", { class: "input-container" }, h("textarea", { id: this.inputId, class: textareaClasses, placeholder: (this.placeholder && loc(this.placeholder)) || undefined, "test-id": "inputField", maxLength: this.maxlength, "aria-describedby": this.inputDescribedBy, "aria-invalid": `${this.hasError}`, "aria-required": `${!this.optional}`, "aria-label": this.hideLabel && this.label, spellcheck: this.spellcheck, rows: this.rows || 3, cols: this.cols, value: this.value, ref: el => (this.textareaField = el), readonly: !!this.readonly, disabled: !!this.disabled, maxlength: this.maxlength, onInput: this.onTextareaInput, onChange: this.onTextareaChange, onFocus: this.onTextareaFocus, onBlur: this.onTextareaBlur }), this.hasError ? (h("q2-icon", { type: "error", class: "icon-error" })) : (''), this.showResize && (h("button", { onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart, class: "btn-resize", "aria-label": loc('tecton.element.input.resize'), tabIndex: -1 }, h("svg", { "aria-hidden": "true", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11", fill: "none", "stroke-stroke-linecap": "square" }))))));
|
|
219
|
-
}
|
|
220
|
-
maxLengthDOM() {
|
|
221
|
-
var _a;
|
|
222
|
-
return (h("div", { class: "max-length", "aria-hidden": "true" }, ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, "/", this.maxlength));
|
|
223
|
-
}
|
|
224
247
|
setHeight(event) {
|
|
225
248
|
var _a, _b;
|
|
226
249
|
const { contentContainer, resize, downParams: { height, y }, } = this;
|
|
@@ -250,8 +273,19 @@ export class Q2Textarea {
|
|
|
250
273
|
}
|
|
251
274
|
// #endregion
|
|
252
275
|
// #region Render Methods
|
|
276
|
+
renderInput() {
|
|
277
|
+
const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';
|
|
278
|
+
return (h("div", { class: "input-container" }, h("textarea", { id: this.inputId, class: textareaClasses, placeholder: (this.placeholder && loc(this.placeholder)) || undefined, "test-id": "inputField", maxLength: this.maxlength, "aria-describedby": this.inputDescribedBy, "aria-invalid": `${this.hasError}`, "aria-required": `${!this.optional}`, "aria-label": this.hideLabel && this.label, spellcheck: this.spellcheck, rows: this.rows || 3, cols: this.cols, value: this.value, ref: el => (this.textareaField = el), readonly: !!this.readonly, disabled: !!this.disabled, maxlength: this.maxlength, onInput: this.onTextareaInput, onChange: this.onTextareaChange, onFocus: this.onTextareaFocus, onBlur: this.onTextareaBlur }), this.hasError ? (h("q2-icon", { type: "error", class: "icon-error" })) : (''), this.showResize && (h("button", { onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart, class: "btn-resize", "aria-label": loc('tecton.element.input.resize'), tabIndex: -1 }, h("svg", { "aria-hidden": "true", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11", fill: "none", "stroke-stroke-linecap": "square" }))))));
|
|
279
|
+
}
|
|
280
|
+
renderMaxLength() {
|
|
281
|
+
var _a;
|
|
282
|
+
return (h(Fragment, null, h("div", { class: "max-length", "aria-hidden": "true" }, ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, "/", this.maxlength), h("div", { "aria-live": "polite", class: "sr", id: `${this.inputId}-max-length`, "test-id": "max-length-sr" }, loc('tecton.element.textarea.characterCount.screenReader', [
|
|
283
|
+
this.screenReaderCharacterCount,
|
|
284
|
+
this.maxlength,
|
|
285
|
+
]))));
|
|
286
|
+
}
|
|
253
287
|
render() {
|
|
254
|
-
return (h("div", { key: '
|
|
288
|
+
return (h("div", { key: '054133483b317d5298a8fb08671d84e917888a3a', class: this.wrapperClasses }, renderLabel(this), h("div", { key: 'dd234ec95a89c23a473c9987a64a5dcfecd7fd44', class: "content-container", ref: el => (this.contentContainer = el) }, this.renderInput(), this.maxlength ? this.renderMaxLength() : '', renderMessages(this))));
|
|
255
289
|
}
|
|
256
290
|
static get is() { return "q2-textarea"; }
|
|
257
291
|
static get encapsulation() { return "shadow"; }
|
|
@@ -548,7 +582,8 @@ export class Q2Textarea {
|
|
|
548
582
|
static get states() {
|
|
549
583
|
return {
|
|
550
584
|
"downParams": {},
|
|
551
|
-
"hasFocus": {}
|
|
585
|
+
"hasFocus": {},
|
|
586
|
+
"screenReaderCharacterCount": {}
|
|
552
587
|
};
|
|
553
588
|
}
|
|
554
589
|
static get events() {
|
|
@@ -624,6 +659,9 @@ export class Q2Textarea {
|
|
|
624
659
|
}, {
|
|
625
660
|
"propName": "hints",
|
|
626
661
|
"methodName": "hintsObserver"
|
|
662
|
+
}, {
|
|
663
|
+
"propName": "maxlength",
|
|
664
|
+
"methodName": "maxlengthObserver"
|
|
627
665
|
}, {
|
|
628
666
|
"propName": "rows",
|
|
629
667
|
"methodName": "rowsObserver"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-textarea.js","sourceRoot":"","sources":["../../../src/components/q2-textarea/q2-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/G,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAGxH,MAAM,OAAO,UAAU;;QAInB,SAAI,GAAG,UAAU,EAAE,CAAC;QACpB,yBAAoB,GAAmB,EAAE,CAAC;QA8Q1C,cAAS,GAAG,GAAG,EAAE;YACb,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAE/D,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,OAAO;YAC3D,gBAAgB,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,gBAAgB,CAAC,WAAW,IAAI,CAAC;YACnE,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC1C,CAAC,CAAC;QAEF,cAAS,GAAG,GAAG,EAAE;YACb,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAE/D,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,OAAO;YAC7D,gBAAgB,CAAC,KAAK,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, EventEmitter, Prop, Event, Element, State, h, Watch, Listen, Method } from '@stencil/core';\nimport { IDict } from 'src/util';\nimport { createGuid, isEventFromElement, labelDOM, loc, messagesDOM, overrideFocus, setMessageHeight } from 'src/utils';\n\n@Component({ tag: 'q2-textarea', shadow: true, styleUrl: 'q2-textarea.scss' })\nexport class Q2Textarea {\n // #region Own Properties\n\n contentContainer?: HTMLDivElement;\n guid = createGuid();\n scheduledAfterRender: (() => void)[] = [];\n textareaField?: HTMLTextAreaElement;\n valueOnFocus: string;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n downParams: IDict<number>;\n\n @State()\n hasFocus: boolean;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Defines the number of columns displayed in the field.\n * If not set, the field will be full-width and respond to the window size.\n */\n @Prop({ reflect: true })\n cols: number;\n\n /** Indicates the field cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Each item in the `errors` array will appear below the input field when the field is focused.\n * @localizable\n */\n @Prop()\n errors: string[];\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true })\n hideLabel: boolean;\n\n /**\n * When `true` and the input field has an active validation error, the field shows the error state without displaying associated error messages below the field (from the errors array above).\n * Primarily used for dropdown selects and date pickers whose controls appear below the input field (where the error messages, if displayed, would also appear).\n */\n @Prop({ reflect: true })\n hideMessages: boolean;\n\n /**\n * Each item in the `hints` array will appear below the input field when the field is focused.\n * @info\n * The `errors` array takes precedence over the `hints` array. If an input field has both hints and errors, only the errors will display.\n * Once all errors are resolved, the hints display the next time the field is focused.\n * @localizable\n */\n @Prop()\n hints: string[];\n\n /**\n * The label that appears above the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * Defines the maximum allowed input length in characters. Formatting characters (e.g. `.`, `-`, etc) are included in the `maxlength` comparison.\n * Make sure you account for them when setting the `maxlength` value.\n * @info\n * Please set the `rows` attribute in correlation with `maxlength` to show as much text as possible in the field viewport.\n */\n @Prop({ reflect: true, mutable: true })\n maxlength: number;\n\n /** Appends \"(optional)\" to the field label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /**\n * Text that appears within the field when it is blurred and empty.\n * Placeholder text disappears when the user focuses on the field and provides input.\n * @info\n * Primarily used for rare cases in which a visible form label is not expected (e.g., search fields).\n * @localizable\n */\n @Prop({ reflect: true })\n placeholder: string;\n\n /**\n * Appends \"(read only)\" to the field label, and field becomes unusable, but remains focusable.\n * Takes priority over `optional` if both are `true`.\n */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** Indicates how the field is resizable. */\n @Prop({ reflect: true })\n resize: 'none' | 'vertical' | 'horizontal' | 'both' | 'vertical-auto' = 'vertical';\n\n /** Defines the number of rows displayed in the field. */\n @Prop({ reflect: true })\n rows: number;\n\n /** Determines whether the field is subject to spell-checking by the underlying browser or OS. */\n @Prop({ reflect: true })\n spellcheck: boolean;\n\n /** The value of the field. */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the field loses focus after the value has been changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n /**\n * Emitted when the field value is updated.\n * @legacyEvent\n */\n @Event()\n input: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n if (isNaN(this.maxlength)) {\n this.maxlength = undefined;\n }\n }\n\n componentDidLoad() {\n overrideFocus(this.hostElement);\n }\n\n componentDidRender() {\n this.scheduledAfterRender.push(this.checkRows, this.checkCols, this.increaseHeightIfOverflowing);\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n @Listen('focus')\n onHostElementFocus(event: Event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.textareaField.focus();\n }\n\n @Listen('input')\n onHostElementInput(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.oninput) {\n this.value = event.detail.value;\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates focusing the `<textarea>`, centering the provided value, and emitting an `input` event.\n *\n * This method leaves the focus on the `<textarea>` and as a result does not trigger the `change` event. If you want\n * to trigger the `change` event, move the focus to another element after calling this method.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n const { textareaField } = this;\n textareaField.focus();\n textareaField.value = value;\n textareaField.dispatchEvent(new InputEvent('input'));\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('cols')\n colsObserver() {\n this.contentContainer.style.width = null;\n }\n\n @Watch('errors')\n errorsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('hints')\n hintsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('rows')\n rowsObserver() {\n this.contentContainer.style.height = null;\n }\n\n @Watch('value')\n valueObserver() {\n const { maxlength, value = '' } = this;\n if (!maxlength) return;\n\n const truncatedValue = value.substr(0, maxlength);\n if (truncatedValue === value) return;\n\n this.change.emit({ value: truncatedValue });\n }\n\n // #endregion\n // #region Local Methods\n\n get hasError() {\n return Array.isArray(this.errors) && this.errors.length > 0;\n }\n\n get inputDescribedBy() {\n return this.showMessages ? `${this.inputId}-description` : undefined;\n }\n\n get inputId() {\n return `input-guid-${this.guid}`;\n }\n\n get messages(): string[] {\n return (\n (this.errors && this.errors.length > 0 && this.errors) ||\n (this.hints && this.hints.length > 0 && this.hints) ||\n []\n );\n }\n\n get showMessages() {\n return this.messages.length > 0 && !this.hideMessages;\n }\n\n get showResize() {\n const { resize } = this;\n return resize && resize !== 'none';\n }\n\n get wrapperClasses() {\n const errorClass = this.hasError ? ' has-error' : '';\n const valueClass = !!this.value ? ' has-value' : '';\n const focusClass = this.hasFocus ? ' has-focus' : '';\n\n return `field-container${errorClass}${valueClass}${focusClass}`;\n }\n\n checkCols = () => {\n const { contentContainer, cols, textareaField, resize } = this;\n\n if (!cols || ['none', 'vertical'].includes(resize)) return;\n contentContainer.style.width = `${contentContainer.offsetWidth}px`;\n textareaField.removeAttribute('cols');\n };\n\n checkRows = () => {\n const { contentContainer, rows, textareaField, resize } = this;\n\n if (!rows || ['none', 'horizontal'].includes(resize)) return;\n contentContainer.style.height = `${contentContainer.offsetHeight}px`;\n textareaField.removeAttribute('rows');\n };\n\n getBorderOffset = () => {\n const computedStyle = window.getComputedStyle(this.textareaField);\n\n return parseInt(computedStyle.borderTopWidth, 10) + parseInt(computedStyle.borderBottomWidth, 10);\n };\n\n increaseHeightIfOverflowing = () => {\n const { scrollHeight } = this.textareaField;\n if (this.resize === 'vertical-auto' && this.isOverflowingVertically()) {\n // need to account for border width because scrollHeight does not include it\n const newHeight = scrollHeight + this.getBorderOffset();\n this.contentContainer.style.height = `${newHeight}px`;\n }\n };\n\n inputDOM() {\n const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';\n\n return (\n <div class=\"input-container\">\n <textarea\n id={this.inputId}\n class={textareaClasses}\n placeholder={(this.placeholder && loc(this.placeholder)) || undefined}\n test-id=\"inputField\"\n maxLength={this.maxlength}\n aria-describedby={this.inputDescribedBy}\n aria-invalid={`${this.hasError}`}\n aria-required={`${!this.optional}`}\n aria-label={this.hideLabel && this.label}\n spellcheck={this.spellcheck}\n rows={this.rows || 3}\n cols={this.cols}\n value={this.value}\n ref={el => (this.textareaField = el)}\n readonly={!!this.readonly}\n disabled={!!this.disabled}\n maxlength={this.maxlength}\n onInput={this.onTextareaInput}\n onChange={this.onTextareaChange}\n onFocus={this.onTextareaFocus}\n onBlur={this.onTextareaBlur}\n ></textarea>\n {this.hasError ? (\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n />\n ) : (\n ''\n )}\n {this.showResize && (\n <button\n onMouseDown={this.onMouseDown}\n onTouchStart={this.onTouchStart}\n class=\"btn-resize\"\n aria-label={loc('tecton.element.input.resize')}\n tabIndex={-1}\n >\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 12 12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11\"\n fill=\"none\"\n stroke-stroke-linecap=\"square\"\n />\n </svg>\n </button>\n )}\n </div>\n );\n }\n\n isOverflowingVertically = () => {\n const { clientHeight, scrollHeight } = this.textareaField;\n\n return scrollHeight > clientHeight;\n };\n\n maxLengthDOM() {\n return (\n <div\n class=\"max-length\"\n aria-hidden=\"true\"\n >\n {this.value?.length || 0}/{this.maxlength}\n </div>\n );\n }\n\n onMouseDown = (event: MouseEvent) => {\n const { contentContainer } = this;\n this.downParams = {\n width: contentContainer.offsetWidth,\n height: contentContainer.offsetHeight,\n x: event.clientX,\n y: event.clientY,\n };\n document.addEventListener('mousemove', this.onMouseMove);\n document.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseMove = (event: MouseEvent) => {\n this.setHeight(event);\n this.setWidth(event);\n };\n\n onMouseUp = () => {\n document.removeEventListener('mousemove', this.onMouseMove);\n this.downParams = null;\n };\n\n onTextareaBlur = () => {\n const {\n valueOnFocus,\n textareaField: { value },\n } = this;\n this.hasFocus = false;\n setMessageHeight(this);\n if (valueOnFocus !== value) this.change.emit({ value });\n };\n\n onTextareaChange = (event: InputEvent) => {\n event.stopPropagation();\n const value = (event.target as HTMLTextAreaElement).value;\n\n this.change.emit({ value });\n };\n\n onTextareaFocus = () => {\n this.hasFocus = true;\n this.valueOnFocus = this.value;\n setMessageHeight(this);\n };\n\n onTextareaInput = (event: InputEvent) => {\n event.stopPropagation();\n const value = (event.target as HTMLTextAreaElement).value;\n this.increaseHeightIfOverflowing();\n\n this.input.emit({ value });\n };\n\n onTouchMove = (event: TouchEvent) => {\n this.setHeight(event);\n this.setWidth(event);\n };\n\n onTouchStart = (event: TouchEvent) => {\n if (event.touches.length !== 1) return;\n\n event.preventDefault();\n\n const { contentContainer } = this;\n const firstTouch = event.touches[0];\n\n this.downParams = {\n width: contentContainer.offsetWidth,\n height: contentContainer.offsetHeight,\n x: firstTouch.pageX,\n y: firstTouch.pageY,\n };\n\n document.addEventListener('touchmove', this.onTouchMove);\n document.addEventListener('touchend', this.onTouchMove);\n };\n\n setHeight(event: MouseEvent | TouchEvent) {\n const {\n contentContainer,\n resize,\n downParams: { height, y },\n } = this;\n const resizeY = ['both', 'vertical', 'vertical-auto'].includes(resize);\n\n if (!resizeY) return;\n\n const eventY = event instanceof MouseEvent ? event.clientY : event.touches[0]?.pageY ?? 0;\n const newHeight = height - (y - eventY);\n // If 'vertical-auto', change height if the new height is greater\n // than the current height or the textarea is not overflowing.\n // Otherwise, change height regardless of the new height.\n if (\n resize !== 'vertical-auto' ||\n newHeight > height ||\n (resize === 'vertical-auto' && !this.isOverflowingVertically())\n ) {\n contentContainer.style.height = `${newHeight}px`;\n }\n }\n\n setWidth(event: MouseEvent | TouchEvent) {\n const {\n contentContainer,\n resize,\n downParams: { width, x },\n } = this;\n\n const resizeX = ['both', 'horizontal'].includes(resize);\n\n if (!resizeX) return;\n const eventX = event instanceof MouseEvent ? event.clientX : event.touches[0]?.pageX ?? 0;\n const newWidth = width - (x - eventX);\n contentContainer.style.width = `${newWidth}px`;\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <div class={this.wrapperClasses}>\n {labelDOM(this)}\n <div\n class=\"content-container\"\n ref={el => (this.contentContainer = el)}\n >\n {this.inputDOM()}\n {this.maxlength ? this.maxLengthDOM() : ''}\n {messagesDOM(this)}\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"file":"q2-textarea.js","sourceRoot":"","sources":["../../../src/components/q2-textarea/q2-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,IAAI,EACJ,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAK,EACL,CAAC,EACD,KAAK,EACL,MAAM,EACN,MAAM,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,GAAG,EACH,cAAc,EACd,aAAa,EACb,gBAAgB,GACnB,MAAM,WAAW,CAAC;AAGnB,MAAM,OAAO,UAAU;;QAInB,wCAAmC,GAAG,QAAQ,CAAC,GAAG,EAAE;YAChD,IAAI,CAAC,gCAAgC,EAAE,CAAC;QAC5C,CAAC,EAAE,IAAI,CAAC,CAAC;QACT,yCAAoC,GAAG,IAAI,CAAC;QAC5C,SAAI,GAAG,UAAU,EAAE,CAAC;QACpB,yBAAoB,GAAmB,EAAE,CAAC;QAyS1C,cAAS,GAAG,GAAG,EAAE;YACb,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAE/D,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,OAAO;YAC3D,gBAAgB,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,gBAAgB,CAAC,WAAW,IAAI,CAAC;YACnE,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC1C,CAAC,CAAC;QAEF,cAAS,GAAG,GAAG,EAAE;YACb,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAE/D,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n EventEmitter,\n Prop,\n Event,\n Element,\n Fragment,\n State,\n h,\n Watch,\n Listen,\n Method,\n} from '@stencil/core';\nimport { IDict } from 'src/util';\nimport {\n createGuid,\n debounce,\n isEventFromElement,\n renderLabel,\n loc,\n renderMessages,\n overrideFocus,\n setMessageHeight,\n} from 'src/utils';\n\n@Component({ tag: 'q2-textarea', shadow: true, styleUrl: 'q2-textarea.scss' })\nexport class Q2Textarea {\n // #region Own Properties\n\n contentContainer?: HTMLDivElement;\n debouncedScreenReaderCharacterCount = debounce(() => {\n this.updateScreenReaderCharacterCount();\n }, 2000);\n describeByScreenReaderCharacterCount = true;\n guid = createGuid();\n scheduledAfterRender: (() => void)[] = [];\n textareaField?: HTMLTextAreaElement;\n valueOnFocus: string;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n downParams: IDict<number>;\n\n @State()\n hasFocus: boolean;\n\n @State()\n screenReaderCharacterCount: number;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Defines the number of columns displayed in the field.\n * If not set, the field will be full-width and respond to the window size.\n */\n @Prop({ reflect: true })\n cols: number;\n\n /** Indicates the field cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Each item in the `errors` array will appear below the input field when the field is focused.\n * @localizable\n */\n @Prop()\n errors: string[];\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true })\n hideLabel: boolean;\n\n /**\n * When `true` and the input field has an active validation error, the field shows the error state without displaying associated error messages below the field (from the errors array above).\n * Primarily used for dropdown selects and date pickers whose controls appear below the input field (where the error messages, if displayed, would also appear).\n */\n @Prop({ reflect: true })\n hideMessages: boolean;\n\n /**\n * Each item in the `hints` array will appear below the input field when the field is focused.\n * @info\n * The `errors` array takes precedence over the `hints` array. If an input field has both hints and errors, only the errors will display.\n * Once all errors are resolved, the hints display the next time the field is focused.\n * @localizable\n */\n @Prop()\n hints: string[];\n\n /**\n * The label that appears above the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * Defines the maximum allowed input length in characters. Formatting characters (e.g. `.`, `-`, etc) are included in the `maxlength` comparison.\n * Make sure you account for them when setting the `maxlength` value.\n * @info\n * Please set the `rows` attribute in correlation with `maxlength` to show as much text as possible in the field viewport.\n */\n @Prop({ reflect: true, mutable: true })\n maxlength: number;\n\n /** Appends \"(optional)\" to the field label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /**\n * Text that appears within the field when it is blurred and empty.\n * Placeholder text disappears when the user focuses on the field and provides input.\n * @info\n * Primarily used for rare cases in which a visible form label is not expected (e.g., search fields).\n * @localizable\n */\n @Prop({ reflect: true })\n placeholder: string;\n\n /**\n * Appends \"(read only)\" to the field label, and field becomes unusable, but remains focusable.\n * Takes priority over `optional` if both are `true`.\n */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** Indicates how the field is resizable. */\n @Prop({ reflect: true })\n resize: 'none' | 'vertical' | 'horizontal' | 'both' | 'vertical-auto' = 'vertical';\n\n /** Defines the number of rows displayed in the field. */\n @Prop({ reflect: true })\n rows: number;\n\n /** Determines whether the field is subject to spell-checking by the underlying browser or OS. */\n @Prop({ reflect: true })\n spellcheck: boolean;\n\n /** The value of the field. */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the field loses focus after the value has been changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n /**\n * Emitted when the field value is updated.\n * @legacyEvent\n */\n @Event()\n input: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n if (isNaN(this.maxlength)) {\n this.maxlength = undefined;\n }\n\n if (this.maxlength) {\n this.updateScreenReaderCharacterCount();\n }\n }\n\n componentDidLoad() {\n overrideFocus(this.hostElement);\n }\n\n componentDidRender() {\n this.scheduledAfterRender.push(this.checkRows, this.checkCols, this.increaseHeightIfOverflowing);\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n @Listen('focus')\n onHostElementFocus(event: Event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.textareaField.focus();\n }\n\n @Listen('input')\n onHostElementInput(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.oninput) {\n this.value = event.detail.value;\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates focusing the `<textarea>`, centering the provided value, and emitting an `input` event.\n *\n * This method leaves the focus on the `<textarea>` and as a result does not trigger the `change` event. If you want\n * to trigger the `change` event, move the focus to another element after calling this method.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n const { textareaField } = this;\n textareaField.focus();\n textareaField.value = value;\n textareaField.dispatchEvent(new InputEvent('input'));\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('cols')\n colsObserver() {\n this.contentContainer.style.width = null;\n }\n\n @Watch('errors')\n errorsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('hints')\n hintsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('maxlength')\n maxlengthObserver() {\n if (this.maxlength) {\n this.updateScreenReaderCharacterCount();\n }\n }\n\n @Watch('rows')\n rowsObserver() {\n this.contentContainer.style.height = null;\n }\n\n @Watch('value')\n valueObserver() {\n const { maxlength, value = '' } = this;\n if (!maxlength) return;\n\n const truncatedValue = value.substr(0, maxlength);\n if (truncatedValue === value) return;\n\n this.change.emit({ value: truncatedValue });\n }\n\n // #endregion\n // #region Local Methods\n\n get hasError() {\n return Array.isArray(this.errors) && this.errors.length > 0;\n }\n\n get inputDescribedBy() {\n let describedBy = undefined;\n\n if (this.showMessages) {\n describedBy = `${this.inputId}-description`;\n }\n\n // Remove screen reader character count from described by after typing\n // starts to avoid double announcement. It's needed on focus to announce\n // the character count when field gains focus.\n if (this.maxlength && this.describeByScreenReaderCharacterCount) {\n describedBy = describedBy ? `${describedBy} ${this.inputId}-max-length` : `${this.inputId}-max-length`;\n }\n\n return describedBy;\n }\n\n get inputId() {\n return `input-guid-${this.guid}`;\n }\n\n get messages(): string[] {\n return (\n (this.errors && this.errors.length > 0 && this.errors) ||\n (this.hints && this.hints.length > 0 && this.hints) ||\n []\n );\n }\n\n get showMessages() {\n return this.messages.length > 0 && !this.hideMessages;\n }\n\n get showResize() {\n const { resize } = this;\n return resize && resize !== 'none';\n }\n\n get wrapperClasses() {\n const errorClass = this.hasError ? ' has-error' : '';\n const valueClass = !!this.value ? ' has-value' : '';\n const focusClass = this.hasFocus ? ' has-focus' : '';\n\n return `field-container${errorClass}${valueClass}${focusClass}`;\n }\n\n checkCols = () => {\n const { contentContainer, cols, textareaField, resize } = this;\n\n if (!cols || ['none', 'vertical'].includes(resize)) return;\n contentContainer.style.width = `${contentContainer.offsetWidth}px`;\n textareaField.removeAttribute('cols');\n };\n\n checkRows = () => {\n const { contentContainer, rows, textareaField, resize } = this;\n\n if (!rows || ['none', 'horizontal'].includes(resize)) return;\n contentContainer.style.height = `${contentContainer.offsetHeight}px`;\n textareaField.removeAttribute('rows');\n };\n\n getBorderOffset = () => {\n const computedStyle = window.getComputedStyle(this.textareaField);\n\n return parseInt(computedStyle.borderTopWidth, 10) + parseInt(computedStyle.borderBottomWidth, 10);\n };\n\n increaseHeightIfOverflowing = () => {\n const { scrollHeight } = this.textareaField;\n if (this.resize === 'vertical-auto' && this.isOverflowingVertically()) {\n // need to account for border width because scrollHeight does not include it\n const newHeight = scrollHeight + this.getBorderOffset();\n this.contentContainer.style.height = `${newHeight}px`;\n }\n };\n\n isOverflowingVertically = () => {\n const { clientHeight, scrollHeight } = this.textareaField;\n\n return scrollHeight > clientHeight;\n };\n\n onMouseDown = (event: MouseEvent) => {\n const { contentContainer } = this;\n this.downParams = {\n width: contentContainer.offsetWidth,\n height: contentContainer.offsetHeight,\n x: event.clientX,\n y: event.clientY,\n };\n document.addEventListener('mousemove', this.onMouseMove);\n document.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseMove = (event: MouseEvent) => {\n this.setHeight(event);\n this.setWidth(event);\n };\n\n onMouseUp = () => {\n document.removeEventListener('mousemove', this.onMouseMove);\n this.downParams = null;\n };\n\n onTextareaBlur = () => {\n const {\n valueOnFocus,\n textareaField: { value },\n } = this;\n this.describeByScreenReaderCharacterCount = true;\n this.hasFocus = false;\n setMessageHeight(this);\n if (valueOnFocus !== value) this.change.emit({ value });\n };\n\n onTextareaChange = (event: InputEvent) => {\n event.stopPropagation();\n const value = (event.target as HTMLTextAreaElement).value;\n\n this.change.emit({ value });\n };\n\n onTextareaFocus = () => {\n this.hasFocus = true;\n this.valueOnFocus = this.value;\n setMessageHeight(this);\n };\n\n onTextareaInput = (event: InputEvent) => {\n event.stopPropagation();\n const value = (event.target as HTMLTextAreaElement).value;\n this.describeByScreenReaderCharacterCount = false;\n this.increaseHeightIfOverflowing();\n if (this.maxlength) this.debouncedScreenReaderCharacterCount();\n this.input.emit({ value });\n };\n\n onTouchMove = (event: TouchEvent) => {\n this.setHeight(event);\n this.setWidth(event);\n };\n\n onTouchStart = (event: TouchEvent) => {\n if (event.touches.length !== 1) return;\n\n event.preventDefault();\n\n const { contentContainer } = this;\n const firstTouch = event.touches[0];\n\n this.downParams = {\n width: contentContainer.offsetWidth,\n height: contentContainer.offsetHeight,\n x: firstTouch.pageX,\n y: firstTouch.pageY,\n };\n\n document.addEventListener('touchmove', this.onTouchMove);\n document.addEventListener('touchend', this.onTouchMove);\n };\n\n setHeight(event: MouseEvent | TouchEvent) {\n const {\n contentContainer,\n resize,\n downParams: { height, y },\n } = this;\n const resizeY = ['both', 'vertical', 'vertical-auto'].includes(resize);\n\n if (!resizeY) return;\n\n const eventY = event instanceof MouseEvent ? event.clientY : event.touches[0]?.pageY ?? 0;\n const newHeight = height - (y - eventY);\n // If 'vertical-auto', change height if the new height is greater\n // than the current height or the textarea is not overflowing.\n // Otherwise, change height regardless of the new height.\n if (\n resize !== 'vertical-auto' ||\n newHeight > height ||\n (resize === 'vertical-auto' && !this.isOverflowingVertically())\n ) {\n contentContainer.style.height = `${newHeight}px`;\n }\n }\n\n setWidth(event: MouseEvent | TouchEvent) {\n const {\n contentContainer,\n resize,\n downParams: { width, x },\n } = this;\n\n const resizeX = ['both', 'horizontal'].includes(resize);\n\n if (!resizeX) return;\n const eventX = event instanceof MouseEvent ? event.clientX : event.touches[0]?.pageX ?? 0;\n const newWidth = width - (x - eventX);\n contentContainer.style.width = `${newWidth}px`;\n }\n\n updateScreenReaderCharacterCount = () => {\n this.screenReaderCharacterCount = this.value?.length || 0;\n };\n\n // #endregion\n // #region Render Methods\n\n renderInput() {\n const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';\n\n return (\n <div class=\"input-container\">\n <textarea\n id={this.inputId}\n class={textareaClasses}\n placeholder={(this.placeholder && loc(this.placeholder)) || undefined}\n test-id=\"inputField\"\n maxLength={this.maxlength}\n aria-describedby={this.inputDescribedBy}\n aria-invalid={`${this.hasError}`}\n aria-required={`${!this.optional}`}\n aria-label={this.hideLabel && this.label}\n spellcheck={this.spellcheck}\n rows={this.rows || 3}\n cols={this.cols}\n value={this.value}\n ref={el => (this.textareaField = el)}\n readonly={!!this.readonly}\n disabled={!!this.disabled}\n maxlength={this.maxlength}\n onInput={this.onTextareaInput}\n onChange={this.onTextareaChange}\n onFocus={this.onTextareaFocus}\n onBlur={this.onTextareaBlur}\n ></textarea>\n {this.hasError ? (\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n />\n ) : (\n ''\n )}\n {this.showResize && (\n <button\n onMouseDown={this.onMouseDown}\n onTouchStart={this.onTouchStart}\n class=\"btn-resize\"\n aria-label={loc('tecton.element.input.resize')}\n tabIndex={-1}\n >\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 12 12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11\"\n fill=\"none\"\n stroke-stroke-linecap=\"square\"\n />\n </svg>\n </button>\n )}\n </div>\n );\n }\n\n renderMaxLength() {\n return (\n <Fragment>\n <div\n class=\"max-length\"\n aria-hidden=\"true\"\n >\n {this.value?.length || 0}/{this.maxlength}\n </div>\n <div\n aria-live=\"polite\"\n class=\"sr\"\n id={`${this.inputId}-max-length`}\n test-id=\"max-length-sr\"\n >\n {loc('tecton.element.textarea.characterCount.screenReader', [\n this.screenReaderCharacterCount,\n this.maxlength,\n ])}\n </div>\n </Fragment>\n );\n }\n\n render() {\n return (\n <div class={this.wrapperClasses}>\n {renderLabel(this)}\n <div\n class=\"content-container\"\n ref={el => (this.contentContainer = el)}\n >\n {this.renderInput()}\n {this.maxlength ? this.renderMaxLength() : ''}\n {renderMessages(this)}\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setup, dispatchEvent, getActiveElementTestId, getListOfStyleCompilationIssues, evaluateA11y, } from "../../../utils/helpers";
|
|
1
|
+
import { setup, setTestStrings, dispatchEvent, getActiveElementTestId, getListOfStyleCompilationIssues, evaluateA11y, } from "../../../utils/helpers";
|
|
2
2
|
describe('q2-textarea', () => {
|
|
3
3
|
let page;
|
|
4
4
|
let normalStyle;
|
|
@@ -22,15 +22,6 @@ describe('q2-textarea', () => {
|
|
|
22
22
|
const label = await page.find('q2-textarea >>> label');
|
|
23
23
|
expect(label.innerText.trim()).toEqual('name');
|
|
24
24
|
});
|
|
25
|
-
describe('[A11y] guideline compliance', () => {
|
|
26
|
-
it('Does not have accessibility violations with only label', async () => {
|
|
27
|
-
const page = await setup({
|
|
28
|
-
html: `<q2-textarea value="Ir" />`,
|
|
29
|
-
});
|
|
30
|
-
const hasViolations = await evaluateA11y(page);
|
|
31
|
-
expect(hasViolations).toBe(false);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
25
|
describe('focus transferring', () => {
|
|
35
26
|
const html = '<q2-textarea value="Ir" />';
|
|
36
27
|
it('focuses when focus event dispatched ', async function () {
|
|
@@ -351,6 +342,22 @@ describe('q2-textarea', () => {
|
|
|
351
342
|
expect(await innerTextarea.getProperty('value')).toEqual('ABCDE');
|
|
352
343
|
expect(maxLengthContainer).toEqualText('5/5');
|
|
353
344
|
});
|
|
345
|
+
it('screen reader character total is updated after pause in typing', async () => {
|
|
346
|
+
const page = await setup({ html: '<q2-textarea />' });
|
|
347
|
+
await setTestStrings(page, {
|
|
348
|
+
'tecton.element.textarea.characterCount.screenReader': '{0}',
|
|
349
|
+
});
|
|
350
|
+
const q2Textarea = await page.find('q2-textarea');
|
|
351
|
+
q2Textarea.setProperty('maxlength', '5');
|
|
352
|
+
await page.waitForChanges();
|
|
353
|
+
await q2Textarea.callMethod('setValue', 'test');
|
|
354
|
+
await page.waitForChanges();
|
|
355
|
+
const maxLengthSRContainerOld = await page.find('q2-textarea >>> [test-id="max-length-sr"]');
|
|
356
|
+
expect(maxLengthSRContainerOld).toEqualText('0');
|
|
357
|
+
await page.waitForTimeout(2000);
|
|
358
|
+
const maxLengthSRContainerNew = await page.find('q2-textarea >>> [test-id="max-length-sr"]');
|
|
359
|
+
expect(maxLengthSRContainerNew).toEqualText('4');
|
|
360
|
+
});
|
|
354
361
|
});
|
|
355
362
|
});
|
|
356
363
|
describe('optional', () => {
|
|
@@ -1163,5 +1170,19 @@ describe('q2-textarea', () => {
|
|
|
1163
1170
|
});
|
|
1164
1171
|
});
|
|
1165
1172
|
});
|
|
1173
|
+
describe('Accessibility', () => {
|
|
1174
|
+
describe('aXe DevTools', () => {
|
|
1175
|
+
it('does not have accessibility violations', async () => {
|
|
1176
|
+
const page = await setup({
|
|
1177
|
+
html: `<q2-textarea value="Ir" />`,
|
|
1178
|
+
});
|
|
1179
|
+
const hasViolations = await evaluateA11y(page);
|
|
1180
|
+
expect(hasViolations).toBe(false);
|
|
1181
|
+
});
|
|
1182
|
+
});
|
|
1183
|
+
describe('Accessibility Tree', () => { });
|
|
1184
|
+
describe('Keyboard Controls', () => { });
|
|
1185
|
+
describe('Other', () => { });
|
|
1186
|
+
});
|
|
1166
1187
|
});
|
|
1167
1188
|
//# sourceMappingURL=q2-textarea-test.e2e.js.map
|