q2-tecton-elements 1.53.2 → 1.53.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +19 -14
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-76f63767.js → index-eec39d23.js} +68 -1
  4. package/dist/cjs/index-eec39d23.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-badge_7.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  16. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-dropdown.cjs.entry.js +4 -2
  22. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  23. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-item_3.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  34. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-section.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-select.cjs.entry.js +51 -3
  39. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  40. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  45. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  46. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  47. package/dist/collection/components/q2-dropdown/q2-dropdown.js +3 -1
  48. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  49. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +1 -1
  50. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  51. package/dist/collection/components/q2-popover/q2-popover.js +19 -14
  52. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  53. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +230 -147
  54. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  55. package/dist/collection/components/q2-select/q2-select.js +57 -3
  56. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  57. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +146 -6
  58. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -1
  59. package/dist/collection/utils/index.js +71 -0
  60. package/dist/collection/utils/index.js.map +1 -1
  61. package/dist/components/index2.js +66 -1
  62. package/dist/components/index2.js.map +1 -1
  63. package/dist/components/q2-dropdown.js +3 -1
  64. package/dist/components/q2-dropdown.js.map +1 -1
  65. package/dist/components/q2-popover2.js +19 -14
  66. package/dist/components/q2-popover2.js.map +1 -1
  67. package/dist/components/q2-select2.js +52 -4
  68. package/dist/components/q2-select2.js.map +1 -1
  69. package/dist/esm/click-elsewhere_2.entry.js +19 -14
  70. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  71. package/dist/esm/{index-504f1a9e.js → index-52ca69b4.js} +67 -2
  72. package/dist/esm/index-52ca69b4.js.map +1 -0
  73. package/dist/esm/loader.js +1 -1
  74. package/dist/esm/q2-action-group.entry.js +1 -1
  75. package/dist/esm/q2-action-sheet.entry.js +1 -1
  76. package/dist/esm/q2-badge_7.entry.js +1 -1
  77. package/dist/esm/q2-calendar.entry.js +1 -1
  78. package/dist/esm/q2-card.entry.js +1 -1
  79. package/dist/esm/q2-carousel-pane.entry.js +1 -1
  80. package/dist/esm/q2-carousel.entry.js +1 -1
  81. package/dist/esm/q2-chart-area.entry.js +1 -1
  82. package/dist/esm/q2-chart-bar.entry.js +1 -1
  83. package/dist/esm/q2-chart-donut.entry.js +1 -1
  84. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  85. package/dist/esm/q2-checkbox.entry.js +1 -1
  86. package/dist/esm/q2-data-table.entry.js +1 -1
  87. package/dist/esm/q2-detail.entry.js +1 -1
  88. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  89. package/dist/esm/q2-dropdown.entry.js +4 -2
  90. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  91. package/dist/esm/q2-editable-field.entry.js +1 -1
  92. package/dist/esm/q2-file-picker.entry.js +1 -1
  93. package/dist/esm/q2-item_3.entry.js +1 -1
  94. package/dist/esm/q2-loc.entry.js +1 -1
  95. package/dist/esm/q2-message.entry.js +1 -1
  96. package/dist/esm/q2-month-picker.entry.js +1 -1
  97. package/dist/esm/q2-optgroup.entry.js +1 -1
  98. package/dist/esm/q2-option-list.entry.js +1 -1
  99. package/dist/esm/q2-option.entry.js +1 -1
  100. package/dist/esm/q2-pagination.entry.js +1 -1
  101. package/dist/esm/q2-pill.entry.js +1 -1
  102. package/dist/esm/q2-radio-group.entry.js +1 -1
  103. package/dist/esm/q2-radio.entry.js +1 -1
  104. package/dist/esm/q2-relative-time.entry.js +1 -1
  105. package/dist/esm/q2-section.entry.js +1 -1
  106. package/dist/esm/q2-select.entry.js +51 -3
  107. package/dist/esm/q2-select.entry.js.map +1 -1
  108. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  109. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  110. package/dist/esm/q2-stepper.entry.js +1 -1
  111. package/dist/esm/q2-tag.entry.js +1 -1
  112. package/dist/esm/q2-tecton-elements.js +1 -1
  113. package/dist/esm/q2-textarea.entry.js +1 -1
  114. package/dist/esm/q2-tooltip.entry.js +1 -1
  115. package/dist/jest.setup.js +11 -0
  116. package/dist/jest.setup.js.map +1 -1
  117. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +139 -134
  118. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -1
  119. package/dist/q2-tecton-elements/{index-504f1a9e.js → index-52ca69b4.js} +121 -61
  120. package/dist/q2-tecton-elements/index-52ca69b4.js.map +1 -0
  121. package/dist/q2-tecton-elements/q2-action-group.entry.js +1 -1
  122. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1 -1
  123. package/dist/q2-tecton-elements/q2-badge_7.entry.js +1 -1
  124. package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
  125. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  126. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +1 -1
  127. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  128. package/dist/q2-tecton-elements/q2-chart-area.entry.js +1 -1
  129. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +78 -78
  130. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +1 -1
  131. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
  132. package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
  133. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  134. package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
  135. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  136. package/dist/q2-tecton-elements/q2-dropdown.entry.js +13 -11
  137. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  138. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  139. package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
  140. package/dist/q2-tecton-elements/q2-item_3.entry.js +1 -1
  141. package/dist/q2-tecton-elements/q2-loc.entry.js +4 -4
  142. package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
  143. package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
  144. package/dist/q2-tecton-elements/q2-optgroup.entry.js +1 -1
  145. package/dist/q2-tecton-elements/q2-option-list.entry.js +1 -1
  146. package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
  147. package/dist/q2-tecton-elements/q2-pagination.entry.js +1 -1
  148. package/dist/q2-tecton-elements/q2-pill.entry.js +1 -1
  149. package/dist/q2-tecton-elements/q2-radio-group.entry.js +5 -5
  150. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  151. package/dist/q2-tecton-elements/q2-relative-time.entry.js +1 -1
  152. package/dist/q2-tecton-elements/q2-section.entry.js +1 -1
  153. package/dist/q2-tecton-elements/q2-select.entry.js +64 -17
  154. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  155. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  156. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +1 -1
  157. package/dist/q2-tecton-elements/q2-stepper.entry.js +1 -1
  158. package/dist/q2-tecton-elements/q2-tag.entry.js +1 -1
  159. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  160. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  161. package/dist/q2-tecton-elements/q2-textarea.entry.js +1 -1
  162. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  163. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +9 -0
  164. package/dist/types/components/q2-select/q2-select.d.ts +10 -0
  165. package/dist/types/utils/index.d.ts +7 -0
  166. package/package.json +3 -3
  167. package/dist/cjs/index-76f63767.js.map +0 -1
  168. package/dist/esm/index-504f1a9e.js.map +0 -1
  169. package/dist/q2-tecton-elements/index-504f1a9e.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["ClickElsewhere","constructor","hostRef","this","isCurrentlyFocused","mouseEventList","mouseHandler","event","shadowContains","findActiveElement","aboutToBeFocused","shadowEventTarget","originatesInSlots","target","change","emit","windowBlurHandler","connectedCallback","forEach","eventName","document","addEventListener","window","disconnectedCallback","removeEventListener","componentWillLoad","workingElement","activeElement","shadowRoot","slots","hostElement","querySelectorAll","currentSlot","Array","from","lightNodes","assignedNodes","childNodes","currentNode","contains","child","parentNode","host","composedPath","q2PopoverCss","Q2PopoverStyle0","Q2Popover","displayBuffer","orientationChanged","handleMinHeight","minHeight","handleDeprecationWarning","handlePopoverToggleEvent","popoverStateChanged","open","newState","setAbsoluteCSSProperties","async","controlElement","containerElement","currentDirection","align","style","setProperty","block","controlStyle","getComputedStyle","controlSize","parseInt","height","borderTopWidth","borderBottomWidth","waitForNextPaint","setPopoverAPICSSProperties","isModule","top","controlTop","bottom","controlBottom","left","controlLeft","right","controlRight","_b","_a","getBoundingClientRect","call","popoverLeft","popoverRight","_c","visualViewport","width","scrollX","offsetWidth","innerHeight","_d","offsetTop","scrollY","_f","_e","viewPortChanged","determinePopDirection","viewPortOrientationChanged","undefined","removeViewportListeners","contentElement","supportsPopoverAPI","console","warn","mode","componentDidLoad","popoverStateHandler","detail","stopPropagation","scrollContainerTo","options","scrollTo","toggle","minHeightProvided","openChanged","addViewportListeners","show","hidePopover","clearCSSProperties","isIframe","hasPlatformDimensions","Object","keys","Tecton","platformDimensions","length","providedDirection","direction","hasOwn","HTMLElement","prototype","validatedMaxHeight","maxHeight","isNaN","passive","capture","screen","orientation","removeProperty","windowHeight","maxSpaceAbove","maxSpaceBelow","outletOffset","distanceToIframeBottom","viewableSpaceBelow","isIframeShorterThanWindow","directionWithMostSpace","shouldUpdateMaxHeight","getPropertyValue","currentOrDetermineDirection","priorityMaxHeight","Math","min","setDirectionAndShow","isOpen","showPopover","render","containerClasses","push","h","key","ref","el","class","join","tabIndex","popover"],"sources":["src/components/click-elsewhere/click-elsewhere.tsx","src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n // #region Own Properties\n\n isCurrentlyFocused: boolean = false;\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event()\n change: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n\n // #endregion\n // #region Local Methods\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n return false;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n child = child.parentNode || child.host;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n windowBlurHandler = (): void => {\n this.isCurrentlyFocused = false;\n this.change.emit();\n };\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.legacy {\n &.container {\n display: none;\n }\n\n &.show {\n display: block;\n z-index: var-list(--tct-popover-z-index, 50);\n }\n}\n\n:popover-open,\n.show {\n position: absolute;\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(\n --tct-popover-box-shadow,\n --app-shadow-1,\n unquote('0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)')\n );\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n &.block {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n &.left {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n &.right {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n orientationChanged: boolean = false;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right' = 'left';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n maxHeight: number;\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);\n this.containerElement = null;\n this.contentElement = null;\n this.controlElement = null;\n }\n\n componentWillLoad() {\n if (!this.supportsPopoverAPI) {\n console.warn(\n 'The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.'\n );\n this.mode = 'legacy';\n }\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.supportsPopoverAPI) this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = false;\n } else {\n this.containerElement.hidePopover();\n }\n\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get supportsPopoverAPI(): boolean {\n return Object.hasOwn(HTMLElement.prototype, 'popover');\n }\n\n get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.addEventListener('resize', this.viewPortChanged);\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('orientationchange', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n handlePopoverToggleEvent = (event: ToggleEvent) => {\n this.popoverStateChanged.emit({ open: event.newState === 'open' });\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.removeEventListener('resize', this.viewPortChanged);\n window.removeEventListener('scroll', this.viewPortChanged, { capture: true });\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = true;\n this.setAbsoluteCSSProperties();\n } else {\n this.setPopoverAPICSSProperties();\n this.containerElement.showPopover();\n }\n }\n\n setPopoverAPICSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, isModule, align } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n\n const popoverLeft: number = controlLeft;\n const popoverRight: number = window?.visualViewport?.width - controlRight;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n\n if (currentDirection === 'up') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${window.innerHeight - controlTop - window?.visualViewport?.offsetTop - window.scrollY}px`\n );\n }\n }\n\n if (currentDirection === 'down') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-top',\n `${controlBottom + (window?.visualViewport?.offsetTop ?? 0) + window.scrollY}px`\n );\n }\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection, this.align];\n if (this.show) containerClasses.push('show');\n if (this.block) containerClasses.push('block');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n tabIndex={-1}\n popover=\"auto\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"],"mappings":";;;;MAMaA,IAAc;EAJ3B,WAAAC,CAAAC;;;;QAOIC,KAAAC,qBAA8B;;;eAI9BD,KAAAE,iBAA2B,EAAC,aAAa,aAAa;IAqDtDF,KAAAG,eAAgBC;MACZ,MAAMH,IAAqBD,KAAKK,eAAeL,KAAKM;MACpD,MAAMC,IACFP,KAAKK,eAAeL,KAAKQ,kBAAkBJ,OAAWJ,KAAKS,kBAAkBL,EAAMM;MAEvF,KAAKH,MAAqBP,KAAKC,sBAAsBA,IAAqB;QACtED,KAAKC,qBAAqB;QAC1BD,KAAKW,OAAOC;QACZ;;MAEJZ,KAAKC,qBAAqBM,KAAoBN;AAAkB;IAuCpED,KAAAa,oBAAoB;MAChBb,KAAKC,qBAAqB;MAC1BD,KAAKW,OAAOC;AAAM;;;;;EAlFtB,iBAAAE;IACId,KAAKE,eAAea,SAASC;MACzBC,SAASC,iBAAiBF,GAAWhB,KAAKG;AAAa;IAE3DgB,OAAOD,iBAAiB,QAAQlB,KAAKa;;EAGzC,oBAAAO;IACIpB,KAAKE,eAAea,SAASC;MACzBC,SAASI,oBAAoBL,GAAWhB,KAAKG;AAAa;IAE9DgB,OAAOE,oBAAoB,QAAQrB,KAAKa;;;iCAK5C,iBAAAS,IAAiB;;;EAKjB,iBAAAhB;IACI,IAAIiB,IAAiBN,SAASO;IAC9B,OAAO,MAAM;MACT,KAAKD,MAAmBA,EAAeE,YAAY;QAC/C,OAAOF;;MAEXA,IAAiBA,EAAeE,WAAWD;;;EAiBnD,iBAAAf,CAAkBC;IACd,MAAMgB,IAAQ1B,KAAK2B,YAAYC,iBAAiB;IAChD,KAAK,MAAMC,KAAeC,MAAMC,KAAKL,IAAQ;MACzC,MAAM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,MAAMyC,EAAiBC,KAAK;IACrC,IAAIhK,KAAK6D,OAAOkG,EAAiBC,KAAK;IACtC,IAAIhK,KAAK0G,SAAS,UAAUqD,EAAiBC,KAAK;IAElD,OACIC,EAAA;MAAAC,KAAA;MACIC,KAAKC,KAAOpK,KAAKwD,mBAAmB4G;MACpCC,OAAON,EAAiBO,KAAK;MAAI,WACzB;MACRC,WAAW;MACXC,SAAQ;OAERP,EAAA;MAAAC,KAAA;MACIC,KAAKC,KAAOpK,KAAKsG,iBAAiB8D;MAClCC,OAAM;OAENJ,EAAA;MAAAC,KAAA"}
