q2-tecton-elements 1.49.2 → 1.49.4
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 +151 -148
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-a93362ed.js → index-4b69f62d.js} +30 -18
- package/dist/{q2-tecton-elements/p-84190698.js.map → cjs/index-4b69f62d.js.map} +1 -1
- package/dist/cjs/{index-42fcd170.js → index-f69742cf.js} +1 -1
- package/dist/cjs/{index-42fcd170.js.map → index-f69742cf.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- 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-btn_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +2 -2
- 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 +4 -2
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +2 -2
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-input.cjs.entry.js +2 -2
- package/dist/cjs/q2-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
- package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list.cjs.entry.js +13 -11
- package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
- package/dist/cjs/q2-pill.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio.cjs.entry.js +2 -2
- package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +149 -30
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- 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-tab-container.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- 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/collection-manifest.json +5 -5
- 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-calendar/q2-calendar.js +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.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-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +7 -7
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +3 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
- package/dist/collection/components/q2-input/q2-input.js +2 -2
- 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-loc/q2-loc.js +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-option/q2-option.js +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +15 -13
- package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
- package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
- package/dist/collection/components/q2-pill/q2-pill.js +1 -1
- package/dist/collection/components/q2-popover/q2-popover.css +18 -10
- package/dist/collection/components/q2-popover/q2-popover.js +207 -203
- 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-section/q2-section.js +2 -2
- package/dist/collection/components/q2-select/q2-select.js +187 -32
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/index.js +46 -0
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/components/index2.js +29 -17
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-sheet.js +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-calendar.js +1 -1
- 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-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 +3 -1
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-input2.js +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-legend2.js +1 -1
- package/dist/components/q2-list.js +1 -1
- package/dist/components/q2-loc.js +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-option-list2.js +12 -10
- package/dist/components/q2-option-list2.js.map +1 -1
- package/dist/components/q2-option2.js +1 -1
- package/dist/components/q2-pagination.js +2 -2
- package/dist/components/q2-pill.js +1 -1
- package/dist/components/q2-popover2.js +158 -155
- 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-section.js +2 -2
- package/dist/components/q2-select2.js +153 -33
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-pane.js +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 +151 -148
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-1c019b24.js → index-3184c760.js} +1 -1
- package/dist/esm/{index-1c019b24.js.map → index-3184c760.js.map} +1 -1
- package/dist/esm/{index-3c5cd75e.js → index-73081b4d.js} +30 -18
- package/dist/esm/index-73081b4d.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +2 -2
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +3 -3
- 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 +2 -2
- package/dist/esm/q2-chart-area.entry.js +2 -2
- package/dist/esm/q2-chart-bar.entry.js +2 -2
- package/dist/esm/q2-chart-donut.entry.js +2 -2
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox.entry.js +2 -2
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +2 -2
- 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 +4 -2
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +2 -2
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-input.entry.js +2 -2
- package/dist/esm/q2-item.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-list.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-month-picker.entry.js +3 -3
- package/dist/esm/q2-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list.entry.js +13 -11
- package/dist/esm/q2-option-list.entry.js.map +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +3 -3
- package/dist/esm/q2-pill.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio.entry.js +2 -2
- package/dist/esm/q2-relative-time.entry.js +3 -3
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +150 -31
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-tab-container.entry.js +2 -2
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- 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 +33 -0
- package/dist/jest.setup.js.map +1 -0
- package/dist/q2-tecton-elements/{p-d8d9ba1f.entry.js → p-014c6454.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-e4b8f4b3.entry.js → p-01b436c4.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-03fcf787.entry.js +2 -0
- package/dist/q2-tecton-elements/{p-a657277b.entry.js.map → p-03fcf787.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/p-0b33965c.entry.js +2 -0
- package/dist/q2-tecton-elements/{p-4da4cb5d.entry.js.map → p-0b33965c.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-a177d812.entry.js → p-0c5ff345.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-0d46b95e.js +2 -0
- package/dist/q2-tecton-elements/p-0d46b95e.js.map +1 -0
- package/dist/q2-tecton-elements/{p-db79c056.entry.js → p-152641b0.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-19d02441.entry.js +2 -0
- package/dist/q2-tecton-elements/p-19d02441.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-1bb08555.entry.js +2 -0
- package/dist/q2-tecton-elements/p-1bb08555.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-dbfab45b.entry.js → p-1be2778a.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-630613c7.entry.js → p-26a23f08.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-da711c59.entry.js → p-2a21bb2a.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-bbf9d36d.entry.js → p-2a471072.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0852e6fe.entry.js → p-2cd69fc5.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-f6358905.entry.js → p-2cdc1c18.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-3b8fbd85.entry.js +2 -0
- package/dist/q2-tecton-elements/p-3b8fbd85.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-1e7fa870.entry.js → p-408f5dd0.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-ea7876eb.entry.js → p-45cf9f0b.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-08176bd0.entry.js → p-4635d8fd.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-333a41ca.entry.js → p-55554655.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-2bcb7e89.entry.js → p-6443ae6f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4388e521.entry.js → p-6c64c5e9.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-793a453e.entry.js → p-6e4b1bfe.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-da0cacef.entry.js → p-79cc72fc.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-c8b4f5f7.entry.js → p-7db2c188.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-9ecabc7a.entry.js → p-818fc8a7.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-9c589ab3.entry.js → p-835cf95a.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-e0a6baea.entry.js → p-88ae4e26.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-ec8a0b64.entry.js → p-8feb8b28.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-926bf280.entry.js +2 -0
- package/dist/q2-tecton-elements/{p-9e90a38a.entry.js.map → p-926bf280.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-6c933b14.entry.js → p-97ab03d0.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-e44560d9.entry.js → p-9c9a2662.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-a8e7e591.entry.js → p-a531a983.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-baa2eaa9.entry.js → p-aa7d16b8.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d78669df.entry.js → p-adf615fc.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-40df4468.entry.js → p-b6e531bb.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-e3ad770b.entry.js → p-b7805a04.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-77a763eb.entry.js → p-bdaa03ca.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-25bfe0b2.entry.js → p-be03e61f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-05b30f98.entry.js → p-c08dba38.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-5037fa67.entry.js → p-dba6c931.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-93680d12.entry.js → p-e3d214f7.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-76b98623.entry.js → p-e5e9718c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-2810ba28.entry.js → p-e844e6f1.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7b9a6bb7.entry.js → p-ecddccef.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-be518818.js → p-f1e887f5.js} +1 -1
- package/dist/q2-tecton-elements/{p-c5aac064.entry.js → p-f6a9e28d.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-5775b02b.entry.js → p-fdf819d2.entry.js} +2 -2
- 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/test/elements/q2-calendar-test.e2e.js +2 -2
- package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-dropdown-test.e2e.js +2 -14
- package/dist/test/elements/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-pagination-test.e2e.js +1 -0
- package/dist/test/elements/q2-pagination-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-pill-test.e2e.js +1 -1
- package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-popover-test.e2e.js +1 -34
- package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-popover-test.spec.js +902 -511
- package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
- package/dist/test/elements/q2-select-test.e2e.js +1 -15
- package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-select-test.spec.js +552 -0
- package/dist/test/elements/q2-select-test.spec.js.map +1 -0
- package/dist/test/elements/q2-tag-test.e2e.js +1 -1
- package/dist/test/elements/q2-tag-test.e2e.js.map +1 -1
- package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +10 -0
- package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +324 -0
- package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -2
- package/dist/types/components/q2-data-table/q2-data-table.d.ts +223 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +130 -0
- package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +50 -0
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +140 -0
- package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
- package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
- package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
- package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -0
- package/dist/types/components/q2-pill/q2-pill.d.ts +102 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +31 -31
- package/dist/types/components/q2-select/q2-select.d.ts +260 -0
- package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
- package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
- package/dist/types/components/q2-tag/q2-tag.d.ts +59 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/utils/action-sheet.d.ts +12 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/package.json +3 -3
- package/dist/cjs/index-a93362ed.js.map +0 -1
- package/dist/esm/index-3c5cd75e.js.map +0 -1
- package/dist/q2-tecton-elements/p-089a7a1e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-089a7a1e.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2e6669a7.entry.js +0 -2
- package/dist/q2-tecton-elements/p-2e6669a7.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4da4cb5d.entry.js +0 -2
- package/dist/q2-tecton-elements/p-84190698.js +0 -2
- package/dist/q2-tecton-elements/p-9e90a38a.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a657277b.entry.js +0 -2
- package/dist/q2-tecton-elements/p-d2d3d95b.entry.js +0 -2
- package/dist/q2-tecton-elements/p-d2d3d95b.entry.js.map +0 -1
- /package/dist/q2-tecton-elements/{p-d8d9ba1f.entry.js.map → p-014c6454.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e4b8f4b3.entry.js.map → p-01b436c4.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-a177d812.entry.js.map → p-0c5ff345.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-db79c056.entry.js.map → p-152641b0.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-dbfab45b.entry.js.map → p-1be2778a.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-630613c7.entry.js.map → p-26a23f08.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-da711c59.entry.js.map → p-2a21bb2a.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-bbf9d36d.entry.js.map → p-2a471072.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-0852e6fe.entry.js.map → p-2cd69fc5.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-f6358905.entry.js.map → p-2cdc1c18.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-1e7fa870.entry.js.map → p-408f5dd0.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-ea7876eb.entry.js.map → p-45cf9f0b.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-08176bd0.entry.js.map → p-4635d8fd.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-333a41ca.entry.js.map → p-55554655.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2bcb7e89.entry.js.map → p-6443ae6f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4388e521.entry.js.map → p-6c64c5e9.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-793a453e.entry.js.map → p-6e4b1bfe.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-da0cacef.entry.js.map → p-79cc72fc.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-c8b4f5f7.entry.js.map → p-7db2c188.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-9ecabc7a.entry.js.map → p-818fc8a7.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-9c589ab3.entry.js.map → p-835cf95a.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e0a6baea.entry.js.map → p-88ae4e26.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-ec8a0b64.entry.js.map → p-8feb8b28.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6c933b14.entry.js.map → p-97ab03d0.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e44560d9.entry.js.map → p-9c9a2662.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-a8e7e591.entry.js.map → p-a531a983.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-baa2eaa9.entry.js.map → p-aa7d16b8.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d78669df.entry.js.map → p-adf615fc.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-40df4468.entry.js.map → p-b6e531bb.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e3ad770b.entry.js.map → p-b7805a04.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-77a763eb.entry.js.map → p-bdaa03ca.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-25bfe0b2.entry.js.map → p-be03e61f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-05b30f98.entry.js.map → p-c08dba38.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-5037fa67.entry.js.map → p-dba6c931.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-93680d12.entry.js.map → p-e3d214f7.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-76b98623.entry.js.map → p-e5e9718c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2810ba28.entry.js.map → p-e844e6f1.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7b9a6bb7.entry.js.map → p-ecddccef.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-be518818.js.map → p-f1e887f5.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-c5aac064.entry.js.map → p-f6a9e28d.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-5775b02b.entry.js.map → p-fdf819d2.entry.js.map} +0 -0
- /package/dist/types/{workspace/workspace/tecton-production_release_1.49.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
- /package/dist/types/{workspace/workspace/tecton-production_release_1.49.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
|
@@ -268,7 +268,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
268
268
|
wrapperClassNames.push('has-icon');
|
|
269
269
|
if (optionCount)
|
|
270
270
|
wrapperClassNames.push('has-options');
|
|
271
|
-
return (h("click-elsewhere", { key: '
|
|
271
|
+
return (h("click-elsewhere", { key: '57c71d62f1c48af3c0cf3459b063dd6751386fb6', onChange: this.onClickElsewhere }, h("div", { key: '83f2d1d8c3b23fdc0c3735b4a62334c68354c32a', class: wrapperClassNames.join(' ') }, h("div", { key: 'b12ed23b4840697d7249a96a37a148644cef814a', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '1f806f669538e2b887dc35ceaa9f15326a7e14bb', 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.handleButtonFocusout, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: 'f2c0d182a7c8fb969f65b1fd965c11c6c16f3c43', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon(), this.generateHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '10a6bf06ce01f377dceada24b018957126fc93cd', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: '3f196b53d24af90518ac76c111439708bd9a85f3', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: '8127d103e44fe0152a064b84c8c904160fa0546c' }))))));
|
|
272
272
|
}
|
|
273
273
|
get hostElement() { return this; }
|
|
274
274
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as handleDeprecationWarning, w as waitForNextPaint } from './index2.js';
|
|
2
|
+
import { g as handleDeprecationWarning, w as waitForNextPaint, t as isInScrollableContainer, d as isMobile } from './index2.js';
|
|
3
3
|
|
|
4
|
-
const q2PopoverCss = "*{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}.container{display:none}.show{display:block;
|
|
4
|
+
const q2PopoverCss = "*{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}.legacy.container{display:none}.legacy.show{display:block;z-index:var(--tct-popover-z-index, 50)}:popover-open,.show{position:absolute;margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:popover-open.block,.show.block{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:popover-open.left,.show.left{left:var(--comp-pop-left);right:unset}:popover-open.right,.show.right{right:var(--comp-pop-right);left:unset}:popover-open.down,.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}:popover-open.up,.show.up{top:unset;bottom:var(--comp-pop-bottom)}:popover-open::-webkit-scrollbar,.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}:popover-open::-webkit-scrollbar-thumb,.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}:popover-open::-webkit-scrollbar-track,.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
|
|
5
5
|
const Q2PopoverStyle0 = q2PopoverCss;
|
|
6
6
|
|
|
7
7
|
const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLElement {
|
|
@@ -14,13 +14,66 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
14
14
|
* The number of pixels to leave between the popover and the edge of the viewport
|
|
15
15
|
*/
|
|
16
16
|
this.displayBuffer = 10;
|
|
17
|
-
/** remove when Popover API is supported in iOS */
|
|
18
17
|
this.orientationChanged = false;
|
|
18
|
+
/// Helpers ///
|
|
19
19
|
this.handleMinHeight = () => {
|
|
20
20
|
if (this.minHeight) {
|
|
21
21
|
handleDeprecationWarning(this, 'minHeight', 'prop');
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
+
this.handlePopoverToggleEvent = (event) => {
|
|
25
|
+
this.popoverStateChanged.emit({ open: event.newState === 'open' });
|
|
26
|
+
};
|
|
27
|
+
this.viewPortChanged = () => {
|
|
28
|
+
if (!this.open)
|
|
29
|
+
return;
|
|
30
|
+
this.determinePopDirection();
|
|
31
|
+
};
|
|
32
|
+
this.viewPortOrientationChanged = () => {
|
|
33
|
+
this.orientationChanged = true;
|
|
34
|
+
this.viewPortChanged();
|
|
35
|
+
};
|
|
36
|
+
this.setPopoverAPICSSProperties = async () => {
|
|
37
|
+
var _a, _b, _c, _d, _e, _f;
|
|
38
|
+
const { controlElement, containerElement, currentDirection, isModule, align } = this;
|
|
39
|
+
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 : {
|
|
40
|
+
top: 0,
|
|
41
|
+
bottom: 0,
|
|
42
|
+
left: 0,
|
|
43
|
+
right: 0,
|
|
44
|
+
};
|
|
45
|
+
const popoverLeft = controlLeft;
|
|
46
|
+
const popoverRight = ((_c = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _c === void 0 ? void 0 : _c.width) - controlRight;
|
|
47
|
+
if (align === 'right') {
|
|
48
|
+
containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);
|
|
49
|
+
containerElement.style.setProperty('--comp-pop-left', 'unset');
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);
|
|
53
|
+
containerElement.style.setProperty('--comp-pop-right', 'unset');
|
|
54
|
+
}
|
|
55
|
+
if (this.block)
|
|
56
|
+
containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
|
|
57
|
+
if (currentDirection === 'up') {
|
|
58
|
+
if (isModule) {
|
|
59
|
+
containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop - ((_d = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _d === void 0 ? void 0 : _d.offsetTop) - window.scrollY}px`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (currentDirection === 'down') {
|
|
66
|
+
if (isModule) {
|
|
67
|
+
containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
containerElement.style.setProperty('--comp-pop-top', `${controlBottom + ((_f = (_e = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _e === void 0 ? void 0 : _e.offsetTop) !== null && _f !== void 0 ? _f : 0) + window.scrollY}px`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// Wait for one paint to prevent layout thrashing
|
|
74
|
+
await waitForNextPaint();
|
|
75
|
+
containerElement.style.setProperty('--comp-pop-opacity', '1');
|
|
76
|
+
};
|
|
24
77
|
this.setAbsoluteCSSProperties = async () => {
|
|
25
78
|
const { controlElement, containerElement, currentDirection, align } = this;
|
|
26
79
|
if (align === 'right') {
|
|
@@ -45,83 +98,46 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
45
98
|
await waitForNextPaint();
|
|
46
99
|
containerElement.style.setProperty('--comp-pop-opacity', '1');
|
|
47
100
|
};
|
|
48
|
-
this.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
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 : {
|
|
52
|
-
top: 0,
|
|
53
|
-
bottom: 0,
|
|
54
|
-
left: 0,
|
|
55
|
-
right: 0,
|
|
56
|
-
};
|
|
57
|
-
const popoverLeft = controlLeft - rootElementRect.left;
|
|
58
|
-
if (this.block)
|
|
59
|
-
containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);
|
|
60
|
-
containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
|
|
61
|
-
containerElement.style.setProperty('--comp-pop-right', `${rootElementRect.width + rootElementRect.left - controlRight}px`);
|
|
62
|
-
if (currentDirection === 'up') {
|
|
63
|
-
containerElement.style.setProperty('--comp-pop-bottom', `${rootElementRect.height + rootElementRect.top - controlTop}px`);
|
|
64
|
-
}
|
|
65
|
-
if (currentDirection === 'down') {
|
|
66
|
-
containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);
|
|
67
|
-
}
|
|
68
|
-
// Wait for one paint to prevent layout thrashing
|
|
69
|
-
await waitForNextPaint();
|
|
70
|
-
containerElement.style.setProperty('--comp-pop-opacity', '1');
|
|
71
|
-
};
|
|
72
|
-
this.viewPortChanged = () => {
|
|
73
|
-
if (!this.open)
|
|
74
|
-
return;
|
|
75
|
-
this.determinePopDirection();
|
|
76
|
-
};
|
|
77
|
-
this.viewPortOrientationChanged = () => {
|
|
78
|
-
this.orientationChanged = true;
|
|
79
|
-
this.viewPortChanged();
|
|
80
|
-
};
|
|
81
|
-
this.currentDirection = undefined;
|
|
82
|
-
this.show = false;
|
|
83
|
-
this.align = undefined;
|
|
101
|
+
this.direction = undefined;
|
|
102
|
+
this.align = 'left';
|
|
103
|
+
this.open = undefined;
|
|
84
104
|
this.block = undefined;
|
|
85
105
|
this.controlElement = undefined;
|
|
86
|
-
this.direction = undefined;
|
|
87
|
-
this.minHeight = undefined;
|
|
88
106
|
this.mode = null;
|
|
89
|
-
this.
|
|
107
|
+
this.minHeight = undefined;
|
|
108
|
+
this.currentDirection = undefined;
|
|
109
|
+
this.show = false;
|
|
90
110
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
111
|
+
/// Lifecycle hooks ///
|
|
112
|
+
componentWillLoad() {
|
|
113
|
+
if (!this.supportsPopoverAPI) {
|
|
114
|
+
console.warn('The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.');
|
|
115
|
+
this.mode = 'legacy';
|
|
116
|
+
}
|
|
95
117
|
}
|
|
96
118
|
componentDidLoad() {
|
|
97
119
|
this.handleMinHeight();
|
|
120
|
+
if (this.supportsPopoverAPI)
|
|
121
|
+
this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
|
|
98
122
|
if (this.open)
|
|
99
123
|
this.determinePopDirection();
|
|
100
124
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this.open = open;
|
|
108
|
-
event.stopPropagation();
|
|
109
|
-
}
|
|
110
|
-
// #endregion
|
|
111
|
-
// #region Public Methods API
|
|
112
|
-
async scrollContainerTo(options) {
|
|
113
|
-
this.containerElement.scrollTo(options);
|
|
125
|
+
disconnectedCallback() {
|
|
126
|
+
this.removeViewportListeners();
|
|
127
|
+
this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);
|
|
128
|
+
this.containerElement = null;
|
|
129
|
+
this.contentElement = null;
|
|
130
|
+
this.controlElement = null;
|
|
114
131
|
}
|
|
132
|
+
/// Methods ///
|
|
115
133
|
async toggle() {
|
|
116
134
|
this.open = !this.open;
|
|
117
135
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
minHeightProvided() {
|
|
121
|
-
this.handleMinHeight();
|
|
136
|
+
async scrollContainerTo(options) {
|
|
137
|
+
this.containerElement.scrollTo(options);
|
|
122
138
|
}
|
|
139
|
+
/// Watchers ///
|
|
123
140
|
async openChanged(open) {
|
|
124
|
-
this.setRootElement();
|
|
125
141
|
this.popoverStateChanged.emit({ open });
|
|
126
142
|
if (open) {
|
|
127
143
|
this.addViewportListeners();
|
|
@@ -130,14 +146,29 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
130
146
|
else {
|
|
131
147
|
this.removeViewportListeners();
|
|
132
148
|
this.currentDirection = undefined;
|
|
133
|
-
this.
|
|
149
|
+
if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
|
|
150
|
+
this.show = false;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
this.containerElement.hidePopover();
|
|
154
|
+
}
|
|
134
155
|
await waitForNextPaint();
|
|
135
156
|
this.clearCSSProperties();
|
|
136
157
|
}
|
|
137
158
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
159
|
+
minHeightProvided() {
|
|
160
|
+
this.handleMinHeight();
|
|
161
|
+
}
|
|
162
|
+
/// Listeners ///
|
|
163
|
+
popoverStateHandler(event) {
|
|
164
|
+
const { detail: { open }, } = event;
|
|
165
|
+
if (open === this.open)
|
|
166
|
+
return;
|
|
167
|
+
this.open = open;
|
|
168
|
+
event.stopPropagation();
|
|
169
|
+
}
|
|
170
|
+
/// Getters ///
|
|
171
|
+
get providedDirection() {
|
|
141
172
|
const { direction } = this;
|
|
142
173
|
switch (direction) {
|
|
143
174
|
case 'up':
|
|
@@ -153,14 +184,26 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
153
184
|
const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
|
|
154
185
|
return isIframe && hasPlatformDimensions;
|
|
155
186
|
}
|
|
187
|
+
get supportsPopoverAPI() {
|
|
188
|
+
return Object.hasOwn(HTMLElement.prototype, 'popover');
|
|
189
|
+
}
|
|
156
190
|
addViewportListeners() {
|
|
157
191
|
var _a;
|
|
158
192
|
window.addEventListener('resize', this.viewPortOrientationChanged);
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
193
|
+
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
|
|
194
|
+
if (isInScrollableContainer(this.hostElement) && !isMobile()) {
|
|
195
|
+
window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
|
|
196
|
+
}
|
|
197
|
+
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
162
198
|
window.addEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
163
|
-
|
|
199
|
+
}
|
|
200
|
+
removeViewportListeners() {
|
|
201
|
+
var _a;
|
|
202
|
+
window.removeEventListener('resize', this.viewPortOrientationChanged);
|
|
203
|
+
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
|
|
204
|
+
window.removeEventListener('scroll', this.viewPortChanged, { capture: true });
|
|
205
|
+
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
206
|
+
window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
164
207
|
}
|
|
165
208
|
clearCSSProperties() {
|
|
166
209
|
this.containerElement.style.removeProperty('--comp-pop-max-height');
|
|
@@ -171,9 +214,25 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
171
214
|
this.containerElement.style.removeProperty('--comp-pop-width');
|
|
172
215
|
this.containerElement.style.removeProperty('--comp-pop-opacity');
|
|
173
216
|
}
|
|
217
|
+
setDirectionAndShow(direction) {
|
|
218
|
+
// Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
|
|
219
|
+
// popover can be closed between the time the popover is opened and the time the direction is determined
|
|
220
|
+
const isOpen = this.open;
|
|
221
|
+
if (!isOpen)
|
|
222
|
+
return;
|
|
223
|
+
this.currentDirection = direction;
|
|
224
|
+
if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
|
|
225
|
+
this.show = true;
|
|
226
|
+
this.setAbsoluteCSSProperties();
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
this.setPopoverAPICSSProperties();
|
|
230
|
+
this.containerElement.showPopover();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
174
233
|
async determinePopDirection() {
|
|
175
234
|
var _a, _b, _c;
|
|
176
|
-
const { containerElement, controlElement,
|
|
235
|
+
const { containerElement, controlElement, providedDirection, displayBuffer } = this;
|
|
177
236
|
if (containerElement)
|
|
178
237
|
containerElement.style.maxHeight = null;
|
|
179
238
|
await waitForNextPaint();
|
|
@@ -186,20 +245,23 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
186
245
|
let maxSpaceAbove;
|
|
187
246
|
let maxSpaceBelow;
|
|
188
247
|
if (isModule) {
|
|
189
|
-
const { outletOffset = 0, innerHeight = window.innerHeight } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
|
|
190
|
-
const distanceToIframeBottom = window.
|
|
191
|
-
|
|
248
|
+
const { outletOffset = 0, innerHeight = window.innerHeight, top: topBarHeight = 0, bottom: bottomBarHeight = 0, } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
|
|
249
|
+
const distanceToIframeBottom = window.innerHeight - controlBottom;
|
|
250
|
+
// controlElement position visually on the page
|
|
251
|
+
const visualControlTop = outletOffset > 0 ? controlTop : controlTop + outletOffset - topBarHeight;
|
|
252
|
+
const visualControlBottom = outletOffset + controlBottom - topBarHeight;
|
|
253
|
+
// visual space around the controlElement
|
|
254
|
+
const viewableSpaceAbove = visualControlTop;
|
|
255
|
+
const viewableSpaceBelow = innerHeight - bottomBarHeight - visualControlBottom;
|
|
256
|
+
// calculate space above and below controlElement
|
|
192
257
|
const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;
|
|
193
|
-
|
|
194
|
-
// If the top of the module is below the top of the window we just use the controlTop
|
|
195
|
-
// Otherwise we need to add the outletOffset to the controlTop
|
|
196
|
-
maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;
|
|
258
|
+
maxSpaceAbove = viewableSpaceAbove - displayBuffer;
|
|
197
259
|
maxSpaceBelow = isIframeShorterThanWindow
|
|
198
260
|
? distanceToIframeBottom - displayBuffer
|
|
199
261
|
: viewableSpaceBelow - displayBuffer;
|
|
200
262
|
}
|
|
201
263
|
else {
|
|
202
|
-
windowHeight = window.
|
|
264
|
+
windowHeight = window.innerHeight;
|
|
203
265
|
maxSpaceAbove = controlTop - displayBuffer;
|
|
204
266
|
maxSpaceBelow = windowHeight - controlBottom - displayBuffer;
|
|
205
267
|
}
|
|
@@ -208,7 +270,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
208
270
|
const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
|
|
209
271
|
// we do not want to constantly update the max-height after an orientation change, so we switch this back to false
|
|
210
272
|
this.orientationChanged = false;
|
|
211
|
-
const currentOrDetermineDirection = this.currentDirection ||
|
|
273
|
+
const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
|
|
212
274
|
switch (currentOrDetermineDirection) {
|
|
213
275
|
case 'up':
|
|
214
276
|
if (shouldUpdateMaxHeight) {
|
|
@@ -224,97 +286,38 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
224
286
|
break;
|
|
225
287
|
}
|
|
226
288
|
}
|
|
227
|
-
|
|
228
|
-
var _a;
|
|
229
|
-
window.removeEventListener('resize', this.viewPortOrientationChanged);
|
|
230
|
-
// #region remove when Popover API is supported in iOS
|
|
231
|
-
window.removeEventListener('scroll', this.viewPortChanged);
|
|
232
|
-
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
233
|
-
window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
234
|
-
// #endregion
|
|
235
|
-
}
|
|
236
|
-
setDirectionAndShow(direction) {
|
|
237
|
-
this.setRootElement();
|
|
238
|
-
// Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
|
|
239
|
-
// popover can be closed between the time the popover is opened and the time the direction is determined
|
|
240
|
-
const isOpen = this.open;
|
|
241
|
-
if (!isOpen)
|
|
242
|
-
return;
|
|
243
|
-
this.currentDirection = direction;
|
|
244
|
-
this.show = true;
|
|
245
|
-
if (this.mode === 'legacy') {
|
|
246
|
-
this.setAbsoluteCSSProperties();
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
this.setFixedCSSProperties();
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
setRootElement() {
|
|
253
|
-
let currentElement = this.hostElement;
|
|
254
|
-
while (currentElement && currentElement !== document.documentElement) {
|
|
255
|
-
const computedStyle = window.getComputedStyle(currentElement);
|
|
256
|
-
// Check if the element has any styles applied that create a new containg block
|
|
257
|
-
if (computedStyle.transform !== 'none' ||
|
|
258
|
-
computedStyle.filter !== 'none' ||
|
|
259
|
-
computedStyle.perspective !== 'none' ||
|
|
260
|
-
computedStyle.containerType !== 'normal' ||
|
|
261
|
-
['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||
|
|
262
|
-
['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)) {
|
|
263
|
-
this.rootElementRect = currentElement.getBoundingClientRect();
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
const rootNode = currentElement.getRootNode();
|
|
267
|
-
const isRootNodeWebComponent = typeof ShadowRoot !== 'undefined' &&
|
|
268
|
-
rootNode instanceof ShadowRoot &&
|
|
269
|
-
rootNode.host instanceof HTMLElement;
|
|
270
|
-
if (isRootNodeWebComponent) {
|
|
271
|
-
currentElement = rootNode.host;
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
currentElement = currentElement.parentElement;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
// Return the document's bounding rect if no element is found
|
|
278
|
-
this.rootElementRect = {
|
|
279
|
-
top: 0,
|
|
280
|
-
bottom: 0,
|
|
281
|
-
left: 0,
|
|
282
|
-
right: 0,
|
|
283
|
-
height: window.visualViewport.height,
|
|
284
|
-
width: window.visualViewport.width,
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
// #endregion
|
|
288
|
-
// #region Render Methods
|
|
289
|
+
/// DOM ///
|
|
289
290
|
render() {
|
|
290
|
-
const containerClasses = ['container', this.currentDirection];
|
|
291
|
+
const containerClasses = ['container', this.currentDirection, this.align];
|
|
291
292
|
if (this.show)
|
|
292
293
|
containerClasses.push('show');
|
|
294
|
+
if (this.block)
|
|
295
|
+
containerClasses.push('block');
|
|
293
296
|
if (this.mode === 'legacy')
|
|
294
297
|
containerClasses.push('legacy');
|
|
295
|
-
return (h("div", { key: '
|
|
298
|
+
return (h("div", { key: 'b4cca12b46de7d0a8cd753163d4b08c4c0b88d47', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "manual" }, h("div", { key: 'e9ff3b3d8511d0601e7bfe142042138535029aa9', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: 'c183a54fecb2e55d84ab2a0b39e7dbd4a4db6282' }))));
|
|
296
299
|
}
|
|
297
300
|
get hostElement() { return this; }
|
|
298
301
|
static get watchers() { return {
|
|
299
|
-
"
|
|
300
|
-
"
|
|
302
|
+
"open": ["openChanged"],
|
|
303
|
+
"minHeight": ["minHeightProvided"]
|
|
301
304
|
}; }
|
|
302
305
|
static get style() { return Q2PopoverStyle0; }
|
|
303
306
|
}, [1, "q2-popover", {
|
|
307
|
+
"direction": [513],
|
|
304
308
|
"align": [513],
|
|
309
|
+
"open": [1540],
|
|
305
310
|
"block": [516],
|
|
306
311
|
"controlElement": [16],
|
|
307
|
-
"direction": [513],
|
|
308
|
-
"minHeight": [2, "min-height"],
|
|
309
312
|
"mode": [1],
|
|
310
|
-
"
|
|
313
|
+
"minHeight": [2, "min-height"],
|
|
311
314
|
"currentDirection": [32],
|
|
312
315
|
"show": [32],
|
|
313
|
-
"
|
|
314
|
-
"
|
|
316
|
+
"toggle": [64],
|
|
317
|
+
"scrollContainerTo": [64]
|
|
315
318
|
}, [[0, "popoverState", "popoverStateHandler"]], {
|
|
316
|
-
"
|
|
317
|
-
"
|
|
319
|
+
"open": ["openChanged"],
|
|
320
|
+
"minHeight": ["minHeightProvided"]
|
|
318
321
|
}]);
|
|
319
322
|
function defineCustomElement() {
|
|
320
323
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,4iFAA4iF,CAAC;AAClkF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAQlB,kBAAa,GAAG,EAAE,CAAC;;QAEnB,uBAAkB,GAAY,KAAK,CAAC;QAkOpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAYF,6BAAwB,GAAG;YACvB,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YAE3E,IAAI,KAAK,KAAK,OAAO,EAAE;gBACnB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;gBAC5D,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;aAClE;iBAAM;gBACH,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;gBAC3D,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;aACnE;YAED,IAAI,IAAI,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AC,aAAa,CAAC;aACjD;SACJ;;QAGD,IAAI,CAAC,eAAe,GAAG;YACnB,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM;YACpC,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC,KAAK;SAC1B,CAAC;KAChB;;;IAeD,MAAM;QACF,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,QACI,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,IAExB,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@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 /** @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 }\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 actualDirection(): '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 isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\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('change', 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, actualDirection, 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 || actualDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}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);\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"],"version":3}
|
|
1
|
+
{"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,ytFAAytF,CAAC;AAC/uF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAyClB,kBAAa,GAAG,EAAE,CAAC;QAEnB,uBAAkB,GAAY,KAAK,CAAC;;QAmGpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAEF,6BAAwB,GAAG,CAAC,KAAkB;YAC1C,IAAI,CAAC,mBAAmB,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L;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@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, isMobile, isInScrollableContainer } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\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 }) direction: 'up' | 'down';\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true }) align: 'left' | 'right' = 'left';\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop() controlElement: HTMLElement;\n\n @Prop() mode: 'legacy' = null;\n\n /** @deprecated */\n @Prop() minHeight: number;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event() popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n @State() currentDirection: 'down' | 'up' = undefined;\n // remove `show` when Popover API is supported in iOS\n @State() show: boolean = false;\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n\n orientationChanged: boolean = false;\n\n /// Lifecycle hooks ///\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 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 /// Methods ///\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n /// Watchers ///\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 @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n /// Listeners ///\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 /// Getters ///\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 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 supportsPopoverAPI(): boolean {\n return Object.hasOwn(HTMLElement.prototype, 'popover');\n }\n\n /// Helpers ///\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 viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\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 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 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 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 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 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 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 if (isModule) {\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 containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n /// DOM ///\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=\"manual\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -183,7 +183,7 @@ const Q2RadioGroup$1 = /*@__PURE__*/ proxyCustomElement(class Q2RadioGroup exten
|
|
|
183
183
|
const showLabel = this.label || this.optional || this.readonly;
|
|
184
184
|
const { hasError } = this;
|
|
185
185
|
const showLabelRow = showLabel || hasError;
|
|
186
|
-
return (h(Fragment, { key: '
|
|
186
|
+
return (h(Fragment, { key: '3536f41532e1cc18001e2e1d8f8f4c9e8223dd67' }, showLabelRow && (h("div", { key: '4ec07666943cb4b0a25ad2dd70fdc26b072affb0', class: "label-row" }, showLabel && h("div", { key: '0442988f9575a44d0d0de1e7885be9239e06ba64', class: "group-legend" }, labelDOM(this)), hasError && (h("q2-icon", { key: 'e455ee3337a5e401c5a4a4a9f8276bff189b26f2', type: "error", "test-id": "iconError" })))), h("fieldset", { key: '2f849878d217decc154d9d04fa8182b3d1b1d79a', onChange: this.onInnerRadioChange, "aria-invalid": `${this.hasError}` }, showLabel && h("legend", { key: '95e7c2f3fcb370048801b4f6be953047011a83f2', class: "sr" }, labelDOM(this)), this.inputDom())));
|
|
187
187
|
}
|
|
188
188
|
get hostElement() { return this; }
|
|
189
189
|
static get watchers() { return {
|
|
@@ -83,7 +83,7 @@ const Q2Radio$1 = /*@__PURE__*/ proxyCustomElement(class Q2Radio extends HTMLEle
|
|
|
83
83
|
// #endregion
|
|
84
84
|
// #region Render Methods
|
|
85
85
|
render() {
|
|
86
|
-
return (h("div", { key: '
|
|
86
|
+
return (h("div", { key: '76206e3b68f37c2cb2b3f250baaeeb3ab527e7dd', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '8eb165ce7393d49b3392d31dbf627ba4f41e55ac', 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: '68b886ae9d8dd3c8f81a303efa134032f5202861', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: '3347f80f5b1db0618ef9f1e47b107348c78739c1', viewBox: "0 0 18 18" }, h("circle", { key: 'c28f245892d655e8e9ace735ed99dd38f2e52885', stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '2cc9cb7577e78fc7fce8cf7c301c6cc5a052439e', stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: 'c4b26258a82523f7cc5517409b23443b85eff770', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: '29b3cc0b2466a43eec80a076e5a0b798bb2ca6ac' }))))));
|
|
87
87
|
}
|
|
88
88
|
get hostElement() { return this; }
|
|
89
89
|
static get watchers() { return {
|
|
@@ -143,7 +143,7 @@ const Q2RelativeTime$1 = /*@__PURE__*/ proxyCustomElement(class Q2RelativeTime e
|
|
|
143
143
|
// #region Render Methods
|
|
144
144
|
render() {
|
|
145
145
|
const { shouldShow, displayedMessage } = this;
|
|
146
|
-
return h(Fragment, { key: '
|
|
146
|
+
return h(Fragment, { key: '14b866b175302504dfb838edd3181ff68ffd004d' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
|
|
147
147
|
}
|
|
148
148
|
get hostElement() { return this; }
|
|
149
149
|
static get watchers() { return {
|