q2-tecton-elements 1.53.0 → 1.53.2
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 +64 -61
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-07285783.js → index-76f63767.js} +1 -21
- package/dist/cjs/index-76f63767.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_7.cjs.entry.js +12 -4
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +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 +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 +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 +10 -12
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +7 -8
- package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-example.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +2 -2
- 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 +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 +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +89 -13
- 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 +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -2
- package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- 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.js +1 -1
- 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.e2e.js.map +1 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
- 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.js.map +1 -1
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-btn/q2-btn.js +4 -0
- 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.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 +2 -2
- 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.js.map +1 -1
- 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.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 +9 -11
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +5 -17
- 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 +12 -7
- 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 +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.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-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 +4 -0
- package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
- 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.js +1 -1
- 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.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.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-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 +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
- 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.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-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 +1 -1
- package/dist/collection/components/q2-option/q2-option.js.map +1 -1
- 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.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-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 +1 -0
- 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 +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.css +18 -10
- package/dist/collection/components/q2-popover/q2-popover.js +64 -60
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -34
- 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 +743 -435
- 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.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 +1 -1
- 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.js +110 -15
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +1 -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 +412 -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.js +1 -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 +6 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +2 -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.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.map +1 -1
- package/dist/collection/utils/index.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/index2.js +1 -20
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.js +1 -1
- package/dist/components/q2-action-sheet.js +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-btn2.js +4 -0
- package/dist/components/q2-btn2.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-currency.js +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown.js +9 -11
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-editable-field.js +7 -8
- package/dist/components/q2-editable-field.js.map +1 -1
- package/dist/components/q2-example.js +1 -1
- package/dist/components/q2-formatted-text.js +1 -1
- package/dist/components/q2-icon2.js +4 -0
- package/dist/components/q2-icon2.js.map +1 -1
- package/dist/components/q2-input2.js +1 -1
- package/dist/components/q2-item2.js +1 -1
- package/dist/components/q2-legend2.js +1 -1
- package/dist/components/q2-list2.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-option2.js +1 -1
- package/dist/components/q2-pagination.js +3 -3
- package/dist/components/q2-pill.js +1 -1
- package/dist/components/q2-popover2.js +63 -60
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select2.js +92 -16
- 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 +1 -1
- package/dist/components/q2-textarea.js +2 -1
- package/dist/components/q2-textarea.js.map +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +64 -61
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-d18e2a20.js → index-504f1a9e.js} +2 -21
- package/dist/esm/index-504f1a9e.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +2 -2
- package/dist/esm/q2-action-sheet.entry.js +2 -2
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_7.entry.js +12 -4
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +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 +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 +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 +10 -12
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +7 -8
- package/dist/esm/q2-editable-field.entry.js.map +1 -1
- package/dist/esm/q2-example.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/esm/q2-option.entry.js +2 -2
- 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 +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 +1 -1
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +90 -14
- 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 +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +3 -2
- package/dist/esm/q2-textarea.entry.js.map +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- 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/click-elsewhere_2.entry.js +175 -163
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -1
- package/dist/q2-tecton-elements/{index-d18e2a20.js → index-504f1a9e.js} +51 -69
- package/dist/q2-tecton-elements/index-504f1a9e.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +34 -34
- package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +25 -17
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-calendar.entry.js +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 +101 -101
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +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 +14 -16
- package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +27 -18
- package/dist/q2-tecton-elements/q2-editable-field.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-item_3.entry.js +19 -19
- package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-loc.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-message.entry.js +21 -21
- 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.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-pagination.entry.js +34 -34
- package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
- package/dist/q2-tecton-elements/q2-select.entry.js +156 -92
- 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 +37 -37
- package/dist/q2-tecton-elements/q2-stepper.entry.js +29 -29
- package/dist/q2-tecton-elements/q2-tag.entry.js +25 -25
- 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 -3
- package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
- package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
- package/dist/types/components/q2-btn/q2-btn.d.ts +1 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +1 -4
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +2 -1
- package/dist/types/components/q2-icon/q2-icon.d.ts +1 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +4 -4
- package/dist/types/components/q2-select/q2-select.d.ts +19 -0
- package/package.json +3 -3
- package/dist/cjs/index-07285783.js.map +0 -1
- package/dist/esm/index-d18e2a20.js.map +0 -1
- package/dist/q2-tecton-elements/index-d18e2a20.js.map +0 -1
|
@@ -100,7 +100,7 @@ export class Q2Detail {
|
|
|
100
100
|
// #endregion
|
|
101
101
|
// #region Render Methods
|
|
102
102
|
render() {
|
|
103
|
-
return (h("div", { key: '
|
|
103
|
+
return (h("div", { key: '811c54a224bbbefce94cbf397a29a4cb1f98ba2b', class: this.detailClasses }, this.hasLabel && (h("div", { key: 'b2c294eb4c1b5cd525351dc67c2dc58ed4b75b70', class: this.labelClasses, "aria-describedby": !!this.description ? 'label-description' : undefined }, !!this.label ? loc(this.label) : this.hasLabelSlotContent ? h("slot", { name: "label" }) : '')), this.hasDescripiton && (h("div", { key: '9d979c672eeefd21882fa676483cd8020e15dc7c', id: "label-description", class: this.descriptionClasses }, !!this.description ? loc(this.description) : this.hasDefaultSlotContent ? h("slot", null) : ''))));
|
|
104
104
|
}
|
|
105
105
|
static get is() { return "q2-detail"; }
|
|
106
106
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-detail.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"q2-detail.js","sourceRoot":"","sources":["../../../../src/components/q2-detail/q2-detail.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOhD,MAAM,OAAO,QAAQ;;yBAWa,MAAM;;;;uBA4BjB,KAAK;;IAExB,aAAa;IACb,qCAAqC;IAErC,iBAAiB;QACb,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC5B,CAAC;IAED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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, Element, Prop, h } from '@stencil/core';\nimport { hasSlotContent, loc } from 'src/utils';\n\n@Component({\n tag: 'q2-detail',\n styleUrl: 'q2-detail.scss',\n shadow: true,\n})\nexport class Q2Detail {\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Defines the alignment of the label and description when stacked, or when only the label or description is present. */\n @Prop({ reflect: true })\n alignment: 'left' | 'right' = 'left';\n\n /**\n * Defines the text content of the description.\n *\n * @localizable\n */\n @Prop({ reflect: true })\n description: string;\n\n /**\n * Defines the text content of the label.\n *\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * Defines the text size of the label and description.\n *\n * If not specified, the detail will display as inline text.\n */\n @Prop({ reflect: true })\n size: null | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n\n /** Determines if the description should appear beneath the label. */\n @Prop({ reflect: true })\n stacked: boolean = false;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.setSlotSizeProps();\n }\n\n // #endregion\n // #region Local Methods\n\n get descriptionClasses() {\n const classes = ['description'];\n if (this.size) {\n classes.push(`description-size-${this.size}`);\n } else {\n classes.push(`description-size-inline`);\n }\n if (!this.stacked) {\n classes.push(`description-alignment-right`);\n }\n\n return classes.join(' ');\n }\n\n get detailClasses() {\n const classes = ['detail'];\n if (this.size) {\n classes.push(`detail-block`);\n } else {\n classes.push(`detail-inline`);\n }\n if (this.stacked || this.onlyHasDescripiton || this.onlyHasLabel) {\n classes.push('detail-stacked', `detail-stacked-alignment-${this.alignment}`);\n } else {\n classes.push('detail-horizontal');\n }\n\n return classes.join(' ');\n }\n\n get hasDefaultSlotContent() {\n const hasInnerHtml = !!this.hostElement.innerHTML.trim();\n const namedSlotCount = this.hostElement.querySelectorAll(':scope > [slot]').length;\n const hostChildNodeCount = this.hostElement.childNodes.length;\n\n return hasInnerHtml && hostChildNodeCount > namedSlotCount;\n }\n\n get hasDescripiton() {\n return !!this.description || this.hasDefaultSlotContent;\n }\n\n get hasLabel() {\n return !!this.label || this.hasLabelSlotContent;\n }\n\n get hasLabelSlotContent() {\n return hasSlotContent(this.hostElement, 'label');\n }\n\n get labelClasses() {\n const classes = ['label'];\n if (this.size) {\n classes.push(`label-size-${this.size}`);\n } else {\n classes.push(`label-size-inline`);\n }\n if (!this.stacked) {\n classes.push(`label-align-left`);\n }\n\n return classes.join(' ');\n }\n\n get onlyHasDescripiton() {\n return this.hasDescripiton && !this.hasLabel;\n }\n\n get onlyHasLabel() {\n return this.hasLabel && !this.hasDescripiton;\n }\n\n setSlotSizeProps() {\n const slotElements = Array.from(\n this.hostElement.querySelectorAll(':scope > *:not([slot]), :scope > [slot=\"label\"] > *')\n ) as { slotSize?: string; localName?: string }[];\n slotElements.forEach(element => {\n let size = this.size;\n if (element.localName === 'q2-currency') {\n switch (size) {\n case 'xsmall':\n size = 'small';\n break;\n case 'xlarge':\n size = 'large';\n break;\n default:\n break;\n }\n }\n element.slotSize = size;\n });\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <div class={this.detailClasses}>\n {this.hasLabel && (\n <div\n class={this.labelClasses}\n aria-describedby={!!this.description ? 'label-description' : undefined}\n >\n {!!this.label ? loc(this.label) : this.hasLabelSlotContent ? <slot name=\"label\" /> : ''}\n </div>\n )}\n {this.hasDescripiton && (\n <div\n id=\"label-description\"\n class={this.descriptionClasses}\n >\n {!!this.description ? loc(this.description) : this.hasDefaultSlotContent ? <slot /> : ''}\n </div>\n )}\n </div>\n );\n }\n\n // #endregion\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-detail-test.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-detail/test/q2-detail-test.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAA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EAAE,GAAG,EAAE;YAC1B,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;gBACpD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,4CAA4C,EAAE,CAAC,CAAC;gBACjF,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;gBAE/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, setTestStrings, setup } from '@/utils/helpers';\n\ndescribe('q2-detail', () => {\n describe('Props', () => {\n describe('alignment', () => {\n const alignments = ['left', 'right'];\n\n alignments.forEach(alignment => {\n it(`when set to \"${alignment}\" and stacked applies class \"detail-stacked-alignment-${alignment}\" to the detail container`, async () => {\n const page = await setup({\n html: `<q2-detail alignment=\"${alignment}\" label=\"Test Label\" description=\"Test Descripiton\" stacked />`,\n });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass(`detail-stacked-alignment-${alignment}`);\n });\n });\n });\n describe('description', () => {\n it('when set renders description', async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Label\" />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toEqualText('Test Label');\n });\n it('when not set does not render description', async () => {\n const page = await setup({ html: `<q2-detail />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toBeFalsy();\n });\n it('when not set does not render description', async () => {\n const page = await setup({ html: `<q2-detail />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toBeFalsy();\n });\n it('is localizable', async () => {\n const page = await setup({ html: `<q2-detail />` });\n await setTestStrings(page, {\n 'button.description': 'q2-btn description',\n });\n const detail = await page.find('q2-detail');\n detail.setProperty('description', 'button.description');\n await page.waitForChanges();\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toEqualText('q2-btn description');\n });\n it(\"has ID for label's aria-describedby attribute\", async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Label\" />` });\n const description = await page.find('q2-detail >>> .description');\n const descriptionId = description.getAttribute('id');\n\n expect(descriptionId).toEqualText('label-description');\n });\n });\n describe('label', () => {\n it('when set renders label', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toEqualText('Test Label');\n });\n it('when not set does not render label', async () => {\n const page = await setup({ html: `<q2-detail />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(!!label).toEqual(false);\n });\n it('is localizable', async () => {\n const page = await setup({ html: `<q2-detail />` });\n await setTestStrings(page, {\n 'button.label': 'q2-btn label',\n });\n const detail = await page.find('q2-detail');\n detail.setProperty('label', 'button.label');\n await page.waitForChanges();\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toEqualText('q2-btn label');\n });\n it('when descripton set renders aria-describedby', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" description=\"Test Description\" />` });\n const label = await page.find('q2-detail >>> .label');\n const ariaDescribedby = await label.getAttribute('aria-describedby');\n\n expect(ariaDescribedby).toBeTruthy();\n });\n it('when descripton not set aria-describedby not rendered', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const label = await page.find('q2-detail >>> .label');\n const ariaDescribedby = await label.getAttribute('aria-describedby');\n\n expect(ariaDescribedby).toBeFalsy();\n });\n it('when descripton not set defaults to align left', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked-alignment-left');\n });\n it('when descripton not set and align right aligns right', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" alignment=\"right\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked-alignment-right');\n });\n });\n describe('size', () => {\n it(`when not set applies class \"detail-inline\" to detail conatiner`, async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass(`detail-inline`);\n });\n it(`when not set applies class \"label-size-inline\" to label`, async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toHaveClass(`label-size-inline`);\n });\n it(`when not set applies class \"description-size-inline\" to description`, async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Descripiton\" />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toHaveClass(`description-size-inline`);\n });\n it(`when set applies class \"detail-block\" to detail container`, async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" size=\"medium\" />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toHaveClass(`label-size-medium`);\n });\n it(`when set to \"medium\" applies class \"label-size-medium\" to label`, async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" size=\"medium\" />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toHaveClass(`label-size-medium`);\n });\n it(`when set to \"large\" applies class \"description-size-large\" to description`, async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Descripiton\" size=\"large\" />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toHaveClass(`description-size-large`);\n });\n it('when description not set defaults to align left', async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Description\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked-alignment-left');\n });\n it('when description not set and align right aligns right', async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Description\" alignment=\"right\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked-alignment-right');\n });\n });\n describe('stacked', () => {\n it('when `true` applies class \"detail-stacked\" to detail container', async () => {\n const page = await setup({\n html: `<q2-detail label=\"Test Label\" description=\"Test Description\" stacked />`,\n });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked');\n });\n });\n });\n describe('Slots', () => {\n describe('description/defalult', () => {\n it('when set content displayed as description', async () => {\n const page = await setup({\n html: `\n <q2-detail>Test Description</q2-detail>\n `,\n });\n const detail = await page.find('q2-detail');\n const description = await page.find('q2-detail >>> .description');\n\n expect(detail).toEqualText('Test Description');\n expect(description).toBeTruthy();\n });\n it('overridden by description prop', async () => {\n const page = await setup({\n html: `\n <q2-detail description=\"Test Description Prop\">Test Description Slot</q2-detail>\n `,\n });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toEqualText('Test Description Prop');\n });\n it('sets a `slot-size` attribute on top level elements', async () => {\n const page = await setup({\n html: `\n <q2-detail size=\"medium\">\n <slot-component>Test Description Slot</slot-component>\n <div slot=\"label\">\n <slot-component>Test Label Slot</slot-component>\n </div>\n </q2-detail>\n `,\n });\n const labelSlotComponent = await page.find('q2-detail > slot-component');\n const labelSlotComponentSize = await labelSlotComponent.getProperty('slotSize');\n const descriptionSlotComponent = await page.find('q2-detail > [slot=\"label\"] > slot-component');\n const descriptionSlotComponentSize = await descriptionSlotComponent.getProperty('slotSize');\n\n expect(labelSlotComponentSize).toEqual('medium');\n expect(descriptionSlotComponentSize).toEqual('medium');\n });\n it('sets a translated `slot-size` value on top level q2-currency elements', async () => {\n const page = await setup({\n html: `\n <q2-detail size=\"xsmall\">\n <q2-currency>Test Description Slot</q2-currency>\n <div slot=\"label\">\n <q2-currency>Test Label Slot</q2-currency>\n </div>\n </q2-detail>\n `,\n });\n const labelSlotComponent = await page.find('q2-detail > q2-currency');\n const labelSlotComponentSize = await labelSlotComponent.getProperty('slotSize');\n const descriptionSlotComponent = await page.find('q2-detail > [slot=\"label\"] > q2-currency');\n const descriptionSlotComponentSize = await descriptionSlotComponent.getProperty('slotSize');\n\n expect(labelSlotComponentSize).toEqual('small');\n expect(descriptionSlotComponentSize).toEqual('small');\n });\n it('works with the label slot', async () => {\n const page = await setup({\n html: `\n <q2-detail>\n Test Description Slot\n <div slot=\"label\">Test Label Slot</div>\n </q2-detail>\n `,\n });\n const detail = await page.find('q2-detail');\n const label = await page.find('q2-detail >>> .label');\n const description = await page.find('q2-detail >>> .description');\n\n expect(detail).toEqualText('Test Description Slot Test Label Slot');\n expect(label).toBeTruthy();\n expect(description).toBeTruthy();\n });\n });\n describe('label', () => {\n it('when set content displayed as label', async () => {\n const page = await setup({\n html: `\n <q2-detail><div slot=\"label\">Test Label</div></q2-detail>\n `,\n });\n const detail = await page.find('q2-detail');\n const label = await page.find('q2-detail >>> .label');\n\n expect(detail).toEqualText('Test Label');\n expect(label).toBeTruthy();\n });\n it('overridden by label prop', async () => {\n const page = await setup({\n html: `\n <q2-detail label=\"Test Label Prop\">Test Label Slot</q2-detail>\n `,\n });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toEqualText('Test Label Prop');\n });\n it('when set and default slot not set only label slot rendered', async () => {\n const page = await setup({\n html: `\n <q2-detail><div slot=\"label\">Test Label</div></q2-detail>\n `,\n });\n const detail = await page.find('q2-detail');\n const label = await page.find('q2-detail >>> .label');\n const description = await page.find('q2-detail >>> .description');\n\n expect(detail).toEqualText('Test Label');\n expect(label).toBeTruthy();\n expect(description).toBeFalsy();\n });\n });\n });\n\n describe('Accessibility', () => {\n describe('aXe DevTools', () => {\n it('does not have accessibility violations', async () => {\n const page = await setup({ html: `<q2-detail label=\"A11y Testing Enabled\" />` });\n const hasViolations = await evaluateA11y(page);\n\n expect(hasViolations).toBe(false);\n });\n });\n describe('Accessibility Tree', () => {});\n describe('Keyboard Controls', () => {});\n describe('Other', () => {});\n });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C;YACpC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,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,EAAE,IAAI,EAAE,4CAA4C,EAAE,CAAC,CAAC;gBACjF,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;gBAE/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, setTestStrings, setup } from '@/utils/helpers';\n\ndescribe('q2-detail', () => {\n describe('Props', () => {\n describe('alignment', () => {\n const alignments = ['left', 'right'];\n\n alignments.forEach(alignment => {\n it(`when set to \"${alignment}\" and stacked applies class \"detail-stacked-alignment-${alignment}\" to the detail container`, async () => {\n const page = await setup({\n html: `<q2-detail alignment=\"${alignment}\" label=\"Test Label\" description=\"Test Descripiton\" stacked />`,\n });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass(`detail-stacked-alignment-${alignment}`);\n });\n });\n });\n describe('description', () => {\n it('when set renders description', async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Label\" />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toEqualText('Test Label');\n });\n it('when not set does not render description', async () => {\n const page = await setup({ html: `<q2-detail />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toBeFalsy();\n });\n it('when not set does not render description', async () => {\n const page = await setup({ html: `<q2-detail />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toBeFalsy();\n });\n it('is localizable', async () => {\n const page = await setup({ html: `<q2-detail />` });\n await setTestStrings(page, {\n 'button.description': 'q2-btn description',\n });\n const detail = await page.find('q2-detail');\n detail.setProperty('description', 'button.description');\n await page.waitForChanges();\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toEqualText('q2-btn description');\n });\n it(\"has ID for label's aria-describedby attribute\", async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Label\" />` });\n const description = await page.find('q2-detail >>> .description');\n const descriptionId = description.getAttribute('id');\n\n expect(descriptionId).toEqualText('label-description');\n });\n });\n describe('label', () => {\n it('when set renders label', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toEqualText('Test Label');\n });\n it('when not set does not render label', async () => {\n const page = await setup({ html: `<q2-detail />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(!!label).toEqual(false);\n });\n it('is localizable', async () => {\n const page = await setup({ html: `<q2-detail />` });\n await setTestStrings(page, {\n 'button.label': 'q2-btn label',\n });\n const detail = await page.find('q2-detail');\n detail.setProperty('label', 'button.label');\n await page.waitForChanges();\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toEqualText('q2-btn label');\n });\n it('when descripton set renders aria-describedby', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" description=\"Test Description\" />` });\n const label = await page.find('q2-detail >>> .label');\n const ariaDescribedby = await label.getAttribute('aria-describedby');\n\n expect(ariaDescribedby).toBeTruthy();\n });\n it('when descripton not set aria-describedby not rendered', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const label = await page.find('q2-detail >>> .label');\n const ariaDescribedby = await label.getAttribute('aria-describedby');\n\n expect(ariaDescribedby).toBeFalsy();\n });\n it('when descripton not set defaults to align left', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked-alignment-left');\n });\n it('when descripton not set and align right aligns right', async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" alignment=\"right\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked-alignment-right');\n });\n });\n describe('size', () => {\n it(`when not set applies class \"detail-inline\" to detail conatiner`, async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass(`detail-inline`);\n });\n it(`when not set applies class \"label-size-inline\" to label`, async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toHaveClass(`label-size-inline`);\n });\n it(`when not set applies class \"description-size-inline\" to description`, async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Descripiton\" />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toHaveClass(`description-size-inline`);\n });\n it(`when set applies class \"detail-block\" to detail container`, async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" size=\"medium\" />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toHaveClass(`label-size-medium`);\n });\n it(`when set to \"medium\" applies class \"label-size-medium\" to label`, async () => {\n const page = await setup({ html: `<q2-detail label=\"Test Label\" size=\"medium\" />` });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toHaveClass(`label-size-medium`);\n });\n it(`when set to \"large\" applies class \"description-size-large\" to description`, async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Descripiton\" size=\"large\" />` });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toHaveClass(`description-size-large`);\n });\n it('when description not set defaults to align left', async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Description\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked-alignment-left');\n });\n it('when description not set and align right aligns right', async () => {\n const page = await setup({ html: `<q2-detail description=\"Test Description\" alignment=\"right\" />` });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked-alignment-right');\n });\n });\n describe('stacked', () => {\n it('when `true` applies class \"detail-stacked\" to detail container', async () => {\n const page = await setup({\n html: `<q2-detail label=\"Test Label\" description=\"Test Description\" stacked />`,\n });\n const detailContainer = await page.find('q2-detail >>> .detail');\n\n expect(detailContainer).toHaveClass('detail-stacked');\n });\n });\n });\n describe('Slots', () => {\n describe('description/defalult', () => {\n it('when set content displayed as description', async () => {\n const page = await setup({\n html: `\n <q2-detail>Test Description</q2-detail>\n `,\n });\n const detail = await page.find('q2-detail');\n const description = await page.find('q2-detail >>> .description');\n\n expect(detail).toEqualText('Test Description');\n expect(description).toBeTruthy();\n });\n it('overridden by description prop', async () => {\n const page = await setup({\n html: `\n <q2-detail description=\"Test Description Prop\">Test Description Slot</q2-detail>\n `,\n });\n const description = await page.find('q2-detail >>> .description');\n\n expect(description).toEqualText('Test Description Prop');\n });\n it('sets a `slot-size` attribute on top level elements', async () => {\n const page = await setup({\n html: `\n <q2-detail size=\"medium\">\n <slot-component>Test Description Slot</slot-component>\n <div slot=\"label\">\n <slot-component>Test Label Slot</slot-component>\n </div>\n </q2-detail>\n `,\n });\n const labelSlotComponent = await page.find('q2-detail > slot-component');\n const labelSlotComponentSize = await labelSlotComponent.getProperty('slotSize');\n const descriptionSlotComponent = await page.find('q2-detail > [slot=\"label\"] > slot-component');\n const descriptionSlotComponentSize = await descriptionSlotComponent.getProperty('slotSize');\n\n expect(labelSlotComponentSize).toEqual('medium');\n expect(descriptionSlotComponentSize).toEqual('medium');\n });\n it('sets a translated `slot-size` value on top level q2-currency elements', async () => {\n const page = await setup({\n html: `\n <q2-detail size=\"xsmall\">\n <q2-currency>Test Description Slot</q2-currency>\n <div slot=\"label\">\n <q2-currency>Test Label Slot</q2-currency>\n </div>\n </q2-detail>\n `,\n });\n const labelSlotComponent = await page.find('q2-detail > q2-currency');\n const labelSlotComponentSize = await labelSlotComponent.getProperty('slotSize');\n const descriptionSlotComponent = await page.find('q2-detail > [slot=\"label\"] > q2-currency');\n const descriptionSlotComponentSize = await descriptionSlotComponent.getProperty('slotSize');\n\n expect(labelSlotComponentSize).toEqual('small');\n expect(descriptionSlotComponentSize).toEqual('small');\n });\n it('works with the label slot', async () => {\n const page = await setup({\n html: `\n <q2-detail>\n Test Description Slot\n <div slot=\"label\">Test Label Slot</div>\n </q2-detail>\n `,\n });\n const detail = await page.find('q2-detail');\n const label = await page.find('q2-detail >>> .label');\n const description = await page.find('q2-detail >>> .description');\n\n expect(detail).toEqualText('Test Description Slot Test Label Slot');\n expect(label).toBeTruthy();\n expect(description).toBeTruthy();\n });\n });\n describe('label', () => {\n it('when set content displayed as label', async () => {\n const page = await setup({\n html: `\n <q2-detail><div slot=\"label\">Test Label</div></q2-detail>\n `,\n });\n const detail = await page.find('q2-detail');\n const label = await page.find('q2-detail >>> .label');\n\n expect(detail).toEqualText('Test Label');\n expect(label).toBeTruthy();\n });\n it('overridden by label prop', async () => {\n const page = await setup({\n html: `\n <q2-detail label=\"Test Label Prop\">Test Label Slot</q2-detail>\n `,\n });\n const label = await page.find('q2-detail >>> .label');\n\n expect(label).toEqualText('Test Label Prop');\n });\n it('when set and default slot not set only label slot rendered', async () => {\n const page = await setup({\n html: `\n <q2-detail><div slot=\"label\">Test Label</div></q2-detail>\n `,\n });\n const detail = await page.find('q2-detail');\n const label = await page.find('q2-detail >>> .label');\n const description = await page.find('q2-detail >>> .description');\n\n expect(detail).toEqualText('Test Label');\n expect(label).toBeTruthy();\n expect(description).toBeFalsy();\n });\n });\n });\n\n describe('Accessibility', () => {\n describe('aXe DevTools', () => {\n it('does not have accessibility violations', async () => {\n const page = await setup({ html: `<q2-detail label=\"A11y Testing Enabled\" />` });\n const hasViolations = await evaluateA11y(page);\n\n expect(hasViolations).toBe(false);\n });\n });\n describe('Accessibility Tree', () => {});\n describe('Keyboard Controls', () => {});\n describe('Other', () => {});\n });\n});\n"]}
|
|
@@ -302,10 +302,6 @@ export class Q2Dropdown {
|
|
|
302
302
|
const targetItem = dropdownItems[targetIndex];
|
|
303
303
|
targetItem && targetItem.dispatchEvent(new Event('focus'));
|
|
304
304
|
}
|
|
305
|
-
navigateTo(featureName, moduleName, queryParams) {
|
|
306
|
-
var _a, _b;
|
|
307
|
-
return (_b = (_a = window.TectonElements) === null || _a === void 0 ? void 0 : _a.navigateTo) === null || _b === void 0 ? void 0 : _b.call(_a, featureName, moduleName, queryParams);
|
|
308
|
-
}
|
|
309
305
|
orchestrateResolvedMenuItems() {
|
|
310
306
|
if (!this.name || !this.context) {
|
|
311
307
|
// this is only for contextual menu outlets
|
|
@@ -344,10 +340,16 @@ export class Q2Dropdown {
|
|
|
344
340
|
}
|
|
345
341
|
switch (menuItemData.action) {
|
|
346
342
|
case 'navigateTo':
|
|
347
|
-
onClickFn = ()
|
|
343
|
+
onClickFn = function () {
|
|
344
|
+
var _a, _b;
|
|
345
|
+
return (_b = (_a = window.TectonElements) === null || _a === void 0 ? void 0 : _a.navigateTo) === null || _b === void 0 ? void 0 : _b.call(_a, menuItemData.featureName, menuItemData.moduleName, queryParams);
|
|
346
|
+
};
|
|
348
347
|
break;
|
|
349
348
|
case 'showOverpanel':
|
|
350
|
-
onClickFn = ()
|
|
349
|
+
onClickFn = function () {
|
|
350
|
+
var _a, _b;
|
|
351
|
+
return (_b = (_a = window.TectonElements) === null || _a === void 0 ? void 0 : _a.showOverpanel) === null || _b === void 0 ? void 0 : _b.call(_a, `${menuItemData.featureName}.${menuItemData.moduleName}`, queryParams, undefined, true);
|
|
352
|
+
};
|
|
351
353
|
break;
|
|
352
354
|
}
|
|
353
355
|
const newDropdownItem = document.createElement('q2-dropdown-item');
|
|
@@ -359,15 +361,11 @@ export class Q2Dropdown {
|
|
|
359
361
|
});
|
|
360
362
|
});
|
|
361
363
|
}
|
|
362
|
-
showOverpanel(overpanelPath, params) {
|
|
363
|
-
var _a, _b;
|
|
364
|
-
return (_b = (_a = window.TectonElements) === null || _a === void 0 ? void 0 : _a.showOverpanel) === null || _b === void 0 ? void 0 : _b.call(_a, overpanelPath, params, undefined, true);
|
|
365
|
-
}
|
|
366
364
|
// #endregion
|
|
367
365
|
// #region Render Methods
|
|
368
366
|
render() {
|
|
369
367
|
const btnProps = this.toggleButtonProps;
|
|
370
|
-
return (h("click-elsewhere", { key: '
|
|
368
|
+
return (h("click-elsewhere", { key: '8e1168806f48fde1b2c0f549f013b3313f4bb04b', class: this.open ? 'dropdown-open' : '', onChange: this.onClickElsewhere, "test-id": "dropdownContainer" }, h("q2-btn", { key: 'bb9a31da210c6fa1afae6fbf1f0b8f98b6425ccd', ref: el => (this.controlElement = el), class: btnProps.className, onClick: this.onToggleClick, onKeyDown: this.onToggleKeydown, fab: btnProps.fab, intent: btnProps.intent, active: btnProps.active, disabled: btnProps.disabled, ariaExpanded: `${!!btnProps.ariaExpanded}`, label: this.hideLabel && this.label ? loc(this.label) : undefined, hideLabel: this.hideLabel, ariaHasPopup: "menu", "test-id": "dropdownButton", block: this.block, description: loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount]) }, this.hasCustomControl ? (h("div", { "test-id": "dropdownControl", class: btnProps.custom ? '' : 'hidden' }, h("slot", { name: "control" }))) : (h(Fragment, null, this.icon ? h("q2-icon", { type: this.icon }) : ' ', this.label && !this.hideLabel && (h("span", { class: "dropdown-button-text" }, loc(this.label)))))), h("q2-popover", { key: '7d5aa6bca5b4d6b494d556c49ec0c84e6e3f37b6', ref: el => (this.popoverElement = el), controlElement: this.controlElement, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, mode: this.popoverMode || undefined, block: this.block }, h("div", { key: 'b548e62ef46ca01018d742c443fc3aea42ab8875', onClick: this.onDropdownMenuClick, onKeyDown: this.onDropdownMenuKeydown, role: "menu", "aria-label": loc(this.label) || undefined }, h("slot", { key: 'ef88abd2fd3d358b3f9e3464b4b5066bb373b31e' })))));
|
|
371
369
|
}
|
|
372
370
|
static get is() { return "q2-dropdown"; }
|
|
373
371
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-dropdown.js","sourceRoot":"","sources":["../../../src/components/q2-dropdown/q2-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEjH,OAAO,EACH,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,GAAG,EACH,aAAa,EACb,gBAAgB,GACnB,MAAM,WAAW,CAAC;AAGnB,MAAM,OAAO,UAAU;;QAInB,yBAAoB,GAAW,mDAAmD,CAAC;QA2UnF,kBAAa,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC;QA2BF,mBAAc,GAAG,KAAK,IAAI,EAAE;YACxB,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAC5C,GAAG,IAAI,CAAC,oBAAoB,cAAc,CAC7C,CAAC;YACF,IAAI,CAAC,SAAS;gBAAE,OAAO;YACvB,MAAM,gBAAgB,EAAE,CAAC;YACzB,SAAS,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC;QAEF,kBAAa,GAAG,KAAK,IAAI,EAAE;YACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAC3C,GAAG,IAAI,CAAC,o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AAE,IAAI,CAAC,WAAW,IAAI,SAAS,EACnC,KAAK,EAAE,IAAI,CAAC,KAAK;gBAEjB,4DACI,OAAO,EAAE,IAAI,CAAC,mBAAmB,EACjC,SAAS,EAAE,IAAI,CAAC,qBAAqB,EACrC,IAAI,EAAC,MAAM,gBACC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,SAAS;oBAExC,8DAAQ,CACN,CACG,CACC,CACrB,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, ComponentInterface, Prop, Method, Element, Watch, h, Fragment, Listen } from '@stencil/core';\nimport { IDict } from 'src/util';\nimport {\n handleAriaLabel,\n handleRenamedProp,\n isEventFromElement,\n loc,\n overrideFocus,\n waitForNextPaint,\n} from 'src/utils';\n\n@Component({ tag: 'q2-dropdown', shadow: true, styleUrl: 'q2-dropdown.scss' })\nexport class Q2Dropdown implements ComponentInterface {\n // #region Own Properties\n\n controlElement?: HTMLQ2BtnElement;\n dropdownItemSelector: string = 'q2-dropdown-item:not([disabled]):not([separator])';\n popoverElement?: HTMLQ2PopoverElement;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n @Prop({ reflect: true })\n additionalContext: string;\n\n /** @deprecated */\n @Prop({ reflect: true })\n alignment: 'left' | 'right';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** If `true`, component expands to fill the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /**\n * Tells the outlet what the type of object being passed in as contextValue.\n * This will allow for the hierarchy resolution logic to work to determine if an option should or should not be shown.\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n context: string;\n\n /**\n * Passes important information to the outlet (e.g., pass an account id that your platform can use to look up what module to show for that account type).\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n contextValue: string;\n\n /** Indicates the menu cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /** The icon that will render within the toggle button. You may use any of the `q2-icon` types. */\n @Prop({ reflect: true })\n icon: string;\n\n /**\n * The text that appears within the button.\n * @warning\n * This property should not be used if the `type` is `icon`.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * Identifies this menu as an outlet. Used in conjunction with context and, optionally, `contextValue`.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n name: 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 /** @deprecated */\n @Prop({ reflect: true })\n popDirection: 'up' | 'down';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true })\n popoverAlignment: 'left' | 'right' = 'left'; // being used in dropdown.scss\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({ mutable: true })\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 /**\n * Determines the display mode of the popover.\n *\n * Providing a value of `legacy` instructs the popover to use absolute positioning instead of fixed positioning.\n *\n * @info\n * This is a temporary solution to work around styling issues related to using fixed positioning for the popover\n * when nested inside of elements with transform properties. This will be removed once the popover API is available\n * for use.\n */\n @Prop({ mutable: true })\n popoverMode: 'legacy' = null;\n\n /**\n * Use with `context` to tell the outlet where it appears. It will be matched with the appropriately configured module for that context.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n resolvedType: string;\n\n /** The type of button used as the menu toggle.\n * @info\n * Type must be \"custom\" to use the custom button slot.\n */\n @Prop({ reflect: true })\n type: 'icon' | 'fab' | 'custom' | 'primary' | 'secondary' | 'neutral' = 'icon';\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.popDirectionHandler();\n this.alignmentHandler();\n this.ariaLabelHandler();\n }\n\n componentDidLoad() {\n this.orchestrateResolvedMenuItems();\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 this.focusToggle();\n }\n\n @Listen('popoverStateChanged')\n popoverStateHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n this.popoverElement?.scrollContainerTo({ top: 0 });\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the dropdown `<button>` to hide the popover if it is showing.\n * @testOnly\n */\n @Method()\n async closePopover() {\n if (!this.open || this.disabled) return;\n this._togglePopover();\n }\n\n /**\n * Emulates clicking the dropdown `<button>` to show the popover if it is hidden.\n * @testOnly\n */\n @Method()\n async openPopover() {\n if (this.open || this.disabled) return;\n this._togglePopover();\n }\n\n /**\n * Emulates opening the dropdown and selecting a [Dropdown Item](https://tecton.q2developer.com/design-system/q2-dropdown-item/).\n *\n * If the dropdown is closed, this will open it before selecting the item.\n *\n * If the value does not match any item's value, this method does nothing.\n * @testOnly\n */\n @Method()\n async selectItem(value: string) {\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const itemBtn = item?.shadowRoot.querySelector<HTMLButtonElement>('.dropdown-item');\n if (!item || this.disabled) return;\n if (!this.open) {\n this.controlElement?.click();\n await waitForNextPaint();\n }\n itemBtn.click();\n await waitForNextPaint();\n }\n\n /**\n * Emulates opening the dropdown and selecting a [Dropdown Item](https://tecton.q2developer.com/design-system/q2-dropdown-item/)'s *remove* button.\n *\n * If the dropdown is closed, this will open it before selecting the remove item button.\n *\n * Requirements for this method to work properly:\n * - Provided `value` matches the item's `value` property\n * - Item has the `removable` property enabled\n * @testOnly\n */\n @Method()\n async selectRemoveItem(value: string) {\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const removeButton = item?.shadowRoot.querySelector<HTMLButtonElement>('.remove-dropdown-item');\n if (!item || !removeButton || this.disabled) return;\n if (!this.open) {\n this.controlElement?.click();\n await waitForNextPaint();\n }\n removeButton.click();\n await waitForNextPaint();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('additionalContext')\n additionalContextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('alignment')\n alignmentHandler() {\n handleRenamedProp(this, 'alignment', 'popoverAlignment');\n }\n\n @Watch('ariaLabel')\n ariaLabelHandler() {\n handleAriaLabel(this);\n }\n\n @Watch('context')\n contextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('contextValue')\n contextValueHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('name')\n nameHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('popDirection')\n popDirectionHandler() {\n handleRenamedProp(this, 'popDirection', 'popoverDirection');\n }\n\n @Watch('resolvedType')\n resolvedTypeHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n // #endregion\n // #region Local Methods\n\n get determineDropdownItemCount() {\n return this.hostElement.querySelectorAll(this.dropdownItemSelector).length;\n }\n\n get hasCustomControl() {\n return !!this.hostElement.querySelector('[slot=control]');\n }\n\n get toggleButtonProps() {\n const allowedIntents = ['primary', 'secondary', 'neutral'];\n const allowedTypes = ['icon', 'fab', 'custom', ...allowedIntents];\n const type = allowedTypes.includes(this.type) ? this.type : '';\n const icon = type === 'icon';\n const fab = type === 'fab';\n const custom = type === 'custom';\n let intent;\n if (allowedIntents.includes(type)) {\n intent = type === 'neutral' ? type : `workflow-${type}`;\n }\n const active = this.open;\n const disabled = !!this.disabled;\n const ariaExpanded = this.open;\n const className = !icon && !fab && !intent ? 'unstyled' : '';\n\n return {\n icon,\n fab,\n intent,\n active,\n disabled,\n ariaExpanded,\n className,\n custom,\n };\n }\n\n _togglePopover() {\n const { controlElement } = this;\n if (!controlElement) return;\n controlElement.click();\n controlElement.focus();\n controlElement.dispatchEvent(new FocusEvent('focus'));\n }\n\n closeDropdown = () => {\n if (!this.open) return;\n this.open = false;\n };\n\n focusAdjacentItem(activeItem: HTMLQ2DropdownItemElement, direction: 'next' | 'prev') {\n const dropdownItems: HTMLQ2DropdownItemElement[] = Array.from(\n this.hostElement.querySelectorAll(this.dropdownItemSelector)\n );\n\n const activeIndex = dropdownItems.indexOf(activeItem);\n\n if (activeIndex === -1) {\n return;\n }\n\n let targetIndex: number = 0;\n if (direction === 'next') {\n targetIndex = activeIndex < dropdownItems.length - 1 ? activeIndex + 1 : 0;\n } else if (direction === 'prev') {\n if (activeIndex > 0) {\n targetIndex = activeIndex - 1;\n } else {\n targetIndex = dropdownItems.length - 1;\n }\n }\n const targetItem = dropdownItems[targetIndex];\n targetItem && targetItem.dispatchEvent(new Event('focus'));\n }\n\n focusFirstItem = async () => {\n const firstItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:first-child`\n );\n if (!firstItem) return;\n await waitForNextPaint();\n firstItem.dispatchEvent(new FocusEvent('focus'));\n };\n\n focusLastItem = async () => {\n const lastItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:last-child`\n );\n if (!lastItem) return;\n await waitForNextPaint();\n lastItem.dispatchEvent(new FocusEvent('focus'));\n };\n\n focusToggle = () => {\n this.controlElement.focus();\n };\n\n navigateTo(featureName: string, moduleName?: string, queryParams?: IDict<string>) {\n return window.TectonElements?.navigateTo?.(featureName, moduleName, queryParams);\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 onDropdownMenuClick = async (event: MouseEvent | CustomEvent) => {\n const item = event.target as HTMLQ2DropdownItemElement;\n if (item.disabled || item.separator) return;\n this.closeDropdown();\n await waitForNextPaint();\n this.focusToggle();\n };\n\n onDropdownMenuKeydown = (event: KeyboardEvent) => {\n const item = event.target as HTMLQ2DropdownItemElement;\n switch (event.key) {\n case 'Escape':\n this.closeDropdown();\n this.focusToggle();\n break;\n\n case 'Tab':\n this.closeDropdown();\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n this.focusAdjacentItem(item, 'prev');\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.focusAdjacentItem(item, 'next');\n break;\n\n default:\n break;\n }\n };\n\n onToggleClick = () => {\n if (this.open) {\n this.closeDropdown();\n } else {\n this.openDropdown();\n }\n };\n\n onToggleKeydown = async (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n this.openDropdown();\n await waitForNextPaint();\n this.focusLastItem();\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.openDropdown();\n await waitForNextPaint();\n this.focusFirstItem();\n return;\n\n case 'Escape':\n event.preventDefault();\n this.closeDropdown();\n break;\n\n case 'Tab':\n if (this.open) this.closeDropdown();\n break;\n\n default:\n break;\n }\n };\n\n openDropdown = () => {\n if (this.open) return;\n this.open = true;\n };\n\n orchestrateResolvedMenuItems() {\n if (!this.name || !this.context) {\n // this is only for contextual menu outlets\n this.removeResolvedElements();\n return;\n }\n\n this.resolveMenuItemElements()\n .then(data => {\n this.removeResolvedElements();\n data.forEach(element => {\n this.hostElement.appendChild(element);\n });\n })\n .catch(err => {\n this.removeResolvedElements();\n throw err;\n });\n }\n\n removeResolvedElements() {\n const resolvedElements = this.hostElement.querySelectorAll('q2-dropdown-item.resolved-menu-item');\n resolvedElements.forEach(element => this.hostElement.removeChild(element));\n }\n\n resolveMenu() {\n return (\n this.name &&\n window.TectonElements &&\n window.TectonElements.resolveMenu(this.name, this.contextValue, this.resolvedType, this.additionalContext)\n );\n }\n\n resolveMenuItemElements() {\n return this.resolveMenu().then(datas => {\n return datas.map(menuItemData => {\n let onClickFn;\n let queryParams;\n if (menuItemData['tct-ctxid']) {\n queryParams = {};\n queryParams[menuItemData.contextIdParamName] = menuItemData['tct-ctxid'];\n }\n\n switch (menuItemData.action) {\n case 'navigateTo':\n onClickFn = () =>\n this.navigateTo(menuItemData.featureName, menuItemData.moduleName, queryParams);\n break;\n case 'showOverpanel':\n onClickFn = () =>\n this.showOverpanel(`${menuItemData.featureName}.${menuItemData.moduleName}`, queryParams);\n break;\n }\n\n const newDropdownItem = document.createElement('q2-dropdown-item');\n newDropdownItem.setAttribute('value', menuItemData.itemLabel);\n newDropdownItem.classList.add('resolved-menu-item');\n newDropdownItem.textContent = menuItemData.itemLabel;\n newDropdownItem.onclick = onClickFn;\n\n return newDropdownItem;\n });\n });\n }\n\n showOverpanel(overpanelPath: string, params: IDict<string>) {\n return window.TectonElements?.showOverpanel?.(overpanelPath, params, undefined, true);\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const btnProps = this.toggleButtonProps;\n\n return (\n <click-elsewhere\n class={this.open ? 'dropdown-open' : ''}\n onChange={this.onClickElsewhere}\n test-id=\"dropdownContainer\"\n >\n <q2-btn\n ref={el => (this.controlElement = el)}\n class={btnProps.className}\n onClick={this.onToggleClick}\n onKeyDown={this.onToggleKeydown}\n fab={btnProps.fab}\n intent={btnProps.intent}\n active={btnProps.active}\n disabled={btnProps.disabled}\n ariaExpanded={`${!!btnProps.ariaExpanded}`}\n label={this.hideLabel && this.label ? loc(this.label) : undefined}\n hideLabel={this.hideLabel}\n ariaHasPopup=\"menu\"\n test-id=\"dropdownButton\"\n block={this.block}\n description={loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount])}\n >\n {this.hasCustomControl ? (\n <div\n test-id=\"dropdownControl\"\n class={btnProps.custom ? '' : 'hidden'}\n >\n <slot name=\"control\" />\n </div>\n ) : (\n <Fragment>\n {this.icon ? <q2-icon type={this.icon} /> : ' '}\n {this.label && !this.hideLabel && (\n <span class=\"dropdown-button-text\">{loc(this.label)}</span>\n )}\n </Fragment>\n )}\n </q2-btn>\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.controlElement}\n open={this.open}\n max-height={this.popoverMaxHeight}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n mode={this.popoverMode || undefined}\n block={this.block}\n >\n <div\n onClick={this.onDropdownMenuClick}\n onKeyDown={this.onDropdownMenuKeydown}\n role=\"menu\"\n aria-label={loc(this.label) || undefined}\n >\n <slot />\n </div>\n </q2-popover>\n </click-elsewhere>\n );\n }\n\n // #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"file":"q2-dropdown.js","sourceRoot":"","sources":["../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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, ComponentInterface, Prop, Method, Element, Watch, h, Fragment, Listen } from '@stencil/core';\nimport {\n handleAriaLabel,\n handleRenamedProp,\n isEventFromElement,\n loc,\n overrideFocus,\n waitForNextPaint,\n} from 'src/utils';\n\n@Component({ tag: 'q2-dropdown', shadow: true, styleUrl: 'q2-dropdown.scss' })\nexport class Q2Dropdown implements ComponentInterface {\n // #region Own Properties\n\n controlElement?: HTMLQ2BtnElement;\n dropdownItemSelector: string = 'q2-dropdown-item:not([disabled]):not([separator])';\n popoverElement?: HTMLQ2PopoverElement;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n @Prop({ reflect: true })\n additionalContext: string;\n\n /** @deprecated */\n @Prop({ reflect: true })\n alignment: 'left' | 'right';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** If `true`, component expands to fill the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /**\n * Tells the outlet what the type of object being passed in as contextValue.\n * This will allow for the hierarchy resolution logic to work to determine if an option should or should not be shown.\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n context: string;\n\n /**\n * Passes important information to the outlet (e.g., pass an account id that your platform can use to look up what module to show for that account type).\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n contextValue: string;\n\n /** Indicates the menu cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /** The icon that will render within the toggle button. You may use any of the `q2-icon` types. */\n @Prop({ reflect: true })\n icon: string;\n\n /**\n * The text that appears within the button.\n * @warning\n * This property should not be used if the `type` is `icon`.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * Identifies this menu as an outlet. Used in conjunction with context and, optionally, `contextValue`.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n name: 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 /** @deprecated */\n @Prop({ reflect: true })\n popDirection: 'up' | 'down';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true })\n popoverAlignment: 'left' | 'right' = 'left'; // being used in dropdown.scss\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({ mutable: true })\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 /**\n * Determines the display mode of the popover.\n *\n * Providing a value of `legacy` instructs the popover to use absolute positioning instead of fixed positioning.\n *\n * @info\n * This is a temporary solution to work around styling issues related to using fixed positioning for the popover\n * when nested inside of elements with transform properties. This will be removed once the popover API is available\n * for use.\n */\n @Prop({ mutable: true })\n popoverMode: 'legacy' = null;\n\n /**\n * Use with `context` to tell the outlet where it appears. It will be matched with the appropriately configured module for that context.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n resolvedType: string;\n\n /** The type of button used as the menu toggle.\n * @info\n * Type must be \"custom\" to use the custom button slot.\n */\n @Prop({ reflect: true })\n type: 'icon' | 'fab' | 'custom' | 'primary' | 'secondary' | 'neutral' = 'icon';\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.popDirectionHandler();\n this.alignmentHandler();\n this.ariaLabelHandler();\n }\n\n componentDidLoad() {\n this.orchestrateResolvedMenuItems();\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 this.focusToggle();\n }\n\n @Listen('popoverStateChanged')\n popoverStateHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n this.popoverElement?.scrollContainerTo({ top: 0 });\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the dropdown `<button>` to hide the popover if it is showing.\n * @testOnly\n */\n @Method()\n async closePopover() {\n if (!this.open || this.disabled) return;\n this._togglePopover();\n }\n\n /**\n * Emulates clicking the dropdown `<button>` to show the popover if it is hidden.\n * @testOnly\n */\n @Method()\n async openPopover() {\n if (this.open || this.disabled) return;\n this._togglePopover();\n }\n\n /**\n * Emulates opening the dropdown and selecting a [Dropdown Item](https://tecton.q2developer.com/design-system/q2-dropdown-item/).\n *\n * If the dropdown is closed, this will open it before selecting the item.\n *\n * If the value does not match any item's value, this method does nothing.\n * @testOnly\n */\n @Method()\n async selectItem(value: string) {\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const itemBtn = item?.shadowRoot.querySelector<HTMLButtonElement>('.dropdown-item');\n if (!item || this.disabled) return;\n if (!this.open) {\n this.controlElement?.click();\n await waitForNextPaint();\n }\n itemBtn.click();\n await waitForNextPaint();\n }\n\n /**\n * Emulates opening the dropdown and selecting a [Dropdown Item](https://tecton.q2developer.com/design-system/q2-dropdown-item/)'s *remove* button.\n *\n * If the dropdown is closed, this will open it before selecting the remove item button.\n *\n * Requirements for this method to work properly:\n * - Provided `value` matches the item's `value` property\n * - Item has the `removable` property enabled\n * @testOnly\n */\n @Method()\n async selectRemoveItem(value: string) {\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const removeButton = item?.shadowRoot.querySelector<HTMLButtonElement>('.remove-dropdown-item');\n if (!item || !removeButton || this.disabled) return;\n if (!this.open) {\n this.controlElement?.click();\n await waitForNextPaint();\n }\n removeButton.click();\n await waitForNextPaint();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('additionalContext')\n additionalContextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('alignment')\n alignmentHandler() {\n handleRenamedProp(this, 'alignment', 'popoverAlignment');\n }\n\n @Watch('ariaLabel')\n ariaLabelHandler() {\n handleAriaLabel(this);\n }\n\n @Watch('context')\n contextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('contextValue')\n contextValueHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('name')\n nameHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('popDirection')\n popDirectionHandler() {\n handleRenamedProp(this, 'popDirection', 'popoverDirection');\n }\n\n @Watch('resolvedType')\n resolvedTypeHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n // #endregion\n // #region Local Methods\n\n get determineDropdownItemCount() {\n return this.hostElement.querySelectorAll(this.dropdownItemSelector).length;\n }\n\n get hasCustomControl() {\n return !!this.hostElement.querySelector('[slot=control]');\n }\n\n get toggleButtonProps() {\n const allowedIntents = ['primary', 'secondary', 'neutral'];\n const allowedTypes = ['icon', 'fab', 'custom', ...allowedIntents];\n const type = allowedTypes.includes(this.type) ? this.type : '';\n const icon = type === 'icon';\n const fab = type === 'fab';\n const custom = type === 'custom';\n let intent;\n if (allowedIntents.includes(type)) {\n intent = type === 'neutral' ? type : `workflow-${type}`;\n }\n const active = this.open;\n const disabled = !!this.disabled;\n const ariaExpanded = this.open;\n const className = !icon && !fab && !intent ? 'unstyled' : '';\n\n return {\n icon,\n fab,\n intent,\n active,\n disabled,\n ariaExpanded,\n className,\n custom,\n };\n }\n\n _togglePopover() {\n const { controlElement } = this;\n if (!controlElement) return;\n controlElement.click();\n controlElement.focus();\n controlElement.dispatchEvent(new FocusEvent('focus'));\n }\n\n closeDropdown = () => {\n if (!this.open) return;\n this.open = false;\n };\n\n focusAdjacentItem(activeItem: HTMLQ2DropdownItemElement, direction: 'next' | 'prev') {\n const dropdownItems: HTMLQ2DropdownItemElement[] = Array.from(\n this.hostElement.querySelectorAll(this.dropdownItemSelector)\n );\n\n const activeIndex = dropdownItems.indexOf(activeItem);\n\n if (activeIndex === -1) {\n return;\n }\n\n let targetIndex: number = 0;\n if (direction === 'next') {\n targetIndex = activeIndex < dropdownItems.length - 1 ? activeIndex + 1 : 0;\n } else if (direction === 'prev') {\n if (activeIndex > 0) {\n targetIndex = activeIndex - 1;\n } else {\n targetIndex = dropdownItems.length - 1;\n }\n }\n const targetItem = dropdownItems[targetIndex];\n targetItem && targetItem.dispatchEvent(new Event('focus'));\n }\n\n focusFirstItem = async () => {\n const firstItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:first-child`\n );\n if (!firstItem) return;\n await waitForNextPaint();\n firstItem.dispatchEvent(new FocusEvent('focus'));\n };\n\n focusLastItem = async () => {\n const lastItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:last-child`\n );\n if (!lastItem) return;\n await waitForNextPaint();\n lastItem.dispatchEvent(new FocusEvent('focus'));\n };\n\n focusToggle = () => {\n this.controlElement.focus();\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 onDropdownMenuClick = async (event: MouseEvent | CustomEvent) => {\n const item = event.target as HTMLQ2DropdownItemElement;\n if (item.disabled || item.separator) return;\n this.closeDropdown();\n await waitForNextPaint();\n this.focusToggle();\n };\n\n onDropdownMenuKeydown = (event: KeyboardEvent) => {\n const item = event.target as HTMLQ2DropdownItemElement;\n switch (event.key) {\n case 'Escape':\n this.closeDropdown();\n this.focusToggle();\n break;\n\n case 'Tab':\n this.closeDropdown();\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n this.focusAdjacentItem(item, 'prev');\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.focusAdjacentItem(item, 'next');\n break;\n\n default:\n break;\n }\n };\n\n onToggleClick = () => {\n if (this.open) {\n this.closeDropdown();\n } else {\n this.openDropdown();\n }\n };\n\n onToggleKeydown = async (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n this.openDropdown();\n await waitForNextPaint();\n this.focusLastItem();\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.openDropdown();\n await waitForNextPaint();\n this.focusFirstItem();\n return;\n\n case 'Escape':\n event.preventDefault();\n this.closeDropdown();\n break;\n\n case 'Tab':\n if (this.open) this.closeDropdown();\n break;\n\n default:\n break;\n }\n };\n\n openDropdown = () => {\n if (this.open) return;\n this.open = true;\n };\n\n orchestrateResolvedMenuItems() {\n if (!this.name || !this.context) {\n // this is only for contextual menu outlets\n this.removeResolvedElements();\n return;\n }\n\n this.resolveMenuItemElements()\n .then(data => {\n this.removeResolvedElements();\n data.forEach(element => {\n this.hostElement.appendChild(element);\n });\n })\n .catch(err => {\n this.removeResolvedElements();\n throw err;\n });\n }\n\n removeResolvedElements() {\n const resolvedElements = this.hostElement.querySelectorAll('q2-dropdown-item.resolved-menu-item');\n resolvedElements.forEach(element => this.hostElement.removeChild(element));\n }\n\n resolveMenu() {\n return (\n this.name &&\n window.TectonElements &&\n window.TectonElements.resolveMenu(this.name, this.contextValue, this.resolvedType, this.additionalContext)\n );\n }\n\n resolveMenuItemElements() {\n return this.resolveMenu().then(datas => {\n return datas.map(menuItemData => {\n let onClickFn;\n let queryParams;\n if (menuItemData['tct-ctxid']) {\n queryParams = {};\n queryParams[menuItemData.contextIdParamName] = menuItemData['tct-ctxid'];\n }\n\n switch (menuItemData.action) {\n case 'navigateTo':\n onClickFn = function () {\n return window.TectonElements?.navigateTo?.(\n menuItemData.featureName,\n menuItemData.moduleName,\n queryParams\n );\n };\n break;\n case 'showOverpanel':\n onClickFn = function () {\n return window.TectonElements?.showOverpanel?.(\n `${menuItemData.featureName}.${menuItemData.moduleName}`,\n queryParams,\n undefined,\n true\n );\n };\n break;\n }\n\n const newDropdownItem = document.createElement('q2-dropdown-item');\n newDropdownItem.setAttribute('value', menuItemData.itemLabel);\n newDropdownItem.classList.add('resolved-menu-item');\n newDropdownItem.textContent = menuItemData.itemLabel;\n newDropdownItem.onclick = onClickFn;\n\n return newDropdownItem;\n });\n });\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const btnProps = this.toggleButtonProps;\n\n return (\n <click-elsewhere\n class={this.open ? 'dropdown-open' : ''}\n onChange={this.onClickElsewhere}\n test-id=\"dropdownContainer\"\n >\n <q2-btn\n ref={el => (this.controlElement = el)}\n class={btnProps.className}\n onClick={this.onToggleClick}\n onKeyDown={this.onToggleKeydown}\n fab={btnProps.fab}\n intent={btnProps.intent}\n active={btnProps.active}\n disabled={btnProps.disabled}\n ariaExpanded={`${!!btnProps.ariaExpanded}`}\n label={this.hideLabel && this.label ? loc(this.label) : undefined}\n hideLabel={this.hideLabel}\n ariaHasPopup=\"menu\"\n test-id=\"dropdownButton\"\n block={this.block}\n description={loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount])}\n >\n {this.hasCustomControl ? (\n <div\n test-id=\"dropdownControl\"\n class={btnProps.custom ? '' : 'hidden'}\n >\n <slot name=\"control\" />\n </div>\n ) : (\n <Fragment>\n {this.icon ? <q2-icon type={this.icon} /> : ' '}\n {this.label && !this.hideLabel && (\n <span class=\"dropdown-button-text\">{loc(this.label)}</span>\n )}\n </Fragment>\n )}\n </q2-btn>\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.controlElement}\n open={this.open}\n max-height={this.popoverMaxHeight}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n mode={this.popoverMode || undefined}\n block={this.block}\n >\n <div\n onClick={this.onDropdownMenuClick}\n onKeyDown={this.onDropdownMenuKeydown}\n role=\"menu\"\n aria-label={loc(this.label) || undefined}\n >\n <slot />\n </div>\n </q2-popover>\n </click-elsewhere>\n );\n }\n\n // #endregion\n}\n"]}
|
|
@@ -310,7 +310,7 @@ describe('q2-dropdown', () => {
|
|
|
310
310
|
await page.waitForChanges();
|
|
311
311
|
expect(await dropdown.getProperty('open')).toBe(true);
|
|
312
312
|
expect(await popover.getProperty('open')).toBe(true);
|
|
313
|
-
expect(popoverStateChangedSpy).
|
|
313
|
+
expect(popoverStateChangedSpy).toHaveReceivedEvent();
|
|
314
314
|
});
|
|
315
315
|
});
|
|
316
316
|
describe('block', () => {
|
|
@@ -340,18 +340,6 @@ describe('q2-dropdown', () => {
|
|
|
340
340
|
});
|
|
341
341
|
});
|
|
342
342
|
describe('popoverMode', () => {
|
|
343
|
-
it('does not set any mode on the popover (default)', async () => {
|
|
344
|
-
const page = await newSpecPage({
|
|
345
|
-
components: [Q2Popover, Q2Dropdown, Q2DropdownItem],
|
|
346
|
-
html: `
|
|
347
|
-
<q2-dropdown>
|
|
348
|
-
<q2-dropdown-item>Item 1 Text</q2-dropdown-item>
|
|
349
|
-
<q2-dropdown-item>Item 2 Text</q2-dropdown-item>
|
|
350
|
-
</q2-dropdown>
|
|
351
|
-
`,
|
|
352
|
-
});
|
|
353
|
-
expect(page.root.shadowRoot.querySelector('q2-popover').mode).toBeNull();
|
|
354
|
-
});
|
|
355
343
|
it('sets the value of popoverMode as the mode on the popover', async () => {
|
|
356
344
|
const page = await newSpecPage({
|
|
357
345
|
components: [Q2Popover, Q2Dropdown, Q2DropdownItem],
|
|
@@ -413,7 +401,7 @@ describe('q2-dropdown', () => {
|
|
|
413
401
|
const popoverStateChangedSpy = await dropdown.spyOnEvent('popoverStateChanged');
|
|
414
402
|
await dropdown.callMethod('selectItem', 'item-1');
|
|
415
403
|
await page.waitForChanges();
|
|
416
|
-
expect(popoverStateChangedSpy).
|
|
404
|
+
expect(popoverStateChangedSpy).toHaveReceivedEvent();
|
|
417
405
|
});
|
|
418
406
|
it('clicks the item matching the provided value', async () => {
|
|
419
407
|
const clickSpy = await firstOption.spyOnEvent('click');
|
|
@@ -455,7 +443,7 @@ describe('q2-dropdown', () => {
|
|
|
455
443
|
const popoverStateChangedSpy = await dropdown.spyOnEvent('popoverStateChanged');
|
|
456
444
|
await dropdown.callMethod('selectRemoveItem', 'item-1');
|
|
457
445
|
await page.waitForChanges();
|
|
458
|
-
expect(popoverStateChangedSpy).
|
|
446
|
+
expect(popoverStateChangedSpy).toHaveReceivedEvent();
|
|
459
447
|
});
|
|
460
448
|
it('clicks the remove item button corresponding to the provided value', async () => {
|
|
461
449
|
const clickSpy = await firstOption.spyOnEvent('click');
|
|
@@ -472,7 +460,7 @@ describe('q2-dropdown', () => {
|
|
|
472
460
|
await dropdown.callMethod('openPopover');
|
|
473
461
|
await page.waitForChanges();
|
|
474
462
|
expect(await dropdown.getProperty('open')).toBe(true);
|
|
475
|
-
expect(popoverStateChangedSpy).
|
|
463
|
+
expect(popoverStateChangedSpy).toHaveReceivedEvent();
|
|
476
464
|
});
|
|
477
465
|
it('does nothing if the dropdown is disabled', async () => {
|
|
478
466
|
dropdown.setProperty('disabled', true);
|
|
@@ -503,7 +491,7 @@ describe('q2-dropdown', () => {
|
|
|
503
491
|
await dropdown.callMethod('closePopover');
|
|
504
492
|
await page.waitForChanges();
|
|
505
493
|
expect(await dropdown.getProperty('open')).toBe(false);
|
|
506
|
-
expect(popoverStateChangedSpy).
|
|
494
|
+
expect(popoverStateChangedSpy).toHaveReceivedEvent();
|
|
507
495
|
});
|
|
508
496
|
it('does nothing if the dropdown is disabled', async () => {
|
|
509
497
|
dropdown.setProperty('open', true);
|