q2-tecton-elements 1.54.5 → 1.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle-report.json +2047 -769
- package/dist/cjs/{index-76f63767.js → index-905f4c87.js} +3 -2
- package/dist/cjs/index-905f4c87.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +45 -14
- package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +4 -1364
- 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 +59 -22
- 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-calendar.cjs.entry.js.map +1 -1
- 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-bar.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
- 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 +21 -21
- package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +2 -2
- package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-form.cjs.entry.js +23 -0
- package/dist/cjs/q2-form.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
- package/dist/cjs/q2-item_3.cjs.entry.js +3 -3
- 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-loc.cjs.entry.js +20 -26
- package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-modal.cjs.entry.js +172 -0
- package/dist/cjs/q2-modal.cjs.entry.js.map +1 -0
- 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_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-option.cjs.entry.js +22 -24
- package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
- package/dist/cjs/q2-pill.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
- package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +10 -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 +2 -2
- package/dist/cjs/q2-tag.cjs.entry.js +51 -9
- 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 +3 -3
- 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/sanitize-html-string-b8e3b24b.js +1366 -0
- package/dist/cjs/sanitize-html-string-b8e3b24b.js.map +1 -0
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
- package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-action-group/q2-action-group.css +11 -4
- package/dist/collection/components/q2-action-group/q2-action-group.js +47 -13
- package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group-test.e2e.js +365 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-action-group/test/{q2-action-group.spec.js → q2-action-group-test.spec.js} +67 -26
- package/dist/collection/components/q2-action-group/test/q2-action-group-test.spec.js.map +1 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-badge/q2-badge.css +52 -41
- package/dist/collection/components/q2-badge/q2-badge.js +88 -22
- package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +35 -126
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-badge/test/q2-badge-test.spec.js +415 -0
- package/dist/collection/components/q2-badge/test/q2-badge-test.spec.js.map +1 -0
- package/dist/collection/components/q2-btn/q2-btn.css +12 -10
- package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar.css +2 -0
- package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-card/q2-card.js.map +1 -1
- package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
- 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-carousel-pane/q2-carousel-pane.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -1
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
- 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.map +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
- 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.map +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
- 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.map +1 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.css +99 -62
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +19 -19
- package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +227 -208
- 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.css +8 -1
- 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.map +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
- 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.map +1 -1
- 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/q2-detail.js.map +1 -1
- package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- 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.map +1 -1
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
- package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-example/q2-example.js.map +1 -1
- package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -1
- package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -1
- package/dist/collection/components/q2-file-picker/q2-file-picker.css +2 -0
- package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js.map +1 -1
- package/dist/collection/components/q2-form/q2-form.css +93 -0
- package/dist/collection/components/q2-form/q2-form.js +44 -0
- package/dist/collection/components/q2-form/q2-form.js.map +1 -0
- package/dist/collection/components/q2-form/test/q2-form-test.e2e.js +93 -0
- package/dist/collection/components/q2-form/test/q2-form-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
- package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +1 -352
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-icon/test/q2-icon-test.spec.js +464 -0
- package/dist/collection/components/q2-icon/test/q2-icon-test.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input.css +3 -2
- package/dist/collection/components/q2-input/q2-input.js +4 -3
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js +10 -0
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -1
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-item/q2-item.js.map +1 -1
- package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-item/test/q2-item-test.spec.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/q2-legend.js.map +1 -1
- package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -1
- package/dist/collection/components/q2-link/q2-link.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.spec.js.map +1 -1
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-list/q2-list.js.map +1 -1
- package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
- package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
- 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.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +19 -37
- package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +1 -7
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +140 -82
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-message/q2-message.js.map +1 -1
- package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-modal/q2-modal.css +223 -0
- package/dist/collection/components/q2-modal/q2-modal.js +470 -0
- package/dist/collection/components/q2-modal/q2-modal.js.map +1 -0
- package/dist/collection/components/q2-modal/test/q2-modal-test.e2e.js +102 -0
- package/dist/collection/components/q2-modal/test/q2-modal-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-modal/test/q2-modal-test.spec.js +127 -0
- package/dist/collection/components/q2-modal/test/q2-modal-test.spec.js.map +1 -0
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
- package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.js +22 -24
- package/dist/collection/components/q2-option/q2-option.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +32 -5
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js +137 -19
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
- 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.map +1 -1
- package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js.map +1 -1
- package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
- package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- 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.map +1 -1
- package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
- 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.css +4 -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.map +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
- 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.js +2 -2
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -1
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -1
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -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.map +1 -1
- package/dist/collection/components/q2-select/q2-select.css +2 -2
- package/dist/collection/components/q2-select/q2-select.js +15 -4
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +5 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.spec.js +85 -0
- package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -0
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
- 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.map +1 -1
- 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/q2-stepper-vertical.js.map +1 -1
- 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 +1 -1
- 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.map +1 -1
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
- 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.css +9 -0
- package/dist/collection/components/q2-tag/q2-tag.js +65 -15
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +131 -341
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.spec.js +719 -0
- package/dist/collection/components/q2-tag/test/q2-tag-test.spec.js.map +1 -0
- package/dist/collection/components/q2-textarea/q2-textarea.css +2 -2
- package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tooltip/q2-tooltip.css +0 -1
- package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
- 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-types.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/action-sheet.js.map +1 -1
- package/dist/collection/utils/charting.js.map +1 -1
- package/dist/collection/utils/helpers.js +1 -25
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/index.js +2 -1
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/mirror-emit.js.map +1 -1
- package/dist/collection/utils/sanitize-html-string.js.map +1 -1
- package/dist/collection/utils/sanitize-regex-string.js.map +1 -1
- package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
- package/dist/collection/utils/test/index.spec.js.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +2 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.js +1 -116
- package/dist/components/q2-action-group.js.map +1 -1
- package/dist/components/q2-action-group2.js +151 -0
- package/dist/components/q2-action-group2.js.map +1 -0
- package/dist/components/q2-action-sheet.js +2 -1362
- package/dist/components/q2-action-sheet.js.map +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-badge2.js +54 -16
- package/dist/components/q2-badge2.js.map +1 -1
- package/dist/components/q2-btn2.js +1 -1
- package/dist/components/q2-btn2.js.map +1 -1
- package/dist/components/q2-calendar.js +1 -1
- package/dist/components/q2-calendar.js.map +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-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox-group.js +1 -1
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-checkbox2.js +20 -20
- package/dist/components/q2-checkbox2.js.map +1 -1
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-file-picker.js +1 -1
- package/dist/components/q2-file-picker.js.map +1 -1
- package/dist/components/q2-form.d.ts +11 -0
- package/dist/components/q2-form.js +39 -0
- package/dist/components/q2-form.js.map +1 -0
- package/dist/components/q2-formatted-text.js +1 -1
- package/dist/components/q2-input2.js +5 -4
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item2.js +1 -1
- package/dist/components/q2-legend2.js +2 -2
- package/dist/components/q2-legend2.js.map +1 -1
- package/dist/components/q2-list2.js +1 -1
- package/dist/components/q2-loc.js +22 -33
- package/dist/components/q2-loc.js.map +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-modal.d.ts +11 -0
- package/dist/components/q2-modal.js +231 -0
- package/dist/components/q2-modal.js.map +1 -0
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-option2.js +23 -25
- package/dist/components/q2-option2.js.map +1 -1
- package/dist/components/q2-pagination.js +3 -3
- package/dist/components/q2-pill.js +1 -1
- package/dist/components/q2-popover2.js +1 -1
- package/dist/components/q2-radio-group.js +1 -1
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +2 -2
- package/dist/components/q2-resize-observer2.js.map +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select2.js +9 -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 +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +50 -8
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/q2-textarea.js +2 -2
- 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/sanitize-html-string.js +1364 -0
- package/dist/components/sanitize-html-string.js.map +1 -0
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/{index-504f1a9e.js → index-f2a66217.js} +3 -2
- package/dist/esm/index-f2a66217.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +45 -14
- package/dist/esm/q2-action-group.entry.js.map +1 -1
- package/dist/esm/q2-action-sheet.entry.js +3 -1363
- 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 +59 -22
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- 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-bar.entry.js +2 -2
- package/dist/esm/q2-chart-donut.entry.js +2 -2
- 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 +21 -21
- package/dist/esm/q2-checkbox.entry.js.map +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +1 -1
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +2 -2
- package/dist/esm/q2-file-picker.entry.js.map +1 -1
- package/dist/esm/q2-form.entry.js +19 -0
- package/dist/esm/q2-form.entry.js.map +1 -0
- package/dist/esm/q2-formatted-text.entry.js +1 -1
- package/dist/esm/q2-item_3.entry.js +3 -3
- package/dist/esm/q2-legend.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js.map +1 -1
- package/dist/esm/q2-loc.entry.js +21 -27
- package/dist/esm/q2-loc.entry.js.map +1 -1
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-modal.entry.js +168 -0
- package/dist/esm/q2-modal.entry.js.map +1 -0
- 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_2.entry.js +2 -2
- package/dist/esm/q2-option.entry.js +22 -24
- package/dist/esm/q2-option.entry.js.map +1 -1
- package/dist/esm/q2-pagination.entry.js +4 -4
- package/dist/esm/q2-pill.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/q2-resize-observer.entry.js +2 -2
- package/dist/esm/q2-resize-observer.entry.js.map +1 -1
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +10 -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 +2 -2
- package/dist/esm/q2-tag.entry.js +51 -9
- 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 +3 -3
- 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/sanitize-html-string-735c19f5.js +1364 -0
- package/dist/esm/sanitize-html-string-735c19f5.js.map +1 -0
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/jest.setup.js +22 -0
- package/dist/jest.setup.js.map +1 -0
- package/dist/q2-tecton-elements/{index-504f1a9e.js → index-f2a66217.js} +9 -8
- package/dist/q2-tecton-elements/index-f2a66217.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +49 -17
- package/dist/q2-tecton-elements/q2-action-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +121 -1331
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +199 -164
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-calendar.entry.js +180 -180
- package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +92 -88
- package/dist/q2-tecton-elements/q2-checkbox.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-detail.entry.js +39 -39
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-form.entry.js +25 -0
- package/dist/q2-tecton-elements/q2-form.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-item_3.entry.js +22 -22
- package/dist/q2-tecton-elements/q2-legend.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-legend.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-loc.entry.js +23 -32
- package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-message.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-modal.entry.js +226 -0
- package/dist/q2-tecton-elements/q2-modal.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-option.entry.js +38 -38
- package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +38 -38
- package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +28 -28
- package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +5 -2
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
- package/dist/q2-tecton-elements/q2-select.entry.js +13 -9
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-stepper.entry.js +22 -22
- package/dist/q2-tecton-elements/q2-tag.entry.js +84 -45
- package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -1
- 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/q2-tecton-elements/q2-textarea.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-tooltip.entry.js.map +1 -1
- package/dist/q2-tecton-elements/sanitize-html-string-735c19f5.js +1214 -0
- package/dist/q2-tecton-elements/sanitize-html-string-735c19f5.js.map +1 -0
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
- package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
- package/dist/types/components/q2-action-group/q2-action-group.d.ts +5 -2
- package/dist/types/components/q2-badge/q2-badge.d.ts +17 -3
- package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +3 -3
- package/dist/types/components/q2-form/q2-form.d.ts +6 -0
- package/dist/types/components/q2-loc/q2-loc.d.ts +5 -5
- package/dist/types/components/q2-modal/q2-modal.d.ts +80 -0
- package/dist/types/components/q2-option/q2-option.d.ts +4 -4
- package/dist/types/components/q2-select/q2-select.d.ts +1 -0
- package/dist/types/components/q2-tag/q2-tag.d.ts +19 -0
- package/dist/types/components.d.ts +182 -6
- package/dist/types/util.d.ts +1 -8
- package/dist/types/utils/helpers.d.ts +1 -13
- package/dist/types/utils/index.d.ts +3 -2
- package/package.json +3 -3
- package/dist/cjs/index-76f63767.js.map +0 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +0 -166
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +0 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +0 -1
- package/dist/esm/index-504f1a9e.js.map +0 -1
- package/dist/q2-tecton-elements/index-504f1a9e.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-tag.js","sourceRoot":"","sources":["../../../src/components/q2-tag/q2-tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,IAAI,EACJ,CAAC,EAED,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EAEP,KAAK,EACL,QAAQ,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG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O,CACzD,CACT;gBAEA,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CACrB,mEACI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,cAAc,EAAE,IAAI,CAAC,WAAW,EAChC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAChC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAChC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAChC,KAAK,EAAE,IAAI,CAAC,gBAAgB;oBAE5B,uEACI,EAAE,EAAC,aAAa,EAChB,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,EACjC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,GAAG,CAAC,iCAAiC,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;wBAGrE,8DAAQ,CACK,CACR,CAChB,CACa,CACf,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n State,\n Prop,\n h,\n ComponentInterface,\n Host,\n Listen,\n Method,\n Element,\n EventEmitter,\n Event,\n Fragment,\n} from '@stencil/core';\nimport { isEventFromElement, loc, overrideFocus, waitForNextPaint } from 'src/utils';\nimport { shouldShowActionSheet, showActionSheetList } from 'src/utils/action-sheet';\n\n@Component({ tag: 'q2-tag', shadow: true, styleUrl: 'q2-tag.scss' })\nexport class Q2Tag implements ComponentInterface {\n // #region Own Properties\n\n dropdownBtn: HTMLButtonElement;\n mutationObserver: MutationObserver;\n optionList: HTMLQ2OptionListElement;\n popoverElement: HTMLQ2PopoverElement;\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 optionCount: number;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Instructs the component to use the action sheet workflow for displaying its options.\n *\n * For more information, see [Action Sheets](https://tecton.q2developer.com/guides/action-sheets/).\n */\n @Prop()\n hoist: boolean = !!window.Tecton?.useActionSheets;\n\n /**\n * The text that populates the label.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * Determine whether the popover is open or closed.\n *\n * @readonly\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n /** Determines the label that is applied to the option list for accessibility purposes. */\n @Prop()\n optionListLabel: string = 'options';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true })\n popoverAlignment: 'left' | 'right' = 'right';\n\n /**\n * Force the direction of the popover dropdown when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop()\n popoverDirection: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n popoverMaxHeight: number;\n\n /** @deprecated */\n @Prop()\n popoverMinHeight: number = 150;\n\n /** The color of the element. */\n @Prop({ reflect: true })\n theme: 'primary' | 'secondary' | 'tertiary';\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when a provided option is clicked.\n *\n * Requires at least one option to be provided.\n */\n @Event()\n click: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n const observer = new MutationObserver(this.determineOptionCount);\n observer.observe(this.hostElement, { childList: true, attributes: true });\n this.mutationObserver = observer;\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n if (!this.optionCount) return;\n this.dropdownBtn.focus();\n }\n\n @Listen('popoverStateChanged')\n popoverStateHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n if (open) return;\n this.optionList.setActiveElement(null);\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async closePopover() {\n if (!this.optionCount || !this.open) return;\n this._togglePopover();\n }\n\n @Method()\n async openPopover() {\n if (!this.optionCount || this.open) return;\n this._togglePopover();\n }\n\n @Method()\n async selectOption(value) {\n if (!this.optionCount) return;\n await this.openPopover();\n await waitForNextPaint();\n const allOptions = await this.optionList.getOptions();\n const desiredOption = allOptions.find(option => option.value === value);\n desiredOption?.click();\n }\n\n // #endregion\n // #region Local Methods\n\n _togglePopover() {\n const { dropdownBtn } = this;\n dropdownBtn?.click();\n dropdownBtn?.focus();\n dropdownBtn.dispatchEvent(new FocusEvent('focus'));\n }\n\n determineOptionCount = () => {\n const numberOfOptions = this.hostElement.querySelectorAll('q2-option').length;\n this.optionCount = numberOfOptions;\n };\n\n handleButtonFocusout = async (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as HTMLElement;\n if (this.popoverElement?.contains(relatedTarget)) return;\n if (this.hostElement.contains(relatedTarget)) return;\n this.open = false;\n };\n\n handleChange = event => {\n event.stopPropagation();\n if (!this.optionCount) return;\n const { value } = event.detail;\n\n this.click.emit({ value });\n };\n\n handleClick = async (event: MouseEvent) => {\n event.stopPropagation();\n this.popoverElement.controlElement = this.dropdownBtn;\n if (shouldShowActionSheet(this)) {\n const { value } = await showActionSheetList(this, event);\n this.dropdownBtn.focus();\n this.click.emit({ value });\n } else {\n await this.popoverElement.toggle();\n }\n };\n\n handleKeydown = async (event: KeyboardEvent) => {\n const isTabMetaOrCtrl = event.metaKey || event.ctrlKey || event.key === 'Tab';\n if (isTabMetaOrCtrl) return;\n\n event.preventDefault();\n this.popoverElement.controlElement = this.dropdownBtn;\n if (shouldShowActionSheet(this, event)) {\n const { value } = await showActionSheetList(this, event);\n this.dropdownBtn.focus();\n this.click.emit({ value });\n } else {\n this.optionList.handleExternalKeydown(event);\n }\n };\n\n handleWrapperClick = () => {\n this.dropdownBtn.focus();\n this.dropdownBtn.click();\n };\n\n onClickElsewhere = (event: CustomEvent) => {\n const target = event.target as HTMLClickElsewhereElement;\n if (target.localName === 'click-elsewhere') {\n event.stopPropagation();\n const { popoverElement } = this;\n if (!popoverElement) return;\n popoverElement.open = false;\n }\n };\n\n // #endregion\n // #region Render Methods\n\n renderHiddenElement() {\n return (\n <div\n id=\"option-description\"\n class=\"sr\"\n aria-hidden=\"true\"\n >\n {loc('tecton.element.optionList.optionCount', [this.optionCount])}\n </div>\n );\n }\n\n render() {\n const { optionCount, open } = this;\n const wrapperClassNames = ['tag'];\n if (optionCount) wrapperClassNames.push('has-options');\n\n return (\n <Host role={this.optionCount > 0 ? 'list' : undefined}>\n <click-elsewhere onChange={this.onClickElsewhere}>\n {this.optionCount ? (\n <Fragment>\n <div\n class=\"btn-wrapper\"\n onClick={this.handleWrapperClick}\n >\n <button\n class=\"tag-wrapper\"\n ref={el => (this.dropdownBtn = el)}\n test-id=\"btn-control\"\n type=\"button\"\n role=\"combobox\"\n onClick={this.handleClick}\n onKeyDown={this.handleKeydown}\n onFocusout={this.handleButtonFocusout}\n aria-controls=\"option-list\"\n aria-expanded={open ? 'true' : 'false'}\n aria-describedby=\"option-description\"\n >\n <div class={wrapperClassNames.join(' ')}>{this.label}</div>\n <q2-icon type=\"options\"></q2-icon>\n </button>\n </div>\n {this.renderHiddenElement()}\n </Fragment>\n ) : (\n <div\n class=\"tag-wrapper\"\n onClick={e => e.stopPropagation()}\n >\n <div class={wrapperClassNames.join(' ')}>{this.label}</div>\n </div>\n )}\n\n {this.optionCount > 0 && (\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.dropdownBtn}\n open={this.open}\n maxHeight={this.popoverMaxHeight}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n >\n <q2-option-list\n id=\"option-list\"\n ref={el => (this.optionList = el)}\n onChange={this.handleChange}\n type=\"menu\"\n align=\"right\"\n label={loc('tecton.element.optionList.label', [this.optionListLabel])}\n no-select\n >\n <slot />\n </q2-option-list>\n </q2-popover>\n )}\n </click-elsewhere>\n </Host>\n );\n }\n\n // #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"file":"q2-tag.js","sourceRoot":"","sources":["../../../../src/components/q2-tag/q2-tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,IAAI,EACJ,CAAC,EAED,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EAEP,KAAK,EACL,QAAQ,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGpF,MAAM,OAAO,KAAK;;;QA6Kd,yBAAoB,GAAG,GAAG,EAAE;YACxB,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;YAC9E,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC;QACvC,CAAC,CAAC;QAEF,0BAAqB,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,CAAC,iBAAiB,IAAI,MAAM,CAAC;gBAAE,OAAO;YAC3C,MAAM,IAAI,GAAoB,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC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CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,EACjC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,GAAG,CAAC,iCAAiC,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;wBAGrE,8DAAQ,CACK,CACR,CAChB,CACa,CACf,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n State,\n Prop,\n h,\n ComponentInterface,\n Host,\n Listen,\n Method,\n Element,\n EventEmitter,\n Event,\n Fragment,\n} from '@stencil/core';\nimport { isEventFromElement, loc, overrideFocus, waitForNextPaint } from 'src/utils';\nimport { shouldShowActionSheet, showActionSheetList } from 'src/utils/action-sheet';\n\n@Component({ tag: 'q2-tag', shadow: true, styleUrl: 'q2-tag.scss' })\nexport class Q2Tag implements ComponentInterface {\n // #region Own Properties\n\n dropdownBtn: HTMLButtonElement;\n mutationObserver: MutationObserver;\n optionList: HTMLQ2OptionListElement;\n popoverElement: HTMLQ2PopoverElement;\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 optionCount: number;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Instructs the component to use the action sheet workflow for displaying its options.\n *\n * For more information, see [Action Sheets](https://tecton.q2developer.com/guides/action-sheets/).\n */\n @Prop()\n hoist: boolean = !!window.Tecton?.useActionSheets;\n\n /**\n * The text that populates the label.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * Determine whether the popover is open or closed.\n *\n * @readonly\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n /** Determines the label that is applied to the option list for accessibility purposes. */\n @Prop()\n optionListLabel: string = 'options';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true })\n popoverAlignment: 'left' | 'right' = 'right';\n\n /**\n * Force the direction of the popover dropdown when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop()\n popoverDirection: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n popoverMaxHeight: number;\n\n /** @deprecated */\n @Prop()\n popoverMinHeight: number;\n\n /** The color of the element. */\n @Prop({ reflect: true })\n theme: 'primary' | 'secondary' | 'tertiary';\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when a provided option is clicked.\n *\n * Requires at least one option to be provided.\n */\n @Event()\n click: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n this.initMutationObserver();\n this.determineOptionCount();\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.filterSlottedElements();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n if (!this.optionCount) return;\n this.dropdownBtn.focus();\n }\n\n @Listen('popoverStateChanged')\n popoverStateHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n if (open) return;\n this.optionList.setActiveElement(null);\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the tag to close the popover when options are provided and the popover is open.\n * @testonly\n */\n @Method()\n async closePopover() {\n if (!this.optionCount || !this.open) return;\n this._togglePopover();\n }\n\n /**\n * Emulates clicking the tag to open the popover when options are provided and the popover is closed.\n * @testonly\n */\n @Method()\n async openPopover() {\n if (!this.optionCount || this.open) return;\n this._togglePopover();\n }\n\n /**\n * Emulates selecting an option matching the passed value.\n *\n * If the popover is closed, this will open it before selecting the option.\n *\n * If there are not options, or the passed value does not match any option's value, this method does nothing.\n * @testonly\n */\n @Method()\n async selectOption(value) {\n if (!this.optionCount) return;\n await this.openPopover();\n await waitForNextPaint();\n const allOptions = await this.optionList.getOptions();\n const desiredOption = allOptions.find(option => option.value === value);\n desiredOption?.click();\n }\n\n // #endregion\n // #region Local Methods\n\n _togglePopover() {\n const { dropdownBtn } = this;\n dropdownBtn?.click();\n dropdownBtn?.focus();\n dropdownBtn.dispatchEvent(new FocusEvent('focus'));\n }\n\n determineOptionCount = () => {\n const numberOfOptions = this.hostElement.querySelectorAll('q2-option').length;\n this.optionCount = numberOfOptions;\n };\n\n filterSlottedElements = () => {\n if (!('HTMLSlotElement' in window)) return;\n const slot: HTMLSlotElement = this.hostElement.shadowRoot.querySelector('slot[name=\"decorator\"]');\n const assignedElements = Array.from(slot?.assignedElements() || []);\n if (!assignedElements.length) return;\n\n const approvedElements = ['Q2-ICON', 'Q2-BADGE'];\n assignedElements.forEach((element, index) => {\n if (!approvedElements.includes(element.tagName) || index > 0) {\n element.remove();\n }\n });\n };\n\n handleButtonFocusout = async (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as HTMLElement;\n if (this.popoverElement?.contains(relatedTarget)) return;\n if (this.hostElement.contains(relatedTarget)) return;\n this.open = false;\n };\n\n handleChange = event => {\n event.stopPropagation();\n if (!this.optionCount) return;\n const { value } = event.detail;\n\n this.click.emit({ value });\n };\n\n handleClick = async (event: MouseEvent) => {\n event.stopPropagation();\n this.popoverElement.controlElement = this.dropdownBtn;\n if (shouldShowActionSheet(this)) {\n const { value } = await showActionSheetList(this, event);\n this.dropdownBtn.focus();\n this.click.emit({ value });\n } else {\n await this.popoverElement.toggle();\n }\n };\n\n handleKeydown = async (event: KeyboardEvent) => {\n const isTabMetaOrCtrl = event.metaKey || event.ctrlKey || event.key === 'Tab';\n if (isTabMetaOrCtrl) return;\n\n event.preventDefault();\n this.popoverElement.controlElement = this.dropdownBtn;\n if (shouldShowActionSheet(this, event)) {\n const { value } = await showActionSheetList(this, event);\n this.dropdownBtn.focus();\n this.click.emit({ value });\n } else {\n this.optionList.handleExternalKeydown(event);\n }\n };\n\n handleWrapperClick = () => {\n this.dropdownBtn.focus();\n this.dropdownBtn.click();\n };\n\n initMutationObserver = () => {\n if (!('MutationObserver' in window)) return;\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true, attributes: true });\n this.mutationObserver = observer;\n };\n\n onClickElsewhere = (event: CustomEvent) => {\n const target = event.target as HTMLClickElsewhereElement;\n if (target.localName === 'click-elsewhere') {\n event.stopPropagation();\n const { popoverElement } = this;\n if (!popoverElement) return;\n popoverElement.open = false;\n }\n };\n\n onMutationObserved = () => {\n this.determineOptionCount();\n this.filterSlottedElements();\n };\n\n // #endregion\n // #region Render Methods\n\n renderHiddenElement() {\n return (\n <div\n id=\"option-description\"\n class=\"sr\"\n aria-hidden=\"true\"\n >\n {loc('tecton.element.optionList.optionCount', [this.optionCount])}\n </div>\n );\n }\n\n render() {\n const { open } = this;\n const wrapperClassNames = ['tag'];\n if (this.optionCount) wrapperClassNames.push('has-options');\n const shouldShowOptions = this.optionCount > 0;\n\n return (\n <Host role={shouldShowOptions ? 'list' : undefined}>\n <click-elsewhere onChange={this.onClickElsewhere}>\n {shouldShowOptions ? (\n <Fragment>\n <div\n class=\"btn-wrapper\"\n onClick={this.handleWrapperClick}\n >\n <button\n class=\"tag-wrapper\"\n ref={el => (this.dropdownBtn = el)}\n test-id=\"btn-control\"\n type=\"button\"\n role=\"combobox\"\n onClick={this.handleClick}\n onKeyDown={this.handleKeydown}\n onFocusout={this.handleButtonFocusout}\n aria-controls=\"option-list\"\n aria-expanded={open ? 'true' : 'false'}\n aria-describedby=\"option-description\"\n >\n <div class={wrapperClassNames.join(' ')}>{loc(this.label)}</div>\n <q2-icon type=\"options\"></q2-icon>\n </button>\n </div>\n {this.renderHiddenElement()}\n </Fragment>\n ) : (\n <div\n class=\"tag-wrapper\"\n onClick={e => e.stopPropagation()}\n >\n <div class={wrapperClassNames.join(' ')}>\n <slot name=\"decorator\" />\n {loc(this.label)}\n </div>\n </div>\n )}\n\n {shouldShowOptions && (\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.dropdownBtn}\n open={this.open}\n maxHeight={this.popoverMaxHeight}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n >\n <q2-option-list\n id=\"option-list\"\n ref={el => (this.optionList = el)}\n onChange={this.handleChange}\n type=\"menu\"\n align=\"right\"\n label={loc('tecton.element.optionList.label', [this.optionListLabel])}\n no-select\n >\n <slot />\n </q2-option-list>\n </q2-popover>\n )}\n </click-elsewhere>\n </Host>\n );\n }\n\n // #endregion\n}\n"]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { setup, getFocusedAttribute,
|
|
1
|
+
import { setup, getFocusedAttribute, getFocusedOptionValue, getActiveElementTestId, getListOfStyleCompilationIssues, evaluateA11y, } from "../../../utils/helpers";
|
|
2
2
|
describe('q2-tag', () => {
|
|
3
3
|
let page;
|
|
4
4
|
let tag;
|
|
5
|
-
let optionList;
|
|
6
5
|
let popover;
|
|
7
6
|
let controlBtn;
|
|
8
7
|
let allOptions;
|
|
@@ -13,143 +12,6 @@ describe('q2-tag', () => {
|
|
|
13
12
|
const page = await setup({ html: `<q2-tag></q2-tag>` });
|
|
14
13
|
expect(await getListOfStyleCompilationIssues(page, 'q2-tag')).toHaveLength(0);
|
|
15
14
|
});
|
|
16
|
-
it('does not render button or dropdown by default', async () => {
|
|
17
|
-
page = await setup({
|
|
18
|
-
html: `<q2-tag label="My tag"></q2-tag>`,
|
|
19
|
-
});
|
|
20
|
-
optionList = await page.find('q2-tag >>> q2-option-list');
|
|
21
|
-
controlBtn = await page.find('q2-tag >>> button');
|
|
22
|
-
expect(controlBtn).toBeNull();
|
|
23
|
-
expect(optionList).toBeNull();
|
|
24
|
-
});
|
|
25
|
-
describe('when options are provided', () => {
|
|
26
|
-
beforeEach(async () => {
|
|
27
|
-
page = await setup({
|
|
28
|
-
html: `
|
|
29
|
-
<q2-tag label="My tag">
|
|
30
|
-
<q2-option value="1">Option 1</q2-option>
|
|
31
|
-
<q2-option value="2">Option 2</q2-option>
|
|
32
|
-
<q2-option value="3">Option 3</q2-option>
|
|
33
|
-
</q2-tag>
|
|
34
|
-
`,
|
|
35
|
-
});
|
|
36
|
-
tag = await page.find('q2-tag');
|
|
37
|
-
allOptions = await page.findAll('q2-option');
|
|
38
|
-
optionList = await page.find('q2-tag >>> q2-option-list');
|
|
39
|
-
popover = await page.find('q2-tag >>> q2-popover');
|
|
40
|
-
optionContainer = await page.find('q2-tag >>> q2-option-list >>> .options');
|
|
41
|
-
controlBtn = await page.find('q2-tag >>> button');
|
|
42
|
-
clickSpy = await tag.spyOnEvent('click');
|
|
43
|
-
changeSpy = await tag.spyOnEvent('change');
|
|
44
|
-
});
|
|
45
|
-
it('renders the tag-wrapper as a button', async () => {
|
|
46
|
-
const tagWrapper = await page.find('q2-tag >>> .tag-wrapper');
|
|
47
|
-
expect(tagWrapper.nodeName).toEqual('BUTTON');
|
|
48
|
-
});
|
|
49
|
-
it('can select option via keyboard', async () => {
|
|
50
|
-
const tagLabel = await page.find('q2-tag >>> .tag');
|
|
51
|
-
expect(tagLabel.classList.contains('has-options')).toBe(true);
|
|
52
|
-
expect(popover).not.toHaveAttribute('open');
|
|
53
|
-
await controlBtn.press('ArrowDown');
|
|
54
|
-
await page.waitForChanges();
|
|
55
|
-
expect(tag).toHaveAttribute('open');
|
|
56
|
-
expect(popover).toHaveAttribute('open');
|
|
57
|
-
expect(await getFocusedOptionValue(page)).toEqual('1');
|
|
58
|
-
await optionContainer.press('ArrowDown');
|
|
59
|
-
await page.waitForChanges();
|
|
60
|
-
expect(await getFocusedOptionValue(page)).toEqual('2');
|
|
61
|
-
await allOptions[1].press(' ');
|
|
62
|
-
await page.waitForChanges();
|
|
63
|
-
expect(tag).not.toHaveAttribute('open');
|
|
64
|
-
expect(popover).not.toHaveAttribute('open');
|
|
65
|
-
expect(clickSpy).toHaveReceivedEventDetail({
|
|
66
|
-
value: '2',
|
|
67
|
-
});
|
|
68
|
-
expect(changeSpy).not.toHaveReceivedEvent();
|
|
69
|
-
});
|
|
70
|
-
it('can select option via mouse', async () => {
|
|
71
|
-
const tagLabel = await page.find('q2-tag >>> .tag');
|
|
72
|
-
expect(tagLabel.classList.contains('has-options')).toBe(true);
|
|
73
|
-
expect(popover).not.toHaveAttribute('open');
|
|
74
|
-
await controlBtn.click();
|
|
75
|
-
await page.waitForChanges();
|
|
76
|
-
expect(tag).toHaveAttribute('open');
|
|
77
|
-
expect(popover).toHaveAttribute('open');
|
|
78
|
-
expect(await getFocusedTagName(page)).toEqual('Q2-TAG');
|
|
79
|
-
await allOptions[1].click();
|
|
80
|
-
await page.waitForChanges();
|
|
81
|
-
// expect(tag).not.toHaveAttribute('open');
|
|
82
|
-
// expect(popover).not.toHaveAttribute('open');
|
|
83
|
-
expect(clickSpy).toHaveReceivedEventDetail({
|
|
84
|
-
value: '2',
|
|
85
|
-
});
|
|
86
|
-
expect(changeSpy).not.toHaveReceivedEvent();
|
|
87
|
-
});
|
|
88
|
-
describe('when keyboard is pressed', () => {
|
|
89
|
-
it('opens list and focuses first option on ArrowDown', async () => {
|
|
90
|
-
await controlBtn.press('ArrowDown');
|
|
91
|
-
await page.waitForChanges();
|
|
92
|
-
expect(tag).toHaveAttribute('open');
|
|
93
|
-
expect(popover).toHaveAttribute('open');
|
|
94
|
-
expect(await getFocusedOptionValue(page)).toEqual('1');
|
|
95
|
-
});
|
|
96
|
-
it('opens list and focuses last option on ArrowUp', async () => {
|
|
97
|
-
await controlBtn.press('ArrowUp');
|
|
98
|
-
await page.waitForChanges();
|
|
99
|
-
expect(tag).toHaveAttribute('open');
|
|
100
|
-
expect(popover).toHaveAttribute('open');
|
|
101
|
-
expect(await getFocusedOptionValue(page)).toEqual('3');
|
|
102
|
-
});
|
|
103
|
-
it('opens list and focuses first option on Enter', async () => {
|
|
104
|
-
await controlBtn.press('Enter');
|
|
105
|
-
await page.waitForChanges();
|
|
106
|
-
expect(tag).toHaveAttribute('open');
|
|
107
|
-
expect(popover).toHaveAttribute('open');
|
|
108
|
-
expect(await getFocusedOptionValue(page)).toEqual('1');
|
|
109
|
-
});
|
|
110
|
-
it('opens list and focuses first option on Space', async () => {
|
|
111
|
-
await controlBtn.press(' ');
|
|
112
|
-
await page.waitForChanges();
|
|
113
|
-
expect(tag).toHaveAttribute('open');
|
|
114
|
-
expect(popover).toHaveAttribute('open');
|
|
115
|
-
expect(await getFocusedOptionValue(page)).toEqual('1');
|
|
116
|
-
});
|
|
117
|
-
it('opens list and focuses last option on Home', async () => {
|
|
118
|
-
await controlBtn.press('Home');
|
|
119
|
-
await page.waitForChanges();
|
|
120
|
-
expect(tag).toHaveAttribute('open');
|
|
121
|
-
expect(popover).toHaveAttribute('open');
|
|
122
|
-
expect(await getFocusedAttribute(page, 'value')).toEqual('1');
|
|
123
|
-
});
|
|
124
|
-
it('opens list and focuses last option on End', async () => {
|
|
125
|
-
await controlBtn.press('End');
|
|
126
|
-
await page.waitForChanges();
|
|
127
|
-
expect(tag).toHaveAttribute('open');
|
|
128
|
-
expect(popover).toHaveAttribute('open');
|
|
129
|
-
expect(await getFocusedAttribute(page, 'value')).toEqual('3');
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
describe('when options are NOT provided', () => {
|
|
134
|
-
beforeEach(async () => {
|
|
135
|
-
page = await setup({
|
|
136
|
-
html: `
|
|
137
|
-
<q2-tag label="My tag">
|
|
138
|
-
</q2-tag>
|
|
139
|
-
`,
|
|
140
|
-
});
|
|
141
|
-
tag = await page.find('q2-tag');
|
|
142
|
-
});
|
|
143
|
-
it('renders the tag-wrapper as a div', async () => {
|
|
144
|
-
const tagWrapper = await page.find('q2-tag >>> .tag-wrapper');
|
|
145
|
-
expect(tagWrapper.nodeName).toEqual('DIV');
|
|
146
|
-
});
|
|
147
|
-
it('zero is not rendered inside the click-elsewhere element (TCT-2433)', async () => {
|
|
148
|
-
const clickElsewhere = await page.find('q2-tag >>> click-elsewhere');
|
|
149
|
-
expect(await tag.getProperty('label')).toBe('My tag');
|
|
150
|
-
expect(clickElsewhere.textContent.slice(-1)).not.toBe('0');
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
15
|
describe('Props', () => {
|
|
154
16
|
describe('hoist', () => {
|
|
155
17
|
const runHoistSetup = async (action, hoistEnabled = false, defineShowActionSheet = false, isCancelled = false) => {
|
|
@@ -281,189 +143,32 @@ describe('q2-tag', () => {
|
|
|
281
143
|
});
|
|
282
144
|
});
|
|
283
145
|
});
|
|
284
|
-
describe('
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
html: `
|
|
289
|
-
<q2-tag label="My tag">
|
|
290
|
-
<q2-option value="1">Option 1</q2-option>
|
|
291
|
-
<q2-option value="2">Option 2</q2-option>
|
|
292
|
-
<q2-option value="3">Option 3</q2-option>
|
|
293
|
-
</q2-tag>
|
|
294
|
-
`,
|
|
295
|
-
});
|
|
296
|
-
tag = await page.find('q2-tag');
|
|
297
|
-
popover = await page.find('q2-tag >>> q2-popover');
|
|
298
|
-
expect(await tag.getProperty('popoverMinHeight')).toEqual(150);
|
|
299
|
-
expect(await popover.getProperty('minHeight')).toEqual(150);
|
|
300
|
-
});
|
|
301
|
-
});
|
|
302
|
-
describe('when provided', () => {
|
|
303
|
-
it('passes the provided value to the q2-popover', async () => {
|
|
304
|
-
page = await setup({
|
|
305
|
-
html: `
|
|
306
|
-
<q2-tag label="My tag" popover-min-height="300">
|
|
307
|
-
<q2-option value="1">Option 1</q2-option>
|
|
308
|
-
<q2-option value="2">Option 2</q2-option>
|
|
309
|
-
<q2-option value="3">Option 3</q2-option>
|
|
310
|
-
</q2-tag>
|
|
311
|
-
`,
|
|
312
|
-
});
|
|
313
|
-
popover = await page.find('q2-tag >>> q2-popover');
|
|
314
|
-
expect(await popover.getProperty('minHeight')).toEqual(300);
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
describe('popoverMaxHeight', () => {
|
|
319
|
-
it('when provided, passes the value to q2-popover', async () => {
|
|
320
|
-
page = await setup({
|
|
321
|
-
html: `
|
|
322
|
-
<q2-tag label="My tag" popover-max-height="600">
|
|
323
|
-
<q2-option value="1">Option 1</q2-option>
|
|
324
|
-
<q2-option value="2">Option 2</q2-option>
|
|
325
|
-
<q2-option value="3">Option 3</q2-option>
|
|
326
|
-
</q2-tag>
|
|
327
|
-
`,
|
|
328
|
-
});
|
|
329
|
-
popover = await page.find('q2-tag >>> q2-popover');
|
|
330
|
-
expect(await popover.getProperty('maxHeight')).toEqual(600);
|
|
331
|
-
});
|
|
332
|
-
});
|
|
333
|
-
describe('popoverDirection', () => {
|
|
334
|
-
describe('when not provided', () => {
|
|
335
|
-
it('does not default and does not pass a value to q2-popover', async () => {
|
|
336
|
-
page = await setup({
|
|
337
|
-
html: `
|
|
338
|
-
<q2-tag label="My tag">
|
|
339
|
-
<q2-option value="1">Option 1</q2-option>
|
|
340
|
-
<q2-option value="2">Option 2</q2-option>
|
|
341
|
-
<q2-option value="3">Option 3</q2-option>
|
|
342
|
-
</q2-tag>
|
|
343
|
-
`,
|
|
344
|
-
});
|
|
345
|
-
tag = await page.find('q2-tag');
|
|
346
|
-
popover = await page.find('q2-tag >>> q2-popover');
|
|
347
|
-
expect(await tag.getProperty('popoverDirection')).toBeUndefined();
|
|
348
|
-
expect(await popover.getProperty('direction')).toBeUndefined();
|
|
349
|
-
});
|
|
350
|
-
});
|
|
351
|
-
describe('when provided', () => {
|
|
352
|
-
it('passes the provided value to the q2-popover', async () => {
|
|
353
|
-
page = await setup({
|
|
354
|
-
html: `
|
|
355
|
-
<q2-tag label="My tag" popover-direction="up">
|
|
356
|
-
<q2-option value="1">Option 1</q2-option>
|
|
357
|
-
<q2-option value="2">Option 2</q2-option>
|
|
358
|
-
<q2-option value="3">Option 3</q2-option>
|
|
359
|
-
</q2-tag>
|
|
360
|
-
`,
|
|
361
|
-
});
|
|
362
|
-
popover = await page.find('q2-tag >>> q2-popover');
|
|
363
|
-
expect(await popover.getProperty('direction')).toEqual('up');
|
|
364
|
-
});
|
|
365
|
-
});
|
|
366
|
-
});
|
|
367
|
-
describe('popoverAlignment', () => {
|
|
368
|
-
it('can be initally set to left, then assigned to right, then back to left', async () => {
|
|
146
|
+
describe('focus', () => {
|
|
147
|
+
let page;
|
|
148
|
+
let tag;
|
|
149
|
+
beforeEach(async () => {
|
|
369
150
|
page = await setup({
|
|
370
151
|
html: `
|
|
371
|
-
<q2-tag popover-alignment="left">
|
|
372
|
-
<q2-option value="1">Option 1</q2-option>
|
|
373
|
-
<q2-option value="2">Option 2</q2-option>
|
|
374
|
-
<q2-option value="3">Option 3</q2-option>
|
|
375
|
-
</q2-tag>
|
|
376
|
-
`,
|
|
377
|
-
});
|
|
378
|
-
await page.waitForChanges();
|
|
379
|
-
tag = await page.find('q2-tag');
|
|
380
|
-
expect(await tag.getProperty('popoverAlignment')).toEqual('left');
|
|
381
|
-
tag.setProperty('popoverAlignment', 'right');
|
|
382
|
-
await page.waitForChanges();
|
|
383
|
-
expect(await tag.getProperty('popoverAlignment')).toEqual('right');
|
|
384
|
-
tag.setProperty('popoverAlignment', 'left');
|
|
385
|
-
await page.waitForChanges();
|
|
386
|
-
expect(await tag.getProperty('popoverAlignment')).toEqual('left');
|
|
387
|
-
});
|
|
388
|
-
it('will default to right via the prop inital value in q2-tag', async () => {
|
|
389
|
-
page = await setup({
|
|
390
|
-
html: `
|
|
391
|
-
<q2-tag>
|
|
392
|
-
<q2-option value="1">Option 1</q2-option>
|
|
393
|
-
<q2-option value="2">Option 2</q2-option>
|
|
394
|
-
<q2-option value="3">Option 3</q2-option>
|
|
395
|
-
</q2-tag>
|
|
396
|
-
`,
|
|
397
|
-
});
|
|
398
|
-
await page.waitForChanges();
|
|
399
|
-
tag = await page.find('q2-tag');
|
|
400
|
-
expect(await tag.getProperty('popoverAlignment')).toEqual('right');
|
|
401
|
-
});
|
|
402
|
-
});
|
|
403
|
-
});
|
|
404
|
-
describe('Methods', () => {
|
|
405
|
-
beforeEach(async () => {
|
|
406
|
-
page = await setup({
|
|
407
|
-
html: `
|
|
408
152
|
<q2-tag label="My tag">
|
|
409
153
|
<q2-option value="1">Option 1</q2-option>
|
|
410
154
|
<q2-option value="2">Option 2</q2-option>
|
|
411
155
|
<q2-option value="3">Option 3</q2-option>
|
|
412
156
|
</q2-tag>
|
|
413
157
|
`,
|
|
158
|
+
});
|
|
159
|
+
tag = await page.find('q2-tag');
|
|
414
160
|
});
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
await page.waitForChanges();
|
|
420
|
-
expect(tag).toHaveAttribute('open');
|
|
421
|
-
});
|
|
422
|
-
it('closePopover() closes the popover', async () => {
|
|
423
|
-
expect(tag).not.toHaveAttribute('open');
|
|
424
|
-
await tag.callMethod('openPopover');
|
|
425
|
-
await page.waitForChanges();
|
|
426
|
-
expect(tag).toHaveAttribute('open');
|
|
427
|
-
await tag.callMethod('closePopover');
|
|
428
|
-
await page.waitForChanges();
|
|
429
|
-
expect(tag).not.toHaveAttribute('open');
|
|
430
|
-
});
|
|
431
|
-
it('selectOption() selects the option matching the provided value and closes the popover ', async () => {
|
|
432
|
-
const clickSpy = await tag.spyOnEvent('click');
|
|
433
|
-
await tag.callMethod('selectOption', '2');
|
|
434
|
-
await page.waitForChanges();
|
|
435
|
-
expect(tag).not.toHaveAttribute('open');
|
|
436
|
-
expect(clickSpy).toHaveReceivedEventDetail({
|
|
437
|
-
value: '2',
|
|
438
|
-
});
|
|
439
|
-
});
|
|
440
|
-
});
|
|
441
|
-
describe('focus', () => {
|
|
442
|
-
let page;
|
|
443
|
-
let tag;
|
|
444
|
-
beforeEach(async () => {
|
|
445
|
-
page = await setup({
|
|
446
|
-
html: `
|
|
447
|
-
<q2-tag label="My tag">
|
|
448
|
-
<q2-option value="1">Option 1</q2-option>
|
|
449
|
-
<q2-option value="2">Option 2</q2-option>
|
|
450
|
-
<q2-option value="3">Option 3</q2-option>
|
|
451
|
-
</q2-tag>
|
|
452
|
-
`,
|
|
161
|
+
it('focuses the <button> element when focus event is dispatched', async function () {
|
|
162
|
+
tag.triggerEvent('focus');
|
|
163
|
+
await page.waitForChanges();
|
|
164
|
+
expect(await getFocusedAttribute(page, 'test-id')).toEqual('btn-control');
|
|
453
165
|
});
|
|
454
|
-
tag = await page.find('q2-tag');
|
|
455
166
|
});
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
});
|
|
462
|
-
describe('Regressions', () => {
|
|
463
|
-
describe('TCT-2161', () => {
|
|
464
|
-
it('leaves the element when Tab is pressed', async function () {
|
|
465
|
-
page = await setup({
|
|
466
|
-
html: `
|
|
167
|
+
describe('Regressions', () => {
|
|
168
|
+
describe('TCT-2161', () => {
|
|
169
|
+
it('leaves the element when Tab is pressed', async function () {
|
|
170
|
+
page = await setup({
|
|
171
|
+
html: `
|
|
467
172
|
<q2-tag label="My tag">
|
|
468
173
|
<q2-option value="1">Option 1</q2-option>
|
|
469
174
|
<q2-option value="2">Option 2</q2-option>
|
|
@@ -471,51 +176,136 @@ describe('q2-tag', () => {
|
|
|
471
176
|
</q2-tag>
|
|
472
177
|
<button test-id="btn-next">Test</button>
|
|
473
178
|
`,
|
|
179
|
+
});
|
|
180
|
+
tag = await page.find('q2-tag');
|
|
181
|
+
await tag.focus();
|
|
182
|
+
expect(await getActiveElementTestId(page)).toEqual('btn-control');
|
|
183
|
+
await tag.press('Tab');
|
|
184
|
+
await page.waitForChanges();
|
|
185
|
+
expect(await getActiveElementTestId(page)).toEqual('btn-next');
|
|
474
186
|
});
|
|
475
|
-
tag = await page.find('q2-tag');
|
|
476
|
-
await tag.focus();
|
|
477
|
-
expect(await getActiveElementTestId(page)).toEqual('btn-control');
|
|
478
|
-
await tag.press('Tab');
|
|
479
|
-
await page.waitForChanges();
|
|
480
|
-
expect(await getActiveElementTestId(page)).toEqual('btn-next');
|
|
481
187
|
});
|
|
482
188
|
});
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
189
|
+
describe('Accessibility', () => {
|
|
190
|
+
describe('aXe DevTools', () => {
|
|
191
|
+
it('does not have accessibility violations', async () => {
|
|
192
|
+
const page = await setup({
|
|
193
|
+
html: `<q2-tag label="My tag" theme="primary"></q2-tag>`,
|
|
194
|
+
});
|
|
195
|
+
const hasViolations = await evaluateA11y(page);
|
|
196
|
+
expect(hasViolations).toBe(false);
|
|
489
197
|
});
|
|
490
|
-
const hasViolations = await evaluateA11y(page);
|
|
491
|
-
expect(hasViolations).toBe(false);
|
|
492
198
|
});
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
html: `
|
|
199
|
+
describe('Accessibility Tree', () => {
|
|
200
|
+
it("option-list should have a role of 'menu' and the options a role of 'menuoption'", async () => {
|
|
201
|
+
page = await setup({
|
|
202
|
+
html: `
|
|
498
203
|
<q2-tag label="My tag" open>
|
|
499
204
|
<q2-option value="1">Option 1</q2-option>
|
|
500
205
|
<q2-option value="2">Option 2</q2-option>
|
|
501
206
|
<q2-option value="3">Option 3</q2-option>
|
|
502
207
|
</q2-tag>
|
|
503
208
|
`,
|
|
209
|
+
});
|
|
210
|
+
await page.waitForChanges();
|
|
211
|
+
const snapshot = await page.accessibility.snapshot();
|
|
212
|
+
const button = snapshot.children[0];
|
|
213
|
+
const optionList = snapshot.children[1].children[0];
|
|
214
|
+
expect(button.role).toEqual('combobox');
|
|
215
|
+
expect(optionList.role).toEqual('menu');
|
|
216
|
+
expect(optionList.children).toHaveLength(3);
|
|
217
|
+
optionList.children.forEach(child => {
|
|
218
|
+
expect(child.role).toEqual('menuitem');
|
|
219
|
+
});
|
|
504
220
|
});
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
221
|
+
});
|
|
222
|
+
describe('Keyboard Controls', () => {
|
|
223
|
+
beforeEach(async () => {
|
|
224
|
+
page = await setup({
|
|
225
|
+
html: `
|
|
226
|
+
<q2-tag label="My tag">
|
|
227
|
+
<q2-option value="1">Option 1</q2-option>
|
|
228
|
+
<q2-option value="2">Option 2</q2-option>
|
|
229
|
+
<q2-option value="3">Option 3</q2-option>
|
|
230
|
+
</q2-tag>
|
|
231
|
+
`,
|
|
232
|
+
});
|
|
233
|
+
tag = await page.find('q2-tag');
|
|
234
|
+
allOptions = await page.findAll('q2-option');
|
|
235
|
+
popover = await page.find('q2-tag >>> q2-popover');
|
|
236
|
+
optionContainer = await page.find('q2-tag >>> q2-option-list >>> .options');
|
|
237
|
+
controlBtn = await page.find('q2-tag >>> button');
|
|
238
|
+
clickSpy = await tag.spyOnEvent('click');
|
|
239
|
+
changeSpy = await tag.spyOnEvent('change');
|
|
240
|
+
});
|
|
241
|
+
it('can select option via keyboard', async () => {
|
|
242
|
+
const tagLabel = await page.find('q2-tag >>> .tag');
|
|
243
|
+
expect(tagLabel.classList.contains('has-options')).toBe(true);
|
|
244
|
+
expect(popover).not.toHaveAttribute('open');
|
|
245
|
+
await controlBtn.press('ArrowDown');
|
|
246
|
+
await page.waitForChanges();
|
|
247
|
+
expect(tag).toHaveAttribute('open');
|
|
248
|
+
expect(popover).toHaveAttribute('open');
|
|
249
|
+
expect(await getFocusedOptionValue(page)).toEqual('1');
|
|
250
|
+
await optionContainer.press('ArrowDown');
|
|
251
|
+
await page.waitForChanges();
|
|
252
|
+
expect(await getFocusedOptionValue(page)).toEqual('2');
|
|
253
|
+
await allOptions[1].press(' ');
|
|
254
|
+
await page.waitForChanges();
|
|
255
|
+
expect(tag).not.toHaveAttribute('open');
|
|
256
|
+
expect(popover).not.toHaveAttribute('open');
|
|
257
|
+
expect(clickSpy).toHaveReceivedEventDetail({
|
|
258
|
+
value: '2',
|
|
259
|
+
});
|
|
260
|
+
expect(changeSpy).not.toHaveReceivedEvent();
|
|
261
|
+
});
|
|
262
|
+
describe('when keyboard is pressed', () => {
|
|
263
|
+
it('opens list and focuses first option on ArrowDown', async () => {
|
|
264
|
+
await controlBtn.press('ArrowDown');
|
|
265
|
+
await page.waitForChanges();
|
|
266
|
+
expect(tag).toHaveAttribute('open');
|
|
267
|
+
expect(popover).toHaveAttribute('open');
|
|
268
|
+
expect(await getFocusedOptionValue(page)).toEqual('1');
|
|
269
|
+
});
|
|
270
|
+
it('opens list and focuses last option on ArrowUp', async () => {
|
|
271
|
+
await controlBtn.press('ArrowUp');
|
|
272
|
+
await page.waitForChanges();
|
|
273
|
+
expect(tag).toHaveAttribute('open');
|
|
274
|
+
expect(popover).toHaveAttribute('open');
|
|
275
|
+
expect(await getFocusedOptionValue(page)).toEqual('3');
|
|
276
|
+
});
|
|
277
|
+
it('opens list and focuses first option on Enter', async () => {
|
|
278
|
+
await controlBtn.press('Enter');
|
|
279
|
+
await page.waitForChanges();
|
|
280
|
+
expect(tag).toHaveAttribute('open');
|
|
281
|
+
expect(popover).toHaveAttribute('open');
|
|
282
|
+
expect(await getFocusedOptionValue(page)).toEqual('1');
|
|
283
|
+
});
|
|
284
|
+
it('opens list and focuses first option on Space', async () => {
|
|
285
|
+
await controlBtn.press(' ');
|
|
286
|
+
await page.waitForChanges();
|
|
287
|
+
expect(tag).toHaveAttribute('open');
|
|
288
|
+
expect(popover).toHaveAttribute('open');
|
|
289
|
+
expect(await getFocusedOptionValue(page)).toEqual('1');
|
|
290
|
+
});
|
|
291
|
+
it('opens list and focuses last option on Home', async () => {
|
|
292
|
+
await controlBtn.press('Home');
|
|
293
|
+
await page.waitForChanges();
|
|
294
|
+
expect(tag).toHaveAttribute('open');
|
|
295
|
+
expect(popover).toHaveAttribute('open');
|
|
296
|
+
expect(await getFocusedAttribute(page, 'value')).toEqual('1');
|
|
297
|
+
});
|
|
298
|
+
it('opens list and focuses last option on End', async () => {
|
|
299
|
+
await controlBtn.press('End');
|
|
300
|
+
await page.waitForChanges();
|
|
301
|
+
expect(tag).toHaveAttribute('open');
|
|
302
|
+
expect(popover).toHaveAttribute('open');
|
|
303
|
+
expect(await getFocusedAttribute(page, 'value')).toEqual('3');
|
|
304
|
+
});
|
|
514
305
|
});
|
|
515
306
|
});
|
|
307
|
+
describe('Other', () => { });
|
|
516
308
|
});
|
|
517
|
-
describe('Keyboard Controls', () => { });
|
|
518
|
-
describe('Other', () => { });
|
|
519
309
|
});
|
|
520
310
|
});
|
|
521
311
|
//# sourceMappingURL=q2-tag-test.e2e.js.map
|