q2-tecton-elements 1.53.0 → 1.54.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 +43422 -0
- package/dist/cjs/{action-sheet-d32c41ae.js → action-sheet-8254c0fd.js} +6 -3
- package/dist/cjs/action-sheet-8254c0fd.js.map +1 -0
- package/dist/cjs/click-elsewhere.cjs.entry.js +96 -0
- package/dist/cjs/click-elsewhere.cjs.entry.js.map +1 -0
- package/dist/cjs/{index-07285783.js → index-76f63767.js} +1 -21
- package/dist/cjs/index-76f63767.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +38 -17
- package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -1
- 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-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-badge_7.cjs.entry.js +52 -18
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- 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.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-item.cjs.entry.js +17 -16
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +48 -99
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +4 -4
- package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-item_3.cjs.entry.js +3 -2
- package/dist/cjs/q2-item_3.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/{q2-option-list.cjs.entry.js → q2-option-list_2.cjs.entry.js} +355 -21
- package/dist/cjs/q2-option-list_2.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-option.cjs.entry.js +18 -4
- package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
- package/dist/cjs/q2-pill.cjs.entry.js +8 -7
- package/dist/cjs/q2-pill.cjs.entry.js.map +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 +2 -2
- package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +10 -8
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-tag.cjs.entry.js +7 -4
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/components/q2-action-group/q2-action-group.css +25 -8
- package/dist/collection/components/q2-action-group/q2-action-group.js +55 -33
- package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +142 -6
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +126 -62
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js +1 -1
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.css +5 -0
- package/dist/collection/components/q2-btn/q2-btn.css +103 -3
- package/dist/collection/components/q2-btn/q2-btn.js +50 -16
- package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +101 -4
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +83 -103
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +188 -24
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +54 -16
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-file-picker/q2-file-picker.css +29 -10
- package/dist/collection/components/q2-file-picker/q2-file-picker.js +3 -3
- package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js +34 -0
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js.map +1 -1
- package/dist/collection/components/q2-link/q2-link.js +26 -7
- package/dist/collection/components/q2-link/q2-link.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +20 -118
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.spec.js +193 -0
- package/dist/collection/components/q2-link/test/q2-link-test.spec.js.map +1 -0
- package/dist/collection/components/q2-loading/q2-loading.js +1 -1
- package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.css +9 -3
- package/dist/collection/components/q2-option/q2-option.js +37 -4
- package/dist/collection/components/q2-option/q2-option.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js +22 -0
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +56 -29
- package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
- package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js +489 -0
- package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js.map +1 -0
- package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
- package/dist/collection/components/q2-pill/q2-pill.js +6 -5
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js.map +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 +9 -7
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +1 -14
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- 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 +5 -2
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/action-sheet.js +5 -2
- package/dist/collection/utils/action-sheet.js.map +1 -1
- package/dist/collection/utils/helpers.js +29 -3
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/test/action-sheet-test.e2e.js +34 -6
- package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
- package/dist/components/action-sheet.js +6 -3
- package/dist/components/action-sheet.js.map +1 -1
- package/dist/components/index2.js +1 -20
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.js +41 -19
- package/dist/components/q2-action-group.js.map +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-avatar2.js.map +1 -1
- package/dist/components/q2-btn2.js +50 -16
- package/dist/components/q2-btn2.js.map +1 -1
- package/dist/components/q2-dropdown-item2.js +19 -17
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +67 -110
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-file-picker.js +3 -3
- package/dist/components/q2-file-picker.js.map +1 -1
- package/dist/components/q2-link2.js +3 -1
- package/dist/components/q2-link2.js.map +1 -1
- package/dist/components/q2-loading2.js.map +1 -1
- package/dist/components/q2-option-list2.js +44 -19
- package/dist/components/q2-option-list2.js.map +1 -1
- package/dist/components/q2-option2.js +20 -4
- package/dist/components/q2-option2.js.map +1 -1
- package/dist/components/q2-pagination.js +3 -3
- package/dist/components/q2-pill.js +7 -6
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +1 -1
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select2.js +10 -8
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +6 -3
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/{action-sheet-e64cb6f7.js → action-sheet-1e24cb38.js} +7 -4
- package/dist/esm/action-sheet-1e24cb38.js.map +1 -0
- package/dist/esm/click-elsewhere.entry.js +92 -0
- package/dist/esm/click-elsewhere.entry.js.map +1 -0
- package/dist/esm/{index-d18e2a20.js → index-504f1a9e.js} +2 -21
- package/dist/esm/index-504f1a9e.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +39 -18
- package/dist/esm/q2-action-group.entry.js.map +1 -1
- package/dist/esm/q2-action-sheet.entry.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-avatar.entry.js.map +1 -1
- package/dist/esm/q2-badge_7.entry.js +52 -18
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +1 -1
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- 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.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-item.entry.js +18 -17
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +48 -99
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +4 -4
- package/dist/esm/q2-file-picker.entry.js.map +1 -1
- package/dist/esm/q2-item_3.entry.js +3 -2
- package/dist/esm/q2-item_3.entry.js.map +1 -1
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/{q2-option-list.entry.js → q2-option-list_2.entry.js} +355 -22
- package/dist/esm/q2-option-list_2.entry.js.map +1 -0
- package/dist/esm/q2-option.entry.js +18 -4
- package/dist/esm/q2-option.entry.js.map +1 -1
- package/dist/esm/q2-pagination.entry.js +4 -4
- package/dist/esm/q2-pill.entry.js +8 -7
- package/dist/esm/q2-pill.entry.js.map +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 +2 -2
- package/dist/esm/q2-resize-observer.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +10 -8
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-tag.entry.js +7 -4
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/action-sheet-1e24cb38.js +80 -0
- package/dist/q2-tecton-elements/action-sheet-1e24cb38.js.map +1 -0
- package/dist/q2-tecton-elements/click-elsewhere.entry.js +90 -0
- package/dist/q2-tecton-elements/click-elsewhere.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{index-d18e2a20.js → index-504f1a9e.js} +51 -69
- package/dist/q2-tecton-elements/index-504f1a9e.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +57 -33
- package/dist/q2-tecton-elements/q2-action-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +256 -213
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +34 -34
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +86 -137
- package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +138 -137
- package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-item_3.entry.js +3 -2
- package/dist/q2-tecton-elements/q2-item_3.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js +902 -0
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-option.entry.js +31 -21
- package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +34 -34
- package/dist/q2-tecton-elements/q2-pill.entry.js +15 -15
- package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
- package/dist/q2-tecton-elements/q2-select.entry.js +23 -20
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +37 -37
- package/dist/q2-tecton-elements/q2-stepper.entry.js +29 -29
- package/dist/q2-tecton-elements/q2-tag.entry.js +36 -34
- package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
- package/dist/types/components/q2-action-group/q2-action-group.d.ts +19 -11
- package/dist/types/components/q2-btn/q2-btn.d.ts +8 -3
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +18 -9
- package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +14 -1
- package/dist/types/components/q2-file-picker/q2-file-picker.d.ts +4 -2
- package/dist/types/components/q2-link/q2-link.d.ts +8 -6
- package/dist/types/components/q2-loading/q2-loading.d.ts +2 -2
- package/dist/types/components/q2-option/q2-option.d.ts +10 -1
- package/dist/types/components/q2-option-list/q2-option-list.d.ts +9 -8
- package/dist/types/components/q2-pill/q2-pill.d.ts +1 -1
- package/dist/types/components.d.ts +93 -30
- package/dist/types/util.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +1 -1
- package/package.json +4 -3
- package/dist/cjs/action-sheet-d32c41ae.js.map +0 -1
- package/dist/cjs/click-elsewhere_2.cjs.entry.js +0 -406
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +0 -1
- package/dist/cjs/index-07285783.js.map +0 -1
- package/dist/cjs/q2-option-list.cjs.entry.js.map +0 -1
- package/dist/esm/action-sheet-e64cb6f7.js.map +0 -1
- package/dist/esm/click-elsewhere_2.entry.js +0 -401
- package/dist/esm/click-elsewhere_2.entry.js.map +0 -1
- package/dist/esm/index-d18e2a20.js.map +0 -1
- package/dist/esm/q2-option-list.entry.js.map +0 -1
- package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js +0 -77
- package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js.map +0 -1
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +0 -398
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +0 -1
- package/dist/q2-tecton-elements/index-d18e2a20.js.map +0 -1
- package/dist/q2-tecton-elements/q2-option-list.entry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,QACIM,QAACC,UAAI,uDACDD,kEACI,KAAK,EAAC,SAAS,EACf,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,UAAU,EAAE,IAAI,CAAC,eAAe,IAEhCA,kEACI,KAAK,EAAC,SAAS,gBACHL,WAAG,CAAC,iCAAiC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,0BAC1C,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAC1C,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,SAAS,EAC5B,SAAS,EAAE,IAAI,CAAC,sBAAsB,EACtC,OAAO,EAAE,IAAI,CAAC,YAAY,IAE1BK,oEAAQ,CACN,CACJ,CACH,EACT;KACL;;;;;;;;;;;","names":["nextPaint","loc","overrideFocus","isEventFromElement","waitForNextPaint","isVisible","h","Host"],"sources":["src/utils/sanitize-regex-string.ts","src/components/q2-option-list/q2-option-list.scss?tag=q2-option-list&encapsulation=shadow","src/components/q2-option-list/q2-option-list.tsx"],"sourcesContent":["export default function sanitizeRegexString(regexString: string) {\n return regexString.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n position: relative;\n width: 100%;\n display: block;\n line-height: var-list(var-prefixer(option-list-line-height),--app-line-height, 1.428571429em);\n}\n\n.content {\n text-align: start;\n\n :host([is-sizeable]) & {\n display: block;\n height: auto;\n }\n}\n","import sanitizeRegexString from '@/utils/sanitize-regex-string';\nimport {\n Component,\n Prop,\n h,\n Event,\n State,\n Element,\n ComponentInterface,\n Host,\n EventEmitter,\n Method,\n Watch,\n Listen,\n} from '@stencil/core';\nimport { isEventFromElement, isVisible, loc, nextPaint, overrideFocus, waitForNextPaint } from 'src/utils';\n\nexport interface IOptionValue {\n value: string;\n display?: string;\n}\n\n@Component({ tag: 'q2-option-list', shadow: true, styleUrl: 'q2-option-list.scss' })\nexport class Q2OptionList implements ComponentInterface {\n // #region Own Properties\n\n activeIndex: number;\n contentElement: HTMLElement;\n keyStore: {\n queue: string[];\n lastPressedAt: Date;\n } = {\n queue: [],\n lastPressedAt: new Date(),\n };\n pivotIndex: number;\n scheduledAfterRender: (() => void)[] = [];\n searchString: string;\n searchStringTimer: number;\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 hasOptions: boolean;\n\n // #endregion\n // #region Public Property API\n\n @Prop({ reflect: true })\n align: 'left' | 'right';\n\n /** Indicates a custom search is being implemented for the option list. */\n @Prop({ reflect: true })\n customSearch: boolean;\n\n /** Disables the option list. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /** Determines the label that is applied to the option list for accessibility purposes. */\n @Prop()\n label: string = loc('tecton.element.optionList.label');\n\n /**\n * Enables the multi-select ability for the option list.\n * @info\n * Only applicable when options are provided.\n */\n @Prop({ reflect: true })\n multiple: boolean;\n\n /** Disables the logic that handles selecting and focusing an option in the option list. */\n @Prop({ reflect: true })\n noSelect: boolean;\n\n /** A list of the selected options on the element. */\n @Prop({ mutable: true })\n selectedOptions: IOptionValue[] = [];\n\n /** Applies focus to the selected option. */\n @Prop({ reflect: true, mutable: true })\n showSelected: boolean;\n\n /** Translates to the role of the option list */\n @Prop()\n type: 'menu' | 'listbox' = 'listbox';\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when an option is selected or deselected.\n *\n * When the multi-select is enabled, the `value` property will be `undefined` and the `selectedOptions` property\n * will contain the selected option values.\n */\n @Event()\n change: EventEmitter<{ value: string; values: IOptionValue[] }>;\n\n /**\n * Emitted to indicate the intended state of the popover.\n * @private\n */\n @Event()\n popoverState: EventEmitter<{ open: boolean; action: 'close' | 'select' | 'open' }>;\n\n /**\n * Emitted when the component has finished rendering.\n * @private\n */\n @Event({ bubbles: false })\n ready: EventEmitter<undefined>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.hasOptions = !!this.hostElement.querySelectorAll('q2-option').length;\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.checkOptions();\n this.selectedOptionsUpdated();\n this.ready.emit();\n }\n\n componentDidRender() {\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('click')\n handleClick(event: MouseEvent) {\n event.stopPropagation();\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.popoverState.emit({ open: true, action: 'open' });\n const { activeIndex } = this;\n if (typeof activeIndex === 'number' && activeIndex > -1) {\n this.setActiveOption();\n this.setFocusedOption();\n } else {\n this.setDefaultActiveElement();\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async getContents(): Promise<(HTMLQ2OptgroupElement | HTMLQ2OptionElement)[]> {\n return this.allContents;\n }\n\n @Method()\n async getOptions(): Promise<HTMLQ2OptionElement[]> {\n return this.allOptions;\n }\n\n @Method()\n async handleExternalKeydown(event: KeyboardEvent) {\n this.externalKeydownHandler(event);\n }\n\n @Method()\n async setActiveElement(index: number) {\n this.activeIndex = index;\n this.setActiveOption();\n this.setFocusedOption();\n }\n\n @Method()\n async setDefaultActiveElement() {\n this.activeIndex = this.getDefaultActiveIndex();\n this.setActiveOption();\n this.setFocusedOption();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('selectedOptions')\n selectedOptionsUpdated() {\n if (this.multiple) {\n this.updateMultipleOptionAttrs();\n } else {\n this.updateSingleOptionAttrs();\n }\n }\n\n @Watch('showSelected')\n showSelectedUpdated(showSelected: boolean) {\n if (showSelected && this.selectedOptions.length === 0) {\n this.showSelected = false;\n return;\n }\n this.allOptions.forEach(option => (option._multiSelectHidden = showSelected ? !option.selected : false));\n }\n\n // #endregion\n // #region Local Methods\n\n get allContents(): (HTMLQ2OptgroupElement | HTMLQ2OptionElement)[] {\n const rootSlot = this.getRootSlot(this.hostElement);\n const acceptedTags = ['Q2-OPTGROUP', 'Q2-OPTION'];\n return rootSlot.filter(element => acceptedTags.includes(element.tagName)) as (\n | HTMLQ2OptgroupElement\n | HTMLQ2OptionElement\n )[];\n }\n\n get allOptions(): HTMLQ2OptionElement[] {\n const contents = this.allContents;\n\n const extractOptions = (\n elements: (HTMLQ2OptgroupElement | HTMLQ2OptionElement | Element)[]\n ): HTMLQ2OptionElement[] => {\n return elements.reduce((acc, element) => {\n if (element.tagName === 'Q2-OPTGROUP') {\n return [...acc, ...extractOptions(Array.from(element.children))];\n } else if (element.tagName === 'Q2-OPTION') {\n return [...acc, element];\n } else {\n return acc;\n }\n }, []);\n };\n\n return extractOptions(contents);\n }\n\n get allVisibleOptions(): HTMLQ2OptionElement[] {\n return this.allOptions.filter(\n option => !option.hidden && !option._multiSelectHidden && !option.disabled && !option.disabledGroup\n );\n }\n\n adjustActiveOptionAndScroll(numToAdd: number) {\n this.activeIndex += numToAdd;\n this.setActiveOption();\n this.setFocusedOption();\n this.scrollToActiveOption();\n }\n\n async checkOptions() {\n const { type } = this;\n const options = await this.getOptions();\n if (!type) return;\n const optionRole = type === 'menu' ? 'menuitem' : 'option';\n options.forEach(option => {\n option.role = optionRole;\n });\n }\n\n clickHandler = (event: Event) => {\n const target = event.target as HTMLQ2OptionElement;\n const option = target.closest('q2-option');\n this.selectOption(option);\n if (this.multiple) return;\n this.popoverState.emit({ open: false, action: 'select' });\n };\n\n /* tslint:disable:cyclomatic-complexity */\n externalKeydownHandler = (event: KeyboardEvent) => {\n event.stopPropagation();\n const { activeIndex, customSearch, allOptions } = this;\n const { key } = event;\n\n let nextIndex;\n switch (key) {\n case ' ':\n if (this.searchString) {\n if (customSearch) break;\n\n this.searchOptions(key, true);\n break;\n } else if (this.type === 'menu') {\n this.activeIndex = 0;\n this.openDropdownWithActiveElement(0);\n } else {\n this.setDefaultActiveElement();\n nextPaint(() => this.popoverState.emit({ open: true, action: 'open' }));\n }\n break;\n\n case 'Enter':\n if (this.type === 'menu') {\n this.activeIndex = 0;\n this.openDropdownWithActiveElement(0);\n } else {\n this.setDefaultActiveElement();\n nextPaint(() => this.popoverState.emit({ open: true, action: 'open' }));\n }\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n nextIndex = !!this.selectedOptions.length ? this.getDefaultActiveIndex() : this.getNextVisibleIndex(-1);\n if (nextIndex === -1) break;\n this.openDropdownWithActiveElement(nextIndex);\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n nextIndex = !!this.selectedOptions.length ? this.getDefaultActiveIndex() : this.getNextVisibleIndex(1);\n if (nextIndex === -1) break;\n this.openDropdownWithActiveElement(nextIndex);\n break;\n\n case 'Home':\n event.preventDefault();\n this.openDropdownWithActiveElement(0);\n break;\n\n case 'End':\n event.preventDefault();\n this.openDropdownWithActiveElement(allOptions.length - 1);\n break;\n\n case 'PageUp':\n event.preventDefault();\n this.openDropdownWithActiveElement(Math.max((activeIndex || 0) - 10, 0));\n break;\n\n case 'PageDown':\n event.preventDefault();\n this.openDropdownWithActiveElement(Math.min((activeIndex || 0) + 10, allOptions.length - 1));\n break;\n\n case 'Tab':\n this.popoverState.emit({ open: false, action: 'close' });\n break;\n\n case 'Esc':\n case 'Escape':\n if (this.noSelect) this.setActiveElement(null);\n this.popoverState.emit({ open: false, action: 'close' });\n break;\n\n default:\n if (customSearch) break;\n if (!key.match(/^[\\w]$/)) break;\n\n this.searchOptions(key, true);\n break;\n }\n };\n\n /* tslint:enable:cyclomatic-complexity */\n\n focusoutHandler = (event: FocusEvent) => {\n const { relatedTarget } = event as unknown as { relatedTarget: HTMLQ2OptionElement };\n const isInQ2OptionList = this.allOptions.includes(relatedTarget);\n const isInLightDom = !isInQ2OptionList && this.hostElement.contains(relatedTarget);\n if (isInQ2OptionList || isInLightDom) {\n event.stopPropagation();\n }\n };\n\n focusSelectedSibling(option: HTMLQ2OptionElement) {\n const { allVisibleOptions, allOptions } = this;\n const hasNoSiblings = allVisibleOptions.length < 2;\n if (hasNoSiblings) {\n this.showSelected = false;\n return;\n }\n\n const selectedOptionVisibleIndex = allVisibleOptions.indexOf(option);\n const nextVisibleSiblingIndex = selectedOptionVisibleIndex\n ? selectedOptionVisibleIndex - 1\n : selectedOptionVisibleIndex + 1;\n const nextVisibleSibling = allVisibleOptions[nextVisibleSiblingIndex];\n const nextSiblingIndex = allOptions.indexOf(nextVisibleSibling);\n\n this.activeIndex = nextSiblingIndex;\n this.setFocusedOption();\n this.scheduledAfterRender.push(() => {\n option._multiSelectHidden = !option.selected;\n });\n }\n\n getDefaultActiveIndex() {\n const { allOptions } = this;\n const firstSelected = allOptions.findIndex(element => element.selected);\n if (firstSelected > -1) return firstSelected;\n\n const firstEnabled = allOptions.findIndex(element => !element.hidden);\n if (firstEnabled > -1) return firstEnabled;\n\n return 0;\n }\n\n getNextVisibleIndex(direction) {\n const { allVisibleOptions, allOptions, activeIndex } = this;\n const activeOption = allOptions[activeIndex];\n const visibleActiveOptionIndex = allVisibleOptions.indexOf(activeOption);\n let nextVisibleOptionIndex = visibleActiveOptionIndex + direction;\n\n if (nextVisibleOptionIndex < 0) {\n nextVisibleOptionIndex = allVisibleOptions.length - 1;\n } else if (nextVisibleOptionIndex > allVisibleOptions.length - 1) {\n nextVisibleOptionIndex = 0;\n }\n\n const nextVisibleOption = allVisibleOptions[nextVisibleOptionIndex];\n return allOptions.indexOf(nextVisibleOption);\n }\n\n getRootSlot(element: Element): Element[] {\n const slot = element.querySelector('slot');\n const assignedElements = slot?.assignedElements() ?? Array.from(element.children);\n const hasAnotherSlot = !!assignedElements.length && assignedElements[0].tagName === 'SLOT';\n if (hasAnotherSlot) {\n return this.getRootSlot(assignedElements[0]);\n } else {\n return assignedElements;\n }\n }\n\n internalKeydownHandler = (event: KeyboardEvent) => {\n event.stopPropagation();\n const { activeIndex, customSearch, allOptions, allVisibleOptions, multiple } = this;\n const { key, shiftKey } = event;\n\n let newOption: HTMLQ2OptionElement;\n switch (key) {\n case ' ':\n if (this.searchString && !this.multiple) {\n if (customSearch) break;\n\n this.searchOptions(key, false);\n break;\n }\n\n event.preventDefault();\n newOption = allOptions.find(element => element.active);\n if (!newOption || newOption.disabled) break;\n this.selectOption(newOption);\n if (multiple) break;\n this.popoverState.emit({ open: false, action: 'select' });\n break;\n\n case 'Enter':\n event.preventDefault();\n newOption = allOptions.find(element => element.active);\n if (!newOption || newOption.disabled) break;\n this.selectOption(newOption);\n if (multiple) break;\n this.popoverState.emit({ open: false, action: 'select' });\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n const isFirstVisibleOptionActive = allVisibleOptions[0].active;\n if (isFirstVisibleOptionActive) break;\n if (activeIndex === undefined) {\n this.setDefaultActiveElement();\n break;\n } else {\n const nextIndex = this.getNextVisibleIndex(-1);\n if (nextIndex === -1) break;\n this.adjustActiveOptionAndScroll(nextIndex - activeIndex);\n break;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n const isLastVisibleOptionActive = allVisibleOptions[allVisibleOptions.length - 1].active;\n if (isLastVisibleOptionActive) break;\n if (activeIndex === undefined) {\n this.setDefaultActiveElement();\n break;\n } else {\n const nextIndex = this.getNextVisibleIndex(1);\n if (nextIndex === -1) break;\n this.adjustActiveOptionAndScroll(nextIndex - activeIndex);\n break;\n }\n\n case 'Home':\n event.preventDefault();\n this.openDropdownWithActiveElement(0);\n break;\n\n case 'End':\n event.preventDefault();\n this.openDropdownWithActiveElement(allOptions.length - 1);\n break;\n\n case 'PageUp':\n event.preventDefault();\n this.openDropdownWithActiveElement(Math.max(activeIndex - 10, 0));\n break;\n\n case 'PageDown':\n event.preventDefault();\n this.openDropdownWithActiveElement(Math.min(activeIndex + 10, allOptions.length - 1));\n break;\n\n case 'Tab':\n if (shiftKey) break;\n if (this.multiple && this.type === 'listbox') break;\n if (this.type === 'menu') {\n this.popoverState.emit({ open: false, action: 'close' });\n break;\n }\n\n newOption = allOptions.find(element => element.active);\n if (!newOption || newOption.disabled) return;\n this.selectOption(newOption);\n break;\n\n case 'Esc':\n case 'Escape':\n if (this.noSelect) this.setActiveElement(null);\n this.popoverState.emit({ open: false, action: 'close' });\n break;\n\n default:\n if (customSearch) break;\n if (!key.match(/^[\\w]$/)) break;\n\n this.searchOptions(key, false);\n break;\n }\n };\n\n async openDropdownWithActiveElement(activeIndex: number) {\n if (this.disabled) return;\n this.popoverState.emit({ open: true, action: 'open' });\n await waitForNextPaint();\n this.activeIndex = activeIndex;\n this.setActiveOption();\n this.setFocusedOption();\n this.scrollToActiveOption();\n }\n\n resetTimer() {\n if (this.searchStringTimer) {\n clearTimeout(this.searchStringTimer);\n }\n\n this.searchStringTimer = window.setTimeout(() => {\n this.searchString = null;\n }, 2000);\n }\n\n scrollToActiveOption() {\n const activeOption = this.allOptions[this.activeIndex];\n activeOption?.scrollIntoView({ block: 'center' });\n }\n\n searchAndFocus = (keyValue: string, shouldSelect: boolean) => {\n // pseudo search in non-searchable select\n const reorder = () => {\n this.pivotIndex = this.pivotIndex === undefined ? 0 : (this.activeIndex || 0) + 1;\n const list = this.allOptions.map((element, index) => ({ element, index }));\n return [...list.slice(this.pivotIndex), ...list.slice(0, this.pivotIndex)];\n };\n\n const buildQueue = () => {\n const now = new Date();\n if (now.getTime() - this.keyStore.lastPressedAt.getTime() > 1000) {\n // empty stored keys if delay > 1s\n this.keyStore.queue.length = 0;\n }\n if (this.keyStore.queue.length !== 1 || this.keyStore.queue[0] !== keyValue) {\n this.keyStore.queue.push(keyValue);\n }\n this.keyStore.lastPressedAt = now;\n };\n\n const searchIndex = (list: any[]) => {\n const keyStr = this.keyStore.queue.join('');\n const sanitizedKeyStr = sanitizeRegexString(keyStr);\n return list.find(v => {\n return (\n !v.element.disabled &&\n v.element.display &&\n (v.element.display.match(new RegExp(`^${sanitizedKeyStr}`, 'i')) ||\n v.element.display.replace(/\\s/g, '').match(new RegExp(`^${sanitizedKeyStr}`, 'i')))\n );\n });\n };\n\n const setFocus = ({ index }) => {\n if (this.multiple) {\n // multiple: should open to make sure that which options are selected\n this.openDropdownWithActiveElement(index);\n } else {\n this.activeIndex = index;\n if (shouldSelect) {\n this.selectOption(this.allOptions[index]);\n this.popoverState.emit({ open: false, action: 'select' });\n } else this.setActiveElement(index);\n }\n };\n\n buildQueue();\n const matched = searchIndex(reorder());\n if (matched) {\n setFocus(matched);\n }\n };\n\n searchOptions(key: string, shouldSelect?: boolean) {\n this.searchString = key;\n this.searchAndFocus(key, shouldSelect);\n }\n\n selectOption(selectedOption: HTMLQ2OptionElement) {\n const { multiple, noSelect, showSelected } = this;\n if (!selectedOption || selectedOption.disabled || selectedOption.disabledGroup) return;\n const selectedValue = selectedOption.value;\n const valueObject = {\n value: selectedValue,\n display: selectedOption.display || selectedOption.innerText.trim(),\n };\n\n let values: IOptionValue[] = [];\n if (multiple) {\n const { selectedOptions } = this;\n const isAlreadySelected = selectedOptions.find(option => option.value === selectedValue);\n\n if (isAlreadySelected) {\n values = selectedOptions.filter(({ value }) => value !== selectedValue);\n } else {\n values = [...selectedOptions, valueObject];\n }\n\n if (showSelected) this.focusSelectedSibling(selectedOption);\n } else {\n values = [valueObject];\n }\n\n if (noSelect) this.setActiveElement(null);\n else this.selectedOptions = values;\n\n this.change.emit({ value: selectedValue, values });\n }\n\n setActiveOption() {\n const activeIndex = this.activeIndex;\n\n this.allOptions.forEach((element, elementIndex) => {\n element.active = activeIndex === elementIndex;\n });\n }\n\n setFocusedOption() {\n const option = this.allOptions[this.activeIndex];\n if (!option) return;\n\n const isOptionVisible = isVisible(option);\n if (isOptionVisible) option.focus();\n else nextPaint(() => option.focus());\n }\n\n updateMultipleOptionAttrs() {\n const { allOptions, selectedOptions } = this;\n const selectedValues = selectedOptions.map(({ value }) => value);\n allOptions.forEach(element => {\n element.selected = selectedValues.includes(element.value);\n });\n }\n\n updateSingleOptionAttrs() {\n const { allOptions, selectedOptions } = this;\n const selectedValue = selectedOptions[0]?.value || undefined;\n allOptions.forEach(element => {\n element.selected = element.value === selectedValue;\n });\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <Host>\n <div\n class=\"content\"\n ref={el => (this.contentElement = el)}\n onFocusout={this.focusoutHandler}\n >\n <div\n class=\"options\"\n aria-label={loc('tecton.element.optionList.label', [this.label])}\n aria-multiselectable={`${!!this.multiple}`}\n role={this.type || 'listbox'}\n onKeyDown={this.internalKeydownHandler}\n onClick={this.clickHandler}\n >\n <slot />\n </div>\n </div>\n </Host>\n );\n }\n\n // #endregion\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"action-sheet-e64cb6f7.js","mappings":"MAWa,qBAAqB,GAAG,CAAC,SAAgC,EAAE,KAAkC;;IACtG,MAAM,iBAAiB,GAAG,MAAM,IAAI,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACrE,IAAI,CAAC,iBAAiB;QAAE,OAAO,KAAK,CAAC;IAErC,MAAM,kBAAkB,GAAG,CAAC,EAAC,MAAA,MAAM,CAAC,cAAc,0CAAE,eAAe,CAAA,CAAC;IACpE,IAAI,CAAC,kBAAkB;QAAE,OAAO,KAAK,CAAC;IAEtC,MAAM,mBAAmB,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IACxG,IAAI,KAAK,EAAE;QACP,MAAM,oBAAoB,GAAG,KAAK,YAAY,aAAa,CAAC;QAC5D,MAAM,iBAAiB,GAAG,KAAK,YAAY,UAAU,CAAC;QACtD,MAAM,8BAA8B,GAAG,oBAAoB,IAAI,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvG,MAAM,2BAA2B,GAAG,iBAAiB,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC;QAChF,MAAM,sBAAsB,GAAG,2BAA2B,IAAI,8BAA8B,CAAC;QAC7F,IAAI,CAAC,sBAAsB;YAAE,OAAO,KAAK,CAAC;KAC7C;IAED,IAAI,SAAS,CAAC,KAAK;QAAE,OAAO,IAAI,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,IAAI;gBACN,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;gBACzB,OAAO,GAAG,CAAC;aACd,oBACI,aAAa,EACrB,CAAC;SACL;KACJ,CAAC,CAAC;AACP,CAAC,CAAC;AAEK,MAAM,aAAa,GAAG,OACzB,SAAoC,EACpC,KAAkC;IAElC,OAAO;QACH,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE;QAC5B,WAAW,EAAE,EAAE;QACf,KAAK;QACL,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ;YACzC,eAAe,EAAG,SAAS,CAAC,UAAU,CAAC,eAA+C,IAAI,EAAE;YAC5F,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ;SAC5C;QACD,OAAO,EAAE,YAAY,CAAC,MAAM,SAAS,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;KAClE,CAAC;AACN,CAAC,CAAC;MAMW,mBAAmB,GAAG,OAC/B,SAAoC,EACpC,KAAkC;;IAElC,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACvD,OAAO,MAAA,MAAM,CAAC,cAAc,0CAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;AAC5D;;;;","names":[],"sources":["src/utils/action-sheet.ts"],"sourcesContent":["import {\n ActionSheetSelectedOption,\n ActionSheetListCloseData,\n ActionSheetListData,\n ActionSheetListOption,\n ActionSheetListOptgroup,\n} from 'q2-tecton-common/lib/utility/action-sheet';\n\ninterface IActionSheetComponent {\n hoist: boolean;\n}\nexport const shouldShowActionSheet = (component: IActionSheetComponent, event?: KeyboardEvent | MouseEvent) => {\n const isDialogSupported = 'open' in document.createElement('dialog');\n if (!isDialogSupported) return false;\n\n const canShowActionSheet = !!window.TectonElements?.showActionSheet;\n if (!canShowActionSheet) return false;\n\n const keysThatTriggerOpen = ['ArrowDown', 'ArrowUp', 'PageDown', 'PageUp', 'Home', 'End', 'Enter', ' '];\n if (event) {\n const eventIsKeyboardEvent = event instanceof KeyboardEvent;\n const eventIsMouseEvent = event instanceof MouseEvent;\n const keyboardEventShouldTriggerOpen = eventIsKeyboardEvent && keysThatTriggerOpen.includes(event.key);\n const mouseEventShouldTriggerOpen = eventIsMouseEvent && event.type === 'click';\n const eventShouldTriggerOpen = mouseEventShouldTriggerOpen || keyboardEventShouldTriggerOpen;\n if (!eventShouldTriggerOpen) return false;\n }\n\n if (component.hoist) return true;\n return false;\n};\n\nconst parseOptions = (options: (HTMLQ2OptgroupElement | HTMLQ2OptionElement)[]): any[] => {\n const defaultOption = {\n disabled: false,\n display: '',\n hidden: false,\n multiline: false,\n value: '',\n innerHTML: '',\n };\n const optionPropsToGet = Object.keys(defaultOption);\n const defaultOptgroup = {\n disabled: false,\n label: '',\n options: [],\n };\n const optgroupPropsToGet = Object.keys(defaultOptgroup);\n return options.map(option => {\n if (option.tagName === 'Q2-OPTGROUP') {\n const optgroup = option as HTMLQ2OptgroupElement;\n return optgroupPropsToGet.reduce<ActionSheetListOptgroup>(\n (acc, prop) => {\n if (prop === 'options') {\n const options = Array.from(option.children).filter(\n child => child.tagName === 'Q2-OPTION' || child.tagName === 'Q2-OPTGROUP'\n ) as HTMLQ2OptgroupElement[];\n\n acc[prop] = parseOptions(options);\n } else {\n acc[prop] = optgroup[prop];\n }\n return acc;\n },\n { ...defaultOptgroup }\n );\n } else if (option.tagName === 'Q2-OPTION') {\n return optionPropsToGet.reduce<ActionSheetListOption>(\n (acc, prop) => {\n acc[prop] = option[prop];\n return acc;\n },\n { ...defaultOption }\n );\n }\n });\n};\n\nexport const buildListData = async (\n component: IActionSheetListComponent,\n event?: MouseEvent | KeyboardEvent\n): Promise<ActionSheetListData> => {\n return {\n appearance: 'list',\n title: component.label || '',\n description: '',\n event,\n listProps: {\n multiple: !!component.optionList.multiple,\n selectedOptions: (component.optionList.selectedOptions as ActionSheetSelectedOption[]) || [],\n noSelect: !!component.optionList.noSelect,\n },\n options: parseOptions(await component.optionList.getContents()),\n };\n};\n\ninterface IActionSheetListComponent {\n optionList: HTMLQ2OptionListElement;\n label: string;\n}\nexport const showActionSheetList = async (\n component: IActionSheetListComponent,\n event?: MouseEvent | KeyboardEvent\n): Promise<ActionSheetListCloseData> => {\n const listData = await buildListData(component, event);\n return window.TectonElements?.showActionSheet(listData);\n};\n"],"version":3}
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-7a5365e2.js';
|
|
2
|
-
import { h as handleDeprecationWarning, w as waitForNextPaint } from './index-d18e2a20.js';
|
|
3
|
-
|
|
4
|
-
const ClickElsewhere = class {
|
|
5
|
-
constructor(hostRef) {
|
|
6
|
-
registerInstance(this, hostRef);
|
|
7
|
-
this.change = createEvent(this, "change", 7);
|
|
8
|
-
// #region Own Properties
|
|
9
|
-
this.isCurrentlyFocused = false;
|
|
10
|
-
/**
|
|
11
|
-
* Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them
|
|
12
|
-
*/
|
|
13
|
-
this.mouseEventList = ['mousedown', 'dragstart', 'touchstart'];
|
|
14
|
-
this.mouseHandler = (event) => {
|
|
15
|
-
const isCurrentlyFocused = this.shadowContains(this.findActiveElement());
|
|
16
|
-
const aboutToBeFocused = this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target);
|
|
17
|
-
if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {
|
|
18
|
-
this.isCurrentlyFocused = false;
|
|
19
|
-
this.change.emit();
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;
|
|
23
|
-
};
|
|
24
|
-
this.windowBlurHandler = () => {
|
|
25
|
-
this.isCurrentlyFocused = false;
|
|
26
|
-
this.change.emit();
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
// #endregion
|
|
30
|
-
// #region Component Lifecycle Events
|
|
31
|
-
/* tslint:enable:no-empty */
|
|
32
|
-
connectedCallback() {
|
|
33
|
-
this.mouseEventList.forEach((eventName) => {
|
|
34
|
-
document.addEventListener(eventName, this.mouseHandler);
|
|
35
|
-
});
|
|
36
|
-
window.addEventListener('blur', this.windowBlurHandler);
|
|
37
|
-
}
|
|
38
|
-
disconnectedCallback() {
|
|
39
|
-
this.mouseEventList.forEach((eventName) => {
|
|
40
|
-
document.removeEventListener(eventName, this.mouseHandler);
|
|
41
|
-
});
|
|
42
|
-
window.removeEventListener('blur', this.windowBlurHandler);
|
|
43
|
-
}
|
|
44
|
-
/* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */
|
|
45
|
-
/* tslint:disable:no-empty */
|
|
46
|
-
componentWillLoad() { }
|
|
47
|
-
// #endregion
|
|
48
|
-
// #region Local Methods
|
|
49
|
-
findActiveElement() {
|
|
50
|
-
let workingElement = document.activeElement;
|
|
51
|
-
while (true) {
|
|
52
|
-
if (!workingElement || !workingElement.shadowRoot) {
|
|
53
|
-
return workingElement;
|
|
54
|
-
}
|
|
55
|
-
workingElement = workingElement.shadowRoot.activeElement;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
originatesInSlots(target) {
|
|
59
|
-
const slots = this.hostElement.querySelectorAll('slot');
|
|
60
|
-
for (const currentSlot of Array.from(slots)) {
|
|
61
|
-
const lightNodes = (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||
|
|
62
|
-
this.hostElement.childNodes;
|
|
63
|
-
for (const currentNode of Array.from(lightNodes)) {
|
|
64
|
-
if (currentNode.contains(target)) {
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
shadowContains(child) {
|
|
72
|
-
/**
|
|
73
|
-
* shadow-dom enabled version of Node.contains()
|
|
74
|
-
*/
|
|
75
|
-
while (true) {
|
|
76
|
-
if (child === this.hostElement) {
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
if (!child) {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
child = child.parentNode || child.host;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
shadowEventTarget(event) {
|
|
86
|
-
return event.composedPath()[0] || event.target;
|
|
87
|
-
}
|
|
88
|
-
get hostElement() { return getElement(this); }
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
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;position:fixed;z-index:var(--tct-popover-z-index, 50);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}:host([block]) .show{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:host([align=left]) .show{left:var(--comp-pop-left);right:unset}:host([align=right]) .show{right:var(--comp-pop-right);left:unset}.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}.show.up{top:unset;bottom:var(--comp-pop-bottom)}.show.legacy{position:absolute}.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
|
|
92
|
-
const Q2PopoverStyle0 = q2PopoverCss;
|
|
93
|
-
|
|
94
|
-
const Q2Popover = class {
|
|
95
|
-
constructor(hostRef) {
|
|
96
|
-
registerInstance(this, hostRef);
|
|
97
|
-
this.popoverStateChanged = createEvent(this, "popoverStateChanged", 7);
|
|
98
|
-
/**
|
|
99
|
-
* The number of pixels to leave between the popover and the edge of the viewport
|
|
100
|
-
*/
|
|
101
|
-
this.displayBuffer = 10;
|
|
102
|
-
/** remove when Popover API is supported in iOS */
|
|
103
|
-
this.orientationChanged = false;
|
|
104
|
-
this.handleMinHeight = () => {
|
|
105
|
-
if (this.minHeight) {
|
|
106
|
-
handleDeprecationWarning(this, 'minHeight', 'prop');
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
this.setAbsoluteCSSProperties = async () => {
|
|
110
|
-
const { controlElement, containerElement, currentDirection, align } = this;
|
|
111
|
-
if (align === 'right') {
|
|
112
|
-
containerElement.style.setProperty('--comp-pop-right', '0');
|
|
113
|
-
containerElement.style.setProperty('--comp-pop-left', 'unset');
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
containerElement.style.setProperty('--comp-pop-left', '0');
|
|
117
|
-
containerElement.style.setProperty('--comp-pop-right', 'unset');
|
|
118
|
-
}
|
|
119
|
-
if (this.block) {
|
|
120
|
-
containerElement.style.setProperty('--comp-pop-width', '100%');
|
|
121
|
-
}
|
|
122
|
-
if (currentDirection === 'up') {
|
|
123
|
-
const controlStyle = getComputedStyle(controlElement);
|
|
124
|
-
const controlSize = parseInt(controlStyle.height || '0') +
|
|
125
|
-
parseInt(controlStyle.borderTopWidth || '0') +
|
|
126
|
-
parseInt(controlStyle.borderBottomWidth || '0');
|
|
127
|
-
containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);
|
|
128
|
-
}
|
|
129
|
-
// Wait for one paint to prevent layout thrashing
|
|
130
|
-
await waitForNextPaint();
|
|
131
|
-
containerElement.style.setProperty('--comp-pop-opacity', '1');
|
|
132
|
-
};
|
|
133
|
-
this.setFixedCSSProperties = async () => {
|
|
134
|
-
var _a, _b;
|
|
135
|
-
const { controlElement, containerElement, currentDirection, rootElementRect } = this;
|
|
136
|
-
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 : {
|
|
137
|
-
top: 0,
|
|
138
|
-
bottom: 0,
|
|
139
|
-
left: 0,
|
|
140
|
-
right: 0,
|
|
141
|
-
};
|
|
142
|
-
const popoverLeft = controlLeft - rootElementRect.left;
|
|
143
|
-
if (this.block)
|
|
144
|
-
containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
|
|
145
|
-
containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
|
|
146
|
-
containerElement.style.setProperty('--comp-pop-right', `${rootElementRect.width + rootElementRect.left - controlRight}px`);
|
|
147
|
-
if (currentDirection === 'up') {
|
|
148
|
-
containerElement.style.setProperty('--comp-pop-bottom', `${rootElementRect.height + rootElementRect.top - controlTop}px`);
|
|
149
|
-
}
|
|
150
|
-
if (currentDirection === 'down') {
|
|
151
|
-
containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);
|
|
152
|
-
}
|
|
153
|
-
// Wait for one paint to prevent layout thrashing
|
|
154
|
-
await waitForNextPaint();
|
|
155
|
-
containerElement.style.setProperty('--comp-pop-opacity', '1');
|
|
156
|
-
};
|
|
157
|
-
this.viewPortChanged = () => {
|
|
158
|
-
if (!this.open)
|
|
159
|
-
return;
|
|
160
|
-
this.determinePopDirection();
|
|
161
|
-
};
|
|
162
|
-
this.viewPortOrientationChanged = () => {
|
|
163
|
-
this.orientationChanged = true;
|
|
164
|
-
this.viewPortChanged();
|
|
165
|
-
};
|
|
166
|
-
this.currentDirection = undefined;
|
|
167
|
-
this.show = false;
|
|
168
|
-
this.align = undefined;
|
|
169
|
-
this.block = undefined;
|
|
170
|
-
this.controlElement = undefined;
|
|
171
|
-
this.direction = undefined;
|
|
172
|
-
this.maxHeight = undefined;
|
|
173
|
-
this.minHeight = undefined;
|
|
174
|
-
this.mode = null;
|
|
175
|
-
this.open = undefined;
|
|
176
|
-
}
|
|
177
|
-
// #endregion
|
|
178
|
-
// #region Component Lifecycle Events
|
|
179
|
-
disconnectedCallback() {
|
|
180
|
-
this.removeViewportListeners();
|
|
181
|
-
}
|
|
182
|
-
componentDidLoad() {
|
|
183
|
-
this.handleMinHeight();
|
|
184
|
-
if (this.open)
|
|
185
|
-
this.determinePopDirection();
|
|
186
|
-
}
|
|
187
|
-
// #endregion
|
|
188
|
-
// #region Listeners
|
|
189
|
-
popoverStateHandler(event) {
|
|
190
|
-
const { detail: { open }, } = event;
|
|
191
|
-
if (open === this.open)
|
|
192
|
-
return;
|
|
193
|
-
this.open = open;
|
|
194
|
-
event.stopPropagation();
|
|
195
|
-
}
|
|
196
|
-
// #endregion
|
|
197
|
-
// #region Public Methods API
|
|
198
|
-
async scrollContainerTo(options) {
|
|
199
|
-
this.containerElement.scrollTo(options);
|
|
200
|
-
}
|
|
201
|
-
async toggle() {
|
|
202
|
-
this.open = !this.open;
|
|
203
|
-
}
|
|
204
|
-
// #endregion
|
|
205
|
-
// #region Watchers
|
|
206
|
-
minHeightProvided() {
|
|
207
|
-
this.handleMinHeight();
|
|
208
|
-
}
|
|
209
|
-
async openChanged(open) {
|
|
210
|
-
this.setRootElement();
|
|
211
|
-
this.popoverStateChanged.emit({ open });
|
|
212
|
-
if (open) {
|
|
213
|
-
this.addViewportListeners();
|
|
214
|
-
this.determinePopDirection();
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
this.removeViewportListeners();
|
|
218
|
-
this.currentDirection = undefined;
|
|
219
|
-
this.show = false;
|
|
220
|
-
await waitForNextPaint();
|
|
221
|
-
this.clearCSSProperties();
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
// #endregion
|
|
225
|
-
// #region Local Methods
|
|
226
|
-
get isModule() {
|
|
227
|
-
var _a, _b;
|
|
228
|
-
const isIframe = window !== window.top;
|
|
229
|
-
const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
|
|
230
|
-
return isIframe && hasPlatformDimensions;
|
|
231
|
-
}
|
|
232
|
-
get providedDirection() {
|
|
233
|
-
const { direction } = this;
|
|
234
|
-
switch (direction) {
|
|
235
|
-
case 'up':
|
|
236
|
-
case 'down':
|
|
237
|
-
return direction;
|
|
238
|
-
default:
|
|
239
|
-
return undefined;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
get validatedMaxHeight() {
|
|
243
|
-
const { maxHeight } = this;
|
|
244
|
-
return isNaN(maxHeight) ? undefined : maxHeight;
|
|
245
|
-
}
|
|
246
|
-
addViewportListeners() {
|
|
247
|
-
var _a;
|
|
248
|
-
window.addEventListener('resize', this.viewPortOrientationChanged);
|
|
249
|
-
// #region remove when Popover API is supported in iOS
|
|
250
|
-
window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
|
|
251
|
-
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.viewPortOrientationChanged);
|
|
252
|
-
window.addEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
253
|
-
// #endregion
|
|
254
|
-
}
|
|
255
|
-
clearCSSProperties() {
|
|
256
|
-
this.containerElement.style.removeProperty('--comp-pop-max-height');
|
|
257
|
-
this.containerElement.style.removeProperty('--comp-pop-top');
|
|
258
|
-
this.containerElement.style.removeProperty('--comp-pop-bottom');
|
|
259
|
-
this.containerElement.style.removeProperty('--comp-pop-left');
|
|
260
|
-
this.containerElement.style.removeProperty('--comp-pop-right');
|
|
261
|
-
this.containerElement.style.removeProperty('--comp-pop-width');
|
|
262
|
-
this.containerElement.style.removeProperty('--comp-pop-opacity');
|
|
263
|
-
}
|
|
264
|
-
async determinePopDirection() {
|
|
265
|
-
var _a, _b, _c;
|
|
266
|
-
const { containerElement, controlElement, providedDirection, displayBuffer } = this;
|
|
267
|
-
if (containerElement)
|
|
268
|
-
containerElement.style.maxHeight = null;
|
|
269
|
-
await waitForNextPaint();
|
|
270
|
-
const { isModule } = this;
|
|
271
|
-
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 : {
|
|
272
|
-
top: 0,
|
|
273
|
-
bottom: 0,
|
|
274
|
-
};
|
|
275
|
-
let windowHeight;
|
|
276
|
-
let maxSpaceAbove;
|
|
277
|
-
let maxSpaceBelow;
|
|
278
|
-
if (isModule) {
|
|
279
|
-
const { outletOffset = 0, innerHeight = window.innerHeight } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
|
|
280
|
-
const distanceToIframeBottom = window.visualViewport.height - controlBottom;
|
|
281
|
-
const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);
|
|
282
|
-
const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;
|
|
283
|
-
windowHeight = innerHeight;
|
|
284
|
-
// If the top of the module is below the top of the window we just use the controlTop
|
|
285
|
-
// Otherwise we need to add the outletOffset to the controlTop
|
|
286
|
-
maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;
|
|
287
|
-
maxSpaceBelow = isIframeShorterThanWindow
|
|
288
|
-
? distanceToIframeBottom - displayBuffer
|
|
289
|
-
: viewableSpaceBelow - displayBuffer;
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
292
|
-
windowHeight = window.visualViewport.height;
|
|
293
|
-
maxSpaceAbove = controlTop - displayBuffer;
|
|
294
|
-
maxSpaceBelow = windowHeight - controlBottom - displayBuffer;
|
|
295
|
-
}
|
|
296
|
-
const directionWithMostSpace = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';
|
|
297
|
-
// We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)
|
|
298
|
-
const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
|
|
299
|
-
// we do not want to constantly update the max-height after an orientation change, so we switch this back to false
|
|
300
|
-
this.orientationChanged = false;
|
|
301
|
-
const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
|
|
302
|
-
switch (currentOrDetermineDirection) {
|
|
303
|
-
case 'up':
|
|
304
|
-
if (shouldUpdateMaxHeight) {
|
|
305
|
-
const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;
|
|
306
|
-
const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);
|
|
307
|
-
containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
|
|
308
|
-
}
|
|
309
|
-
this.setDirectionAndShow('up');
|
|
310
|
-
break;
|
|
311
|
-
case 'down':
|
|
312
|
-
if (shouldUpdateMaxHeight) {
|
|
313
|
-
const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;
|
|
314
|
-
const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);
|
|
315
|
-
containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
|
|
316
|
-
}
|
|
317
|
-
this.setDirectionAndShow('down');
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
removeViewportListeners() {
|
|
322
|
-
var _a;
|
|
323
|
-
window.removeEventListener('resize', this.viewPortOrientationChanged);
|
|
324
|
-
// #region remove when Popover API is supported in iOS
|
|
325
|
-
window.removeEventListener('scroll', this.viewPortChanged);
|
|
326
|
-
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
327
|
-
window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
328
|
-
// #endregion
|
|
329
|
-
}
|
|
330
|
-
setDirectionAndShow(direction) {
|
|
331
|
-
this.setRootElement();
|
|
332
|
-
// Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
|
|
333
|
-
// popover can be closed between the time the popover is opened and the time the direction is determined
|
|
334
|
-
const isOpen = this.open;
|
|
335
|
-
if (!isOpen)
|
|
336
|
-
return;
|
|
337
|
-
this.currentDirection = direction;
|
|
338
|
-
this.show = true;
|
|
339
|
-
if (this.mode === 'legacy') {
|
|
340
|
-
this.setAbsoluteCSSProperties();
|
|
341
|
-
}
|
|
342
|
-
else {
|
|
343
|
-
this.setFixedCSSProperties();
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
setRootElement() {
|
|
347
|
-
let currentElement = this.hostElement;
|
|
348
|
-
while (currentElement && currentElement !== document.documentElement) {
|
|
349
|
-
const computedStyle = window.getComputedStyle(currentElement);
|
|
350
|
-
// Check if the element has any styles applied that create a new containg block
|
|
351
|
-
if (computedStyle.transform !== 'none' ||
|
|
352
|
-
computedStyle.filter !== 'none' ||
|
|
353
|
-
computedStyle.perspective !== 'none' ||
|
|
354
|
-
computedStyle.containerType !== 'normal' ||
|
|
355
|
-
['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||
|
|
356
|
-
['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)) {
|
|
357
|
-
this.rootElementRect = currentElement.getBoundingClientRect();
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
const rootNode = currentElement.getRootNode();
|
|
361
|
-
const isRootNodeWebComponent = typeof ShadowRoot !== 'undefined' &&
|
|
362
|
-
rootNode instanceof ShadowRoot &&
|
|
363
|
-
rootNode.host instanceof HTMLElement;
|
|
364
|
-
if (isRootNodeWebComponent) {
|
|
365
|
-
currentElement = rootNode.host;
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
currentElement = currentElement.parentElement;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
// Return the document's bounding rect if no element is found
|
|
372
|
-
this.rootElementRect = {
|
|
373
|
-
top: 0,
|
|
374
|
-
bottom: 0,
|
|
375
|
-
left: 0,
|
|
376
|
-
right: 0,
|
|
377
|
-
height: window.visualViewport.height,
|
|
378
|
-
width: window.visualViewport.width,
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
// #endregion
|
|
382
|
-
// #region Render Methods
|
|
383
|
-
render() {
|
|
384
|
-
const containerClasses = ['container', this.currentDirection];
|
|
385
|
-
if (this.show)
|
|
386
|
-
containerClasses.push('show');
|
|
387
|
-
if (this.mode === 'legacy')
|
|
388
|
-
containerClasses.push('legacy');
|
|
389
|
-
return (h("div", { key: 'ea60a3f8f2005cd25dac56ac3c681aa5dbc27111', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, h("div", { key: '92041f64b8d066240de5653f9035bb9165697525', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '65db5e767d8992e8c084c045094306b6be42879f' }))));
|
|
390
|
-
}
|
|
391
|
-
get hostElement() { return getElement(this); }
|
|
392
|
-
static get watchers() { return {
|
|
393
|
-
"minHeight": ["minHeightProvided"],
|
|
394
|
-
"open": ["openChanged"]
|
|
395
|
-
}; }
|
|
396
|
-
};
|
|
397
|
-
Q2Popover.style = Q2PopoverStyle0;
|
|
398
|
-
|
|
399
|
-
export { ClickElsewhere as click_elsewhere, Q2Popover as q2_popover };
|
|
400
|
-
|
|
401
|
-
//# sourceMappingURL=click-elsewhere_2.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"click-elsewhere.q2-popover.entry.js","mappings":";;;MAMa,cAAc;IAJ3B;;;;QAOI,uBAAkB,GAAY,KAAK,CAAC;;;;QAIpC,mBAAc,GAAa,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAqDpE,iBAAY,GAAG,CAAC,KAAY;YACxB,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;YACzE,MAAM,gBAAgB,GAClB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAiB,CAAC,CAAC;YAE1G,IAAI,CAAC,gBAAgB,KAAK,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,EAAE;gBACtE,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;gBAChC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnB,OAAO;aACV;YACD,IAAI,CAAC,kBAAkB,GAAG,gBAAgB,IAAI,kBAAkB,CAAC;SACpE,CAAC;QAsCF,sBAAiB,GAAG;YAChB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;YAChC,I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AG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;","names":[],"sources":["src/components/click-elsewhere/click-elsewhere.tsx","src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n // #region Own Properties\n\n isCurrentlyFocused: boolean = false;\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event()\n change: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n\n // #endregion\n // #region Local Methods\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n return false;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n child = child.parentNode || child.host;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n windowBlurHandler = (): void => {\n this.isCurrentlyFocused = false;\n this.change.emit();\n };\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\"));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n &.legacy {\n position: absolute;\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n rootElementRect: DOMRect;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n maxHeight: number;\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('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, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\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}
|