q2-tecton-elements 1.67.0 → 1.67.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle-report.json +431 -431
- package/dist/cjs/click-elsewhere.q2-option-list.q2-popover.entry.cjs.js.map +1 -1
- package/dist/cjs/click-elsewhere_3.cjs.entry.js +41 -14
- package/dist/cjs/click-elsewhere_3.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-action-group_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn.q2-loading.entry.cjs.js.map +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +4 -2
- package/dist/cjs/q2-btn_2.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
- package/dist/cjs/q2-card-image.cjs.entry.js +2 -2
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-context.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 +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-form.cjs.entry.js +1 -1
- package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
- package/dist/cjs/q2-grid-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-grid.cjs.entry.js +1 -1
- package/dist/cjs/q2-input.cjs.entry.js +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-link_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-meter.cjs.entry.js +1 -1
- package/dist/cjs/q2-modal.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
- package/dist/cjs/q2-mutation-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
- package/dist/cjs/q2-pill.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +2 -2
- package/dist/cjs/q2-select.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-btn/q2-btn.js +4 -2
- package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-card-image/q2-card-image.js +2 -2
- package/dist/collection/components/q2-carousel/q2-carousel.js +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
- package/dist/collection/components/q2-context/q2-context.js +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +2 -2
- package/dist/collection/components/q2-example/q2-example.js +1 -1
- package/dist/collection/components/q2-form/q2-form.js +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-grid/q2-grid.js +31 -31
- package/dist/collection/components/q2-grid-area/q2-grid-area.js +43 -43
- package/dist/collection/components/q2-input/q2-input.js +3 -3
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-meter/q2-meter.js +1 -1
- package/dist/collection/components/q2-modal/q2-modal.js +1 -1
- package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +6 -6
- package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
- package/dist/collection/components/q2-pill/q2-pill.js +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +40 -13
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-radio/q2-radio.js +1 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-select/q2-select.js +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
- package/dist/components/q2-action-group2.js +1 -1
- package/dist/components/q2-action-sheet.js +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-btn2.js +4 -2
- package/dist/components/q2-btn2.js.map +1 -1
- package/dist/components/q2-calendar.js +1 -1
- package/dist/components/q2-card-image.js +2 -2
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-carousel.js +1 -1
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox-group.js +1 -1
- package/dist/components/q2-checkbox2.js +1 -1
- package/dist/components/q2-context.js +1 -1
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-data-table.js +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown.js +1 -1
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-example.js +1 -1
- package/dist/components/q2-form.js +1 -1
- package/dist/components/q2-formatted-text.js +1 -1
- package/dist/components/q2-grid-area.js +1 -1
- package/dist/components/q2-grid.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-message2.js +1 -1
- package/dist/components/q2-meter.js +1 -1
- package/dist/components/q2-modal.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-mutation-observer.js +1 -1
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-option-list2.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 +40 -13
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +1 -1
- package/dist/components/q2-radio.js +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 +1 -1
- package/dist/components/q2-stepper-pane.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-textarea.js +1 -1
- package/dist/esm/click-elsewhere.q2-option-list.q2-popover.entry.js.map +1 -1
- package/dist/esm/click-elsewhere_3.entry.js +41 -14
- package/dist/esm/click-elsewhere_3.entry.js.map +1 -1
- package/dist/esm/q2-action-group_2.entry.js +2 -2
- package/dist/esm/q2-action-sheet.entry.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-btn.q2-loading.entry.js.map +1 -1
- package/dist/esm/q2-btn_2.entry.js +4 -2
- package/dist/esm/q2-btn_2.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +1 -1
- package/dist/esm/q2-card-image.entry.js +2 -2
- package/dist/esm/q2-carousel-pane.entry.js +2 -2
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox_2.entry.js +1 -1
- package/dist/esm/q2-context.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 +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-form.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +1 -1
- package/dist/esm/q2-grid-area.entry.js +1 -1
- package/dist/esm/q2-grid.entry.js +1 -1
- package/dist/esm/q2-input.entry.js +1 -1
- package/dist/esm/q2-item.entry.js +1 -1
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-link_2.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-meter.entry.js +1 -1
- package/dist/esm/q2-modal.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +2 -2
- package/dist/esm/q2-mutation-observer.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +3 -3
- package/dist/esm/q2-pill.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/q2-section.entry.js +2 -2
- package/dist/esm/q2-select.entry.js +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/q2-tecton-elements/click-elsewhere.q2-option-list.q2-popover.entry.esm.js.map +1 -1
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +212 -193
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-action-group_2.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-avatar.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-btn.q2-loading.entry.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-btn_2.entry.js +4 -2
- package/dist/q2-tecton-elements/q2-btn_2.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-calendar.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-card-image.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-context.entry.js +15 -15
- package/dist/q2-tecton-elements/q2-currency.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-data-table.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-detail.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +79 -79
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-form.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-grid-area.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-grid.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-input.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-item.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-link_2.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-message.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-meter.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-modal.entry.js +50 -50
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +66 -66
- package/dist/q2-tecton-elements/q2-mutation-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-pagination.entry.js +19 -19
- package/dist/q2-tecton-elements/q2-pill.entry.js +36 -36
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-radio.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +22 -22
- package/dist/q2-tecton-elements/q2-select.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-stepper.entry.js +25 -25
- package/dist/q2-tecton-elements/q2-textarea.entry.js +2 -2
- package/dist/types/components/q2-popover/q2-popover.d.ts +1 -0
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +1 -1
- package/package.json +71 -69
- /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/jest.e2e-coverage.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/scripts/docs-generator/index.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/scripts/docs-generator/markdown-generator.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/scripts/docs-generator/tag-handlers.d.ts +0 -0
- /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/scripts/docs-generator/types.d.ts +0 -0
|
@@ -304,7 +304,7 @@ export class Q2Pagination {
|
|
|
304
304
|
total,
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
|
-
return (h("nav", { key: '
|
|
307
|
+
return (h("nav", { key: '642369130b2d57d4e6a89927608636a4da87f11d', class: this.containerClasses.join(' '), ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: 'e988b3374cec5bb1a73dfbcc705899fb3a3474d6', class: "description", "test-id": "description" }, pagesOnly
|
|
308
308
|
? loc('tecton.element.pagination.pages', {
|
|
309
309
|
current: page,
|
|
310
310
|
total: totalPages,
|
|
@@ -313,10 +313,10 @@ export class Q2Pagination {
|
|
|
313
313
|
range: currentRange,
|
|
314
314
|
recordType: recordType.toLowerCase(),
|
|
315
315
|
total: total.toLocaleString(),
|
|
316
|
-
})), h("div", { key: '
|
|
316
|
+
})), h("div", { key: '8ac5316082ab9fcc03fd6c605e56e31124f5d5dc', class: "controls" }, h("div", { key: 'c7e99c77f10d0d587d31af19b3bd39ba2d64aeb7', class: "btn-group" }, h("q2-btn", { key: 'ba7cc1e9b1eee9d0db75e7f653c74974e06435a6', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: disabled || onFirstPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '90b82dd3b935af151d517c997086e5779e51bd3c', type: "chevron-double-left" })), h("q2-btn", { key: '179b59d1c5cebff1897d5e0a3e825e969da90719', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: disabled || onFirstPage, onTctClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'b23b78e56fc5df453036c07c055f2bc7bf10da11', type: "chevron-left" }))), h("div", { key: '5ac4941af9479fe7c2644cfe56fb1bf3f4e2c968', class: "input-display", hidden: isFullViewHidden }, h("span", { key: 'f748874515ec184a25bc2f10f16f1031b4ed5583', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '2e870838a5ca57ccfd80f648f8eaf6f895c950be', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '3c765b872520ae12cf6d86789a5dfb56fe140d97', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => event.stopImmediatePropagation(), onTctChange: event => {
|
|
317
317
|
event.stopPropagation();
|
|
318
318
|
this.handlePageChange(event.detail.value);
|
|
319
|
-
}, "test-id": "pageInput", current: "page", disabled: disabled })), h("span", { key: '
|
|
319
|
+
}, "test-id": "pageInput", current: "page", disabled: disabled })), h("span", { key: '1fad0a391c7b5b2bac9439b7116674d43d205a95', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '52dc5be6a7deae84418c2cfbf108b68451c3db5b', class: "btn-group" }, h("q2-btn", { key: 'b1aa2468c227ad4f251736eee6596a0525f620dd', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: disabled || onLastPage, onTctClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: '689bc3f2f90724c53ff67d9724d17cc303af716c', type: "chevron-right" })), h("q2-btn", { key: 'bb1bb9cbbbc58454e6f811fcaa5359d561d79042', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: disabled || onLastPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: 'd271e5fd48c58f95f0b8d2d45af6f48c335038e8', type: "chevron-double-right" })))), h("div", { key: 'cc2ac1c470e2034b242079c44ecf4435cb42548e', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
|
|
320
320
|
}
|
|
321
321
|
static get is() { return "q2-pagination"; }
|
|
322
322
|
static get encapsulation() { return "shadow"; }
|
|
@@ -372,7 +372,7 @@ export class Q2Pill {
|
|
|
372
372
|
wrapperClassNames.push('has-icon');
|
|
373
373
|
if (optionCount)
|
|
374
374
|
wrapperClassNames.push('has-options');
|
|
375
|
-
return (h("click-elsewhere", { key: '
|
|
375
|
+
return (h("click-elsewhere", { key: 'e967de8b2086ebf86f51cc927c3430c07ad37636', onChange: this.onClickElsewhere }, h("div", { key: '38c871229f1f80d49b003d5c6f7895c335a9eed8', class: wrapperClassNames.join(' ') }, h("div", { key: '8dd9a60999c49de096f8f8f67adccffba0f9a80a', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '1d485d62c6acfaee927e1fa1aa0bc9401c7f2c98', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleFocusOut, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": `${this.buttonContent}${!optionCount && active ? ` ${loc('tecton.element.pill.active')}` : ''}`, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent)), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '05ca8c8195186b220364ee67198d6210bbe34455', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, onFocusout: this.handleFocusOut }, h("div", { key: 'e1eb81bfc0489fd9450975eee632fb59830cce54', class: "popover-content" }, h("div", { key: 'a101a2d7f88fdb18f2a859737f1bca96742bad7e', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleKeydown }, h("slot", { key: '752c27b869d1dd91f5d369e7f1675554e48a4554', name: "popover-top" })), h("q2-option-list", { key: '2f70d1533c8733721326b02a47531a7feb47ab7e', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), onPopoverState: this.onPopoverState, label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: '5ffddd45ce88c535a5bb4481f34a74690cb8d46f' })), h("div", { key: '1c5ae3722ea7caace731239ac0d91d4fcbe7eb8b', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleKeydown }, h("slot", { key: 'afa0d457a65303d7a4e50fa9e633e9fa609922e8', name: "popover-bottom" })))))));
|
|
376
376
|
}
|
|
377
377
|
static get is() { return "q2-pill"; }
|
|
378
378
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,6 +40,7 @@ export class Q2Popover {
|
|
|
40
40
|
*/
|
|
41
41
|
this.displayBuffer = 10;
|
|
42
42
|
this.orientationChanged = false;
|
|
43
|
+
this.pendingAnimationResolve = null;
|
|
43
44
|
// #endregion
|
|
44
45
|
// #region State Properties
|
|
45
46
|
this.animationState = 'idle';
|
|
@@ -67,6 +68,8 @@ export class Q2Popover {
|
|
|
67
68
|
};
|
|
68
69
|
this.setAbsoluteCSSProperties = async () => {
|
|
69
70
|
const { controlElement, containerElement, currentDirection, align } = this;
|
|
71
|
+
if (!containerElement)
|
|
72
|
+
return;
|
|
70
73
|
if (align === 'right') {
|
|
71
74
|
containerElement.style.setProperty('--comp-pop-right', '0');
|
|
72
75
|
containerElement.style.setProperty('--comp-pop-left', 'unset');
|
|
@@ -87,11 +90,14 @@ export class Q2Popover {
|
|
|
87
90
|
}
|
|
88
91
|
// Wait for one paint to prevent layout thrashing
|
|
89
92
|
await waitForNextPaint();
|
|
90
|
-
containerElement
|
|
93
|
+
if (this.containerElement)
|
|
94
|
+
containerElement.style.setProperty('--comp-pop-opacity', '1');
|
|
91
95
|
};
|
|
92
96
|
this.setPopoverAPICSSProperties = async () => {
|
|
93
97
|
var _a, _b, _c;
|
|
94
98
|
const { controlElement, containerElement, currentDirection, isModule, align } = this;
|
|
99
|
+
if (!containerElement)
|
|
100
|
+
return;
|
|
95
101
|
const { top: controlTop, bottom: controlBottom, left: controlLeft, right: controlRight, } = (_b = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(controlElement)) !== null && _b !== void 0 ? _b : {
|
|
96
102
|
top: 0,
|
|
97
103
|
bottom: 0,
|
|
@@ -129,7 +135,8 @@ export class Q2Popover {
|
|
|
129
135
|
}
|
|
130
136
|
// Wait for one paint to prevent layout thrashing
|
|
131
137
|
await waitForNextPaint();
|
|
132
|
-
containerElement
|
|
138
|
+
if (this.containerElement)
|
|
139
|
+
containerElement.style.setProperty('--comp-pop-opacity', '1');
|
|
133
140
|
};
|
|
134
141
|
this.viewPortChanged = () => {
|
|
135
142
|
if (!this.open)
|
|
@@ -144,8 +151,13 @@ export class Q2Popover {
|
|
|
144
151
|
// #endregion
|
|
145
152
|
// #region Component Lifecycle Events
|
|
146
153
|
disconnectedCallback() {
|
|
154
|
+
var _a;
|
|
147
155
|
this.removeViewportListeners();
|
|
148
|
-
|
|
156
|
+
if (this.pendingAnimationResolve) {
|
|
157
|
+
this.pendingAnimationResolve();
|
|
158
|
+
this.pendingAnimationResolve = null;
|
|
159
|
+
}
|
|
160
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('toggle', this.handlePopoverToggleEvent);
|
|
149
161
|
this.containerElement = null;
|
|
150
162
|
this.contentElement = null;
|
|
151
163
|
this.controlElement = null;
|
|
@@ -157,9 +169,10 @@ export class Q2Popover {
|
|
|
157
169
|
}
|
|
158
170
|
}
|
|
159
171
|
componentDidLoad() {
|
|
172
|
+
var _a;
|
|
160
173
|
this.handleMinHeight();
|
|
161
174
|
if (this.supportsPopoverAPI)
|
|
162
|
-
this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
|
|
175
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.addEventListener('toggle', this.handlePopoverToggleEvent);
|
|
163
176
|
if (this.open)
|
|
164
177
|
this.determinePopDirection();
|
|
165
178
|
}
|
|
@@ -175,7 +188,8 @@ export class Q2Popover {
|
|
|
175
188
|
// #endregion
|
|
176
189
|
// #region Public Methods API
|
|
177
190
|
async scrollContainerTo(options) {
|
|
178
|
-
|
|
191
|
+
var _a;
|
|
192
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.scrollTo(options);
|
|
179
193
|
}
|
|
180
194
|
async toggle() {
|
|
181
195
|
this.open = !this.open;
|
|
@@ -198,17 +212,25 @@ export class Q2Popover {
|
|
|
198
212
|
// Wait for close animation to complete
|
|
199
213
|
if (this.animated) {
|
|
200
214
|
await new Promise(resolve => {
|
|
215
|
+
var _a;
|
|
201
216
|
const handleAnimationEnd = () => {
|
|
202
|
-
|
|
217
|
+
var _a;
|
|
218
|
+
this.pendingAnimationResolve = null;
|
|
219
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('animationend', handleAnimationEnd);
|
|
203
220
|
resolve();
|
|
204
221
|
};
|
|
205
|
-
this.
|
|
222
|
+
this.pendingAnimationResolve = handleAnimationEnd;
|
|
223
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.addEventListener('animationend', handleAnimationEnd);
|
|
224
|
+
if (!this.containerElement)
|
|
225
|
+
resolve();
|
|
206
226
|
});
|
|
207
227
|
}
|
|
208
228
|
else {
|
|
209
229
|
// No animation, proceed immediately
|
|
210
230
|
await waitForNextPaint();
|
|
211
231
|
}
|
|
232
|
+
if (!this.containerElement)
|
|
233
|
+
return;
|
|
212
234
|
this.currentDirection = undefined;
|
|
213
235
|
this.animationState = 'idle';
|
|
214
236
|
if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
|
|
@@ -257,6 +279,8 @@ export class Q2Popover {
|
|
|
257
279
|
window.addEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
258
280
|
}
|
|
259
281
|
clearCSSProperties() {
|
|
282
|
+
if (!this.containerElement)
|
|
283
|
+
return;
|
|
260
284
|
this.containerElement.style.removeProperty('--comp-pop-max-height');
|
|
261
285
|
this.containerElement.style.removeProperty('--comp-pop-top');
|
|
262
286
|
this.containerElement.style.removeProperty('--comp-pop-bottom');
|
|
@@ -271,6 +295,8 @@ export class Q2Popover {
|
|
|
271
295
|
if (containerElement)
|
|
272
296
|
containerElement.style.maxHeight = null;
|
|
273
297
|
await waitForNextPaint();
|
|
298
|
+
if (!this.containerElement)
|
|
299
|
+
return;
|
|
274
300
|
const { isModule } = this;
|
|
275
301
|
const { top: controlTop, bottom: controlBottom } = (_b = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(controlElement)) !== null && _b !== void 0 ? _b : {
|
|
276
302
|
top: 0,
|
|
@@ -303,13 +329,13 @@ export class Q2Popover {
|
|
|
303
329
|
}
|
|
304
330
|
const directionWithMostSpace = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';
|
|
305
331
|
// We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)
|
|
306
|
-
const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
|
|
332
|
+
const shouldUpdateMaxHeight = !(containerElement === null || containerElement === void 0 ? void 0 : containerElement.style.getPropertyValue('--comp-pop-max-height')) || this.orientationChanged;
|
|
307
333
|
// we do not want to constantly update the max-height after an orientation change, so we switch this back to false
|
|
308
334
|
this.orientationChanged = false;
|
|
309
335
|
const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
|
|
310
336
|
switch (currentOrDetermineDirection) {
|
|
311
337
|
case 'up':
|
|
312
|
-
if (shouldUpdateMaxHeight) {
|
|
338
|
+
if (shouldUpdateMaxHeight && containerElement) {
|
|
313
339
|
const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;
|
|
314
340
|
const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);
|
|
315
341
|
containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
|
|
@@ -317,7 +343,7 @@ export class Q2Popover {
|
|
|
317
343
|
this.setDirectionAndShow('up');
|
|
318
344
|
break;
|
|
319
345
|
case 'down':
|
|
320
|
-
if (shouldUpdateMaxHeight) {
|
|
346
|
+
if (shouldUpdateMaxHeight && containerElement) {
|
|
321
347
|
const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;
|
|
322
348
|
const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);
|
|
323
349
|
containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
|
|
@@ -337,10 +363,11 @@ export class Q2Popover {
|
|
|
337
363
|
window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
338
364
|
}
|
|
339
365
|
setDirectionAndShow(direction) {
|
|
366
|
+
var _a;
|
|
340
367
|
// Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
|
|
341
368
|
// popover can be closed between the time the popover is opened and the time the direction is determined
|
|
342
369
|
const isOpen = this.open;
|
|
343
|
-
if (!isOpen)
|
|
370
|
+
if (!isOpen || !this.containerElement)
|
|
344
371
|
return;
|
|
345
372
|
this.currentDirection = direction;
|
|
346
373
|
if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
|
|
@@ -349,7 +376,7 @@ export class Q2Popover {
|
|
|
349
376
|
}
|
|
350
377
|
else {
|
|
351
378
|
this.setPopoverAPICSSProperties();
|
|
352
|
-
this.containerElement.showPopover();
|
|
379
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.showPopover();
|
|
353
380
|
}
|
|
354
381
|
}
|
|
355
382
|
// #endregion
|
|
@@ -368,7 +395,7 @@ export class Q2Popover {
|
|
|
368
395
|
containerClasses.push('animating-open');
|
|
369
396
|
if (this.animated && this.animationState === 'closing')
|
|
370
397
|
containerClasses.push('animating-close');
|
|
371
|
-
return (h("div", { key: '
|
|
398
|
+
return (h("div", { key: '779d18b2765abec3eff0f19ca297b01356a06a7d', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "manual" }, h("div", { key: '47eb4c1420bbc63f821333c03804c1843363f946', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '8554a334fd61f07cf712e2bdbe797f7835878469' }))));
|
|
372
399
|
}
|
|
373
400
|
static get is() { return "q2-popover"; }
|
|
374
401
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-popover.js","sourceRoot":"","sources":["../../../../src/components/q2-popover/q2-popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,CAAC,EAED,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EAEN,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;GAIG;AAEH,MAAM,OAAO,SAAS;IADtB;QAMI;;WAEG;QACH,kBAAa,GAAG,EAAE,CAAC;QACnB,uBAAkB,GAAY,KAAK,CAAC;QAQpC,aAAa;QACb,2BAA2B;QAG3B,mBAAc,GAAmC,MAAM,CAAC;QAGxD,qBAAgB,GAAkB,SAAS,CAAC;QAE5C,sFAAsF;QAEtF,SAAI,GAAY,KAAK,CAAC;QAEtB,aAAa;QACb,8BAA8B;QAE9B,2EAA2E;QAE3E,UAAK,GAAqB,MAAM,CAAC;QAEjC;;;;WAIG;QAEH,aAAQ,GAAY,IAAI,CAAC;QA6BzB,SAAI,GAAa,IAAI,CAAC;QAuPtB,oBAAe,GAAG,GAAG,EAAE;YACnB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,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f,8DAAQ,CACN,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["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, isMobile, isInScrollableContainer } from '../../utils';\nimport mirrorEmit from '@/utils/mirror-emit';\n\n/**\n * ***********\n * * WARNING *\n * ***********\n * Touching this file obligates you to manually test thoroughly, because Puppeteer can't capture every edgecase.\n *\n * Each of the following Scenarios must be tested on each Device, in each Environment.\n *\n * Scenarios:\n * - Q2 Select searchable\n * - Q2 Select non-searchable\n *\n * Orientations:\n * - Portrait\n * - Landscape\n *\n * Devices:\n * - iOS Safari\n * - Android Chrome\n * - MacOS Safari\n * - Chrome\n * - Firefox\n *\n * Environments:\n * - Standard (Outside of Iframe)\n * - SDK Extension (Inside of Iframe)\n */\n\n/**\n * @name Popover\n * @category Display\n * @summary Use for positioning floating content relative to a trigger element.\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 animationState: 'idle' | 'opening' | 'closing' = 'idle';\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when we transitiong fully to Popover API and get rid of 'legacy' mode\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 /**\n * Controls whether the popover is animated when opening/closing.\n * Default is true (animated). Set to false to disable animations.\n * Animation is also disabled if the user has enabled prefers-reduced-motion.\n */\n @Prop({ reflect: true })\n animated: boolean = true;\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 * @deprecated Use 'tctPopoverStateChanged' instead\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n tctPopoverStateChanged: 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 mirrorEmit(this, ['popoverStateChanged', 'tctPopoverStateChanged'], { open });\n\n if (open) {\n this.animationState = 'opening';\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.animationState = 'closing';\n this.removeViewportListeners();\n\n // Wait for close animation to complete\n if (this.animated) {\n await new Promise<void>(resolve => {\n const handleAnimationEnd = () => {\n this.containerElement.removeEventListener('animationend', handleAnimationEnd);\n resolve();\n };\n this.containerElement.addEventListener('animationend', handleAnimationEnd);\n });\n } else {\n // No animation, proceed immediately\n await waitForNextPaint();\n }\n\n this.currentDirection = undefined;\n this.animationState = 'idle';\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(): boolean {\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 if (isInScrollableContainer(this.hostElement) && !isMobile()) {\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n }\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 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 const isScrollableIframe = isModule && isInScrollableContainer(this.hostElement);\n if (isModule && !isScrollableIframe) {\n const {\n outletOffset = 0,\n innerHeight = window.innerHeight,\n top: topBarHeight = 0,\n bottom: bottomBarHeight = 0,\n } = window.Tecton?.platformDimensions || {};\n\n const distanceToIframeBottom = window.innerHeight - controlBottom;\n\n // controlElement position visually on the page\n const visualControlTop = outletOffset > 0 ? controlTop : controlTop + outletOffset - topBarHeight;\n const visualControlBottom = outletOffset + controlBottom - topBarHeight;\n\n // visual space around the controlElement\n const viewableSpaceAbove = visualControlTop;\n const viewableSpaceBelow = innerHeight - bottomBarHeight - visualControlBottom;\n\n // calculate space above and below controlElement\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n maxSpaceAbove = viewableSpaceAbove - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.innerHeight;\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 mirrorEmit(this, ['popoverStateChanged', 'tctPopoverStateChanged'], { 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 const isScrollableIframe = isModule && isInScrollableContainer(this.hostElement);\n\n if (currentDirection === 'up') {\n if (isModule && !isScrollableIframe) {\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.scrollY}px`\n );\n }\n }\n\n if (currentDirection === 'down') {\n if (isModule && !isScrollableIframe) {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n } else {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom + window.scrollY}px`);\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 (isMobile()) containerClasses.push('mobile');\n if (this.show) containerClasses.push('show');\n if (this.block) containerClasses.push('block');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n if (this.animated && this.animationState === 'opening') containerClasses.push('animating-open');\n if (this.animated && this.animationState === 'closing') containerClasses.push('animating-close');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n tabIndex={-1}\n popover=\"manual\"\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"]}
|
|
1
|
+
{"version":3,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BAAgB,CAAC,CAAC;QAChG,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;YAAE,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAEjG,OAAO,CACH,4DACI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAC,QAAQ;YAEhB,4DACI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS;gBAEf,8DAAQ,CACN,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["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, isMobile, isInScrollableContainer } from '../../utils';\nimport mirrorEmit from '@/utils/mirror-emit';\n\n/**\n * ***********\n * * WARNING *\n * ***********\n * Touching this file obligates you to manually test thoroughly, because Puppeteer can't capture every edgecase.\n *\n * Each of the following Scenarios must be tested on each Device, in each Environment.\n *\n * Scenarios:\n * - Q2 Select searchable\n * - Q2 Select non-searchable\n *\n * Orientations:\n * - Portrait\n * - Landscape\n *\n * Devices:\n * - iOS Safari\n * - Android Chrome\n * - MacOS Safari\n * - Chrome\n * - Firefox\n *\n * Environments:\n * - Standard (Outside of Iframe)\n * - SDK Extension (Inside of Iframe)\n */\n\n/**\n * @name Popover\n * @category Display\n * @summary Use for positioning floating content relative to a trigger element.\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 pendingAnimationResolve: (() => void) | null = null;\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 animationState: 'idle' | 'opening' | 'closing' = 'idle';\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when we transitiong fully to Popover API and get rid of 'legacy' mode\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 /**\n * Controls whether the popover is animated when opening/closing.\n * Default is true (animated). Set to false to disable animations.\n * Animation is also disabled if the user has enabled prefers-reduced-motion.\n */\n @Prop({ reflect: true })\n animated: boolean = true;\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 * @deprecated Use 'tctPopoverStateChanged' instead\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n tctPopoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n if (this.pendingAnimationResolve) {\n this.pendingAnimationResolve();\n this.pendingAnimationResolve = null;\n }\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 mirrorEmit(this, ['popoverStateChanged', 'tctPopoverStateChanged'], { open });\n\n if (open) {\n this.animationState = 'opening';\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.animationState = 'closing';\n this.removeViewportListeners();\n\n // Wait for close animation to complete\n if (this.animated) {\n await new Promise<void>(resolve => {\n const handleAnimationEnd = () => {\n this.pendingAnimationResolve = null;\n this.containerElement?.removeEventListener('animationend', handleAnimationEnd);\n resolve();\n };\n this.pendingAnimationResolve = handleAnimationEnd;\n this.containerElement?.addEventListener('animationend', handleAnimationEnd);\n if (!this.containerElement) resolve();\n });\n } else {\n // No animation, proceed immediately\n await waitForNextPaint();\n }\n\n if (!this.containerElement) return;\n\n this.currentDirection = undefined;\n this.animationState = 'idle';\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(): boolean {\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 if (isInScrollableContainer(this.hostElement) && !isMobile()) {\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n }\n screen?.orientation?.addEventListener('orientationchange', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n clearCSSProperties() {\n if (!this.containerElement) return;\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 await waitForNextPaint();\n if (!this.containerElement) return;\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 const isScrollableIframe = isModule && isInScrollableContainer(this.hostElement);\n if (isModule && !isScrollableIframe) {\n const {\n outletOffset = 0,\n innerHeight = window.innerHeight,\n top: topBarHeight = 0,\n bottom: bottomBarHeight = 0,\n } = window.Tecton?.platformDimensions || {};\n\n const distanceToIframeBottom = window.innerHeight - controlBottom;\n\n // controlElement position visually on the page\n const visualControlTop = outletOffset > 0 ? controlTop : controlTop + outletOffset - topBarHeight;\n const visualControlBottom = outletOffset + controlBottom - topBarHeight;\n\n // visual space around the controlElement\n const viewableSpaceAbove = visualControlTop;\n const viewableSpaceBelow = innerHeight - bottomBarHeight - visualControlBottom;\n\n // calculate space above and below controlElement\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n maxSpaceAbove = viewableSpaceAbove - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.innerHeight;\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 && containerElement) {\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 && containerElement) {\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 mirrorEmit(this, ['popoverStateChanged', 'tctPopoverStateChanged'], { 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 if (!containerElement) return;\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 if (this.containerElement) 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 || !this.containerElement) 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 if (!containerElement) return;\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 const isScrollableIframe = isModule && isInScrollableContainer(this.hostElement);\n\n if (currentDirection === 'up') {\n if (isModule && !isScrollableIframe) {\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.scrollY}px`\n );\n }\n }\n\n if (currentDirection === 'down') {\n if (isModule && !isScrollableIframe) {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n } else {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom + window.scrollY}px`);\n }\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n if (this.containerElement) 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 (isMobile()) containerClasses.push('mobile');\n if (this.show) containerClasses.push('show');\n if (this.block) containerClasses.push('block');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n if (this.animated && this.animationState === 'opening') containerClasses.push('animating-open');\n if (this.animated && this.animationState === 'closing') containerClasses.push('animating-close');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n tabIndex={-1}\n popover=\"manual\"\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"]}
|
|
@@ -90,7 +90,7 @@ export class Q2Radio {
|
|
|
90
90
|
// #endregion
|
|
91
91
|
// #region Render Methods
|
|
92
92
|
render() {
|
|
93
|
-
return (h("div", { key: '
|
|
93
|
+
return (h("div", { key: '1c740c79651798b5aa532b48a8d35fbfb44e47a9', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '1e8f5b6100d8ad8c43a60afba569184f5ccd8530', ref: el => (this.inputField = el), class: "sr", id: this._id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { key: 'd86c5a574f853b570491bc9842996d9300b3a72c', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: '473eb06c9c4a1b7ebd8014642da157b2aa4a5d08', viewBox: "0 0 18 18" }, h("circle", { key: '0035db29b3d96bb1e322fd8aa7233554098be30a', class: "big-circle", stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '6efda15f869a255325c8f09e9cf250a50627bd6d', class: "small-circle", stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: '5def4a33beb0e6bd0e4327cdfb07d3fdabb4a72e', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: 'f8ca1eac5a03d93e7019b5e5bd25456acf5a1230' }))))));
|
|
94
94
|
}
|
|
95
95
|
static get is() { return "q2-radio"; }
|
|
96
96
|
static get encapsulation() { return "shadow"; }
|
|
@@ -178,7 +178,7 @@ export class Q2RadioGroup {
|
|
|
178
178
|
const showLabel = this.label || this.optional || this.readonly;
|
|
179
179
|
const { hasError } = this;
|
|
180
180
|
const showLabelRow = (showLabel && !this.hideLabel) || hasError;
|
|
181
|
-
return (h(Fragment, { key: '
|
|
181
|
+
return (h(Fragment, { key: '3fa5b7ba14cd74a3544ad38d40c74127126f0fc6' }, showLabelRow && (h("div", { key: '254b8a8ec9f21fccf2227966f56e366682957da8', class: "label-row" }, showLabel && !this.hideLabel && h("div", { key: 'f1176458f14bfc50adaab4a0d5342a7fcf58c6a4', class: "group-legend" }, renderLabel(this)), hasError && (h("q2-icon", { key: '7b829af0555cd13090459c5dc83ba22ce4cbe92c', type: "error", "test-id": "iconError" })))), h("fieldset", { key: '1eb9e6e18c1a5442d4582f23649b06d3864412b7', onChange: this.onInnerRadioChange, "aria-invalid": hasError ? `${hasError}` : undefined }, showLabel && h("legend", { key: '2ee4c9b44c86077fbda3f9eef02da24546cb6ec6', class: "sr-only" }, renderLabel(this)), this.inputDom())));
|
|
182
182
|
}
|
|
183
183
|
static get is() { return "q2-radio-group"; }
|
|
184
184
|
static get encapsulation() { return "shadow"; }
|
|
@@ -153,7 +153,7 @@ export class Q2RelativeTime {
|
|
|
153
153
|
// #region Render Methods
|
|
154
154
|
render() {
|
|
155
155
|
const { shouldShow, displayedMessage } = this;
|
|
156
|
-
return h(Fragment, { key: '
|
|
156
|
+
return h(Fragment, { key: '3a518920ff969cb0b60ca20ac780e11022803bef' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
|
|
157
157
|
}
|
|
158
158
|
static get is() { return "q2-relative-time"; }
|
|
159
159
|
static get encapsulation() { return "shadow"; }
|
|
@@ -76,7 +76,7 @@ export class Q2ResizeObserver {
|
|
|
76
76
|
// #endregion
|
|
77
77
|
// #region Render Methods
|
|
78
78
|
render() {
|
|
79
|
-
return h("slot", { key: '
|
|
79
|
+
return h("slot", { key: 'f415d8b1adcb2cdfd6e76d09e9865fbfbeb2371e', onSlotchange: this.handleSlotChange });
|
|
80
80
|
}
|
|
81
81
|
static get is() { return "q2-resize-observer"; }
|
|
82
82
|
static get encapsulation() { return "shadow"; }
|
|
@@ -186,9 +186,9 @@ export class Q2Section {
|
|
|
186
186
|
wrapperClasses.push('is-transitioning');
|
|
187
187
|
}
|
|
188
188
|
const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
|
|
189
|
-
return (h("section", { key: '
|
|
189
|
+
return (h("section", { key: '3128e3974825bcd873c7713c20e1b4f004d02a30', class: "wrapper" }, h("header", { key: '1eb1fb74a992c76989a2a8baaa3bee68afa57138', class: hasHeader ? 'has-header' : '' }, h("div", { key: '9621ce7f0ccbfb97f522b5640d986371e0ed2d08', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '9b4819672218286c3b0d11417933b6661a97c2af', class: "title" }, loc(this.label)), h("div", { key: '3ad3f55b3a554575b5b361ea565883860ce843b3', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: 'ada9ab542b0f37d627fd1086c92289ebb6ec9049', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'dfd4ba0293689a3d603a1c1168e2f140c5307d60', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: '6c72dd59ead1dad5a54def864afa4d5d6ff7ce14', type: "chevron-up" })))), h("div", { key: '96434da7e59bf12b908a95aa4aa46fe59655da32', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
|
|
190
190
|
height: this.contentHeight,
|
|
191
|
-
} }, h("div", { key: '
|
|
191
|
+
} }, h("div", { key: 'b6ef59a27be6c6b3c0cdc8b23eef7d7a80a0937e', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'bca7946799bfd50e1be14b24e4106df2a583b43b', ref: (el) => (this.contentSlot = el) })))));
|
|
192
192
|
}
|
|
193
193
|
static get is() { return "q2-section"; }
|
|
194
194
|
static get encapsulation() { return "shadow"; }
|
|
@@ -797,7 +797,7 @@ export class Q2Select {
|
|
|
797
797
|
]), checked: showSelected, "test-id": "selectedOptionsButton", onClick: this.showSelectedOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "selected" }, loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount]))))));
|
|
798
798
|
}
|
|
799
799
|
render() {
|
|
800
|
-
return (h("click-elsewhere", { key: '
|
|
800
|
+
return (h("click-elsewhere", { key: 'c0da37dd6495f81c0e9fa7303ed3059f60521d96', class: this.wrapperClasses, role: "presentation", onChange: this.clickedElsewhere }, this.renderSelectField()));
|
|
801
801
|
}
|
|
802
802
|
static get is() { return "q2-select"; }
|
|
803
803
|
static get encapsulation() { return "shadow"; }
|
|
@@ -280,7 +280,7 @@ export class Q2Stepper {
|
|
|
280
280
|
const containerClasses = ['step-container'];
|
|
281
281
|
if (scrollEnabled)
|
|
282
282
|
containerClasses.push('has-scroll');
|
|
283
|
-
return (h(Fragment, { key: '
|
|
283
|
+
return (h(Fragment, { key: '921748b0e20ada57cac4f0b66ac9ed97d2355d26' }, h("div", { key: '3d5099613b5a5e825ade9a246dbec2068e04a7d8', class: containerClasses.join(' ') }, scrollEnabled && (h(Fragment, { key: '3842e7310fa0788566192e34fee1d1df20f48b52' }, h("div", { key: 'ad9d8ba937cc012dca25b8844e2ecea36be1e4c8', class: "gradient-left", hidden: !showScrollLeft }), h("div", { key: '4a17dcc015ac03d2b6c41d2493c7ae81196d850f', class: "gradient-right", hidden: !showScrollRight }), h("q2-btn", { key: 'b38a23630a4c0f330aa52d8b2cfc7643b3fa134c', class: "btn-left", hideLabel: true, hidden: !this.showScrollLeft, label: loc('tecton.element.stepper.scrollLeft'), onTctClick: () => this.onScrollBtnClick('left') }, h("q2-icon", { key: '043873f95eae37851127d03c61fd73c93abae581', type: "chevron-left" })), h("q2-btn", { key: 'b86849ccce00f6ddbdd25a64f345f98e6070dd19', class: "btn-right", hideLabel: true, hidden: !this.showScrollRight, label: loc('tecton.element.stepper.scrollRight'), onTctClick: () => this.onScrollBtnClick('right') }, h("q2-icon", { key: 'de9ea9fc186474cb0f3a57f6314aa1e78539a2cd', type: "chevron-right" })))), h("ul", { key: '10078d2a1382c4abee65f52c88ef3006cfdd0c19', onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, stepCount > 0 && [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))), h("div", { key: '96efdd3370c5fc3ed7f91d372a645063b9b6ad61', role: "list" }, h("slot", { key: '26bfea7637cd71eb704d626cd93c74c3df13c4ba', onSlotchange: () => this.onSlotChange() }))));
|
|
284
284
|
}
|
|
285
285
|
static get is() { return "q2-stepper"; }
|
|
286
286
|
static get encapsulation() { return "shadow"; }
|
|
@@ -73,7 +73,7 @@ export class Q2StepperPane {
|
|
|
73
73
|
// #region Render Methods
|
|
74
74
|
render() {
|
|
75
75
|
const { label, isActive } = this;
|
|
76
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: '3522e747efa7fceace61bfcbc8ebe875a122b68d', role: "listitem" }, h(Fragment, { key: '986e434647215ff29c168609a2154156fdbb69a1' }, h("div", { key: 'ed2fef05b366c5fd3d8f0b64db2ce4dceb3b6735', "aria-label": label && loc(label), tabindex: "0", hidden: !isActive && !(this.isChildActive && this.showWithChildren) }, h("slot", { key: '5b5333b64c2114e5fd7caada8818eb2ce793900f' })), h("div", { key: '6aeb4f8ebc8700ac3c363bd72023743eba58f841', hidden: true }, h("slot", { key: '7d3eaf00c409f597efbb934a8d356195fa239265', name: "label", onSlotchange: () => this.contentChange.emit() }), h("slot", { key: '258bf88e3a2c98734501a3d3e7b66e1735011f50', name: "description", onSlotchange: () => this.contentChange.emit() })), h("slot", { key: '4013f30dde148392690cdef431959a056af98873', name: "children" }))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "q2-stepper-pane"; }
|
|
79
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -277,7 +277,7 @@ export class Q2Textarea {
|
|
|
277
277
|
]))));
|
|
278
278
|
}
|
|
279
279
|
render() {
|
|
280
|
-
return (h("div", { key: '
|
|
280
|
+
return (h("div", { key: '1a53c8b1528031f5ccb957f2a2320f7a8a8f4607', class: this.wrapperClasses }, renderLabel(this), h("div", { key: '1de221d01fd339d749b557d408acabdc06c07ecc', class: "content-container", ref: el => (this.contentContainer = el) }, this.renderInput(), this.maxlength ? this.renderMaxLength() : '', renderMessages(this))));
|
|
281
281
|
}
|
|
282
282
|
static get is() { return "q2-textarea"; }
|
|
283
283
|
static get encapsulation() { return "shadow"; }
|
|
@@ -232,7 +232,7 @@ const Q2ActionGroup = /*@__PURE__*/ proxyCustomElement(class Q2ActionGroup exten
|
|
|
232
232
|
containerClassNames.push(className);
|
|
233
233
|
});
|
|
234
234
|
this.handleFullWidth(!!fullWidth);
|
|
235
|
-
return (h("q2-resize-observer", { key: '
|
|
235
|
+
return (h("q2-resize-observer", { key: '90c4038fda5346ea144fbe3bc2c5b77ab7e883cc', onTctResize: this.handleResize, disabled: shouldDisableResizeObserver }, h("div", { key: 'acfc1be2dac34f29bdb3c9a9ff723b0810ac0705', ref: el => (this.container = el), class: containerClassNames.join(' '), role: "group" }, h("slot", { key: 'ec63003e0b662ec70d5882efdfef7760699954b9' }))));
|
|
236
236
|
}
|
|
237
237
|
get hostElement() { return this; }
|
|
238
238
|
static get watchers() { return {
|
|
@@ -219,7 +219,7 @@ const Q2ActionSheet$1 = /*@__PURE__*/ proxyCustomElement(class Q2ActionSheet ext
|
|
|
219
219
|
}
|
|
220
220
|
const appearance = (data === null || data === void 0 ? void 0 : data.appearance) || 'slot';
|
|
221
221
|
const interiorClasses = `interior is-${appearance}`;
|
|
222
|
-
return (h("dialog", { key: '
|
|
222
|
+
return (h("dialog", { key: '077f6e7ab0a5a6102cabf09ab4d80059759f24e4', ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, h("div", { key: '43ee070fa56554f895e8d1ff86c81699cd69e3ef', class: interiorClasses }, showHeader && (h("header", { key: '6a846ed9be91c7d6f2892d8ed6d38327a9f8f15a' }, h("div", { key: 'f4a3b768f9ad448f05f4745d38f1598a4a3b3886', class: "title" }, (data === null || data === void 0 ? void 0 : data.title) || this.title), !this.hideClose && (h("q2-btn", { key: '5e51264235990b96ad0ccdfe73d9dc0ac3d03267', class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.actionSheet.close", "hide-label": true }, h("q2-icon", { key: '8c049f7b79abddf1552dd265d4a9654b9e8aa9c1', type: "close" }))))), ((_a = this.data) === null || _a === void 0 ? void 0 : _a.description) && h("p", { key: 'bc3ab1f5cfe359ccad839f46eaf5b5eef5975322' }, data.description), RenderContent && h(RenderContent, { key: '5225ff71d47bc8ef4f4963246976b94420daf1b3', data: this.data }))));
|
|
223
223
|
}
|
|
224
224
|
get hostElement() { return this; }
|
|
225
225
|
static get style() { return q2ActionSheetCss; }
|
|
@@ -90,7 +90,7 @@ const Q2Avatar = /*@__PURE__*/ proxyCustomElement(class Q2Avatar extends HTMLEle
|
|
|
90
90
|
const isLoaded = this.isLoaded;
|
|
91
91
|
const showInitials = (this.name || this.initials) && (!this.src || this.badSrc);
|
|
92
92
|
const showFallback = !this.name && !this.initials && (!this.src || this.badSrc);
|
|
93
|
-
return (h("div", { key: '
|
|
93
|
+
return (h("div", { key: 'bdce1116b87a48c861e7ba66e0dccd13829d3819', class: `avatar-wrapper size-${this.size}` }, this.hasDecorator && (h("div", { key: '461db5f2062faa3c4d7f43105c84c51aabc179d8', class: "decorator" }, h("slot", { key: '673a93a53a752514bce15687f5791682fdf3b0b7', name: "decorator" }))), showImg && (h("img", { key: 'fa881cb161c7f2bf64dabc1cf888d465e4698cb9', class: `${isLoaded ? 'avatar-img' : 'avatar-img-default'}`, "test-id": "userImage", src: this.src, onError: this.onError, onLoad: this.onLoad, alt: this.name || '' })), showInitials && (h("svg", { key: '6d8707c833fed056813f81b9014e82584444fa54', viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid meet", "test-id": "userInitials", class: `avatar-initials initials-size-${computedInitials.length}`, "aria-label": this.name, "aria-hidden": !this.name && 'true' }, h("text", { key: 'ae99c0b68abaa70e9517dee3dfe6dfdccdad13d6', x: "50", y: "50", "dominant-baseline": "central", "text-anchor": "middle", "aria-hidden": "true" }, computedInitials))), showFallback && (h("div", { key: 'df92213216e69c7d933fdfcd4ba1664cee793e14', "test-id": "fallbackIcon", class: "fallback" }, h("q2-icon", { key: '373a344abc59c1e8ea07472d932d5417265582d3', type: this.icon })))));
|
|
94
94
|
}
|
|
95
95
|
get el() { return this; }
|
|
96
96
|
static get watchers() { return {
|
|
@@ -63,17 +63,19 @@ const Q2Btn = /*@__PURE__*/ proxyCustomElement(class Q2Btn extends HTMLElement {
|
|
|
63
63
|
// #endregion
|
|
64
64
|
// #region Listeners
|
|
65
65
|
handleClick(event) {
|
|
66
|
+
var _a;
|
|
66
67
|
if (this.loading || this.disabled) {
|
|
67
68
|
event.stopImmediatePropagation();
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
70
71
|
this.tctClick.emit();
|
|
71
|
-
this.primaryBtn.focus();
|
|
72
|
+
(_a = this.primaryBtn) === null || _a === void 0 ? void 0 : _a.focus();
|
|
72
73
|
}
|
|
73
74
|
delegateFocus(event) {
|
|
75
|
+
var _a;
|
|
74
76
|
if (!isEventFromElement(event, this.hostElement))
|
|
75
77
|
return;
|
|
76
|
-
this.primaryBtn.focus();
|
|
78
|
+
(_a = this.primaryBtn) === null || _a === void 0 ? void 0 : _a.focus();
|
|
77
79
|
}
|
|
78
80
|
// #endregion
|
|
79
81
|
// #region Watchers
|