q2-tecton-elements 1.53.1 → 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 +59 -60
- 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 +4 -4
- 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 +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +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 +2 -2
- 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.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.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.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.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 +59 -59
- 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 +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tooltip/q2-tooltip.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-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-example.js +1 -1
- package/dist/components/q2-formatted-text.js +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 +58 -59
- 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 +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +59 -60
- 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 +4 -4
- 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 +1 -1
- package/dist/esm/q2-editable-field.entry.js +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 +2 -2
- 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 +170 -164
- 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 +17 -17
- 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 +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +8 -8
- 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 +3 -3
- 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-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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ClickElsewhere","constructor","hostRef","this","isCurrentlyFocused","mouseEventList","mouseHandler","event","shadowContains","findActiveElement","aboutToBeFocused","shadowEventTarget","originatesInSlots","target","change","emit","windowBlurHandler","connectedCallback","forEach","eventName","document","addEventListener","window","disconnectedCallback","removeEventListener","componentWillLoad","workingElement","activeElement","shadowRoot","slots","hostElement","querySelectorAll","currentSlot","Array","from","lightNodes","assignedNodes","childNodes","currentNode","contains","child","parentNode","host","composedPath","q2PopoverCss","Q2PopoverStyle0","Q2Popover","displayBuffer","orientationChanged","handleMinHeight","minHeight","handleDeprecationWarning","setAbsoluteCSSProperties","async","controlElement","containerElement","currentDirection","align","style","setProperty","block","controlStyle","getComputedStyle","controlSize","parseInt","height","borderTopWidth","borderBottomWidth","waitForNextPaint","setFixedCSSProperties","rootElementRect","top","controlTop","bottom","controlBottom","left","controlLeft","right","controlRight","_b","_a","getBoundingClientRect","call","popoverLeft","offsetWidth","width","viewPortChanged","open","determinePopDirection","viewPortOrientationChanged","undefined","removeViewportListeners","contentElement","componentDidLoad","popoverStateHandler","detail","stopPropagation","scrollContainerTo","options","scrollTo","toggle","minHeightProvided","openChanged","setRootElement","popoverStateChanged","addViewportListeners","show","clearCSSProperties","isModule","isIframe","hasPlatformDimensions","Object","keys","Tecton","platformDimensions","length","providedDirection","direction","validatedMaxHeight","maxHeight","isNaN","passive","capture","screen","orientation","removeProperty","windowHeight","maxSpaceAbove","maxSpaceBelow","outletOffset","innerHeight","_c","distanceToIframeBottom","visualViewport","viewableSpaceBelow","isIframeShorterThanWindow","directionWithMostSpace","shouldUpdateMaxHeight","getPropertyValue","currentOrDetermineDirection","priorityMaxHeight","Math","min","setDirectionAndShow","isOpen","mode","currentElement","documentElement","computedStyle","transform","filter","perspective","containerType","includes","willChange","contain","rootNode","getRootNode","isRootNodeWebComponent","ShadowRoot","HTMLElement","parentElement","render","containerClasses","push","h","key","ref","el","class","join"],"sources":["src/components/click-elsewhere/click-elsewhere.tsx","src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n // #region Own Properties\n\n isCurrentlyFocused: boolean = false;\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event()\n change: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n\n // #endregion\n // #region Local Methods\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n return false;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n child = child.parentNode || child.host;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n windowBlurHandler = (): void => {\n this.isCurrentlyFocused = false;\n this.change.emit();\n };\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\"));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n &.legacy {\n position: absolute;\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n rootElementRect: DOMRect;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: '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 maxHeight: number;\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n this.containerElement = null;\n this.contentElement = null;\n this.controlElement = null;\n this.rootElementRect = null;\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('orientationchange', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged, { capture: true });\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n this.setRootElement();\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n this.show = true;\n if (this.mode === 'legacy') {\n this.setAbsoluteCSSProperties();\n } else {\n this.setFixedCSSProperties();\n }\n }\n\n setFixedCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, rootElementRect } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n const popoverLeft: number = controlLeft - rootElementRect.left;\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);\n containerElement.style.setProperty(\n '--comp-pop-right',\n `${rootElementRect.width + rootElementRect.left - controlRight}px`\n );\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${rootElementRect.height + rootElementRect.top - controlTop}px`\n );\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setRootElement() {\n let currentElement: HTMLElement = this.hostElement;\n\n while (currentElement && currentElement !== document.documentElement) {\n const computedStyle = window.getComputedStyle(currentElement);\n\n // Check if the element has any styles applied that create a new containg block\n if (\n computedStyle.transform !== 'none' ||\n computedStyle.filter !== 'none' ||\n computedStyle.perspective !== 'none' ||\n computedStyle.containerType !== 'normal' ||\n ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||\n ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)\n ) {\n this.rootElementRect = currentElement.getBoundingClientRect();\n return;\n }\n\n const rootNode = currentElement.getRootNode();\n const isRootNodeWebComponent =\n typeof ShadowRoot !== 'undefined' &&\n rootNode instanceof ShadowRoot &&\n rootNode.host instanceof HTMLElement;\n if (isRootNodeWebComponent) {\n currentElement = rootNode.host;\n } else {\n currentElement = currentElement.parentElement;\n }\n }\n\n // Return the document's bounding rect if no element is found\n this.rootElementRect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: window.visualViewport.height,\n width: window.visualViewport.width,\n } as DOMRect;\n }\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"],"mappings":";;;;MAMaA,IAAc;EAJ3B,WAAAC,CAAAC;;;;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YAAWD,SAASL,EAAcO,UAClE;QACExJ,KAAKmE,kBAAkB4E,EAAejE;QACtC;;MAGJ,MAAM2E,IAAWV,EAAeW;MAChC,MAAMC,WACKC,eAAe,eACtBH,aAAoBG,cACpBH,EAASlH,gBAAgBsH;MAC7B,IAAIF,GAAwB;QACxBZ,IAAiBU,EAASlH;aACvB;QACHwG,IAAiBA,EAAee;;;;QAKxC9J,KAAKmE,kBAAkB;MACnBC,KAAK;MACLE,QAAQ;MACRE,MAAM;MACNE,OAAO;MACPZ,QAAQ3C,OAAO+G,eAAepE;MAC9BoB,OAAO/D,OAAO+G,eAAehD;;;;;EAiBrC,MAAA6E;IACI,MAAMC,IAAmB,EAAC,aAAahK,KAAKqD;IAC5C,IAAIrD,KAAKuG,MAAMyD,EAAiBC,KAAK;IACrC,IAAIjK,KAAK8I,SAAS,UAAUkB,EAAiBC,KAAK;IAElD,OACIC,EAAA;MAAAC,KAAA;MACIC,KAAKC,KAAOrK,KAAKoD,mBAAmBiH;MACpCC,OAAON,EAAiBO,KAAK;MAAI,WACzB;OAERL,EAAA;MAAAC,KAAA;MACIC,KAAKC,KAAOrK,KAAKyF,iBAAiB4E;MAClCC,OAAM;OAENJ,EAAA;MAAAC,KAAA"}
|
|
1
|
+
{"version":3,"names":["ClickElsewhere","constructor","hostRef","this","isCurrentlyFocused","mouseEventList","mouseHandler","event","shadowContains","findActiveElement","aboutToBeFocused","shadowEventTarget","originatesInSlots","target","change","emit","windowBlurHandler","connectedCallback","forEach","eventName","document","addEventListener","window","disconnectedCallback","removeEventListener","componentWillLoad","workingElement","activeElement","shadowRoot","slots","hostElement","querySelectorAll","currentSlot","Array","from","lightNodes","assignedNodes","childNodes","currentNode","contains","child","parentNode","host","composedPath","q2PopoverCss","Q2PopoverStyle0","Q2Popover","displayBuffer","orientationChanged","handleMinHeight","minHeight","handleDeprecationWarning","handlePopoverToggleEvent","popoverStateChanged","open","newState","setAbsoluteCSSProperties","async","controlElement","containerElement","currentDirection","align","style","setProperty","block","controlStyle","getComputedStyle","controlSize","parseInt","height","borderTopWidth","borderBottomWidth","waitForNextPaint","setPopoverAPICSSProperties","isModule","top","controlTop","bottom","controlBottom","left","controlLeft","right","controlRight","_b","_a","getBoundingClientRect","call","popoverLeft","popoverRight","_c","visualViewport","width","scrollX","offsetWidth","innerHeight","_d","offsetTop","scrollY","_f","_e","viewPortChanged","determinePopDirection","viewPortOrientationChanged","undefined","removeViewportListeners","contentElement","supportsPopoverAPI","console","warn","mode","componentDidLoad","popoverStateHandler","detail","stopPropagation","scrollContainerTo","options","scrollTo","toggle","minHeightProvided","openChanged","addViewportListeners","show","hidePopover","clearCSSProperties","isIframe","hasPlatformDimensions","Object","keys","Tecton","platformDimensions","length","providedDirection","direction","hasOwn","HTMLElement","prototype","validatedMaxHeight","maxHeight","isNaN","passive","capture","screen","orientation","removeProperty","windowHeight","maxSpaceAbove","maxSpaceBelow","outletOffset","distanceToIframeBottom","viewableSpaceBelow","isIframeShorterThanWindow","directionWithMostSpace","shouldUpdateMaxHeight","getPropertyValue","currentOrDetermineDirection","priorityMaxHeight","Math","min","setDirectionAndShow","isOpen","showPopover","render","containerClasses","push","h","key","ref","el","class","join","tabIndex","popover"],"sources":["src/components/click-elsewhere/click-elsewhere.tsx","src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n // #region Own Properties\n\n isCurrentlyFocused: boolean = false;\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event()\n change: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n\n // #endregion\n // #region Local Methods\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n return false;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n child = child.parentNode || child.host;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n windowBlurHandler = (): void => {\n this.isCurrentlyFocused = false;\n this.change.emit();\n };\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.legacy {\n &.container {\n display: none;\n }\n\n &.show {\n display: block;\n z-index: var-list(--tct-popover-z-index, 50);\n }\n}\n\n:popover-open,\n.show {\n position: absolute;\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(\n --tct-popover-box-shadow,\n --app-shadow-1,\n unquote('0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)')\n );\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n &.block {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n &.left {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n &.right {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n orientationChanged: boolean = false;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right' = 'left';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: '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 maxHeight: number;\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);\n this.containerElement = null;\n this.contentElement = null;\n this.controlElement = null;\n }\n\n componentWillLoad() {\n if (!this.supportsPopoverAPI) {\n console.warn(\n 'The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.'\n );\n this.mode = 'legacy';\n }\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.supportsPopoverAPI) this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = false;\n } else {\n this.containerElement.hidePopover();\n }\n\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get supportsPopoverAPI(): boolean {\n return Object.hasOwn(HTMLElement.prototype, 'popover');\n }\n\n get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.addEventListener('resize', this.viewPortChanged);\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('orientationchange', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n handlePopoverToggleEvent = (event: ToggleEvent) => {\n this.popoverStateChanged.emit({ open: event.newState === 'open' });\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.removeEventListener('resize', this.viewPortChanged);\n window.removeEventListener('scroll', this.viewPortChanged, { capture: true });\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = true;\n this.setAbsoluteCSSProperties();\n } else {\n this.setPopoverAPICSSProperties();\n this.containerElement.showPopover();\n }\n }\n\n setPopoverAPICSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, isModule, align } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n\n const popoverLeft: number = controlLeft;\n const popoverRight: number = window?.visualViewport?.width - controlRight;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n\n if (currentDirection === 'up') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${window.innerHeight - controlTop - window?.visualViewport?.offsetTop - window.scrollY}px`\n );\n }\n }\n\n if (currentDirection === 'down') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-top',\n `${controlBottom + (window?.visualViewport?.offsetTop ?? 0) + window.scrollY}px`\n );\n }\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection, this.align];\n if (this.show) containerClasses.push('show');\n if (this.block) containerClasses.push('block');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n tabIndex={-1}\n popover=\"auto\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"],"mappings":";;;;MAMaA,IAAc;EAJ3B,WAAAC,CAAAC;;;;QAOIC,KAAAC,qBAA8B;;;eAI9BD,KAAAE,iBAA2B,EAAC,aAAa,aAAa;IAqDtDF,KAAAG,eAAgBC;MACZ,MAAMH,IAAqBD,KAAKK,eAAeL,KAAKM;MACpD,MAAMC,IACFP,KAAKK,eAAeL,KAAKQ,kBAAkBJ,OAAWJ,KAAKS,kBAAkBL,EAAMM;MAEvF,KAAKH,MAAqBP,KAAKC,sBAAsBA,IAAqB;QACtED,KAAKC,qBAAqB;QAC1BD,KAAKW,OAAOC;QACZ;;MAEJZ,KAAKC,qBAAqBM,KAAoBN;AAAkB;IAuCpED,KAAAa,oBAAoB;MAChBb,KAAKC,qBAAqB;MAC1BD,KAAKW,OAAOC;AAAM;;;;;EAlFtB,iBAAAE;IACId,KAAKE,eAAea,SAASC;MACzBC,SAASC,iBAAiBF,GAAWhB,KAAKG;AAAa;IAE3DgB,OAAOD,iBAAiB,QAAQlB,KAAKa;;EAGzC,oBAAAO;IACIpB,KAAKE,eAAea,SAASC;MACzBC,SAASI,oBAAoBL,GAAWhB,KAAKG;AAAa;IAE9DgB,OAAOE,oBAAoB,QAAQrB,KAAKa;;;iCAK5C,iBAAAS,IAAiB;;;EAKjB,iBAAAhB;IACI,IAAIiB,IAAiBN,SAASO;IAC9B,OAAO,MAAM;MACT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1G,KAAKuG,oBAAoB;MACpDvG,KAAKsH,OAAO;MACZtH,KAAKqD;WACF;MACHrD,KAAKsE;MACLtE,KAAKwD,iBAAiBqG;;;;;EAuE9B,MAAAC;IACI,MAAMC,IAAmB,EAAC,aAAa/J,KAAKyD,kBAAkBzD,KAAK0D;IACnE,IAAI1D,KAAKsH,MAAMyC,EAAiBC,KAAK;IACrC,IAAIhK,KAAK6D,OAAOkG,EAAiBC,KAAK;IACtC,IAAIhK,KAAK0G,SAAS,UAAUqD,EAAiBC,KAAK;IAElD,OACIC,EAAA;MAAAC,KAAA;MACIC,KAAKC,KAAOpK,KAAKwD,mBAAmB4G;MACpCC,OAAON,EAAiBO,KAAK;MAAI,WACzB;MACRC,WAAW;MACXC,SAAQ;OAERP,EAAA;MAAAC,KAAA;MACIC,KAAKC,KAAOpK,KAAKsG,iBAAiB8D;MAClCC,OAAM;OAENJ,EAAA;MAAAC,KAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { h as e } from "./index-7a5365e2.js";
|
|
2
2
|
|
|
3
3
|
const debounce = (e, n = 300) => {
|
|
4
|
-
let
|
|
5
|
-
return function(...
|
|
6
|
-
clearTimeout(
|
|
7
|
-
|
|
8
|
-
e(...
|
|
4
|
+
let i;
|
|
5
|
+
return function(...o) {
|
|
6
|
+
clearTimeout(i);
|
|
7
|
+
i = setTimeout((() => {
|
|
8
|
+
e(...o);
|
|
9
9
|
}), n);
|
|
10
10
|
};
|
|
11
11
|
};
|
|
@@ -14,31 +14,13 @@ function isMobile() {
|
|
|
14
14
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(navigator.userAgent);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
function isHostLosingFocus(e, n) {
|
|
18
|
-
const o = e.type;
|
|
19
|
-
const i = [ "focusin", "focus" ];
|
|
20
|
-
const t = i.includes(o);
|
|
21
|
-
// on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus
|
|
22
|
-
// on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus
|
|
23
|
-
const a = t ? e.target : e.relatedTarget;
|
|
24
|
-
const isElementNestedInHostElement = e => {
|
|
25
|
-
if (e === n) return true;
|
|
26
|
-
if (e.parentElement) {
|
|
27
|
-
return isElementNestedInHostElement(e.parentElement);
|
|
28
|
-
}
|
|
29
|
-
return false;
|
|
30
|
-
};
|
|
31
|
-
if (!(a instanceof HTMLElement)) return true;
|
|
32
|
-
return !isElementNestedInHostElement(a);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
17
|
function isRelatedTargetWithinHost(e, n) {
|
|
36
18
|
return e.relatedTarget !== n && !n.contains(e.relatedTarget);
|
|
37
19
|
}
|
|
38
20
|
|
|
39
21
|
function isEventFromElement(e, n) {
|
|
40
|
-
var
|
|
41
|
-
return ((
|
|
22
|
+
var i;
|
|
23
|
+
return ((i = e.composedPath) === null || i === void 0 ? void 0 : i.call(e)[0]) === n;
|
|
42
24
|
}
|
|
43
25
|
|
|
44
26
|
function overrideFocus(e) {
|
|
@@ -87,24 +69,24 @@ function waitForNextPaint() {
|
|
|
87
69
|
}
|
|
88
70
|
|
|
89
71
|
function loc(e, n) {
|
|
90
|
-
var
|
|
72
|
+
var i, o, t;
|
|
91
73
|
if (!e) return "";
|
|
92
|
-
if (((
|
|
74
|
+
if (((i = window.Tecton) === null || i === void 0 ? void 0 : i.noStrings) === true) {
|
|
93
75
|
return e;
|
|
94
76
|
}
|
|
95
|
-
return (t = (
|
|
77
|
+
return (t = (o = window === null || window === void 0 ? void 0 : window.TectonElements) === null || o === void 0 ? void 0 : o.loc(e, n)) !== null && t !== void 0 ? t : e;
|
|
96
78
|
}
|
|
97
79
|
|
|
98
80
|
function renderLabel(n) {
|
|
99
|
-
const {label:
|
|
81
|
+
const {label: i, hideLabel: o, optional: t, readonly: a} = n;
|
|
100
82
|
const r = [ "input-label" ];
|
|
101
83
|
let s = "";
|
|
102
|
-
let l =
|
|
84
|
+
let l = o;
|
|
103
85
|
if (!l) {
|
|
104
86
|
const e = n.hostElement.querySelectorAll('[slot="label"]');
|
|
105
|
-
const
|
|
106
|
-
const t = !!
|
|
107
|
-
l = t ||
|
|
87
|
+
const o = e.length > 0;
|
|
88
|
+
const t = !!i;
|
|
89
|
+
l = t || o ? false : true;
|
|
108
90
|
}
|
|
109
91
|
if (l) r.push("sr");
|
|
110
92
|
if (t) {
|
|
@@ -123,7 +105,7 @@ function renderLabel(n) {
|
|
|
123
105
|
class: r.join(" ")
|
|
124
106
|
}, e("slot", {
|
|
125
107
|
name: "label"
|
|
126
|
-
},
|
|
108
|
+
}, i ? loc(i) : undefined, s));
|
|
127
109
|
}
|
|
128
110
|
|
|
129
111
|
function hasSlotContent(e, n) {
|
|
@@ -134,8 +116,8 @@ function handleAriaLabel(e) {
|
|
|
134
116
|
const {ariaLabel: n} = e;
|
|
135
117
|
if (!n) return;
|
|
136
118
|
// If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return
|
|
137
|
-
const
|
|
138
|
-
if (n ===
|
|
119
|
+
const i = Symbol().toString();
|
|
120
|
+
if (n === i) {
|
|
139
121
|
e.ariaLabel = undefined;
|
|
140
122
|
return;
|
|
141
123
|
}
|
|
@@ -147,57 +129,57 @@ function handleAriaLabel(e) {
|
|
|
147
129
|
|
|
148
130
|
/**
|
|
149
131
|
* Handles when a prop has been renamed on a component without introducing a breaking change.
|
|
150
|
-
*/ function handleRenamedProp(e, n,
|
|
132
|
+
*/ function handleRenamedProp(e, n, i, o) {
|
|
151
133
|
if (typeof e[n] === "undefined") return;
|
|
152
134
|
// If old prop has value, aka set in component, call handleDeprecationWarning()
|
|
153
135
|
if (e[n]) {
|
|
154
136
|
handleDeprecationWarning(e, n, "prop");
|
|
155
137
|
}
|
|
156
|
-
e[
|
|
157
|
-
if (
|
|
138
|
+
e[i] = e[n];
|
|
139
|
+
if (o) {
|
|
158
140
|
delete e[n];
|
|
159
141
|
}
|
|
160
142
|
}
|
|
161
143
|
|
|
162
|
-
function handleDeprecationWarning(e, n,
|
|
144
|
+
function handleDeprecationWarning(e, n, i) {
|
|
163
145
|
if (window.location.hostname === "localhost" || window.location.host === "stack.q2developer.com") {
|
|
164
146
|
if (e[n] === "undefined") return;
|
|
165
|
-
const
|
|
166
|
-
switch (
|
|
147
|
+
const o = e.constructor.name.toLowerCase().slice(2);
|
|
148
|
+
switch (i) {
|
|
167
149
|
case "prop":
|
|
168
|
-
if (n === "size" &&
|
|
150
|
+
if (n === "size" && o === "btn") {
|
|
169
151
|
console.warn(`The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: "small" / "medium" / "large" `);
|
|
170
152
|
} else {
|
|
171
|
-
console.warn(`The property ${n} in q2-${
|
|
153
|
+
console.warn(`The property ${n} in q2-${o} has been marked for deprecation and will be removed in an upcoming major release.`);
|
|
172
154
|
}
|
|
173
155
|
break;
|
|
174
156
|
|
|
175
157
|
case "function":
|
|
176
|
-
console.warn(`The function ${n} in ${
|
|
158
|
+
console.warn(`The function ${n} in ${o} has been marked for deprecation and will be removed in an upcoming major release.`);
|
|
177
159
|
break;
|
|
178
160
|
|
|
179
161
|
case "method":
|
|
180
|
-
console.warn(`The method ${n} in ${
|
|
162
|
+
console.warn(`The method ${n} in ${o} has been marked for deprecation and will be removed in an upcoming major release.`);
|
|
181
163
|
break;
|
|
182
164
|
|
|
183
165
|
case "event":
|
|
184
|
-
console.warn(`The event ${n} in ${
|
|
166
|
+
console.warn(`The event ${n} in ${o} has been marked for deprecation and will be removed in an upcoming major release.`);
|
|
185
167
|
break;
|
|
186
168
|
|
|
187
169
|
default:
|
|
188
|
-
console.error(`handleDeprecationWarning --\x3e No type found for desired deprecation: ${n} in q2-${
|
|
170
|
+
console.error(`handleDeprecationWarning --\x3e No type found for desired deprecation: ${n} in q2-${o}: deprecatedItemType = ${n}`);
|
|
189
171
|
}
|
|
190
172
|
}
|
|
191
173
|
}
|
|
192
174
|
|
|
193
175
|
function renderMessages(n) {
|
|
194
|
-
const
|
|
176
|
+
const i = n.hasError ? "danger" : "info";
|
|
195
177
|
return e("div", {
|
|
196
178
|
class: "messages-container"
|
|
197
179
|
}, e("q2-message", {
|
|
198
180
|
appearance: "minimal",
|
|
199
181
|
description: true,
|
|
200
|
-
type:
|
|
182
|
+
type: i,
|
|
201
183
|
"test-id": "message"
|
|
202
184
|
}, e("ul", {
|
|
203
185
|
id: n.inputDescribedBy
|
|
@@ -208,16 +190,16 @@ function renderMessages(n) {
|
|
|
208
190
|
|
|
209
191
|
function setMessageHeight(e) {
|
|
210
192
|
const n = e.hostElement.shadowRoot.querySelector(".messages-container");
|
|
211
|
-
const
|
|
193
|
+
const i = n.querySelector("q2-message");
|
|
212
194
|
nextPaint((() => {
|
|
213
|
-
const
|
|
214
|
-
if (n.style.getPropertyValue("height") === `${
|
|
215
|
-
if (
|
|
216
|
-
|
|
195
|
+
const o = e.showMessages && e.hasFocus ? i.getBoundingClientRect().height : 0;
|
|
196
|
+
if (n.style.getPropertyValue("height") === `${o}px`) return;
|
|
197
|
+
if (o === 0) {
|
|
198
|
+
i.classList.add("invisible");
|
|
217
199
|
n.style.removeProperty("height");
|
|
218
200
|
} else {
|
|
219
|
-
|
|
220
|
-
n.style.setProperty("height", `${
|
|
201
|
+
i.classList.remove("invisible");
|
|
202
|
+
n.style.setProperty("height", `${o}px`);
|
|
221
203
|
}
|
|
222
204
|
}));
|
|
223
205
|
}
|
|
@@ -246,28 +228,28 @@ const handleColor = e => {
|
|
|
246
228
|
* @return {Promise<string>} All translated text content in DOM order
|
|
247
229
|
*/ const getAllText = async (e, n = {}) => {
|
|
248
230
|
if (!e) return "";
|
|
249
|
-
const
|
|
231
|
+
const i = Object.assign({
|
|
250
232
|
trim: true,
|
|
251
233
|
normalizeWhitespace: false,
|
|
252
234
|
skipComponentReady: false
|
|
253
235
|
}, n);
|
|
254
|
-
const
|
|
236
|
+
const o = new Set([ "STYLE", "SCRIPT", "NOSCRIPT", "TEMPLATE", "#comment" ]);
|
|
255
237
|
const t = new WeakSet;
|
|
256
238
|
let a = "";
|
|
257
239
|
async function processNode(e) {
|
|
258
240
|
var n;
|
|
259
|
-
if (t.has(e) ||
|
|
241
|
+
if (t.has(e) || o.has(e.nodeName)) return;
|
|
260
242
|
t.add(e);
|
|
261
243
|
// Handle text nodes
|
|
262
244
|
if (e.nodeType === Node.TEXT_NODE) {
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
245
|
+
const o = i.trim ? e.textContent.trim() : e.textContent;
|
|
246
|
+
if (o) {
|
|
265
247
|
// Add space between adjacent text nodes if needed
|
|
266
|
-
if (a && !a.endsWith(" ") && !
|
|
248
|
+
if (a && !a.endsWith(" ") && !o.startsWith(" ")) {
|
|
267
249
|
a += " ";
|
|
268
250
|
}
|
|
269
251
|
// Translate the text
|
|
270
|
-
a +=
|
|
252
|
+
a += i.skipComponentReady ? (n = window.TectonElements) === null || n === void 0 ? void 0 : n.loc(o) : loc(o);
|
|
271
253
|
}
|
|
272
254
|
return;
|
|
273
255
|
}
|
|
@@ -275,7 +257,7 @@ const handleColor = e => {
|
|
|
275
257
|
if (e.nodeType === Node.ELEMENT_NODE) {
|
|
276
258
|
// Wait for Stencil component if needed
|
|
277
259
|
const n = e.nodeName.startsWith("Q2-") && typeof e.componentOnReady === "function";
|
|
278
|
-
if (n && !
|
|
260
|
+
if (n && !i.skipComponentReady) {
|
|
279
261
|
await e.componentOnReady();
|
|
280
262
|
}
|
|
281
263
|
// Process children in light DOM
|
|
@@ -310,14 +292,14 @@ const handleColor = e => {
|
|
|
310
292
|
}
|
|
311
293
|
await processNode(e);
|
|
312
294
|
// Apply final formatting
|
|
313
|
-
if (
|
|
295
|
+
if (i.trim) {
|
|
314
296
|
a = a.trim();
|
|
315
297
|
}
|
|
316
|
-
if (
|
|
298
|
+
if (i.normalizeWhitespace) {
|
|
317
299
|
a = a.replace(/\s+/g, " ");
|
|
318
300
|
}
|
|
319
301
|
return a;
|
|
320
302
|
};
|
|
321
303
|
|
|
322
|
-
export { handleAriaLabel as a, handleColor as b, createGuid as c, isMobile as d, hasSlotContent as e, renderLabel as f, getAriaValueFromProp as g, handleDeprecationWarning as h, isEventFromElement as i, handleRenamedProp as j, isTouchDevice as k, loc as l, resizeIframe as m, nextPaint as n, overrideFocus as o, debounce as p, isRelatedTargetWithinHost as q, renderMessages as r, setMessageHeight as s,
|
|
323
|
-
//# sourceMappingURL=index-
|
|
304
|
+
export { handleAriaLabel as a, handleColor as b, createGuid as c, isMobile as d, hasSlotContent as e, renderLabel as f, getAriaValueFromProp as g, handleDeprecationWarning as h, isEventFromElement as i, handleRenamedProp as j, isTouchDevice as k, loc as l, resizeIframe as m, nextPaint as n, overrideFocus as o, debounce as p, isRelatedTargetWithinHost as q, renderMessages as r, setMessageHeight as s, isFirefox as t, getAllText as u, isVisible as v, waitForNextPaint as w };
|
|
305
|
+
//# sourceMappingURL=index-504f1a9e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["debounce","fn","delay","timeout","args","clearTimeout","setTimeout","isMobile","test","navigator","userAgent","isRelatedTargetWithinHost","event","element","relatedTarget","contains","isEventFromElement","_a","composedPath","call","overrideFocus","hostElement","focus","dispatchEvent","FocusEvent","bubbles","isFirefox","toLowerCase","includes","isTouchDevice","window","maxTouchPoints","getAriaValueFromProp","prop","validValues","undefined","guid","createGuid","nextPaint","requestAnimationFrame","isVisible","offsetWidth","offsetHeight","getClientRects","length","waitForNextPaint","Promise","resolve","loc","key","subs","Tecton","noStrings","_c","_b","TectonElements","renderLabel","target","label","hideLabel","optional","readonly","labelClasses","helpText","shouldHideLabel","labelSlotElements","querySelectorAll","hasSlotContent","hasLabel","push","h","class","htmlFor","inputId","join","name","slotName","querySelector","handleAriaLabel","ariaLabel","FW_WRAPPERS_EMPTY_PROP","Symbol","toString","handleRenamedProp","oldProp","newProp","removeOldProp","handleDeprecationWarning","deprecatedItemName","deprecatedItemType","location","hostname","host","componentName","constructor","slice","console","warn","error","renderMessages","type","hasError","appearance","description","id","inputDescribedBy","messages","map","message","setMessageHeight","messageContainer","shadowRoot","q2Message","height","showMessages","hasFocus","getBoundingClientRect","style","getPropertyValue","classList","add","removeProperty","remove","setProperty","resizeIframe","handleColor","intent","color","getAllText","async","options","opts","Object","assign","trim","normalizeWhitespace","skipComponentReady","nodesToSkip","Set","processedNodes","WeakSet","result","processNode","node","has","nodeName","nodeType","Node","TEXT_NODE","text","textContent","endsWith","startsWith","ELEMENT_NODE","isStencilComponent","componentOnReady","child","childNodes","shadowChild","assignedNodes","assigned","fallback","replace"],"sources":["src/utils/index.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { Q2Btn } from 'src/components/q2-btn/q2-btn';\nimport { Q2Calendar } from 'src/components/q2-calendar/q2-calendar';\nimport { Q2Carousel } from 'src/components/q2-carousel/q2-carousel';\nimport { Q2Checkbox } from 'src/components/q2-checkbox/q2-checkbox';\nimport { Q2CheckboxGroup } from 'src/components/q2-checkbox-group/q2-checkbox-group';\nimport { Q2RadioGroup } from 'src/components/q2-radio-group/q2-radio-group';\nimport { Q2Dropdown } from 'src/components/q2-dropdown/q2-dropdown';\nimport { Q2DropdownItem } from 'src/components/q2-dropdown-item/q2-dropdown-item';\nimport { Q2EditableField } from 'src/components/q2-editable-field/q2-editable-field';\nimport { Q2Input } from 'src/components/q2-input/q2-input';\nimport { Q2Loading } from 'src/components/q2-loading/q2-loading';\nimport { Q2Radio } from 'src/components/q2-radio/q2-radio';\nimport { Q2Select } from 'src/components/q2-select/q2-select';\nimport { FormFieldTypes, IDict } from 'src/util';\n\nexport const debounce = <F extends (...args: Parameters<F>) => ReturnType<F>>(fn: F, delay: number = 300) => {\n let timeout: ReturnType<typeof setTimeout>;\n return function (...args: Parameters<F>) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n};\n\nexport function isMobile(): boolean {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(\n navigator.userAgent\n );\n}\n\nexport function isHostLosingFocus(event: FocusEvent, hostElement: HTMLElement) {\n const type = event.type;\n const focusInTypes = ['focusin', 'focus'];\n const isFocusIn = focusInTypes.includes(type);\n\n // on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus\n // on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus\n const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;\n\n const isElementNestedInHostElement = (element: HTMLElement) => {\n if (element === hostElement) return true;\n if (element.parentElement) {\n return isElementNestedInHostElement(element.parentElement);\n }\n return false;\n };\n\n if (!(elementGainingFocus instanceof HTMLElement)) return true;\n return !isElementNestedInHostElement(elementGainingFocus);\n}\n\nexport function isRelatedTargetWithinHost(event: FocusEvent, element: HTMLElement) {\n return event.relatedTarget !== element && !element.contains(event.relatedTarget as Node);\n}\n\nexport function isEventFromElement(event: Event, element: HTMLElement): boolean {\n return event.composedPath?.()[0] === element;\n}\n\nexport function overrideFocus(hostElement: HTMLElement) {\n hostElement.focus = () => hostElement?.dispatchEvent(new FocusEvent('focus', { bubbles: false }));\n}\n\nexport function isFirefox() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('firefox');\n}\n\nexport function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n}\n\nexport function isSafari() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('safari') && !userAgent.includes('chrome');\n}\n\n/**\n * Returns the value of a prop if it is defined and included in the `validValues`\n * array. This is used primarily to prevent Vue wrappers from setting aria props\n * to \"Symbol()\" when the prop is not set.\n */\nexport function getAriaValueFromProp(prop: string, validValues?: string[]) {\n if (prop === undefined) return prop;\n if (!validValues) return prop !== 'Symbol()' ? prop : undefined;\n return validValues.includes(prop) || prop === '' ? prop : undefined;\n}\n\nlet guid: number = 1000;\nexport function createGuid(): number {\n return guid++;\n}\n\nexport function nextPaint(fn: (value?: unknown) => void) {\n requestAnimationFrame(() => {\n requestAnimationFrame(fn);\n });\n}\n\nexport function isVisible(element: HTMLElement) {\n return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;\n}\n\nexport function waitForNextPaint() {\n return new Promise(resolve => nextPaint(resolve));\n}\n\nexport function capitalize(value: string) {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n\nexport function pick(props: string[]): (obj: object) => object {\n return obj => {\n return props.reduce((memo, prop) => {\n return {\n ...memo,\n [prop]: obj[prop],\n };\n }, {});\n };\n}\n\nexport function loc(key: string, subs?: IDict<any> | string[]) {\n if (!key) return '';\n if (window.Tecton?.noStrings === true) {\n return key;\n }\n return window?.TectonElements?.loc(key, subs) ?? key;\n}\n\nexport function renderLabel(target: FormFieldTypes | Q2RadioGroup | Q2CheckboxGroup) {\n const { label, hideLabel, optional, readonly } = target;\n const labelClasses: string[] = ['input-label'];\n let helpText = '';\n\n let shouldHideLabel = hideLabel;\n if (!shouldHideLabel) {\n const labelSlotElements = target.hostElement.querySelectorAll<HTMLSlotElement>('[slot=\"label\"]');\n const hasSlotContent = labelSlotElements.length > 0;\n const hasLabel = !!label;\n\n shouldHideLabel = hasLabel || hasSlotContent ? false : true;\n }\n\n if (shouldHideLabel) labelClasses.push('sr');\n if (optional) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.optional')}</span>;\n }\n if (readonly) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.readonly')}</span>;\n labelClasses.push('readonly-field');\n }\n return (\n <label\n htmlFor={target.inputId}\n class={labelClasses.join(' ')}\n >\n <slot name=\"label\">\n {label ? loc(label) : undefined}\n {helpText}\n </slot>\n </label>\n );\n}\n\nexport function hasSlotContent(target: HTMLElement, slotName: string) {\n return target.querySelector(`[slot=\"${slotName}\"]`) !== null;\n}\n\nexport function handleAriaLabel(\n target:\n | Q2Input\n | Q2Select\n | Q2Radio\n | Q2Checkbox\n | Q2EditableField\n | Q2Dropdown\n | Q2DropdownItem\n | Q2Loading\n | Q2Carousel\n | Q2Calendar\n | Q2Btn\n) {\n const { ariaLabel } = target;\n if (!ariaLabel) return;\n\n // If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return\n const FW_WRAPPERS_EMPTY_PROP = Symbol().toString();\n if (ariaLabel === FW_WRAPPERS_EMPTY_PROP) {\n target.ariaLabel = undefined;\n return;\n }\n\n // If ariaLabel is set, set hideLabel to true and set label to ariaLabel\n if ('hideLabel' in target) target.hideLabel = true;\n target.label = loc(ariaLabel);\n target.ariaLabel = undefined;\n}\n\n/**\n * Handles when a prop has been renamed on a component without introducing a breaking change.\n */\nexport function handleRenamedProp(target: object, oldProp: string, newProp: string, removeOldProp?: boolean) {\n if (typeof target[oldProp] === 'undefined') return;\n\n // If old prop has value, aka set in component, call handleDeprecationWarning()\n if (target[oldProp]) {\n handleDeprecationWarning(target, oldProp, 'prop');\n }\n\n target[newProp] = target[oldProp];\n\n if (removeOldProp) {\n delete target[oldProp];\n }\n}\n\nexport function handleDeprecationWarning(\n target: object,\n deprecatedItemName: string,\n deprecatedItemType: 'function' | 'prop' | 'method' | 'event'\n) {\n if (window.location.hostname === 'localhost' || window.location.host === 'stack.q2developer.com') {\n if (target[deprecatedItemName] === 'undefined') return;\n\n const componentName = target.constructor.name.toLowerCase().slice(2);\n\n switch (deprecatedItemType) {\n case 'prop':\n if (deprecatedItemName === 'size' && componentName === 'btn') {\n console.warn(\n `The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: \"small\" / \"medium\" / \"large\" `\n );\n } else {\n console.warn(\n `The property ${deprecatedItemName} in q2-${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n }\n break;\n\n case 'function':\n console.warn(\n `The function ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'method':\n console.warn(\n `The method ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'event':\n console.warn(\n `The event ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n default:\n console.error(\n `handleDeprecationWarning --> No type found for desired deprecation: ${deprecatedItemName} in q2-${componentName}: deprecatedItemType = ${deprecatedItemName}`\n );\n }\n }\n}\n\nexport function renderMessages(target: FormFieldTypes) {\n const type = target.hasError ? 'danger' : 'info';\n\n return (\n <div class=\"messages-container\">\n <q2-message\n appearance=\"minimal\"\n description\n type={type}\n test-id=\"message\"\n >\n <ul id={target.inputDescribedBy}>\n {target.messages.map(message => (\n <li test-id=\"messageListItem\">{loc(message)}</li>\n ))}\n </ul>\n </q2-message>\n </div>\n );\n}\n\nexport function setMessageHeight(target: FormFieldTypes) {\n const messageContainer = (target.hostElement.shadowRoot as ShadowRoot).querySelector<HTMLDivElement>(\n '.messages-container'\n );\n const q2Message = messageContainer.querySelector('q2-message');\n nextPaint(() => {\n const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;\n\n if (messageContainer.style.getPropertyValue('height') === `${height}px`) return;\n\n if (height === 0) {\n q2Message.classList.add('invisible');\n messageContainer.style.removeProperty('height');\n } else {\n q2Message.classList.remove('invisible');\n messageContainer.style.setProperty('height', `${height}px`);\n }\n });\n}\n\nexport const resizeIframe = () => {\n return window.TectonElements?.resizeIframe?.();\n};\n\n// Handling color attribute (deprecated)\nexport const handleColor = (target: Q2Btn) => {\n if (!target.intent && ['primary', 'secondary'].includes(target.color)) {\n target.intent = `workflow-${target.color}` as HTMLQ2BtnElement['intent'];\n target.color = undefined;\n }\n};\n\n/**\n * Gets all translated text content from an element, including shadow DOM content\n *\n * @param {Element} element - The element to extract text from\n * @param {Object} options - Configuration options\n * @param {boolean} [options.trim=true] - Whether to trim whitespace\n * @param {boolean} [options.normalizeWhitespace=false] - Whether to normalize whitespace\n * @param {boolean} [options.skipComponentReady=false] - Skip waiting for components (for test environments)\n * @return {Promise<string>} All translated text content in DOM order\n */\nexport const getAllText = async (element, options = {}) => {\n if (!element) return '';\n\n const opts = {\n trim: true,\n normalizeWhitespace: false,\n skipComponentReady: false,\n ...options,\n };\n\n const nodesToSkip = new Set(['STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE', '#comment']);\n const processedNodes = new WeakSet();\n let result = '';\n\n async function processNode(node) {\n if (processedNodes.has(node) || nodesToSkip.has(node.nodeName)) return;\n\n processedNodes.add(node);\n\n // Handle text nodes\n if (node.nodeType === Node.TEXT_NODE) {\n const text = opts.trim ? node.textContent.trim() : node.textContent;\n\n if (text) {\n // Add space between adjacent text nodes if needed\n if (result && !result.endsWith(' ') && !text.startsWith(' ')) {\n result += ' ';\n }\n\n // Translate the text\n result += opts.skipComponentReady ? window.TectonElements?.loc(text) : loc(text);\n }\n return;\n }\n\n // Handle element nodes\n if (node.nodeType === Node.ELEMENT_NODE) {\n // Wait for Stencil component if needed\n const isStencilComponent = node.nodeName.startsWith('Q2-') && typeof node.componentOnReady === 'function';\n\n if (isStencilComponent && !opts.skipComponentReady) {\n await node.componentOnReady();\n }\n\n // Process children in light DOM\n for (const child of node.childNodes) {\n await processNode(child);\n }\n\n // Process shadow DOM if present\n if (node.shadowRoot) {\n for (const shadowChild of node.shadowRoot.childNodes) {\n await processNode(shadowChild);\n }\n }\n\n // Handle slot elements with assigned nodes\n if (node.nodeName === 'SLOT' && typeof node.assignedNodes === 'function') {\n const assignedNodes = node.assignedNodes();\n\n if (assignedNodes.length > 0) {\n for (const assigned of assignedNodes) {\n if (!processedNodes.has(assigned)) {\n await processNode(assigned);\n }\n }\n } else {\n // Process slot fallback content\n for (const fallback of node.childNodes) {\n if (!processedNodes.has(fallback)) {\n await processNode(fallback);\n }\n }\n }\n }\n }\n }\n\n await processNode(element);\n\n // Apply final formatting\n if (opts.trim) {\n result = result.trim();\n }\n\n if (opts.normalizeWhitespace) {\n result = result.replace(/\\s+/g, ' ');\n }\n\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,IAAIqG,KAAQrG,IAAIqG;;MAE/E;;;QAIJ,IAAIN,EAAKG,aAAaC,KAAKM,cAAc;;MAErC,MAAMC,IAAqBX,EAAKE,SAASO,WAAW,iBAAiBT,EAAKY,qBAAqB;MAE/F,IAAID,MAAuBvB,EAAKK,oBAAoB;cAC1CO,EAAKY;;;YAIf,KAAK,MAAMC,KAASb,EAAKc,YAAY;cAC3Bf,YAAYc;;;YAItB,IAAIb,EAAKhC,YAAY;QACjB,KAAK,MAAM+C,KAAef,EAAKhC,WAAW8C,YAAY;gBAC5Cf,YAAYgB;;;;YAK1B,IAAIf,EAAKE,aAAa,iBAAiBF,EAAKgB,kBAAkB,YAAY;QACtE,MAAMA,IAAgBhB,EAAKgB;QAE3B,IAAIA,EAAcnH,SAAS,GAAG;UAC1B,KAAK,MAAMoH,KAAYD,GAAe;YAClC,KAAKpB,EAAeK,IAAIgB,IAAW;oBACzBlB,YAAYkB;;;eAGvB;;UAEH,KAAK,MAAMC,KAAYlB,EAAKc,YAAY;YACpC,KAAKlB,EAAeK,IAAIiB,IAAW;oBACzBnB,YAAYmB;;;;;;;QAQpCnB,YAAYjI;;IAGlB,IAAIsH,EAAKG,MAAM;IACXO,IAASA,EAAOP;;EAGpB,IAAIH,EAAKI,qBAAqB;IAC1BM,IAASA,EAAOqB,QAAQ,QAAQ;;EAGpC,OAAOrB;AAAM"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as t, h as e } from "./index-7a5365e2.js";
|
|
2
2
|
|
|
3
|
-
import { n as i } from "./index-
|
|
3
|
+
import { n as i } from "./index-504f1a9e.js";
|
|
4
4
|
|
|
5
5
|
const o = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host(:not([hidden])){display:block;width:100%;--comp-default-btn-group-margin:var(--app-scale-5x, 25px) 0;margin:var(--tct-btn-group-margin, var(--comp-default-btn-group-margin))}.container{width:100%;display:flex;gap:var(--tct-btn-group-gap, var(--app-scale-2x, 10px))}.container.vertical{flex-direction:var(--tct-btn-group-vertical-flex-direction, column)}.container.vertical ::slotted(q2-btn){display:block;width:100%}.container.horizontal{justify-content:var(--tct-btn-group-horizontal-justify-content, flex-start);flex-direction:var(--tct-btn-group-horizontal-flex-direction, row-reverse);align-items:var(--tct-btn-group-horizontal-align-items, center);flex-wrap:var(--tct-btn-group-horizontal-flex-wrap, wrap)}.container.horizontal.full-width{flex-wrap:nowrap}.container.vertical ::slotted(q2-btn),.container.horizontal.full-width ::slotted(q2-btn){display:block;width:100%}";
|
|
6
6
|
|
|
@@ -57,16 +57,16 @@ const r = class {
|
|
|
57
57
|
if (o && i === "horizontal") n.push("full-width");
|
|
58
58
|
n.push(i);
|
|
59
59
|
return e("q2-resize-observer", {
|
|
60
|
-
key: "
|
|
60
|
+
key: "a2147fc3406a4f50f3103642bc8b41dd40cd51ce",
|
|
61
61
|
onTctResize: this.handleResize,
|
|
62
62
|
disabled: t
|
|
63
63
|
}, e("div", {
|
|
64
|
-
key: "
|
|
64
|
+
key: "0504420fa85e810ef70cf87a3e17abf9771ac9f4",
|
|
65
65
|
ref: t => this.container = t,
|
|
66
66
|
class: n.join(" "),
|
|
67
67
|
role: "group"
|
|
68
68
|
}, e("slot", {
|
|
69
|
-
key: "
|
|
69
|
+
key: "5a75ed7cf1b5e58034fe09895ec6a057787ff350"
|
|
70
70
|
})));
|
|
71
71
|
}
|
|
72
72
|
static get watchers() {
|