1
+ {"version":3,"names":["ClickElsewhere","constructor","hostRef","this","isCurrentlyFocused","mouseEventList","mouseHandler","event","shadowContains","findActiveElement","aboutToBeFocused","shadowEventTarget","originatesInSlots","target","change","emit","windowBlurHandler","connectedCallback","forEach","eventName","document","addEventListener","window","disconnectedCallback","removeEventListener","componentWillLoad","workingElement","activeElement","shadowRoot","slots","hostElement","querySelectorAll","currentSlot","Array","from","lightNodes","assignedNodes","childNodes","currentNode","contains","child","parentNode","host","composedPath","q2PopoverCss","Q2PopoverStyle0","Q2Popover","displayBuffer","orientationChanged","handleMinHeight","minHeight","handleDeprecationWarning","handlePopoverToggleEvent","popoverStateChanged","open","newState","setAbsoluteCSSProperties","async","controlElement","containerElement","currentDirection","align","style","setProperty","block","controlStyle","getComputedStyle","controlSize","parseInt","height","borderTopWidth","borderBottomWidth","waitForNextPaint","setPopoverAPICSSProperties","isModule","top","controlTop","bottom","controlBottom","left","controlLeft","right","controlRight","_b","_a","getBoundingClientRect","call","popoverLeft","popoverRight","_c","visualViewport","width","scrollX","offsetWidth","innerHeight","scrollY","viewPortChanged","determinePopDirection","viewPortOrientationChanged","undefined","removeViewportListeners","contentElement","supportsPopoverAPI","console","warn","mode","componentDidLoad","popoverStateHandler","detail","stopPropagation","scrollContainerTo","options","scrollTo","toggle","minHeightProvided","openChanged","addViewportListeners","show","hidePopover","clearCSSProperties","isIframe","hasPlatformDimensions","Object","keys","Tecton","platformDimensions","length","providedDirection","direction","hasOwn","HTMLElement","prototype","validatedMaxHeight","maxHeight","isNaN","isInScrollableContainer","isMobile","passive","capture","screen","orientation","removeProperty","windowHeight","maxSpaceAbove","maxSpaceBelow","outletOffset","topBarHeight","bottomBarHeight","distanceToIframeBottom","visualControlTop","visualControlBottom","viewableSpaceAbove","viewableSpaceBelow","isIframeShorterThanWindow","directionWithMostSpace","shouldUpdateMaxHeight","getPropertyValue","currentOrDetermineDirection","priorityMaxHeight","Math","min","setDirectionAndShow","isOpen","showPopover","render","containerClasses","push","h","key","ref","el","class","join","tabIndex","popover"],"sources":["src/components/click-elsewhere/click-elsewhere.tsx","src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n // #region Own Properties\n\n isCurrentlyFocused: boolean = false;\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event()\n change: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n\n // #endregion\n // #region Local Methods\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n return false;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n child = child.parentNode || child.host;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n windowBlurHandler = (): void => {\n this.isCurrentlyFocused = false;\n this.change.emit();\n };\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.legacy {\n &.container {\n display: none;\n }\n\n &.show {\n display: block;\n z-index: var-list(--tct-popover-z-index, 50);\n }\n}\n\n:popover-open,\n.show {\n position: absolute;\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(\n --tct-popover-box-shadow,\n --app-shadow-1,\n unquote('0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)')\n );\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n &.block {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n &.left {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n &.right {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint, isMobile, isInScrollableContainer } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n orientationChanged: boolean = false;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right' = 'left';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n maxHeight: number;\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);\n this.containerElement = null;\n this.contentElement = null;\n this.controlElement = null;\n }\n\n componentWillLoad() {\n if (!this.supportsPopoverAPI) {\n console.warn(\n 'The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.'\n );\n this.mode = 'legacy';\n }\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.supportsPopoverAPI) this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = false;\n } else {\n this.containerElement.hidePopover();\n }\n\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get supportsPopoverAPI(): boolean {\n return Object.hasOwn(HTMLElement.prototype, 'popover');\n }\n\n get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.addEventListener('resize', this.viewPortChanged);\n if (isInScrollableContainer(this.hostElement) && !isMobile()) {\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n }\n screen?.orientation?.addEventListener('orientationchange', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n 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 const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n handlePopoverToggleEvent = (event: ToggleEvent) => {\n this.popoverStateChanged.emit({ open: event.newState === 'open' });\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.removeEventListener('resize', this.viewPortChanged);\n window.removeEventListener('scroll', this.viewPortChanged, { capture: true });\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = true;\n this.setAbsoluteCSSProperties();\n } else {\n this.setPopoverAPICSSProperties();\n this.containerElement.showPopover();\n }\n }\n\n setPopoverAPICSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, isModule, align } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n\n const popoverLeft: number = controlLeft;\n const popoverRight: number = window?.visualViewport?.width - controlRight;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n\n if (currentDirection === 'up') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${window.innerHeight - controlTop - window.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('--comp-pop-top', `${controlBottom + window.scrollY}px`);\n }\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection, this.align];\n if (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 // #endregion\n}\n"],"mappings":";;;;MAMaA,IAAc;EAJ3B,WAAAC,CAAAC;;;;QAOIC,KAAAC,qBAA8B;;;eAI9BD,KAAAE,iBAA2B,EAAC,aAAa,aAAa;IAqDtDF,KAAAG,eAAgBC;MACZ,MAAMH,IAAqBD,KAAKK,eAAeL,KAAKM;MACpD,MAAMC,IACFP,KAAKK,eAAeL,KAAKQ,kBAAkBJ,OAAWJ,KAAKS,kBAAkBL,EAAMM;MAEvF,KAAKH,MAAqBP,KAAKC,sBAAsBA,IAAqB;QACtED,KAAKC,qBAAqB;QAC1BD,KAAKW,OAAOC;QACZ;;MAEJZ,KAAKC,qBAAqBM,KAAoBN;AAAkB;IAuCpED,KAAAa,oBAAoB;MAChBb,KAAKC,qBAAqB;MAC1BD,KAAKW,OAAOC;AAAM;;;;;EAlFtB,iBAAAE;IACId,KAAKE,eAAea,SAASC;MACzBC,SAASC,iBAAiBF,GAAWhB,KAAKG;AAAa;IAE3DgB,OAAOD,iBAAiB,QAAQlB,KAAKa;;EAGzC,oBAAAO;IACIpB,KAAKE,eAAea,SAASC;MACzBC,SAASI,oBAAoBL,GAAWhB,KAAKG;AAAa;IAE9DgB,OAAOE,oBAAoB,QAAQrB,KAAKa;;;iCAK5C,iBAAAS,IAAiB;;;EAKjB,iBAAAhB;IACI,IAAIiB,IAAiBN,SAASO;IAC9B,OAAO,MAAM;MACT,KAAKD,MAAmBA,EAAeE,YAAY;QAC/C,OAAOF;;MAEXA,IAAiBA,EAAeE,WAAWD;;;EAiBnD,iBAAAf,CAAkBC;IACd,MAAMgB,IAAQ1B,KAAK2B,YAAYC,iBAAiB;IAChD,KAAK,MAAMC,KAAeC,MAAMC,KAAKL,IAAQ;MACzC,MAAMM,IACDH,KAAeA,EAAYI,iBA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KAAKsG,SAAS,UAAU4D,EAAiBC,KAAK;IAElD,OACIC,EAAA;MAAAC,KAAA;MACIC,KAAKC,KAAOvK,KAAKwD,mBAAmB+G;MACpCC,OAAON,EAAiBO,KAAK;MAAI,WACzB;MACRC,WAAW;MACXC,SAAQ;OAERP,EAAA;MAAAC,KAAA;MACIC,KAAKC,KAAOvK,KAAKkG,iBAAiBqE;MAClCC,OAAM;OAENJ,EAAA;MAAAC,KAAA"}
@@ -1,11 +1,11 @@
1
1
  import { h as e } from "./index-7a5365e2.js";
