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
|
@@ -4,15 +4,6 @@ describe('q2-message', () => {
|
|
|
4
4
|
const page = await setup({ html: '<q2-message></q2-message>' });
|
|
5
5
|
expect(await getListOfStyleCompilationIssues(page, 'q2-message')).toHaveLength(0);
|
|
6
6
|
});
|
|
7
|
-
describe('[A11y] guideline compliance', () => {
|
|
8
|
-
it('Does not have accessibility violations with only label', async () => {
|
|
9
|
-
const page = await setup({
|
|
10
|
-
html: '<q2-message type="success"></q2-message>',
|
|
11
|
-
});
|
|
12
|
-
const hasViolations = await evaluateA11y(page);
|
|
13
|
-
expect(hasViolations).toBe(false);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
7
|
describe('@Props', () => {
|
|
17
8
|
describe('type', () => {
|
|
18
9
|
describe('when omitted', () => {
|
|
@@ -155,6 +146,20 @@ describe('q2-message', () => {
|
|
|
155
146
|
expect(containsClass).toBe(true);
|
|
156
147
|
});
|
|
157
148
|
});
|
|
149
|
+
describe('Accessibility', () => {
|
|
150
|
+
describe('aXe DevTools', () => {
|
|
151
|
+
it('does not have accessibility violations', async () => {
|
|
152
|
+
const page = await setup({
|
|
153
|
+
html: '<q2-message type="success"></q2-message>',
|
|
154
|
+
});
|
|
155
|
+
const hasViolations = await evaluateA11y(page);
|
|
156
|
+
expect(hasViolations).toBe(false);
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
describe('Accessibility Tree', () => { });
|
|
160
|
+
describe('Keyboard Controls', () => { });
|
|
161
|
+
describe('Other', () => { });
|
|
162
|
+
});
|
|
158
163
|
});
|
|
159
164
|
async function expectScreenReaderMessageLabel(type) {
|
|
160
165
|
const page = await setup({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-message-test.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-message/test/q2-message-test.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,+BAA+B,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEtH,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC,CAAC;QAChE,MAAM,CAAC,MAAM,+BAA+B,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACzC,EAAE,CAAC,wDAAwD,EAAE,KAAK,IAAI,EAAE;YACpE,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC;gBACrB,IAAI,EAAE,0CAA0C;aACnD,CAAC,CAAC;YACH,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,Q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,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;IAEtE,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import { setTestStrings, setup, dispatchEvent, getListOfStyleCompilationIssues, evaluateA11y } from '@/utils/helpers';\n\ndescribe('q2-message', () => {\n it('properly compiles CSS vars and functions', async () => {\n const page = await setup({ html: '<q2-message></q2-message>' });\n expect(await getListOfStyleCompilationIssues(page, 'q2-message')).toHaveLength(0);\n });\n\n describe('[A11y] guideline compliance', () => {\n it('Does not have accessibility violations with only label', async () => {\n const page = await setup({\n html: '<q2-message type=\"success\"></q2-message>',\n });\n const hasViolations = await evaluateA11y(page);\n expect(hasViolations).toBe(false);\n });\n });\n\n describe('@Props', () => {\n describe('type', () => {\n describe('when omitted', () => {\n it('defaults to \"info\" type and icon', async () => {\n const page = await setup({\n html: '<q2-message></q2-message>',\n });\n const messageElement = await page.find('q2-message');\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageElement.getAttribute('type')).toEqual('info');\n expect(await messageIcon.getAttribute('type')).toEqual('info');\n });\n\n it('defaults to \"info\" message type label', async () => {\n const ariaLabel = 'q2-message aria-label';\n const page = await setup({ html: '' });\n await setTestStrings(page, {\n 'tecton.element.message.type.info': ariaLabel,\n });\n await page.setContent('<q2-message></q2-message>');\n await page.waitForChanges();\n const typeLabel = await page.find('q2-message >>> .sr.message-label');\n\n expect(typeLabel).toEqualText(ariaLabel);\n });\n });\n\n describe('when value is \"success\"', () => {\n it('renders with \"success\" icon', async () => {\n const page = await setup({\n html: '<q2-message type=\"success\"></q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageIcon.getAttribute('type')).toEqual('success');\n });\n\n it('renders with \"success\" message type label', async () => {\n await expectScreenReaderMessageLabel('success');\n });\n });\n\n describe('when value is \"warning\"', () => {\n it('renders with \"warning\" icon', async () => {\n const page = await setup({\n html: '<q2-message type=\"warning\"></q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageIcon.getAttribute('type')).toEqual('warning');\n });\n\n it('renders with \"warning\" message type label', async () => {\n await expectScreenReaderMessageLabel('warning');\n });\n });\n\n describe('when value is \"danger\"', () => {\n it('renders with \"error\" icon', async () => {\n const page = await setup({\n html: '<q2-message type=\"danger\"></q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageIcon.getAttribute('type')).toEqual('error');\n });\n\n it('renders with \"danger\" message type label', async () => {\n await expectScreenReaderMessageLabel('danger');\n });\n });\n\n describe('when value is \"error\"', () => {\n it('renders with \"error\" icon', async () => {\n const page = await setup({\n html: '<q2-message type=\"error\"></q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageIcon.getAttribute('type')).toEqual('error');\n });\n\n it('renders with \"error\" message type label', async () => {\n await expectScreenReaderMessageLabel('error');\n });\n });\n });\n\n describe('appearance', () => {\n describe('when value is \"minimal\"', () => {\n it('does not render icon', async () => {\n const page = await setup({\n html: '<q2-message appearance=\"minimal\">Hipster script</q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(messageIcon).toBeNull();\n });\n });\n\n describe('when omitted', () => {\n it('defaults to \"standard\" and renders icon', async () => {\n const page = await setup({\n html: '<q2-message>Hipster script</q2-message>',\n });\n const messageElement = await page.find('q2-message');\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageElement.getAttribute('appearance')).toEqual('standard');\n expect(messageIcon).toBeDefined();\n });\n });\n });\n\n describe('description', () => {\n describe('when provided', () => {\n it('does not add aria-attributes and role', async () => {\n const page = await setup({\n html: '<q2-message description>Tony Stark</q2-message>',\n });\n const messageBlock = await page.find('q2-message >>> .message');\n\n expect(await messageBlock.getAttribute('role')).toBeNull();\n expect(await messageBlock.getAttribute('aria-live')).toBeNull();\n expect(await messageBlock.getAttribute('aria-atomic')).toBeNull();\n });\n });\n\n describe('when omitted', () => {\n it('adds aria-attributes and role', async () => {\n const page = await setup({\n html: '<q2-message>Tony Stark</q2-message>',\n });\n const messageBlock = await page.find('q2-message >>> .message');\n\n expect(await messageBlock.getAttribute('role')).toEqual('alert');\n expect(await messageBlock.getAttribute('aria-live')).toEqual('assertive');\n expect(await messageBlock.getAttribute('aria-atomic')).toEqual('true');\n expect(await messageBlock.getAttribute('aria-relevant')).toEqual('all');\n });\n });\n });\n });\n\n describe('focus transferring', () => {\n const html = '<q2-message type=\"info\" appearance=\"standard\">Tony Stark</q2-message>';\n\n it('focuses when focus event dispatched ', async function (): Promise<void> {\n const page = await setup({ html });\n await dispatchEvent(page, ['q2-message'], 'focus');\n const containsClass = await page.$eval('q2-message', el => {\n return el.shadowRoot.activeElement.classList.contains('message');\n });\n expect(containsClass).toBe(true);\n });\n\n it('focuses when focus event method called ', async function (): Promise<void> {\n const page = await setup({ html });\n const message = await page.find('q2-message');\n await message.triggerEvent('focus');\n await page.waitForChanges();\n const containsClass = await page.$eval('q2-message', el => {\n return el.shadowRoot.activeElement.classList.contains('message');\n });\n expect(containsClass).toBe(true);\n });\n });\n});\n\nasync function expectScreenReaderMessageLabel(type: string): Promise<void> {\n const page = await setup({\n html: '<q2-message></q2-message>',\n });\n const screenReaderLabel = 'q2-message aria-label';\n await setTestStrings(page, {\n [`tecton.element.message.type.${type}`]: screenReaderLabel,\n });\n const messageElement = await page.find('q2-message');\n messageElement.setAttribute('type', type);\n await page.waitForChanges();\n const typeLabel = await page.find('q2-message >>> .sr.message-label');\n\n expect(typeLabel).toEqualText(screenReaderLabel);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"q2-message-test.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-message/test/q2-message-test.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,+BAA+B,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;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,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC;oBACrB,IAAI,EAAE,0CAA0C;iBACnD,CAAC,CAAC;gBACH,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;gBAC/C,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACzC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,8BAA8B,CAAC,IAAY;IACtD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC;QACrB,IAAI,EAAE,2BAA2B;KACpC,CAAC,CAAC;IACH,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;IAClD,MAAM,cAAc,CAAC,IAAI,EAAE;QACvB,CAAC,+BAA+B,IAAI,EAAE,CAAC,EAAE,iBAAiB;KAC7D,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrD,cAAc,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC5B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;IAEtE,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import { setTestStrings, setup, dispatchEvent, getListOfStyleCompilationIssues, evaluateA11y } from '@/utils/helpers';\n\ndescribe('q2-message', () => {\n it('properly compiles CSS vars and functions', async () => {\n const page = await setup({ html: '<q2-message></q2-message>' });\n expect(await getListOfStyleCompilationIssues(page, 'q2-message')).toHaveLength(0);\n });\n\n describe('@Props', () => {\n describe('type', () => {\n describe('when omitted', () => {\n it('defaults to \"info\" type and icon', async () => {\n const page = await setup({\n html: '<q2-message></q2-message>',\n });\n const messageElement = await page.find('q2-message');\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageElement.getAttribute('type')).toEqual('info');\n expect(await messageIcon.getAttribute('type')).toEqual('info');\n });\n\n it('defaults to \"info\" message type label', async () => {\n const ariaLabel = 'q2-message aria-label';\n const page = await setup({ html: '' });\n await setTestStrings(page, {\n 'tecton.element.message.type.info': ariaLabel,\n });\n await page.setContent('<q2-message></q2-message>');\n await page.waitForChanges();\n const typeLabel = await page.find('q2-message >>> .sr.message-label');\n\n expect(typeLabel).toEqualText(ariaLabel);\n });\n });\n\n describe('when value is \"success\"', () => {\n it('renders with \"success\" icon', async () => {\n const page = await setup({\n html: '<q2-message type=\"success\"></q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageIcon.getAttribute('type')).toEqual('success');\n });\n\n it('renders with \"success\" message type label', async () => {\n await expectScreenReaderMessageLabel('success');\n });\n });\n\n describe('when value is \"warning\"', () => {\n it('renders with \"warning\" icon', async () => {\n const page = await setup({\n html: '<q2-message type=\"warning\"></q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageIcon.getAttribute('type')).toEqual('warning');\n });\n\n it('renders with \"warning\" message type label', async () => {\n await expectScreenReaderMessageLabel('warning');\n });\n });\n\n describe('when value is \"danger\"', () => {\n it('renders with \"error\" icon', async () => {\n const page = await setup({\n html: '<q2-message type=\"danger\"></q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageIcon.getAttribute('type')).toEqual('error');\n });\n\n it('renders with \"danger\" message type label', async () => {\n await expectScreenReaderMessageLabel('danger');\n });\n });\n\n describe('when value is \"error\"', () => {\n it('renders with \"error\" icon', async () => {\n const page = await setup({\n html: '<q2-message type=\"error\"></q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageIcon.getAttribute('type')).toEqual('error');\n });\n\n it('renders with \"error\" message type label', async () => {\n await expectScreenReaderMessageLabel('error');\n });\n });\n });\n\n describe('appearance', () => {\n describe('when value is \"minimal\"', () => {\n it('does not render icon', async () => {\n const page = await setup({\n html: '<q2-message appearance=\"minimal\">Hipster script</q2-message>',\n });\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(messageIcon).toBeNull();\n });\n });\n\n describe('when omitted', () => {\n it('defaults to \"standard\" and renders icon', async () => {\n const page = await setup({\n html: '<q2-message>Hipster script</q2-message>',\n });\n const messageElement = await page.find('q2-message');\n const messageIcon = await page.find('q2-message >>> .message-icon');\n\n expect(await messageElement.getAttribute('appearance')).toEqual('standard');\n expect(messageIcon).toBeDefined();\n });\n });\n });\n\n describe('description', () => {\n describe('when provided', () => {\n it('does not add aria-attributes and role', async () => {\n const page = await setup({\n html: '<q2-message description>Tony Stark</q2-message>',\n });\n const messageBlock = await page.find('q2-message >>> .message');\n\n expect(await messageBlock.getAttribute('role')).toBeNull();\n expect(await messageBlock.getAttribute('aria-live')).toBeNull();\n expect(await messageBlock.getAttribute('aria-atomic')).toBeNull();\n });\n });\n\n describe('when omitted', () => {\n it('adds aria-attributes and role', async () => {\n const page = await setup({\n html: '<q2-message>Tony Stark</q2-message>',\n });\n const messageBlock = await page.find('q2-message >>> .message');\n\n expect(await messageBlock.getAttribute('role')).toEqual('alert');\n expect(await messageBlock.getAttribute('aria-live')).toEqual('assertive');\n expect(await messageBlock.getAttribute('aria-atomic')).toEqual('true');\n expect(await messageBlock.getAttribute('aria-relevant')).toEqual('all');\n });\n });\n });\n });\n\n describe('focus transferring', () => {\n const html = '<q2-message type=\"info\" appearance=\"standard\">Tony Stark</q2-message>';\n\n it('focuses when focus event dispatched ', async function (): Promise<void> {\n const page = await setup({ html });\n await dispatchEvent(page, ['q2-message'], 'focus');\n const containsClass = await page.$eval('q2-message', el => {\n return el.shadowRoot.activeElement.classList.contains('message');\n });\n expect(containsClass).toBe(true);\n });\n\n it('focuses when focus event method called ', async function (): Promise<void> {\n const page = await setup({ html });\n const message = await page.find('q2-message');\n await message.triggerEvent('focus');\n await page.waitForChanges();\n const containsClass = await page.$eval('q2-message', el => {\n return el.shadowRoot.activeElement.classList.contains('message');\n });\n expect(containsClass).toBe(true);\n });\n });\n\n describe('Accessibility', () => {\n describe('aXe DevTools', () => {\n it('does not have accessibility violations', async () => {\n const page = await setup({\n html: '<q2-message type=\"success\"></q2-message>',\n });\n const hasViolations = await evaluateA11y(page);\n expect(hasViolations).toBe(false);\n });\n });\n describe('Accessibility Tree', () => {});\n describe('Keyboard Controls', () => {});\n describe('Other', () => {});\n });\n});\n\nasync function expectScreenReaderMessageLabel(type: string): Promise<void> {\n const page = await setup({\n html: '<q2-message></q2-message>',\n });\n const screenReaderLabel = 'q2-message aria-label';\n await setTestStrings(page, {\n [`tecton.element.message.type.${type}`]: screenReaderLabel,\n });\n const messageElement = await page.find('q2-message');\n messageElement.setAttribute('type', type);\n await page.waitForChanges();\n const typeLabel = await page.find('q2-message >>> .sr.message-label');\n\n expect(typeLabel).toEqualText(screenReaderLabel);\n}\n"]}
|
|
@@ -43,7 +43,7 @@ export class Q2Optgroup {
|
|
|
43
43
|
// #endregion
|
|
44
44
|
// #region Render Methods
|
|
45
45
|
render() {
|
|
46
|
-
return (h("div", { key: '
|
|
46
|
+
return (h("div", { key: '2c58c18d1f6d5b7886d12a0c5ae99975912fe41b', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: '7852309fb1c677c76931f630b6f975379450f5d1', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: '4481127fec8a882f0bfcaf3d2047ec2f9b4eb059', class: "q2-optgroup-options" }, h("slot", { key: '03425c1d351eb91b0956c03ef3584a978578db37' }))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "q2-optgroup"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { evaluateA11y, getListOfStyleCompilationIssues, setTestStrings, setup } from "../../../utils/helpers";
|
|
2
2
|
describe('q2-select', () => {
|
|
3
|
-
describe('[A11y] guideline compliance', () => {
|
|
4
|
-
it('Does not have accessibility violations with only label', async () => {
|
|
5
|
-
const page = await setup({
|
|
6
|
-
html: `<q2-select label="My Select">
|
|
7
|
-
<q2-optgroup label="Option Group" >
|
|
8
|
-
<q2-option value="option1" display="Option Text">Option Text</q2-option>
|
|
9
|
-
</q2-optgroup>
|
|
10
|
-
</q2-select>`,
|
|
11
|
-
});
|
|
12
|
-
const hasViolations = await evaluateA11y(page);
|
|
13
|
-
expect(hasViolations).toBe(false);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
3
|
it('properly compiles CSS vars and functions', async () => {
|
|
17
4
|
const page = await setup({ html: '<q2-select></q2-select>' });
|
|
18
5
|
expect(await getListOfStyleCompilationIssues(page, 'q2-select')).toHaveLength(0);
|
|
@@ -85,5 +72,25 @@ describe('q2-select', () => {
|
|
|
85
72
|
const optGroupLabel = await page.find('q2-optgroup >>> .q2-optgroup-header');
|
|
86
73
|
expect(optGroupLabel.textContent).toEqual('My Option Group Label');
|
|
87
74
|
});
|
|
75
|
+
describe('Accessibility', () => {
|
|
76
|
+
describe('aXe DevTools', () => {
|
|
77
|
+
it('does not have accessibility violations', async () => {
|
|
78
|
+
const page = await setup({
|
|
79
|
+
html: `
|
|
80
|
+
<q2-select label="My Select">
|
|
81
|
+
<q2-optgroup label="Option Group" >
|
|
82
|
+
<q2-option value="option1" display="Option Text">Option Text</q2-option>
|
|
83
|
+
</q2-optgroup>
|
|
84
|
+
</q2-select>
|
|
85
|
+
`,
|
|
86
|
+
});
|
|
87
|
+
const hasViolations = await evaluateA11y(page);
|
|
88
|
+
expect(hasViolations).toBe(false);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
describe('Accessibility Tree', () => { });
|
|
92
|
+
describe('Keyboard Controls', () => { });
|
|
93
|
+
describe('Other', () => { });
|
|
94
|
+
});
|
|
88
95
|
});
|
|
89
96
|
//# sourceMappingURL=q2-optgroup-test.e2e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-optgroup-test.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-optgroup/test/q2-optgroup-test.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,+BAA+B,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEvG,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACvB,
|
|
1
|
+
{"version":3,"file":"q2-optgroup-test.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-optgroup/test/q2-optgroup-test.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,+BAA+B,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEvG,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACvB,EAAE,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC,CAAC;QAC9D,MAAM,CAAC,MAAM,+BAA+B,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oBAAoB,EAAE,KAAK;QAC1B,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC;YACrB,IAAI,EAAE;;;aAGL;SACJ,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEhD,wBAA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CAAC,CAAC;IAEH,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC3B,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;YAC1B,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;gBACpD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC;oBACrB,IAAI,EAAE;;;;;;qBAML;iBACJ,CAAC,CAAC;gBACH,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;gBAC/C,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACzC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { evaluateA11y, getListOfStyleCompilationIssues, setTestStrings, setup } from '@/utils/helpers';\n\ndescribe('q2-select', () => {\n it('properly compiles CSS vars and functions', async () => {\n const page = await setup({ html: '<q2-select></q2-select>' });\n expect(await getListOfStyleCompilationIssues(page, 'q2-select')).toHaveLength(0);\n });\n\n it('renders base state', async function (): Promise<void> {\n const page = await setup({\n html: `<q2-optgroup label=\"Option Group\" >\n <q2-option value=\"option1\" display=\"Option Text\">Option Text</q2-option>\n </q2-optgroup>\n `,\n });\n\n const optGroup = await page.find('q2-optgroup');\n\n // the component renders\n expect(optGroup.tagName).toEqual('Q2-OPTGROUP');\n\n const optGroupLabel = await page.find('q2-optgroup >>> .q2-optgroup-header');\n // label text is rendered in header\n expect(optGroupLabel.textContent).toEqual('Option Group');\n\n const optGroupContainer = await page.find('q2-optgroup >>> .q2-optgroup-container');\n\n // label header id matches container aria-labelledby\n expect(optGroupLabel.id).toEqual(optGroupContainer.getAttribute('aria-labelledby'));\n\n const assignedNodesLocalName = await page.$eval('q2-optgroup', group => {\n return group.shadowRoot.querySelector('slot').assignedElements()[0].localName;\n });\n\n // slot renders with provided options\n expect(assignedNodesLocalName).toEqual('q2-option');\n });\n\n it('propagates disabled state to child options', async function () {\n const page = await setup({\n html: `<q2-optgroup label=\"Option Group\" disabled>\n <q2-option value=\"option1\" display=\"Option Text\">Option Text</q2-option>\n </q2-optgroup>\n `,\n });\n\n const option = await page.find('q2-option');\n const optionDisabledByGroup = await option.getProperty('disabledGroup');\n\n expect(optionDisabledByGroup).toEqual(true);\n });\n\n it('hides the container if all children are hidden', async function () {\n const page = await setup({\n html: `<q2-optgroup label=\"Option Group\" >\n <q2-option value=\"option1\" display=\"Option Text\" hidden>Option Text</q2-option>\n </q2-optgroup>\n `,\n });\n\n const optGroupContainer = await page.find('q2-optgroup >>> .q2-optgroup-container');\n let containerHidden = await optGroupContainer.getProperty('hidden');\n\n // container hidden if all options hidden\n expect(containerHidden).toEqual(true);\n\n const option = await page.find('q2-option');\n\n await option.setProperty('hidden', false);\n\n await page.waitForChanges();\n\n // container no longer hidden once option isn't hidden\n // tests mutation observer fires\n containerHidden = await optGroupContainer.getProperty('hidden');\n expect(containerHidden).toEqual(false);\n });\n\n it('localizes label string', async function () {\n const page = await setup({\n html: `<q2-optgroup >\n <q2-option value=\"option1\" display=\"Option Text\" hidden>Option Text</q2-option>\n </q2-optgroup>\n `,\n });\n\n await setTestStrings(page, {\n 'q2-optGroup.label': 'My Option Group Label',\n });\n\n const optGroup = await page.find('q2-optgroup');\n await optGroup.setProperty('label', 'q2-optGroup.label');\n\n await page.waitForChanges();\n\n const optGroupLabel = await page.find('q2-optgroup >>> .q2-optgroup-header');\n\n expect(optGroupLabel.textContent).toEqual('My Option Group Label');\n });\n\n describe('Accessibility', () => {\n describe('aXe DevTools', () => {\n it('does not have accessibility violations', async () => {\n const page = await setup({\n html: `\n <q2-select label=\"My Select\">\n <q2-optgroup label=\"Option Group\" >\n <q2-option value=\"option1\" display=\"Option Text\">Option Text</q2-option>\n </q2-optgroup>\n </q2-select>\n `,\n });\n const hasViolations = await evaluateA11y(page);\n expect(hasViolations).toBe(false);\n });\n });\n describe('Accessibility Tree', () => {});\n describe('Keyboard Controls', () => {});\n describe('Other', () => {});\n });\n});\n"]}
|
|
@@ -56,7 +56,7 @@ export class Q2Option {
|
|
|
56
56
|
render() {
|
|
57
57
|
const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
|
|
58
58
|
const isDisabled = disabled || disabledGroup;
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '31957c36e0836d1f4936d8af97beb51335b4c6b9', tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": `${!!selected}`, "aria-hidden": _multiSelectHidden ? 'true' : undefined, display: this.display }, this.selected && h("q2-icon", { key: 'c5e9eac9b66bb975b303c1184b06fd71718096f7', type: "checkmark" }), h("div", { key: 'c0ea2c0acd37626d90ad07908f7697fe7c1edc1e', class: "content" }, h("slot", { key: '7b19d2f5977b67cace150e51956121011e28c138' }))));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "q2-option"; }
|
|
62
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,18 +14,6 @@ describe('q2-option', () => {
|
|
|
14
14
|
const page = await setup({ html: '<q2-option></q2-option>' });
|
|
15
15
|
expect(await getListOfStyleCompilationIssues(page, 'q2-option')).toHaveLength(0);
|
|
16
16
|
});
|
|
17
|
-
describe('[A11y] guideline compliance', () => {
|
|
18
|
-
it('Does not have accessibility violations with only label', async () => {
|
|
19
|
-
const page = await setup({
|
|
20
|
-
html: `<q2-select label="Test" value="option-1">
|
|
21
|
-
<q2-option value="option-1" display="Option Text">Option Text</q2-option>
|
|
22
|
-
<q2-option value="option-2" display="Option Text">Option Text</q2-option>
|
|
23
|
-
</q2-select>`,
|
|
24
|
-
});
|
|
25
|
-
const hasViolations = await evaluateA11y(page);
|
|
26
|
-
expect(hasViolations).toBe(false);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
17
|
describe('@Props', () => {
|
|
30
18
|
describe('selected', () => {
|
|
31
19
|
describe('when not provided', () => {
|
|
@@ -141,5 +129,33 @@ describe('q2-option', () => {
|
|
|
141
129
|
});
|
|
142
130
|
});
|
|
143
131
|
});
|
|
132
|
+
describe('Accessibility', () => {
|
|
133
|
+
describe('aXe DevTools', () => {
|
|
134
|
+
it('does not have accessibility violations', async () => {
|
|
135
|
+
const page = await setup({
|
|
136
|
+
html: `<q2-select label="Test" value="option-1">
|
|
137
|
+
<q2-option value="option-1" display="Option Text">Option Text</q2-option>
|
|
138
|
+
<q2-option value="option-2" display="Option Text">Option Text</q2-option>
|
|
139
|
+
</q2-select>`,
|
|
140
|
+
});
|
|
141
|
+
const hasViolations = await evaluateA11y(page);
|
|
142
|
+
expect(hasViolations).toBe(false);
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
describe('Accessibility Tree', () => {
|
|
146
|
+
it('is correctly represented in the accessibility tree', async () => {
|
|
147
|
+
page = await setup({
|
|
148
|
+
html: `<q2-option>My Option</q2-option>`,
|
|
149
|
+
});
|
|
150
|
+
const accessibilitySnapshot = await page.accessibility.snapshot({
|
|
151
|
+
root: await page.$('q2-option'),
|
|
152
|
+
});
|
|
153
|
+
expect(accessibilitySnapshot.role).toBe('option');
|
|
154
|
+
expect(accessibilitySnapshot.name).toBe('My Option');
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
describe('Keyboard Controls', () => { });
|
|
158
|
+
describe('Other', () => { });
|
|
159
|
+
});
|
|
144
160
|
});
|
|
145
161
|
//# sourceMappingURL=q2-option-test.e2e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-option-test.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-option/test/q2-option-test.e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YA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AM,KAAK,CAAC;wBACf,IAAI,EAAE,kCAAkC;qBAC3C,CAAC,CAAC;oBACH,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;oBACtC,MAAM,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBACrE,CAAC,CAAC,CAAC;gBAEH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;oBACxC,EAAE,CAAC,oDAAoD,EAAE,KAAK,IAAI,EAAE;wBAChE,IAAI,GAAG,MAAM,KAAK,CAAC;4BACf,IAAI,EAAE,4CAA4C;yBACrD,CAAC,CAAC;wBACH,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBACtC,MAAM,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;oBAChE,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;YAEH,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;gBAC3B,EAAE,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;oBACrD,IAAI,GAAG,MAAM,KAAK,CAAC;wBACf,IAAI,EAAE,gDAAgD;qBACzD,CAAC,CAAC;oBACH,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;oBACtC,MAAM,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAC/D,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { E2EElement, E2EPage } from '@stencil/core/testing';\nimport { evaluateA11y, getListOfStyleCompilationIssues, setup } from '@/utils/helpers';\n\ndescribe('q2-option', () => {\n let page: E2EPage;\n let option: E2EElement;\n it('renders with default attributes', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n expect(option).toEqualAttribute('role', 'option');\n expect(option).toEqualAttribute('tabindex', '-1');\n });\n\n it('properly compiles CSS vars and functions', async () => {\n const page = await setup({ html: '<q2-option></q2-option>' });\n expect(await getListOfStyleCompilationIssues(page, 'q2-option')).toHaveLength(0);\n });\n\n describe('[A11y] guideline compliance', () => {\n it('Does not have accessibility violations with only label', async () => {\n const page = await setup({\n html: `<q2-select label=\"Test\" value=\"option-1\">\n <q2-option value=\"option-1\" display=\"Option Text\">Option Text</q2-option>\n <q2-option value=\"option-2\" display=\"Option Text\">Option Text</q2-option>\n </q2-select>`,\n });\n const hasViolations = await evaluateA11y(page);\n expect(hasViolations).toBe(false);\n });\n });\n\n describe('@Props', () => {\n describe('selected', () => {\n describe('when not provided', () => {\n it('does not render checkmark icon and adds aria-selected=\"false\"', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n const optionIcon = await page.find('q2-option >>> q2-icon[type=checkmark]');\n\n expect(option).toEqualAttribute('aria-selected', 'false');\n expect(optionIcon).toBeNull();\n });\n });\n\n describe('when provided', () => {\n it('renders with checkmark icon and adds aria-selected=\"true\"', async () => {\n page = await setup({\n html: `<q2-option selected>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n const optionIcon = await page.find('q2-option >>> q2-icon[type=checkmark]');\n\n expect(option).toEqualAttribute('aria-selected', 'true');\n expect(optionIcon).toBeTruthy();\n });\n });\n });\n\n describe('disabled', () => {\n describe('when not provided', () => {\n it('renders without aria-disabled attribute', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).not.toHaveAttribute('aria-disabled');\n });\n });\n\n describe('when provided', () => {\n it('renders with aria-disabled attribute', async () => {\n page = await setup({\n html: `<q2-option disabled>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).toEqualAttribute('aria-disabled', 'true');\n });\n });\n });\n\n describe('disabledGroup', () => {\n describe('when not provided', () => {\n it('renders without aria-disabled attribute', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).not.toHaveAttribute('aria-disabled');\n });\n });\n\n describe('when provided', () => {\n it('renders with aria-disabled attribute', async () => {\n page = await setup({\n html: `<q2-option disabled-group>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).toEqualAttribute('aria-disabled', 'true');\n });\n });\n });\n\n describe('_multiSelectHidden', () => {\n describe('when not provided', () => {\n it('renders without aria-hidden attribute', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).not.toHaveAttribute('aria-hidden');\n });\n });\n\n describe('when provided', () => {\n it('renders with aria-hidden attribute', async () => {\n page = await setup({\n html: `<q2-option _multiSelectHidden>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).toEqualAttribute('aria-hidden', 'true');\n });\n });\n });\n\n describe('display', () => {\n describe('when not provided', () => {\n it('uses the text content as the display value', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n expect(await option.getProperty('display')).toEqual('My Option');\n });\n\n describe('when multiline is provided', () => {\n it('does not use the text content as the display value', async () => {\n page = await setup({\n html: `<q2-option multiline>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n expect(await option.getProperty('display')).toBeUndefined();\n });\n });\n });\n\n describe('when provided', () => {\n it('renders with the provided display value', async () => {\n page = await setup({\n html: `<q2-option display=\"Foo\">My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n expect(await option.getProperty('display')).toEqual('Foo');\n });\n });\n });\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"q2-option-test.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-option/test/q2-option-test.e2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,GAAG,EAAE;YAChC,EAAE,CAAC,oDAAoD,EAAE,KAAK,IAAI,EAAE;gBAChE,IAAI,GAAG,MAAM,KAAK,CAAC;oBACf,IAAI,EAAE,kCAAkC;iBAC3C,CAAC,CAAC;gBACH,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;oBAC5D,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;iBAClC,CAAC,CAAC;gBACH,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAClD,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { E2EElement, E2EPage } from '@stencil/core/testing';\nimport { evaluateA11y, getListOfStyleCompilationIssues, setup } from '@/utils/helpers';\n\ndescribe('q2-option', () => {\n let page: E2EPage;\n let option: E2EElement;\n it('renders with default attributes', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n expect(option).toEqualAttribute('role', 'option');\n expect(option).toEqualAttribute('tabindex', '-1');\n });\n\n it('properly compiles CSS vars and functions', async () => {\n const page = await setup({ html: '<q2-option></q2-option>' });\n expect(await getListOfStyleCompilationIssues(page, 'q2-option')).toHaveLength(0);\n });\n\n describe('@Props', () => {\n describe('selected', () => {\n describe('when not provided', () => {\n it('does not render checkmark icon and adds aria-selected=\"false\"', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n const optionIcon = await page.find('q2-option >>> q2-icon[type=checkmark]');\n\n expect(option).toEqualAttribute('aria-selected', 'false');\n expect(optionIcon).toBeNull();\n });\n });\n\n describe('when provided', () => {\n it('renders with checkmark icon and adds aria-selected=\"true\"', async () => {\n page = await setup({\n html: `<q2-option selected>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n const optionIcon = await page.find('q2-option >>> q2-icon[type=checkmark]');\n\n expect(option).toEqualAttribute('aria-selected', 'true');\n expect(optionIcon).toBeTruthy();\n });\n });\n });\n\n describe('disabled', () => {\n describe('when not provided', () => {\n it('renders without aria-disabled attribute', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).not.toHaveAttribute('aria-disabled');\n });\n });\n\n describe('when provided', () => {\n it('renders with aria-disabled attribute', async () => {\n page = await setup({\n html: `<q2-option disabled>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).toEqualAttribute('aria-disabled', 'true');\n });\n });\n });\n\n describe('disabledGroup', () => {\n describe('when not provided', () => {\n it('renders without aria-disabled attribute', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).not.toHaveAttribute('aria-disabled');\n });\n });\n\n describe('when provided', () => {\n it('renders with aria-disabled attribute', async () => {\n page = await setup({\n html: `<q2-option disabled-group>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).toEqualAttribute('aria-disabled', 'true');\n });\n });\n });\n\n describe('_multiSelectHidden', () => {\n describe('when not provided', () => {\n it('renders without aria-hidden attribute', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).not.toHaveAttribute('aria-hidden');\n });\n });\n\n describe('when provided', () => {\n it('renders with aria-hidden attribute', async () => {\n page = await setup({\n html: `<q2-option _multiSelectHidden>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n\n expect(option).toEqualAttribute('aria-hidden', 'true');\n });\n });\n });\n\n describe('display', () => {\n describe('when not provided', () => {\n it('uses the text content as the display value', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n expect(await option.getProperty('display')).toEqual('My Option');\n });\n\n describe('when multiline is provided', () => {\n it('does not use the text content as the display value', async () => {\n page = await setup({\n html: `<q2-option multiline>My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n expect(await option.getProperty('display')).toBeUndefined();\n });\n });\n });\n\n describe('when provided', () => {\n it('renders with the provided display value', async () => {\n page = await setup({\n html: `<q2-option display=\"Foo\">My Option</q2-option>`,\n });\n option = await page.find('q2-option');\n expect(await option.getProperty('display')).toEqual('Foo');\n });\n });\n });\n });\n\n describe('Accessibility', () => {\n describe('aXe DevTools', () => {\n it('does not have accessibility violations', async () => {\n const page = await setup({\n html: `<q2-select label=\"Test\" value=\"option-1\">\n <q2-option value=\"option-1\" display=\"Option Text\">Option Text</q2-option>\n <q2-option value=\"option-2\" display=\"Option Text\">Option Text</q2-option>\n </q2-select>`,\n });\n const hasViolations = await evaluateA11y(page);\n expect(hasViolations).toBe(false);\n });\n });\n describe('Accessibility Tree', () => {\n it('is correctly represented in the accessibility tree', async () => {\n page = await setup({\n html: `<q2-option>My Option</q2-option>`,\n });\n const accessibilitySnapshot = await page.accessibility.snapshot({\n root: await page.$('q2-option'),\n });\n expect(accessibilitySnapshot.role).toBe('option');\n expect(accessibilitySnapshot.name).toBe('My Option');\n });\n });\n describe('Keyboard Controls', () => {});\n describe('Other', () => {});\n });\n});\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import sanitizeRegexString from "../../utils/sanitize-regex-string";
|
|
1
2
|
import { h, Host, } from "@stencil/core";
|
|
2
3
|
import { isEventFromElement, isVisible, loc, nextPaint, overrideFocus, waitForNextPaint } from "../../utils/index";
|
|
3
4
|
export class Q2OptionList {
|
|
@@ -234,11 +235,12 @@ export class Q2OptionList {
|
|
|
234
235
|
};
|
|
235
236
|
const searchIndex = (list) => {
|
|
236
237
|
const keyStr = this.keyStore.queue.join('');
|
|
238
|
+
const sanitizedKeyStr = sanitizeRegexString(keyStr);
|
|
237
239
|
return list.find(v => {
|
|
238
240
|
return (!v.element.disabled &&
|
|
239
241
|
v.element.display &&
|
|
240
|
-
(v.element.display.match(new RegExp(`^${
|
|
241
|
-
v.element.display.replace(/\s/g, '').match(new RegExp(`^${
|
|
242
|
+
(v.element.display.match(new RegExp(`^${sanitizedKeyStr}`, 'i')) ||
|
|
243
|
+
v.element.display.replace(/\s/g, '').match(new RegExp(`^${sanitizedKeyStr}`, 'i'))));
|
|
242
244
|
});
|
|
243
245
|
};
|
|
244
246
|
const setFocus = ({ index }) => {
|
|
@@ -533,7 +535,7 @@ export class Q2OptionList {
|
|
|
533
535
|
// #endregion
|
|
534
536
|
// #region Render Methods
|
|
535
537
|
render() {
|
|
536
|
-
return (h(Host, { key: '
|
|
538
|
+
return (h(Host, { key: '221e3d11f55902cd286a6f69cb1c30ce4cc3cb1c' }, h("div", { key: '5e08ad2fd5a1a773976285ad16f2e2ef6e2161be', class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { key: '537330008c139176aaa19ba997579e61f841fffb', class: "options", "aria-label": loc('tecton.element.optionList.label', [this.label]), "aria-multiselectable": `${!!this.multiple}`, role: this.type || 'listbox', onKeyDown: this.internalKeydownHandler, onClick: this.clickHandler }, h("slot", { key: '9204233743b02ead43bbe4f9329973059af24414' })))));
|
|
537
539
|
}
|
|
538
540
|
static get is() { return "q2-option-list"; }
|
|
539
541
|
static get encapsulation() { return "shadow"; }
|
|
@@ -664,7 +666,7 @@ export class Q2OptionList {
|
|
|
664
666
|
"references": {
|
|
665
667
|
"IOptionValue": {
|
|
666
668
|
"location": "local",
|
|
667
|
-
"path": "/
|
|
669
|
+
"path": "/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/src/components/q2-option-list/q2-option-list.tsx",
|
|
668
670
|
"id": "src/components/q2-option-list/q2-option-list.tsx::IOptionValue"
|
|
669
671
|
}
|
|
670
672
|
}
|
|
@@ -736,7 +738,7 @@ export class Q2OptionList {
|
|
|
736
738
|
"references": {
|
|
737
739
|
"IOptionValue": {
|
|
738
740
|
"location": "local",
|
|
739
|
-
"path": "/
|
|
741
|
+
"path": "/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/src/components/q2-option-list/q2-option-list.tsx",
|
|
740
742
|
"id": "src/components/q2-option-list/q2-option-list.tsx::IOptionValue"
|
|
741
743
|
}
|
|
742
744
|
}
|