q2-tecton-elements 1.48.1 → 1.48.3
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 +17 -54
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-a93362ed.js → index-f70484ba.js} +68 -1
- package/dist/cjs/index-f70484ba.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +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 +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 +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-input.cjs.entry.js +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-list.cjs.entry.js +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 +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +56 -4
- 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 +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +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/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-popover/q2-popover.js +17 -54
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.js +62 -4
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/utils/index.js +65 -0
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/components/index2.js +66 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-dropdown.js +3 -1
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-popover2.js +17 -54
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-select2.js +57 -5
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/esm/click-elsewhere_2.entry.js +17 -54
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-3c5cd75e.js → index-c14ec4b5.js} +67 -2
- package/dist/esm/index-c14ec4b5.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +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 +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 +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-input.entry.js +1 -1
- package/dist/esm/q2-item.entry.js +1 -1
- package/dist/esm/q2-list.entry.js +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 +1 -1
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +1 -1
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +1 -1
- package/dist/esm/q2-select.entry.js +56 -4
- 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 +1 -1
- package/dist/esm/q2-stepper.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +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/jest.setup.js +11 -0
- package/dist/jest.setup.js.map +1 -1
- package/dist/q2-tecton-elements/{p-75bb43b2.entry.js → p-037f1f28.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-0d54bacb.entry.js +2 -0
- package/dist/q2-tecton-elements/p-0d54bacb.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-11982614.entry.js → p-23b4ee5c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-ca17f7ca.entry.js → p-2d10b3c4.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0a211fb4.entry.js → p-2fa050ba.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-cfabf5d1.entry.js → p-326ea4b1.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7deda459.entry.js → p-32fc4088.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-34eff2c8.js +2 -0
- package/dist/q2-tecton-elements/p-34eff2c8.js.map +1 -0
- package/dist/q2-tecton-elements/{p-6be0e333.entry.js → p-3530e050.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-363e4e72.entry.js +2 -0
- package/dist/q2-tecton-elements/{p-fe2fd83b.entry.js.map → p-363e4e72.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-81bb9436.entry.js → p-39c66aa0.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-fe1f1ff4.entry.js → p-3c22599b.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-07f40176.entry.js → p-4bb841ca.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-044b8914.entry.js → p-4f04df58.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d6c8d94d.entry.js → p-546a1b35.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-1a628982.entry.js → p-562bc5d7.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-de2f3111.entry.js → p-66c66bb3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-def9be7b.entry.js → p-69a18ec3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-85a7b1ab.entry.js → p-6a66ff01.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-77e6704d.entry.js → p-6bf4d0e7.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-5214296a.entry.js → p-6d80a94c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-84fc61f5.entry.js → p-7c701caa.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-132005d2.entry.js → p-82bfca30.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-644d5b2e.entry.js → p-83ccd9e7.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-8734e1cb.entry.js → p-8683c826.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4740e969.entry.js → p-8b5639df.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-a2caa101.entry.js → p-8cd46d16.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-1d824cdf.entry.js → p-917a8c98.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0d73466a.entry.js → p-a1aa64d9.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-572805fc.entry.js → p-a57750a2.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-68276771.entry.js → p-aa7e150c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-432532fe.entry.js → p-ab844234.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-46085a34.entry.js → p-bcd6b43b.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d5c182d8.entry.js → p-bea623bd.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-3fe532bc.entry.js → p-cd1fb170.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-76be9cad.entry.js → p-cd72a928.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-d7a3301b.entry.js +2 -0
- package/dist/q2-tecton-elements/p-d7a3301b.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-e786ba03.entry.js → p-df2ed4f8.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-63038a54.entry.js → p-e3b49661.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-6af21a10.entry.js → p-fa42284d.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-28b0de1c.entry.js → p-fa43dced.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-pagination-test.e2e.js +3 -2
- package/dist/test/elements/q2-pagination-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-popover-test.spec.js +230 -154
- package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
- package/dist/test/elements/q2-select-test.spec.js +146 -6
- package/dist/test/elements/q2-select-test.spec.js.map +1 -1
- package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +9 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +0 -2
- package/dist/types/components/q2-select/q2-select.d.ts +5 -0
- package/dist/types/utils/index.d.ts +5 -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-25a0f807.entry.js +0 -2
- package/dist/q2-tecton-elements/p-25a0f807.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-84190698.js +0 -2
- package/dist/q2-tecton-elements/p-84190698.js.map +0 -1
- package/dist/q2-tecton-elements/p-eb45704f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-eb45704f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-fe2fd83b.entry.js +0 -2
- /package/dist/q2-tecton-elements/{p-75bb43b2.entry.js.map → p-037f1f28.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-11982614.entry.js.map → p-23b4ee5c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-ca17f7ca.entry.js.map → p-2d10b3c4.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-0a211fb4.entry.js.map → p-2fa050ba.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-cfabf5d1.entry.js.map → p-326ea4b1.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7deda459.entry.js.map → p-32fc4088.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6be0e333.entry.js.map → p-3530e050.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-81bb9436.entry.js.map → p-39c66aa0.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-fe1f1ff4.entry.js.map → p-3c22599b.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-07f40176.entry.js.map → p-4bb841ca.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-044b8914.entry.js.map → p-4f04df58.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d6c8d94d.entry.js.map → p-546a1b35.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-1a628982.entry.js.map → p-562bc5d7.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-de2f3111.entry.js.map → p-66c66bb3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-def9be7b.entry.js.map → p-69a18ec3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-85a7b1ab.entry.js.map → p-6a66ff01.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-77e6704d.entry.js.map → p-6bf4d0e7.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-5214296a.entry.js.map → p-6d80a94c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-84fc61f5.entry.js.map → p-7c701caa.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-132005d2.entry.js.map → p-82bfca30.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-644d5b2e.entry.js.map → p-83ccd9e7.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-8734e1cb.entry.js.map → p-8683c826.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4740e969.entry.js.map → p-8b5639df.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-a2caa101.entry.js.map → p-8cd46d16.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-1d824cdf.entry.js.map → p-917a8c98.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-0d73466a.entry.js.map → p-a1aa64d9.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-572805fc.entry.js.map → p-a57750a2.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-68276771.entry.js.map → p-aa7e150c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-432532fe.entry.js.map → p-ab844234.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-46085a34.entry.js.map → p-bcd6b43b.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d5c182d8.entry.js.map → p-bea623bd.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-3fe532bc.entry.js.map → p-cd1fb170.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-76be9cad.entry.js.map → p-cd72a928.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e786ba03.entry.js.map → p-df2ed4f8.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-63038a54.entry.js.map → p-e3b49661.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6af21a10.entry.js.map → p-fa42284d.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-28b0de1c.entry.js.map → p-fa43dced.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
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
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, 3px)));--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;
|
|
@@ -136,44 +136,8 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
136
136
|
async scrollContainerTo(options) {
|
|
137
137
|
this.containerElement.scrollTo(options);
|
|
138
138
|
}
|
|
139
|
-
setRootElement() {
|
|
140
|
-
let currentElement = this.hostElement;
|
|
141
|
-
while (currentElement && currentElement !== document.documentElement) {
|
|
142
|
-
const computedStyle = window.getComputedStyle(currentElement);
|
|
143
|
-
// Check if the element has any styles applied that create a new containg block
|
|
144
|
-
if (computedStyle.transform !== 'none' ||
|
|
145
|
-
computedStyle.filter !== 'none' ||
|
|
146
|
-
computedStyle.perspective !== 'none' ||
|
|
147
|
-
computedStyle.containerType !== 'normal' ||
|
|
148
|
-
['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||
|
|
149
|
-
['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)) {
|
|
150
|
-
this.rootElementRect = currentElement.getBoundingClientRect();
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
const rootNode = currentElement.getRootNode();
|
|
154
|
-
const isRootNodeWebComponent = typeof ShadowRoot !== 'undefined' &&
|
|
155
|
-
rootNode instanceof ShadowRoot &&
|
|
156
|
-
rootNode.host instanceof HTMLElement;
|
|
157
|
-
if (isRootNodeWebComponent) {
|
|
158
|
-
currentElement = rootNode.host;
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
currentElement = currentElement.parentElement;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
// Return the document's bounding rect if no element is found
|
|
165
|
-
this.rootElementRect = {
|
|
166
|
-
top: 0,
|
|
167
|
-
bottom: 0,
|
|
168
|
-
left: 0,
|
|
169
|
-
right: 0,
|
|
170
|
-
height: window.visualViewport.height,
|
|
171
|
-
width: window.visualViewport.width,
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
139
|
/// Watchers ///
|
|
175
140
|
async openChanged(open) {
|
|
176
|
-
this.setRootElement();
|
|
177
141
|
this.popoverStateChanged.emit({ open });
|
|
178
142
|
if (open) {
|
|
179
143
|
this.addViewportListeners();
|
|
@@ -227,10 +191,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
227
191
|
var _a;
|
|
228
192
|
window.addEventListener('resize', this.viewPortOrientationChanged);
|
|
229
193
|
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
|
|
230
|
-
|
|
231
|
-
passive: true,
|
|
232
|
-
|
|
233
|
-
});
|
|
194
|
+
if (isInScrollableContainer(this.hostElement) && !isMobile()) {
|
|
195
|
+
window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
|
|
196
|
+
}
|
|
234
197
|
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
235
198
|
window.addEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
236
199
|
}
|
|
@@ -238,9 +201,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
238
201
|
var _a;
|
|
239
202
|
window.removeEventListener('resize', this.viewPortOrientationChanged);
|
|
240
203
|
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
|
|
241
|
-
window.removeEventListener('scroll', this.viewPortChanged, {
|
|
242
|
-
capture: true,
|
|
243
|
-
});
|
|
204
|
+
window.removeEventListener('scroll', this.viewPortChanged, { capture: true });
|
|
244
205
|
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
245
206
|
window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
246
207
|
}
|
|
@@ -254,7 +215,6 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
254
215
|
this.containerElement.style.removeProperty('--comp-pop-opacity');
|
|
255
216
|
}
|
|
256
217
|
setDirectionAndShow(direction) {
|
|
257
|
-
this.setRootElement();
|
|
258
218
|
// Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
|
|
259
219
|
// popover can be closed between the time the popover is opened and the time the direction is determined
|
|
260
220
|
const isOpen = this.open;
|
|
@@ -285,20 +245,23 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
285
245
|
let maxSpaceAbove;
|
|
286
246
|
let maxSpaceBelow;
|
|
287
247
|
if (isModule) {
|
|
288
|
-
const { outletOffset = 0, innerHeight = window.innerHeight } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
|
|
289
|
-
const distanceToIframeBottom = window.
|
|
290
|
-
|
|
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
|
|
291
257
|
const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;
|
|
292
|
-
|
|
293
|
-
// If the top of the module is below the top of the window we just use the controlTop
|
|
294
|
-
// Otherwise we need to add the outletOffset to the controlTop
|
|
295
|
-
maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;
|
|
258
|
+
maxSpaceAbove = viewableSpaceAbove - displayBuffer;
|
|
296
259
|
maxSpaceBelow = isIframeShorterThanWindow
|
|
297
260
|
? distanceToIframeBottom - displayBuffer
|
|
298
261
|
: viewableSpaceBelow - displayBuffer;
|
|
299
262
|
}
|
|
300
263
|
else {
|
|
301
|
-
windowHeight = window.
|
|
264
|
+
windowHeight = window.innerHeight;
|
|
302
265
|
maxSpaceAbove = controlTop - displayBuffer;
|
|
303
266
|
maxSpaceBelow = windowHeight - controlBottom - displayBuffer;
|
|
304
267
|
}
|
|
@@ -332,7 +295,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
332
295
|
containerClasses.push('block');
|
|
333
296
|
if (this.mode === 'legacy')
|
|
334
297
|
containerClasses.push('legacy');
|
|
335
|
-
return (h("div", { key: '
|
|
298
|
+
return (h("div", { key: '3c4f9aa456357dbb8bbb07b2120de7a5999ba52a', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "manual" }, h("div", { key: '249dcb31d3af7689d47b5d3d81112afa212c9123', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '26c48e818d567b9a63223df1b13320e9a9bbb1c3' }))));
|
|
336
299
|
}
|
|
337
300
|
get hostElement() { return this; }
|
|
338
301
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,ytFAAytF,CAAC;AAC/uF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QA0ClB,kBAAa,GAAG,EAAE,CAAC;QAEnB,uBAAkB,GAAY,KAAK,CAAC;;QA8IpC,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,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC;SACtE,CAAC;QAEF,oBAAe,GAAG;YACd,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvB,IAAI,CAAC,qBAAqB,EAAE,CAAC;SAChC,CAAC;QAEF,+BAA0B,GAAG;YACzB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;YAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;SAC1B,CAAC;QAuBF,+BAA0B,GAAG;;YACzB,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YACrF,MAAM,EACF,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,YAAY,GACtB,GAAG,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,qBAAqB,8DAAI,mCAAI;gBAC7C,GA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C,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,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAC,MAAM,IAEd,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.legacy {\n &.container {\n display: none;\n }\n\n &.show {\n display: block;\n z-index: var-list(--tct-popover-z-index, 50);\n }\n}\n\n:popover-open,\n.show {\n position: absolute;\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(\n --tct-popover-box-shadow,\n --app-shadow-1,\n unquote('0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)')\n );\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n &.block {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n &.left {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n &.right {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n /**\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 rootElementRect: DOMRect;\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 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 /// Watchers ///\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 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 window.addEventListener('scroll', this.viewPortChanged, {\n passive: true,\n 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, {\n capture: true,\n });\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 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 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\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 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=\"auto\"\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}
|
|
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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,aACzB,gBAAgB,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAC,QAAQ,IAEhB,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.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}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as isMobile, l as loc, h as handleAriaLabel, o as overrideFocus, w as waitForNextPaint,
|
|
2
|
+
import { d as isMobile, l as loc, h as handleAriaLabel, o as overrideFocus, w as waitForNextPaint, u as isRelatedTargetWithinHost, i as isEventFromElement, v as getBrowserInfo, x as isHostLosingFocus } from './index2.js';
|
|
3
3
|
import { s as shouldShowActionSheet, a as showActionSheetList } from './action-sheet.js';
|
|
4
4
|
import { d as defineCustomElement$8 } from './click-elsewhere2.js';
|
|
5
5
|
import { d as defineCustomElement$7 } from './q2-badge2.js';
|
|
@@ -21,7 +21,13 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
21
21
|
this.change = createEvent(this, "change", 7);
|
|
22
22
|
this.input = createEvent(this, "input", 7);
|
|
23
23
|
var _a;
|
|
24
|
+
this.lastTouchWasInPopover = false;
|
|
24
25
|
this.scheduledAfterRender = [];
|
|
26
|
+
this.addTouchEventListeners = () => {
|
|
27
|
+
if (!isMobile() || !this.popoverElement)
|
|
28
|
+
return;
|
|
29
|
+
this.popoverElement.addEventListener('touchmove', this.handleTouchMove, { passive: true });
|
|
30
|
+
};
|
|
25
31
|
this.initEventListeners = () => {
|
|
26
32
|
var _a;
|
|
27
33
|
if (!isMobile())
|
|
@@ -78,6 +84,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
78
84
|
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.handleOrientationChange);
|
|
79
85
|
window.removeEventListener('resize', this.handleOrientationChange);
|
|
80
86
|
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.handleOrientationChange);
|
|
87
|
+
this.removeTouchEventListeners();
|
|
81
88
|
};
|
|
82
89
|
this.handleOrientationChange = () => {
|
|
83
90
|
var _a, _b, _c;
|
|
@@ -95,6 +102,16 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
95
102
|
if (!isLandscape)
|
|
96
103
|
this.searchable = this.originalSearchable;
|
|
97
104
|
};
|
|
105
|
+
this.handleTouchMove = (event) => {
|
|
106
|
+
if (document.activeElement === this.hostElement) {
|
|
107
|
+
const target = event.target;
|
|
108
|
+
if (target && target !== this.hostElement) {
|
|
109
|
+
this.inputFocused = false;
|
|
110
|
+
this.lastTouchWasInPopover = true;
|
|
111
|
+
target.focus();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
98
115
|
/// Event handlers ///
|
|
99
116
|
this.onPopoverState = ({ detail: { open, action }, }) => {
|
|
100
117
|
if (!open || this.searchText) {
|
|
@@ -158,6 +175,16 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
158
175
|
};
|
|
159
176
|
this.inputClickHandler = async (event) => {
|
|
160
177
|
event.stopPropagation();
|
|
178
|
+
// Check if the last interaction was a touch within the popover
|
|
179
|
+
// If so, don't toggle the dropdown as the user is likely continuing to interact
|
|
180
|
+
if (this.lastTouchWasInPopover && this.open && this.searchable) {
|
|
181
|
+
// Reset the flag and don't toggle
|
|
182
|
+
this.lastTouchWasInPopover = false;
|
|
183
|
+
this.focusInput();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
// Reset the flag for any other click
|
|
187
|
+
this.lastTouchWasInPopover = false;
|
|
161
188
|
if (shouldShowActionSheet(this)) {
|
|
162
189
|
return this.executeActionSheet(event);
|
|
163
190
|
}
|
|
@@ -190,12 +217,22 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
190
217
|
if (target.localName !== 'click-elsewhere')
|
|
191
218
|
return;
|
|
192
219
|
event.stopPropagation();
|
|
220
|
+
const { popoverElement } = this;
|
|
221
|
+
if (!popoverElement)
|
|
222
|
+
return;
|
|
223
|
+
popoverElement.open = false;
|
|
224
|
+
this.innerInputField.blur();
|
|
193
225
|
};
|
|
194
226
|
this.onCustomDisplayClick = (event) => {
|
|
195
227
|
event.stopPropagation();
|
|
196
228
|
this.focusInput();
|
|
197
229
|
this.toggleDropdown();
|
|
198
230
|
};
|
|
231
|
+
this.removeTouchEventListeners = () => {
|
|
232
|
+
if (!isMobile() || !this.popoverElement)
|
|
233
|
+
return;
|
|
234
|
+
this.popoverElement.removeEventListener('touchmove', this.handleTouchMove);
|
|
235
|
+
};
|
|
199
236
|
this.disabled = false;
|
|
200
237
|
this.errors = undefined;
|
|
201
238
|
this.hideLabel = undefined;
|
|
@@ -345,6 +382,12 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
345
382
|
this.optionElements.forEach(element => (element.multiline = newValue));
|
|
346
383
|
}
|
|
347
384
|
openChanged(isOpen) {
|
|
385
|
+
if (isOpen) {
|
|
386
|
+
this.addTouchEventListeners();
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
this.removeTouchEventListeners();
|
|
390
|
+
}
|
|
348
391
|
this.scheduledAfterRender.push(async () => {
|
|
349
392
|
await waitForNextPaint();
|
|
350
393
|
const { popoverTopContainer, popoverElement } = this;
|
|
@@ -480,7 +523,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
480
523
|
this.clearSelectedDisplay();
|
|
481
524
|
}
|
|
482
525
|
else if (isEventFromElement(event, this.hostElement)) {
|
|
483
|
-
this.
|
|
526
|
+
this.innerInputField.focus();
|
|
484
527
|
}
|
|
485
528
|
}
|
|
486
529
|
handleFocusout(event) {
|
|
@@ -494,6 +537,14 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
494
537
|
return;
|
|
495
538
|
this.inputField.value = event.detail.display;
|
|
496
539
|
}
|
|
540
|
+
handleTctClick() {
|
|
541
|
+
const { name, version } = getBrowserInfo();
|
|
542
|
+
const majorVersion = Number(version.split('.')[0]);
|
|
543
|
+
// Only Safari under iOS 18 having issue when searchable
|
|
544
|
+
if (this.searchable && name === 'Safari' && !isNaN(majorVersion) && majorVersion < 18) {
|
|
545
|
+
this.scheduledAfterRender.push(() => this.innerInputField.blur());
|
|
546
|
+
}
|
|
547
|
+
}
|
|
497
548
|
/// Helpers ///
|
|
498
549
|
async executeActionSheet(event) {
|
|
499
550
|
const result = await showActionSheetList(this, event);
|
|
@@ -551,6 +602,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
551
602
|
}
|
|
552
603
|
closeDropdown() {
|
|
553
604
|
this.open = false;
|
|
605
|
+
this.lastTouchWasInPopover = false;
|
|
554
606
|
this.clearSearchText();
|
|
555
607
|
}
|
|
556
608
|
clearSearchText() {
|
|
@@ -643,11 +695,11 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
643
695
|
}
|
|
644
696
|
render() {
|
|
645
697
|
var _a;
|
|
646
|
-
return (h("click-elsewhere", { key: '
|
|
698
|
+
return (h("click-elsewhere", { key: '03aa28dcb79c9eba0714d60a4156f7bde8315262', class: this.wrapperClasses, onChange: this.clickedElsewhere }, h("div", { key: '6abfa3799f3f0a1ee9e792c6350be2e1d2dfdff6', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("q2-input", { key: 'c692c7f3c1a01f329787070d70bbc27eb39b8043', ref: el => (this.inputField = el), class: "q2-select-input", label: (this.label && loc(this.label)) || '', value: this.selectedDisplay, clearable: (this.clearable && (!!this.value || !!((_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length))) || undefined, errors: (Array.isArray(this.errors) &&
|
|
647
699
|
this.errors.length > 0 &&
|
|
648
700
|
this.errors.map(error => loc(error))) ||
|
|
649
701
|
(this.invalid && ['tecton.element.select.invalid']) ||
|
|
650
|
-
[], disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined, _role: "combobox", _preventEntry: !this.searchable }, this.renderCustomDisplay()), h("div", { key: '
|
|
702
|
+
[], disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined, _role: "combobox", _preventEntry: !this.searchable }, this.renderCustomDisplay()), h("div", { key: '0d8acbb22ab53f27a02ca150c5a5eca92cfbc438', class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { key: '035ae49247af1a6b3d14bfb2df70550c3f62c33a', name: "q2-select-display" })), this.optionsDropdown()));
|
|
651
703
|
}
|
|
652
704
|
optionsDropdown() {
|
|
653
705
|
return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.innerInputContainer, open: this.open, minHeight: this.popoverMinHeight, direction: this.popDirection, mode: this.popoverMode || undefined, block: true }, h("div", { class: "popover-content" }, h("q2-option-list", { onPopoverState: this.onPopoverState, ref: el => (this.optionList = el), type: "listbox", id: "option-list", "show-selected": this.showSelected, label: this.listLabel, multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, onChange: this.onOptionListChange }, h("slot", null)), h("div", { class: "popover-top-container", ref: el => (this.popoverTopContainer = el), hidden: !this.multiple && !this.hasPopoverTop, tabindex: "-1" }, h("slot", { name: "popover-top" }), this.multiple && this.visibilityToggle())), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" }))));
|
|
@@ -704,7 +756,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
704
756
|
"closePopover": [64],
|
|
705
757
|
"setValue": [64],
|
|
706
758
|
"searchOptions": [64]
|
|
707
|
-
}, [[0, "keydown", "keydownHandler"], [0, "change", "onHostElementChange"], [0, "clear", "onClearHandler"], [0, "input", "onHostElementInput"], [0, "focus", "delegateFocus"], [0, "focusout", "handleFocusout"], [0, "displayChanged", "handleSelectedDisplay"]], {
|
|
759
|
+
}, [[0, "keydown", "keydownHandler"], [0, "change", "onHostElementChange"], [0, "clear", "onClearHandler"], [0, "input", "onHostElementInput"], [0, "focus", "delegateFocus"], [0, "focusout", "handleFocusout"], [0, "displayChanged", "handleSelectedDisplay"], [0, "tctClick", "handleTctClick"]], {
|
|
708
760
|
"value": ["buildStructuredSelectedOptions", "valueUpdated"],
|
|
709
761
|
"selectedOptions": ["buildStructuredSelectedOptions"],
|
|
710
762
|
"ariaLabel": ["ariaLabelObserver"],
|