2
2
 
3
3
  const debounce = (e, n = 300) => {
4
- let i;
5
- return function(...o) {
6
- clearTimeout(i);
7
- i = setTimeout((() => {
8
- e(...o);
4
+ let o;
5
+ return function(...i) {
6
+ clearTimeout(o);
7
+ o = setTimeout((() => {
8
+ e(...i);
9
9
  }), n);
10
10
  };
11
11
  };
@@ -14,13 +14,38 @@ function isMobile() {
14
14
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(navigator.userAgent);
15
15
  }
16
16
 
17
+ function isInScrollableContainer(e) {
18
+ let n = e;
19
+ while (n && n !== document.body && n !== document.documentElement) {
20
+ // Move to parent
21
+ if (n.parentElement) {
22
+ n = n.parentElement;
23
+ } else {
24
+ // Try to cross shadow DOM boundary
25
+ const e = n.getRootNode();
26
+ if (e && e.host) {
27
+ n = e.host;
28
+ } else {
29
+ break;
30
+ }
31
+ }
32
+ const e = window.getComputedStyle(n);
33
+ const o = e.overflow === "scroll" || e.overflow === "auto" || e.overflowX === "scroll" || e.overflowX === "auto" || e.overflowY === "scroll" || e.overflowY === "auto";
34
+ const i = n.scrollHeight > n.clientHeight || n.scrollWidth > n.clientWidth;
35
+ if (o && i) {
36
+ return true;
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+
17
42
  function isRelatedTargetWithinHost(e, n) {
18
43
  return e.relatedTarget !== n && !n.contains(e.relatedTarget);
19
44
  }
20
45
 
21
46
  function isEventFromElement(e, n) {
22
- var i;
23
- return ((i = e.composedPath) === null || i === void 0 ? void 0 : i.call(e)[0]) === n;
47
+ var o;
48
+ return ((o = e.composedPath) === null || o === void 0 ? void 0 : o.call(e)[0]) === n;
24
49
  }
25
50
 
26
51
  function overrideFocus(e) {
@@ -69,43 +94,78 @@ function waitForNextPaint() {
69
94
  }
70
95
 
71
96
  function loc(e, n) {
72
- var i, o, t;
97
+ var o, i, t;
73
98
  if (!e) return "";
74
- if (((i = window.Tecton) === null || i === void 0 ? void 0 : i.noStrings) === true) {
99
+ if (((o = window.Tecton) === null || o === void 0 ? void 0 : o.noStrings) === true) {
75
100
  return e;
76
101
  }
77
- return (t = (o = window === null || window === void 0 ? void 0 : window.TectonElements) === null || o === void 0 ? void 0 : o.loc(e, n)) !== null && t !== void 0 ? t : e;
102
+ return (t = (i = window === null || window === void 0 ? void 0 : window.TectonElements) === null || i === void 0 ? void 0 : i.loc(e, n)) !== null && t !== void 0 ? t : e;
103
+ }
104
+
105
+ function getBrowserInfo() {
106
+ const e = navigator.userAgent;
107
+ let n = "Unknown";
108
+ let o = "Unknown";
109
+ if (e.includes("Firefox")) {
110
+ n = "Firefox";
111
+ const i = e.match(/Firefox\/(\d+\.\d+)/);
112
+ if (i && i[1]) {
113
+ o = i[1];
114
+ }
115
+ } else if (e.includes("Chrome") && !e.includes("Edg")) {
116
+ n = "Chrome";
117
+ const i = e.match(/Chrome\/(\d+\.\d+\.\d+\.\d+)/);
118
+ if (i && i[1]) {
119
+ o = i[1];
120
+ }
121
+ } else if (e.includes("Safari") && !e.includes("Chrome")) {
122
+ n = "Safari";
123
+ const i = e.match(/Version\/(\d+\.\d+)/);
124
+ if (i && i[1]) {
125
+ o = i[1];
126
+ }
127
+ } else if (e.includes("Edg")) {
128
+ n = "Edge";
129
+ const i = e.match(/Chrome\/(\d+\.\d+\.\d+\.\d+)/);
130
+ if (i && i[1]) {
131
+ o = i[1];
132
+ }
133
+ }
134
+ return {
135
+ name: n,
136
+ version: o
137
+ };
78
138
  }
79
139
 
80
140
  function renderLabel(n) {
81
- const {label: i, hideLabel: o, optional: t, readonly: a} = n;
82
- const r = [ "input-label" ];
141
+ const {label: o, hideLabel: i, optional: t, readonly: r} = n;
142
+ const a = [ "input-label" ];
83
143
  let s = "";
84
- let l = o;
144
+ let l = i;
85
145
  if (!l) {
86
146
  const e = n.hostElement.querySelectorAll('[slot="label"]');
87
- const o = e.length > 0;
88
- const t = !!i;
89
- l = t || o ? false : true;
147
+ const i = e.length > 0;
148
+ const t = !!o;
149
+ l = t || i ? false : true;
90
150
  }
91
- if (l) r.push("sr");
151
+ if (l) a.push("sr");
92
152
  if (t) {
93
153
  s = e("span", {
94
154
  class: "optional-tag"
95
155
  }, loc("tecton.element.input.optional"));
96
156
  }
97
- if (a) {
157
+ if (r) {
98
158
  s = e("span", {
99
159
  class: "optional-tag"
100
160
  }, loc("tecton.element.input.readonly"));
101
- r.push("readonly-field");
161
+ a.push("readonly-field");
102
162
  }
103
163
  return e("label", {
104
164
  htmlFor: n.inputId,
105
- class: r.join(" ")
165
+ class: a.join(" ")
106
166
  }, e("slot", {
107
167
  name: "label"
108
- }, i ? loc(i) : undefined, s));
168
+ }, o ? loc(o) : undefined, s));
109
169
  }
110
170
 
111
171
  function hasSlotContent(e, n) {
@@ -116,8 +176,8 @@ function handleAriaLabel(e) {
116
176
  const {ariaLabel: n} = e;
117
177
  if (!n) return;
118
178
  // If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return
119
- const i = Symbol().toString();
120
- if (n === i) {
179
+ const o = Symbol().toString();
180
+ if (n === o) {
121
181
  e.ariaLabel = undefined;
122
182
  return;
123
183
  }
@@ -129,57 +189,57 @@ function handleAriaLabel(e) {
129
189
 
130
190
  /**
131
191
  * Handles when a prop has been renamed on a component without introducing a breaking change.
132
- */ function handleRenamedProp(e, n, i, o) {
192
+ */ function handleRenamedProp(e, n, o, i) {
133
193
  if (typeof e[n] === "undefined") return;
134
194
  // If old prop has value, aka set in component, call handleDeprecationWarning()
135
195
  if (e[n]) {
136
196
  handleDeprecationWarning(e, n, "prop");
137
197
  }
138
- e[i] = e[n];
139
- if (o) {
198
+ e[o] = e[n];
199
+ if (i) {
140
200
  delete e[n];
141
201
  }
142
202
  }
143
203
 
144
- function handleDeprecationWarning(e, n, i) {
204
+ function handleDeprecationWarning(e, n, o) {
145
205
  if (window.location.hostname === "localhost" || window.location.host === "stack.q2developer.com") {
146
206
  if (e[n] === "undefined") return;
147
- const o = e.constructor.name.toLowerCase().slice(2);
148
- switch (i) {
207
+ const i = e.constructor.name.toLowerCase().slice(2);
208
+ switch (o) {
149
209
  case "prop":
150
- if (n === "size" && o === "btn") {
210
+ if (n === "size" && i === "btn") {
151
211
  console.warn(`The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: "small" / "medium" / "large" `);
152
212
  } else {
153
- console.warn(`The property ${n} in q2-${o} has been marked for deprecation and will be removed in an upcoming major release.`);
213
+ console.warn(`The property ${n} in q2-${i} has been marked for deprecation and will be removed in an upcoming major release.`);
154
214
  }
155
215
  break;
156
216
 
157
217
  case "function":
158
- console.warn(`The function ${n} in ${o} has been marked for deprecation and will be removed in an upcoming major release.`);
218
+ console.warn(`The function ${n} in ${i} has been marked for deprecation and will be removed in an upcoming major release.`);
159
219
  break;
160
220
 
161
221
  case "method":
162
- console.warn(`The method ${n} in ${o} has been marked for deprecation and will be removed in an upcoming major release.`);
222
+ console.warn(`The method ${n} in ${i} has been marked for deprecation and will be removed in an upcoming major release.`);
163
223
  break;
164
224
 
165
225
  case "event":
166
- console.warn(`The event ${n} in ${o} has been marked for deprecation and will be removed in an upcoming major release.`);
226
+ console.warn(`The event ${n} in ${i} has been marked for deprecation and will be removed in an upcoming major release.`);
167
227
  break;
168
228
 
169
229
  default:
170
- console.error(`handleDeprecationWarning --\x3e No type found for desired deprecation: ${n} in q2-${o}: deprecatedItemType = ${n}`);
230
+ console.error(`handleDeprecationWarning --\x3e No type found for desired deprecation: ${n} in q2-${i}: deprecatedItemType = ${n}`);
171
231
  }
172
232
  }
173
233
  }
174
234
 
175
235
  function renderMessages(n) {
176
- const i = n.hasError ? "danger" : "info";
236
+ const o = n.hasError ? "danger" : "info";
177
237
  return e("div", {
178
238
  class: "messages-container"
179
239
  }, e("q2-message", {
180
240
  appearance: "minimal",
181
241
  description: true,
182
- type: i,
242
+ type: o,
183
243
  "test-id": "message"
184
244
  }, e("ul", {
185
245
  id: n.inputDescribedBy
@@ -190,16 +250,16 @@ function renderMessages(n) {
190
250
 
191
251
  function setMessageHeight(e) {
192
252
  const n = e.hostElement.shadowRoot.querySelector(".messages-container");
193
- const i = n.querySelector("q2-message");
253
+ const o = n.querySelector("q2-message");
194
254
  nextPaint((() => {
195
- const o = e.showMessages && e.hasFocus ? i.getBoundingClientRect().height : 0;
196
- if (n.style.getPropertyValue("height") === `${o}px`) return;
197
- if (o === 0) {
198
- i.classList.add("invisible");
255
+ const i = e.showMessages && e.hasFocus ? o.getBoundingClientRect().height : 0;
256
+ if (n.style.getPropertyValue("height") === `${i}px`) return;
257
+ if (i === 0) {
258
+ o.classList.add("invisible");
199
259
  n.style.removeProperty("height");
200
260
  } else {
201
- i.classList.remove("invisible");
202
- n.style.setProperty("height", `${o}px`);
261
+ o.classList.remove("invisible");
262
+ n.style.setProperty("height", `${i}px`);
203
263
  }
204
264
  }));
205
265
  }
@@ -228,28 +288,28 @@ const handleColor = e => {
228
288
  * @return {Promise<string>} All translated text content in DOM order
229
289
  */ const getAllText = async (e, n = {}) => {
230
290
  if (!e) return "";
231
- const i = Object.assign({
291
+ const o = Object.assign({
232
292
  trim: true,
233
293
  normalizeWhitespace: false,
234
294
  skipComponentReady: false
235
295
  }, n);
236
- const o = new Set([ "STYLE", "SCRIPT", "NOSCRIPT", "TEMPLATE", "#comment" ]);
296
+ const i = new Set([ "STYLE", "SCRIPT", "NOSCRIPT", "TEMPLATE", "#comment" ]);
237
297
  const t = new WeakSet;
238
- let a = "";
298
+ let r = "";
239
299
  async function processNode(e) {
240
300
  var n;
241
- if (t.has(e) || o.has(e.nodeName)) return;
301
+ if (t.has(e) || i.has(e.nodeName)) return;
242
302
  t.add(e);
243
303
  // Handle text nodes
244
304
  if (e.nodeType === Node.TEXT_NODE) {
245
- const o = i.trim ? e.textContent.trim() : e.textContent;
246
- if (o) {
305
+ const i = o.trim ? e.textContent.trim() : e.textContent;
306
+ if (i) {
247
307
  // Add space between adjacent text nodes if needed
248
- if (a && !a.endsWith(" ") && !o.startsWith(" ")) {
249
- a += " ";
308
+ if (r && !r.endsWith(" ") && !i.startsWith(" ")) {
309
+ r += " ";
250
310
  }
251
311
  // Translate the text
252
- a += i.skipComponentReady ? (n = window.TectonElements) === null || n === void 0 ? void 0 : n.loc(o) : loc(o);
312
+ r += o.skipComponentReady ? (n = window.TectonElements) === null || n === void 0 ? void 0 : n.loc(i) : loc(i);
253
313
  }
254
314
  return;
255
315
  }
@@ -257,7 +317,7 @@ const handleColor = e => {
257
317
  if (e.nodeType === Node.ELEMENT_NODE) {
258
318
  // Wait for Stencil component if needed
259
319
  const n = e.nodeName.startsWith("Q2-") && typeof e.componentOnReady === "function";
260
- if (n && !i.skipComponentReady) {
320
+ if (n && !o.skipComponentReady) {
261
321
  await e.componentOnReady();
262
322
  }
263
323
  // Process children in light DOM
@@ -292,14 +352,14 @@ const handleColor = e => {
292
352
  }
293
353
  await processNode(e);
294
354
  // Apply final formatting
295
- if (i.trim) {
296
- a = a.trim();
355
+ if (o.trim) {
356
+ r = r.trim();
297
357
  }
298
- if (i.normalizeWhitespace) {
299
- a = a.replace(/\s+/g, " ");
358
+ if (o.normalizeWhitespace) {
359
+ r = r.replace(/\s+/g, " ");
300
360
  }
301
- return a;
361
+ return r;
302
362
  };
303
363
 
304
- export { handleAriaLabel as a, handleColor as b, createGuid as c, isMobile as d, hasSlotContent as e, renderLabel as f, getAriaValueFromProp as g, handleDeprecationWarning as h, isEventFromElement as i, handleRenamedProp as j, isTouchDevice as k, loc as l, resizeIframe as m, nextPaint as n, overrideFocus as o, debounce as p, isRelatedTargetWithinHost as q, renderMessages as r, setMessageHeight as s, isFirefox as t, getAllText as u, isVisible as v, waitForNextPaint as w };
305
- //# sourceMappingURL=index-504f1a9e.js.map
364
+ export { handleAriaLabel as a, handleColor as b, createGuid as c, isMobile as d, hasSlotContent as e, renderLabel as f, getAriaValueFromProp as g, handleDeprecationWarning as h, isEventFromElement as i, handleRenamedProp as j, isTouchDevice as k, loc as l, resizeIframe as m, nextPaint as n, overrideFocus as o, debounce as p, isRelatedTargetWithinHost as q, renderMessages as r, setMessageHeight as s, getBrowserInfo as t, isFirefox as u, getAllText as v, waitForNextPaint as w, isVisible as x, isInScrollableContainer as y };
365
+ //# sourceMappingURL=index-52ca69b4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["debounce","fn","delay","timeout","args","clearTimeout","setTimeout","isMobile","test","navigator","userAgent","isInScrollableContainer","element","current","document","body","documentElement","parentElement","root","getRootNode","host","style","window","getComputedStyle","hasScrollableOverflow","overflow","overflowX","overflowY","hasOverflowingContent","scrollHeight","clientHeight","scrollWidth","clientWidth","isRelatedTargetWithinHost","event","relatedTarget","contains","isEventFromElement","_a","composedPath","call","overrideFocus","hostElement","focus","dispatchEvent","FocusEvent","bubbles","isFirefox","toLowerCase","includes","isTouchDevice","maxTouchPoints","getAriaValueFromProp","prop","validValues","undefined","guid","createGuid","nextPaint","requestAnimationFrame","isVisible","offsetWidth","offsetHeight","getClientRects","length","waitForNextPaint","Promise","resolve","loc","key","subs","Tecton","noStrings","_c","_b","TectonElements","getBrowserInfo","browserName","browserVersion","match","name","version","renderLabel","target","label","hideLabel","optional","readonly","labelClasses","helpText","shouldHideLabel","labelSlotElements","querySelectorAll","hasSlotContent","hasLabel","push","h","class","htmlFor","inputId","join","slotName","querySelector","handleAriaLabel","ariaLabel","FW_WRAPPERS_EMPTY_PROP","Symbol","toString","handleRenamedProp","oldProp","newProp","removeOldProp","handleDeprecationWarning","deprecatedItemName","deprecatedItemType","location","hostname","componentName","constructor","slice","console","warn","error","renderMessages","type","hasError","appearance","description","id","inputDescribedBy","messages","map","message","setMessageHeight","messageContainer","shadowRoot","q2Message","height","showMessages","hasFocus","getBoundingClientRect","getPropertyValue","classList","add","removeProperty","remove","setProperty","resizeIframe","handleColor","intent","color","getAllText","async","options","opts","Object","assign","trim","normalizeWhitespace","skipComponentReady","nodesToSkip","Set","processedNodes","WeakSet","result","processNode","node","has","nodeName","nodeType","Node","TEXT_NODE","text","textContent","endsWith","startsWith","ELEMENT_NODE","isStencilComponent","componentOnReady","child","childNodes","shadowChild","assignedNodes","assigned","fallback","replace"],"sources":["src/utils/index.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { Q2Btn } from 'src/components/q2-btn/q2-btn';\nimport { Q2Calendar } from 'src/components/q2-calendar/q2-calendar';\nimport { Q2Carousel } from 'src/components/q2-carousel/q2-carousel';\nimport { Q2Checkbox } from 'src/components/q2-checkbox/q2-checkbox';\nimport { Q2CheckboxGroup } from 'src/components/q2-checkbox-group/q2-checkbox-group';\nimport { Q2RadioGroup } from 'src/components/q2-radio-group/q2-radio-group';\nimport { Q2Dropdown } from 'src/components/q2-dropdown/q2-dropdown';\nimport { Q2DropdownItem } from 'src/components/q2-dropdown-item/q2-dropdown-item';\nimport { Q2EditableField } from 'src/components/q2-editable-field/q2-editable-field';\nimport { Q2Input } from 'src/components/q2-input/q2-input';\nimport { Q2Loading } from 'src/components/q2-loading/q2-loading';\nimport { Q2Radio } from 'src/components/q2-radio/q2-radio';\nimport { Q2Select } from 'src/components/q2-select/q2-select';\nimport { FormFieldTypes, IDict } from 'src/util';\n\nexport const debounce = <F extends (...args: Parameters<F>) => ReturnType<F>>(fn: F, delay: number = 300) => {\n let timeout: ReturnType<typeof setTimeout>;\n return function (...args: Parameters<F>) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n};\n\nexport function isAndroid(): boolean {\n return /Android/i.test(navigator.userAgent);\n}\n\nexport function isIOS(): boolean {\n return /iPad|iPhone|iPod/.test(navigator.userAgent);\n}\n\nexport function isMobile(): boolean {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(\n navigator.userAgent\n );\n}\n\nexport function isInScrollableContainer(element) {\n let current = element;\n\n while (current && current !== document.body && current !== document.documentElement) {\n // Move to parent\n if (current.parentElement) {\n current = current.parentElement;\n } else {\n // Try to cross shadow DOM boundary\n const root = current.getRootNode();\n if (root && root.host) {\n current = root.host;\n } else {\n break;\n }\n }\n\n const style = window.getComputedStyle(current);\n const hasScrollableOverflow =\n style.overflow === 'scroll' ||\n style.overflow === 'auto' ||\n style.overflowX === 'scroll' ||\n style.overflowX === 'auto' ||\n style.overflowY === 'scroll' ||\n style.overflowY === 'auto';\n\n const hasOverflowingContent =\n current.scrollHeight > current.clientHeight || current.scrollWidth > current.clientWidth;\n\n if (hasScrollableOverflow && hasOverflowingContent) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function isHostLosingFocus(event: FocusEvent, hostElement: HTMLElement) {\n const type = event.type;\n const focusInTypes = ['focusin', 'focus'];\n const isFocusIn = focusInTypes.includes(type);\n\n // on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus\n // on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus\n const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;\n\n const isElementNestedInHostElement = (element: HTMLElement) => {\n if (element === hostElement) return true;\n if (element.parentElement) {\n return isElementNestedInHostElement(element.parentElement);\n }\n return false;\n };\n\n if (!(elementGainingFocus instanceof HTMLElement)) return true;\n return !isElementNestedInHostElement(elementGainingFocus);\n}\n\nexport function isRelatedTargetWithinHost(event: FocusEvent, element: HTMLElement) {\n return event.relatedTarget !== element && !element.contains(event.relatedTarget as Node);\n}\n\nexport function isEventFromElement(event: Event, element: HTMLElement): boolean {\n return event.composedPath?.()[0] === element;\n}\n\nexport function overrideFocus(hostElement: HTMLElement) {\n hostElement.focus = () => hostElement?.dispatchEvent(new FocusEvent('focus', { bubbles: false }));\n}\n\nexport function isFirefox() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('firefox');\n}\n\nexport function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n}\n\nexport function isSafari() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('safari') && !userAgent.includes('chrome');\n}\n\n/**\n * Returns the value of a prop if it is defined and included in the `validValues`\n * array. This is used primarily to prevent Vue wrappers from setting aria props\n * to \"Symbol()\" when the prop is not set.\n */\nexport function getAriaValueFromProp(prop: string, validValues?: string[]) {\n if (prop === undefined) return prop;\n if (!validValues) return prop !== 'Symbol()' ? prop : undefined;\n return validValues.includes(prop) || prop === '' ? prop : undefined;\n}\n\nlet guid: number = 1000;\nexport function createGuid(): number {\n return guid++;\n}\n\nexport function nextPaint(fn: (value?: unknown) => void) {\n requestAnimationFrame(() => {\n requestAnimationFrame(fn);\n });\n}\n\nexport function isVisible(element: HTMLElement) {\n return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;\n}\n\nexport function waitForNextPaint() {\n return new Promise(resolve => nextPaint(resolve));\n}\n\nexport function capitalize(value: string) {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n\nexport function pick(props: string[]): (obj: object) => object {\n return obj => {\n return props.reduce((memo, prop) => {\n return {\n ...memo,\n [prop]: obj[prop],\n };\n }, {});\n };\n}\n\nexport function loc(key: string, subs?: IDict<any> | string[]) {\n if (!key) return '';\n if (window.Tecton?.noStrings === true) {\n return key;\n }\n return window?.TectonElements?.loc(key, subs) ?? key;\n}\n\nexport function getBrowserInfo() {\n const userAgent = navigator.userAgent;\n let browserName = 'Unknown';\n let browserVersion = 'Unknown';\n\n if (userAgent.includes('Firefox')) {\n browserName = 'Firefox';\n const match = userAgent.match(/Firefox\\/(\\d+\\.\\d+)/);\n if (match && match[1]) {\n browserVersion = match[1];\n }\n } else if (userAgent.includes('Chrome') && !userAgent.includes('Edg')) {\n browserName = 'Chrome';\n const match = userAgent.match(/Chrome\\/(\\d+\\.\\d+\\.\\d+\\.\\d+)/);\n if (match && match[1]) {\n browserVersion = match[1];\n }\n } else if (userAgent.includes('Safari') && !userAgent.includes('Chrome')) {\n browserName = 'Safari';\n const match = userAgent.match(/Version\\/(\\d+\\.\\d+)/);\n if (match && match[1]) {\n browserVersion = match[1];\n }\n } else if (userAgent.includes('Edg')) {\n browserName = 'Edge';\n const match = userAgent.match(/Chrome\\/(\\d+\\.\\d+\\.\\d+\\.\\d+)/);\n if (match && match[1]) {\n browserVersion = match[1];\n }\n }\n\n return { name: browserName, version: browserVersion };\n}\n\nexport function renderLabel(target: FormFieldTypes | Q2RadioGroup | Q2CheckboxGroup) {\n const { label, hideLabel, optional, readonly } = target;\n const labelClasses: string[] = ['input-label'];\n let helpText = '';\n\n let shouldHideLabel = hideLabel;\n if (!shouldHideLabel) {\n const labelSlotElements = target.hostElement.querySelectorAll<HTMLSlotElement>('[slot=\"label\"]');\n const hasSlotContent = labelSlotElements.length > 0;\n const hasLabel = !!label;\n\n shouldHideLabel = hasLabel || hasSlotContent ? false : true;\n }\n\n if (shouldHideLabel) labelClasses.push('sr');\n if (optional) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.optional')}</span>;\n }\n if (readonly) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.readonly')}</span>;\n labelClasses.push('readonly-field');\n }\n return (\n <label\n htmlFor={target.inputId}\n class={labelClasses.join(' ')}\n >\n <slot name=\"label\">\n {label ? loc(label) : undefined}\n {helpText}\n </slot>\n </label>\n );\n}\n\nexport function hasSlotContent(target: HTMLElement, slotName: string) {\n return target.querySelector(`[slot=\"${slotName}\"]`) !== null;\n}\n\nexport function handleAriaLabel(\n target:\n | Q2Input\n | Q2Select\n | Q2Radio\n | Q2Checkbox\n | Q2EditableField\n | Q2Dropdown\n | Q2DropdownItem\n | Q2Loading\n | Q2Carousel\n | Q2Calendar\n | Q2Btn\n) {\n const { ariaLabel } = target;\n if (!ariaLabel) return;\n\n // If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return\n const FW_WRAPPERS_EMPTY_PROP = Symbol().toString();\n if (ariaLabel === FW_WRAPPERS_EMPTY_PROP) {\n target.ariaLabel = undefined;\n return;\n }\n\n // If ariaLabel is set, set hideLabel to true and set label to ariaLabel\n if ('hideLabel' in target) target.hideLabel = true;\n target.label = loc(ariaLabel);\n target.ariaLabel = undefined;\n}\n\n/**\n * Handles when a prop has been renamed on a component without introducing a breaking change.\n */\nexport function handleRenamedProp(target: object, oldProp: string, newProp: string, removeOldProp?: boolean) {\n if (typeof target[oldProp] === 'undefined') return;\n\n // If old prop has value, aka set in component, call handleDeprecationWarning()\n if (target[oldProp]) {\n handleDeprecationWarning(target, oldProp, 'prop');\n }\n\n target[newProp] = target[oldProp];\n\n if (removeOldProp) {\n delete target[oldProp];\n }\n}\n\nexport function handleDeprecationWarning(\n target: object,\n deprecatedItemName: string,\n deprecatedItemType: 'function' | 'prop' | 'method' | 'event'\n) {\n if (window.location.hostname === 'localhost' || window.location.host === 'stack.q2developer.com') {\n if (target[deprecatedItemName] === 'undefined') return;\n\n const componentName = target.constructor.name.toLowerCase().slice(2);\n\n switch (deprecatedItemType) {\n case 'prop':\n if (deprecatedItemName === 'size' && componentName === 'btn') {\n console.warn(\n `The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: \"small\" / \"medium\" / \"large\" `\n );\n } else {\n console.warn(\n `The property ${deprecatedItemName} in q2-${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n }\n break;\n\n case 'function':\n console.warn(\n `The function ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'method':\n console.warn(\n `The method ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'event':\n console.warn(\n `The event ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n default:\n console.error(\n `handleDeprecationWarning --> No type found for desired deprecation: ${deprecatedItemName} in q2-${componentName}: deprecatedItemType = ${deprecatedItemName}`\n );\n }\n }\n}\n\nexport function renderMessages(target: FormFieldTypes) {\n const type = target.hasError ? 'danger' : 'info';\n\n return (\n <div class=\"messages-container\">\n <q2-message\n appearance=\"minimal\"\n description\n type={type}\n test-id=\"message\"\n >\n <ul id={target.inputDescribedBy}>\n {target.messages.map(message => (\n <li test-id=\"messageListItem\">{loc(message)}</li>\n ))}\n </ul>\n </q2-message>\n </div>\n );\n}\n\nexport function setMessageHeight(target: FormFieldTypes) {\n const messageContainer = (target.hostElement.shadowRoot as ShadowRoot).querySelector<HTMLDivElement>(\n '.messages-container'\n );\n const q2Message = messageContainer.querySelector('q2-message');\n nextPaint(() => {\n const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;\n\n if (messageContainer.style.getPropertyValue('height') === `${height}px`) return;\n\n if (height === 0) {\n q2Message.classList.add('invisible');\n messageContainer.style.removeProperty('height');\n } else {\n q2Message.classList.remove('invisible');\n messageContainer.style.setProperty('height', `${height}px`);\n }\n });\n}\n\nexport const resizeIframe = () => {\n return window.TectonElements?.resizeIframe?.();\n};\n\n// Handling color attribute (deprecated)\nexport const handleColor = (target: Q2Btn) => {\n if (!target.intent && ['primary', 'secondary'].includes(target.color)) {\n target.intent = `workflow-${target.color}` as HTMLQ2BtnElement['intent'];\n target.color = undefined;\n }\n};\n\n/**\n * Gets all translated text content from an element, including shadow DOM content\n *\n * @param {Element} element - The element to extract text from\n * @param {Object} options - Configuration options\n * @param {boolean} [options.trim=true] - Whether to trim whitespace\n * @param {boolean} [options.normalizeWhitespace=false] - Whether to normalize whitespace\n * @param {boolean} [options.skipComponentReady=false] - Skip waiting for components (for test environments)\n * @return {Promise<string>} All translated text content in DOM order\n */\nexport const getAllText = async (element, options = {}) => {\n if (!element) return '';\n\n const opts = {\n trim: true,\n normalizeWhitespace: false,\n skipComponentReady: false,\n ...options,\n };\n\n const nodesToSkip = new Set(['STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE', '#comment']);\n const processedNodes = new WeakSet();\n let result = '';\n\n async function processNode(node) {\n if (processedNodes.has(node) || nodesToSkip.has(node.nodeName)) return;\n\n processedNodes.add(node);\n\n // Handle text nodes\n if (node.nodeType === Node.TEXT_NODE) {\n const text = opts.trim ? node.textContent.trim() : node.textContent;\n\n if (text) {\n // Add space between adjacent text nodes if needed\n if (result && !result.endsWith(' ') && !text.startsWith(' ')) {\n result += ' ';\n }\n\n // Translate the text\n result += opts.skipComponentReady ? window.TectonElements?.loc(text) : loc(text);\n }\n return;\n }\n\n // Handle element nodes\n if (node.nodeType === Node.ELEMENT_NODE) {\n // Wait for Stencil component if needed\n const isStencilComponent = node.nodeName.startsWith('Q2-') && typeof node.componentOnReady === 'function';\n\n if (isStencilComponent && !opts.skipComponentReady) {\n await node.componentOnReady();\n }\n\n // Process children in light DOM\n for (const child of node.childNodes) {\n await processNode(child);\n }\n\n // Process shadow DOM if present\n if (node.shadowRoot) {\n for (const shadowChild of node.shadowRoot.childNodes) {\n await processNode(shadowChild);\n }\n }\n\n // Handle slot elements with assigned nodes\n if (node.nodeName === 'SLOT' && typeof node.assignedNodes === 'function') {\n const assignedNodes = node.assignedNodes();\n\n if (assignedNodes.length > 0) {\n for (const assigned of assignedNodes) {\n if (!processedNodes.has(assigned)) {\n await processNode(assigned);\n }\n }\n } else {\n // Process slot fallback content\n for (const fallback of node.childNodes) {\n if (!processedNodes.has(fallback)) {\n await processNode(fallback);\n }\n }\n }\n }\n }\n }\n\n await processNode(element);\n\n // Apply final formatting\n if (opts.trim) {\n result = result.trim();\n }\n\n if (opts.normalizeWhitespace) {\n result = result.replace(/\\s+/g, ' ');\n }\n\n return result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;;;gBAIdA,KAAUV,EAAKK,sBAAqBzH,IAAAhB,OAAOqD,oBAAc,QAAArC,WAAA,aAAAA,EAAE8B,IAAIwG,KAAQxG,IAAIwG;;MAE/E;;;QAIJ,IAAIN,EAAKG,aAAaC,KAAKM,cAAc;;MAErC,MAAMC,IAAqBX,EAAKE,SAASO,WAAW,iBAAiBT,EAAKY,qBAAqB;MAE/F,IAAID,MAAuBvB,EAAKK,oBAAoB;cAC1CO,EAAKY;;;YAIf,KAAK,MAAMC,KAASb,EAAKc,YAAY;cAC3Bf,YAAYc;;;YAItB,IAAIb,EAAK/B,YAAY;QACjB,KAAK,MAAM8C,KAAef,EAAK/B,WAAW6C,YAAY;gBAC5Cf,YAAYgB;;;;YAK1B,IAAIf,EAAKE,aAAa,iBAAiBF,EAAKgB,kBAAkB,YAAY;QACtE,MAAMA,IAAgBhB,EAAKgB;QAE3B,IAAIA,EAActH,SAAS,GAAG;UAC1B,KAAK,MAAMuH,KAAYD,GAAe;YAClC,KAAKpB,EAAeK,IAAIgB,IAAW;oBACzBlB,YAAYkB;;;eAGvB;;UAEH,KAAK,MAAMC,KAAYlB,EAAKc,YAAY;YACpC,KAAKlB,EAAeK,IAAIiB,IAAW;oBACzBnB,YAAYmB;;;;;;;QAQpCnB,YAAYzJ;;IAGlB,IAAI8I,EAAKG,MAAM;IACXO,IAASA,EAAOP;;EAGpB,IAAIH,EAAKI,qBAAqB;IAC1BM,IAASA,EAAOqB,QAAQ,QAAQ;;EAGpC,OAAOrB;AAAM"}
@@ -1,6 +1,6 @@
1
1
  import { r as t, h as e } from "./index-7a5365e2.js";
2
2
 
3
- import { n as i } from "./index-504f1a9e.js";
3
+ import { n as i } from "./index-52ca69b4.js";
4
4
 
5
5
  const o = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host(:not([hidden])){display:block;width:100%;--comp-default-btn-group-margin:var(--app-scale-5x, 25px) 0;margin:var(--tct-btn-group-margin, var(--comp-default-btn-group-margin))}.container{width:100%;display:flex;gap:var(--tct-btn-group-gap, var(--app-scale-2x, 10px))}.container.vertical{flex-direction:var(--tct-btn-group-vertical-flex-direction, column)}.container.vertical ::slotted(q2-btn){display:block;width:100%}.container.horizontal{justify-content:var(--tct-btn-group-horizontal-justify-content, flex-start);flex-direction:var(--tct-btn-group-horizontal-flex-direction, row-reverse);align-items:var(--tct-btn-group-horizontal-align-items, center);flex-wrap:var(--tct-btn-group-horizontal-flex-wrap, wrap)}.container.horizontal.full-width{flex-wrap:nowrap}.container.vertical ::slotted(q2-btn),.container.horizontal.full-width ::slotted(q2-btn){display:block;width:100%}";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { r as e, c as t, h as n, F as o, g as i } from "./index-7a5365e2.js";
2
2
 
3
- import { l as a, w as r } from "./index-504f1a9e.js";
3
+ import { l as a, w as r } from "./index-52ca69b4.js";
4
4
 
5
5
  var s = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { r as t, h as r, g as o, F as a, a as e, c as i } from "./index-7a5365e2.js";
2
2
 
3
- import { h as n, l as c, a as s, b as d, o as l, i as p, g as b, c as u, d as f, s as h, e as v, n as m, r as x, f as g } from "./index-504f1a9e.js";
3
+ import { h as n, l as c, a as s, b as d, o as l, i as p, g as b, c as u, d as f, s as h, e as v, n as m, r as x, f as g } from "./index-52ca69b4.js";
4
4
 
5
5
  import { s as k } from "./shapes-c7e1a3fa.js";
6
6
 
@@ -2,7 +2,7 @@ import { r as e, c as t, h as i, g as a } from "./index-7a5365e2.js";
2
2
 
3
3
  import { d as n } from "./index-3184c760.js";
4
4
 
5
- import { l as s, a as r, o, i as d, w as l, j as c } from "./index-504f1a9e.js";
5
+ import { l as s, a as r, o, i as d, w as l, j as c } from "./index-52ca69b4.js";
6
6
 
7
7
  function formatDateISO(e) {
8
8
  const t = new Date(e);
@@ -1,6 +1,6 @@
1
1
  import { r as t, c as a, h as r, F as c, g as o } from "./index-7a5365e2.js";
2
2
 
3
- import { k as e, o as i, i as s } from "./index-504f1a9e.js";
3
+ import { k as e, o as i, i as s } from "./index-52ca69b4.js";
4
4
 
5
5
  const n = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}.container{position:relative;width:100%;text-align:start;height:100%;display:grid;gap:var(--tct-card-gap, var(--t-card-gap, var(--app-scale-3x, 15px)));margin:0;color:var(--tct-card-color, var(--t-card-color, var(--t-text, #4d4d4d)));--comp-avatar-size:var(--tct-card-avatar-size, var(--t-card-avatar-size, 44px));--comp-chevron-size:0;--comp-bar-width:var(--tct-card-bar-width, var(--t-card-bar-width, var(--app-scale-2x, 10px)));--comp-card-padding:var(--tct-card-padding, var(--t-card-padding, var(--app-scale-4x, 20px)))}.container.is-small{--comp-avatar-size:var(--tct-card-avatar-size, var(--t-card-avatar-size, 26px))}.container.has-avatar{grid-template-columns:var(--comp-avatar-size) 1fr;--tct-avatar-width:var(--comp-avatar-size);--tct-avatar-height:var(--comp-avatar-size);--tct-icon-size:var(--comp-avatar-size)}:host([bar][is-static]) .container{padding-left:var(--comp-card-padding)}:host(:not([is-static])) .container{--comp-border-radius:var(--tct-card-border-radius, var(--t-card-border-radius, var(--app-border-radius-1, 4px)));--comp-border-width:var(--tct-card-border-width, var(--t-card-border-width, 0px));border:none;background:var(--tct-card-background, var(--t-card-background, var(--t-base, #ffffff)));padding:var(--comp-card-padding);text-decoration:none;border-width:var(--comp-border-width);border-color:var(--tct-card-border-color, var(--t-card-border-color, transparent));border-style:var(--tct-card-border-style, solid);border-radius:var(--comp-border-radius);transition:box-shadow var(--tct-tween-1, var(--app-tween-1, 0.2s ease));box-shadow:var(--tct-card-box-shadow, var(--t-card-box-shadow, var(--app-shadow-2, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 4px 8px rgba(0, 0, 0, 0.14))))}:host(:not([is-static])) .container.clickable{cursor:pointer}@media (hover: hover){:host(:not([is-static])) .container.clickable{--comp-card-hover-box-shadow:var(--tct-card-hover-box-shadow, var(--t-card-hover-box-shadow, var(--app-shadow-3, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 8px 16px rgba(0, 0, 0, 0.14))))}:host(:not([is-static])) .container.clickable:hover,:host(:not([is-static])) .container.clickable:active,:host(:not([is-static])) .container.clickable:focus{color:var(--tct-card-color, var(--t-card-color, var(--t-text, #4d4d4d)));box-shadow:var(--const-double-focus-ring)}:host(:not([is-static])) .container.clickable:hover{box-shadow:var(--comp-card-hover-box-shadow)}:host(:not([is-static])) .container.clickable:focus:hover{box-shadow:var(--const-double-focus-ring), var(--comp-card-hover-box-shadow)}:host(:not([is-static])) .container.clickable:active{box-shadow:var(--tct-card-active-box-shadow, var(--t-card-active-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14))))}}:host(:not([is-static])) .container.is-touch{--comp-chevron-size:var(--tct-card-chevron-size, var(--t-card-chevron-size, 26px));grid-template-columns:1fr var(--comp-chevron-size)}:host(:not([is-static])) .container.has-avatar.is-touch{grid-template-columns:var(--comp-avatar-size) 1fr var(--comp-chevron-size)}.content{overflow:hidden;display:grid;gap:var(--tct-card-content-gap, var(--t-card-content-gap, var(--app-scale-1x, 5px)));align-content:start}h3,p{margin:0;padding:0;line-height:var(--tct-card-font-height, var(--t-card-font-height, 20px))}h3{font-weight:var(--tct-card-font-weight, var(--t-card-font-weight, 600));font-size:var(--tct-card-font-size, var(--t-card-font-size, 17px));text-overflow:ellipsis;overflow:hidden;white-space:nowrap}p{text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.bar{--comp-bar-border-radius:calc(var(--comp-border-radius) - var(--comp-border-width));border-radius:var(--comp-bar-border-radius) 0 0 var(--comp-bar-border-radius);position:absolute;inset:0 auto auto 0;width:var(--comp-bar-width);background:var(--comp-bar-color);height:100%}.bar.color-primary{--comp-bar-color:var(--tct-card-bar-color-primary, var(--t-primary, #5446a4))}.bar.color-secondary{--comp-bar-color:var(--tct-card-bar-color-secondary, var(--t-secondary, #b6b3cc))}.bar.color-tertiary{--comp-bar-color:var(--tct-card-bar-color-tertiary, var(--t-tertiary, #ebe8fc))}.bar.color-info{--comp-bar-color:var(--tct-card-bar-color-info, var(--const-stoplight-info, #0079c1))}.bar.color-success{--comp-bar-color:var(--tct-card-bar-color-success, var(--const-stoplight-success, #0e8a00))}.bar.color-warning{--comp-bar-color:var(--tct-card-bar-color-warning, var(--const-stoplight-warning, #c35500))}.bar.color-alert{--comp-bar-color:var(--tct-card-bar-color-alert, var(--const-stoplight-alert, #c35500))}.bar.color-accent-1{--comp-bar-color:var(--tct-card-bar-color-accent-1, var(--t-accent-1, #e05252))}.bar.color-accent-2{--comp-bar-color:var(--tct-card-bar-color-accent-2, var(--t-accent-2, #e09952))}.bar.color-accent-3{--comp-bar-color:var(--tct-card-bar-color-accent-3, var(--t-accent-3, #e0e052))}.bar.color-accent-4{--comp-bar-color:var(--tct-card-bar-color-accent-4, var(--t-accent-4, #99e052))}.bar.color-accent-5{--comp-bar-color:var(--tct-card-bar-color-accent-5, var(--t-accent-5, #52e052))}.bar.color-accent-6{--comp-bar-color:var(--tct-card-bar-color-accent-6, var(--t-accent-6, #52e099))}.bar.color-accent-7{--comp-bar-color:var(--tct-card-bar-color-accent-7, var(--t-accent-7, #52e0e0))}.bar.color-accent-8{--comp-bar-color:var(--tct-card-bar-color-accent-8, var(--t-accent-8, #5299e0))}.bar.color-accent-9{--comp-bar-color:var(--tct-card-bar-color-accent-9, var(--t-accent-9, #5252e0))}.bar.color-accent-10{--comp-bar-color:var(--tct-card-bar-color-accent-10, var(--t-accent-10, #9952e0))}.bar.color-accent-11{--comp-bar-color:var(--tct-card-bar-color-accent-11, var(--t-accent-11, #e052e0))}.bar.color-accent-12{--comp-bar-color:var(--tct-card-bar-color-accent-12, var(--t-accent-12, #e05299))}.touch-indicator{align-self:center;--tct-icon-size:var(--comp-chevron-size)}";
6
6