q2-tecton-elements 1.45.5 → 1.45.7

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 (194) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +1 -1
  2. package/dist/cjs/{index-d1633d7b.js → index-6df1e29e.js} +36 -1
  3. package/dist/cjs/index-6df1e29e.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  16. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-input.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-item.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-list.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-optgroup_2.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  34. package/dist/cjs/q2-section.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-select.cjs.entry.js +14 -7
  36. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  37. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  43. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  45. package/dist/collection/components/q2-select/q2-select.js +20 -7
  46. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  47. package/dist/collection/utils/index.js +34 -0
  48. package/dist/collection/utils/index.js.map +1 -1
  49. package/dist/components/index2.js +35 -1
  50. package/dist/components/index2.js.map +1 -1
  51. package/dist/components/q2-btn2.js +1 -1
  52. package/dist/components/q2-input2.js +1 -1
  53. package/dist/components/q2-message2.js +1 -1
  54. package/dist/components/q2-option-list2.js +1 -1
  55. package/dist/components/q2-popover2.js +1 -1
  56. package/dist/components/q2-select.js +15 -8
  57. package/dist/components/q2-select.js.map +1 -1
  58. package/dist/esm/click-elsewhere_2.entry.js +1 -1
  59. package/dist/esm/{index-bcdf5800.js → index-d9f4d587.js} +36 -2
  60. package/dist/esm/index-d9f4d587.js.map +1 -0
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/q2-action-sheet.entry.js +1 -1
  63. package/dist/esm/q2-btn_2.entry.js +1 -1
  64. package/dist/esm/q2-calendar.entry.js +1 -1
  65. package/dist/esm/q2-card.entry.js +1 -1
  66. package/dist/esm/q2-carousel-pane.entry.js +1 -1
  67. package/dist/esm/q2-carousel.entry.js +1 -1
  68. package/dist/esm/q2-chart-area.entry.js +1 -1
  69. package/dist/esm/q2-chart-bar.entry.js +1 -1
  70. package/dist/esm/q2-chart-donut.entry.js +1 -1
  71. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  72. package/dist/esm/q2-checkbox.entry.js +1 -1
  73. package/dist/esm/q2-data-table.entry.js +1 -1
  74. package/dist/esm/q2-detail.entry.js +1 -1
  75. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  76. package/dist/esm/q2-dropdown.entry.js +1 -1
  77. package/dist/esm/q2-editable-field.entry.js +1 -1
  78. package/dist/esm/q2-icon.entry.js +1 -1
  79. package/dist/esm/q2-input.entry.js +1 -1
  80. package/dist/esm/q2-item.entry.js +1 -1
  81. package/dist/esm/q2-list.entry.js +1 -1
  82. package/dist/esm/q2-loc.entry.js +1 -1
  83. package/dist/esm/q2-message.entry.js +1 -1
  84. package/dist/esm/q2-month-picker.entry.js +1 -1
  85. package/dist/esm/q2-optgroup_2.entry.js +1 -1
  86. package/dist/esm/q2-option-list.entry.js +1 -1
  87. package/dist/esm/q2-pagination.entry.js +1 -1
  88. package/dist/esm/q2-pill.entry.js +1 -1
  89. package/dist/esm/q2-radio-group.entry.js +1 -1
  90. package/dist/esm/q2-radio.entry.js +1 -1
  91. package/dist/esm/q2-section.entry.js +1 -1
  92. package/dist/esm/q2-select.entry.js +14 -7
  93. package/dist/esm/q2-select.entry.js.map +1 -1
  94. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  95. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  96. package/dist/esm/q2-stepper.entry.js +1 -1
  97. package/dist/esm/q2-tab-container.entry.js +1 -1
  98. package/dist/esm/q2-tag.entry.js +1 -1
  99. package/dist/esm/q2-tecton-elements.js +1 -1
  100. package/dist/esm/q2-textarea.entry.js +1 -1
  101. package/dist/esm/q2-tooltip.entry.js +1 -1
  102. package/dist/q2-tecton-elements/{p-a9c6ebda.entry.js → p-110ea928.entry.js} +2 -2
  103. package/dist/q2-tecton-elements/{p-fe6db5c3.entry.js → p-12863e29.entry.js} +2 -2
  104. package/dist/q2-tecton-elements/{p-3892b0eb.entry.js → p-1437d0cf.entry.js} +2 -2
  105. package/dist/q2-tecton-elements/{p-100938c8.entry.js → p-14aee8f5.entry.js} +2 -2
  106. package/dist/q2-tecton-elements/{p-911b7798.entry.js → p-24adf2c6.entry.js} +2 -2
  107. package/dist/q2-tecton-elements/{p-556b18ac.entry.js → p-32d9c880.entry.js} +2 -2
  108. package/dist/q2-tecton-elements/{p-0f0bf0c8.entry.js → p-38a5a6fb.entry.js} +2 -2
  109. package/dist/q2-tecton-elements/{p-5604e541.entry.js → p-393407b0.entry.js} +2 -2
  110. package/dist/q2-tecton-elements/{p-cb21467a.entry.js → p-39bcbdc0.entry.js} +2 -2
  111. package/dist/q2-tecton-elements/{p-1ac97a0c.entry.js → p-3b2612ef.entry.js} +2 -2
  112. package/dist/q2-tecton-elements/{p-e05ddf75.entry.js → p-3e1bc191.entry.js} +2 -2
  113. package/dist/q2-tecton-elements/{p-bc199dfa.entry.js → p-458b8606.entry.js} +2 -2
  114. package/dist/q2-tecton-elements/{p-8463a1bb.entry.js → p-4d97df35.entry.js} +2 -2
  115. package/dist/q2-tecton-elements/{p-1d8bfe8e.entry.js → p-52c0cd76.entry.js} +2 -2
  116. package/dist/q2-tecton-elements/{p-c1f32312.entry.js → p-577a238f.entry.js} +2 -2
  117. package/dist/q2-tecton-elements/{p-ce907c0c.entry.js → p-5f0b41dd.entry.js} +2 -2
  118. package/dist/q2-tecton-elements/{p-2b512eb9.entry.js → p-62165fe3.entry.js} +2 -2
  119. package/dist/q2-tecton-elements/{p-e216d48d.entry.js → p-69d325e0.entry.js} +2 -2
  120. package/dist/q2-tecton-elements/{p-632e1e0c.entry.js → p-6b3b2995.entry.js} +2 -2
  121. package/dist/q2-tecton-elements/{p-69df8a32.entry.js → p-7271d222.entry.js} +2 -2
  122. package/dist/q2-tecton-elements/{p-0a34d6b0.entry.js → p-73185a6c.entry.js} +2 -2
  123. package/dist/q2-tecton-elements/{p-e168e356.entry.js → p-7b11f001.entry.js} +2 -2
  124. package/dist/q2-tecton-elements/{p-2adbc99f.entry.js → p-87741e39.entry.js} +2 -2
  125. package/dist/q2-tecton-elements/{p-ff541a15.entry.js → p-88b3f4f0.entry.js} +2 -2
  126. package/dist/q2-tecton-elements/{p-a68fd5f3.entry.js → p-89bd8dcb.entry.js} +2 -2
  127. package/dist/q2-tecton-elements/{p-cd01a560.entry.js → p-a1587b5b.entry.js} +2 -2
  128. package/dist/q2-tecton-elements/{p-b41960b3.entry.js → p-a180d27e.entry.js} +2 -2
  129. package/dist/q2-tecton-elements/{p-4cec59d6.entry.js → p-a29cfe7f.entry.js} +2 -2
  130. package/dist/q2-tecton-elements/{p-1c5ae6c1.entry.js → p-a3a2e6c0.entry.js} +2 -2
  131. package/dist/q2-tecton-elements/{p-557e47c0.entry.js → p-a938c166.entry.js} +2 -2
  132. package/dist/q2-tecton-elements/{p-a3e711e5.entry.js → p-a97ef962.entry.js} +2 -2
  133. package/dist/q2-tecton-elements/{p-16316638.entry.js → p-afffd84d.entry.js} +2 -2
  134. package/dist/q2-tecton-elements/{p-998ced65.entry.js → p-b82c1681.entry.js} +2 -2
  135. package/dist/q2-tecton-elements/p-c49e1a96.js +2 -0
  136. package/dist/q2-tecton-elements/p-c49e1a96.js.map +1 -0
  137. package/dist/q2-tecton-elements/{p-8e047dc7.entry.js → p-d262377b.entry.js} +2 -2
  138. package/dist/q2-tecton-elements/{p-49b6b300.entry.js → p-d3af153e.entry.js} +2 -2
  139. package/dist/q2-tecton-elements/{p-a39898b8.entry.js → p-d8b1ab7f.entry.js} +2 -2
  140. package/dist/q2-tecton-elements/{p-33ac1c35.entry.js → p-dbbc9877.entry.js} +2 -2
  141. package/dist/q2-tecton-elements/p-e6031ff8.entry.js +2 -0
  142. package/dist/q2-tecton-elements/p-e6031ff8.entry.js.map +1 -0
  143. package/dist/q2-tecton-elements/{p-3cf22783.entry.js → p-f00ce995.entry.js} +2 -2
  144. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  145. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  146. package/dist/test/elements/q2-select-test.spec.js +8 -12
  147. package/dist/test/elements/q2-select-test.spec.js.map +1 -1
  148. package/dist/types/components/q2-select/q2-select.d.ts +2 -1
  149. package/dist/types/utils/index.d.ts +4 -0
  150. package/package.json +3 -3
  151. package/dist/cjs/index-d1633d7b.js.map +0 -1
  152. package/dist/esm/index-bcdf5800.js.map +0 -1
  153. package/dist/q2-tecton-elements/p-8ba6e825.js +0 -2
  154. package/dist/q2-tecton-elements/p-8ba6e825.js.map +0 -1
  155. package/dist/q2-tecton-elements/p-da6c1104.entry.js +0 -2
  156. package/dist/q2-tecton-elements/p-da6c1104.entry.js.map +0 -1
  157. /package/dist/q2-tecton-elements/{p-a9c6ebda.entry.js.map → p-110ea928.entry.js.map} +0 -0
  158. /package/dist/q2-tecton-elements/{p-fe6db5c3.entry.js.map → p-12863e29.entry.js.map} +0 -0
  159. /package/dist/q2-tecton-elements/{p-3892b0eb.entry.js.map → p-1437d0cf.entry.js.map} +0 -0
  160. /package/dist/q2-tecton-elements/{p-100938c8.entry.js.map → p-14aee8f5.entry.js.map} +0 -0
  161. /package/dist/q2-tecton-elements/{p-911b7798.entry.js.map → p-24adf2c6.entry.js.map} +0 -0
  162. /package/dist/q2-tecton-elements/{p-556b18ac.entry.js.map → p-32d9c880.entry.js.map} +0 -0
  163. /package/dist/q2-tecton-elements/{p-0f0bf0c8.entry.js.map → p-38a5a6fb.entry.js.map} +0 -0
  164. /package/dist/q2-tecton-elements/{p-5604e541.entry.js.map → p-393407b0.entry.js.map} +0 -0
  165. /package/dist/q2-tecton-elements/{p-cb21467a.entry.js.map → p-39bcbdc0.entry.js.map} +0 -0
  166. /package/dist/q2-tecton-elements/{p-1ac97a0c.entry.js.map → p-3b2612ef.entry.js.map} +0 -0
  167. /package/dist/q2-tecton-elements/{p-e05ddf75.entry.js.map → p-3e1bc191.entry.js.map} +0 -0
  168. /package/dist/q2-tecton-elements/{p-bc199dfa.entry.js.map → p-458b8606.entry.js.map} +0 -0
  169. /package/dist/q2-tecton-elements/{p-8463a1bb.entry.js.map → p-4d97df35.entry.js.map} +0 -0
  170. /package/dist/q2-tecton-elements/{p-1d8bfe8e.entry.js.map → p-52c0cd76.entry.js.map} +0 -0
  171. /package/dist/q2-tecton-elements/{p-c1f32312.entry.js.map → p-577a238f.entry.js.map} +0 -0
  172. /package/dist/q2-tecton-elements/{p-ce907c0c.entry.js.map → p-5f0b41dd.entry.js.map} +0 -0
  173. /package/dist/q2-tecton-elements/{p-2b512eb9.entry.js.map → p-62165fe3.entry.js.map} +0 -0
  174. /package/dist/q2-tecton-elements/{p-e216d48d.entry.js.map → p-69d325e0.entry.js.map} +0 -0
  175. /package/dist/q2-tecton-elements/{p-632e1e0c.entry.js.map → p-6b3b2995.entry.js.map} +0 -0
  176. /package/dist/q2-tecton-elements/{p-69df8a32.entry.js.map → p-7271d222.entry.js.map} +0 -0
  177. /package/dist/q2-tecton-elements/{p-0a34d6b0.entry.js.map → p-73185a6c.entry.js.map} +0 -0
  178. /package/dist/q2-tecton-elements/{p-e168e356.entry.js.map → p-7b11f001.entry.js.map} +0 -0
  179. /package/dist/q2-tecton-elements/{p-2adbc99f.entry.js.map → p-87741e39.entry.js.map} +0 -0
  180. /package/dist/q2-tecton-elements/{p-ff541a15.entry.js.map → p-88b3f4f0.entry.js.map} +0 -0
  181. /package/dist/q2-tecton-elements/{p-a68fd5f3.entry.js.map → p-89bd8dcb.entry.js.map} +0 -0
  182. /package/dist/q2-tecton-elements/{p-cd01a560.entry.js.map → p-a1587b5b.entry.js.map} +0 -0
  183. /package/dist/q2-tecton-elements/{p-b41960b3.entry.js.map → p-a180d27e.entry.js.map} +0 -0
  184. /package/dist/q2-tecton-elements/{p-4cec59d6.entry.js.map → p-a29cfe7f.entry.js.map} +0 -0
  185. /package/dist/q2-tecton-elements/{p-1c5ae6c1.entry.js.map → p-a3a2e6c0.entry.js.map} +0 -0
  186. /package/dist/q2-tecton-elements/{p-557e47c0.entry.js.map → p-a938c166.entry.js.map} +0 -0
  187. /package/dist/q2-tecton-elements/{p-a3e711e5.entry.js.map → p-a97ef962.entry.js.map} +0 -0
  188. /package/dist/q2-tecton-elements/{p-16316638.entry.js.map → p-afffd84d.entry.js.map} +0 -0
  189. /package/dist/q2-tecton-elements/{p-998ced65.entry.js.map → p-b82c1681.entry.js.map} +0 -0
  190. /package/dist/q2-tecton-elements/{p-8e047dc7.entry.js.map → p-d262377b.entry.js.map} +0 -0
  191. /package/dist/q2-tecton-elements/{p-49b6b300.entry.js.map → p-d3af153e.entry.js.map} +0 -0
  192. /package/dist/q2-tecton-elements/{p-a39898b8.entry.js.map → p-d8b1ab7f.entry.js.map} +0 -0
  193. /package/dist/q2-tecton-elements/{p-33ac1c35.entry.js.map → p-dbbc9877.entry.js.map} +0 -0
  194. /package/dist/q2-tecton-elements/{p-3cf22783.entry.js.map → p-f00ce995.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["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","isHostLosingFocus","event","hostElement","type","focusInTypes","isFocusIn","includes","elementGainingFocus","target","relatedTarget","isElementNestedInHostElement","HTMLElement","isRelatedTargetWithinHost","contains","isEventFromElement","_a","composedPath","call","overrideFocus","focus","dispatchEvent","FocusEvent","bubbles","isFirefox","toLowerCase","isTouchDevice","maxTouchPoints","getAriaValueFromProp","prop","validValues","undefined","guid","createGuid","nextPaint","fn","requestAnimationFrame","isVisible","offsetWidth","offsetHeight","getClientRects","length","waitForNextPaint","Promise","resolve","loc","key","subs","Tecton","noStrings","_c","_b","TectonElements","getBrowserInfo","browserName","browserVersion","match","name","version","labelDOM","label","hideLabel","optional","readonly","labelClasses","helpText","shouldHideLabel","labelSlot","shadowRoot","querySelector","hasSlotContent","assignedNodes","hasLabel","push","h","class","htmlFor","inputId","join","slotName","handleAriaLabel","ariaLabel","FW_WRAPPERS_EMPTY_PROP","Symbol","toString","handleRenamedProp","oldProp","newProp","removeOldProp","handleDeprecationWarning","deprecatedItemName","deprecatedItemType","location","hostname","componentName","constructor","slice","console","warn","error","messagesDOM","hasError","appearance","description","id","inputDescribedBy","messages","map","message","setMessageHeight","messageContainer","q2Message","height","showMessages","hasFocus","getBoundingClientRect","getPropertyValue","classList","add","removeProperty","remove","setProperty","resizeIframe","handleColor","intent","color"],"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 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 labelDOM(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 labelSlot = target.hostElement.shadowRoot.querySelector<HTMLSlotElement>('slot[name=\"label\"]');\n const hasSlotContent = labelSlot?.assignedNodes().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 messagesDOM(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"],"mappings":"6CAgBgBA,IACZ,MAAO,sFAAsFC,KACzFC,UAAUC,UAElB,C,SAEgBC,EAAwBC,GACpC,IAAIC,EAAUD,EAEd,MAAOC,GAAWA,IAAYC,SAASC,MAAQF,IAAYC,SAASE,gBAAiB,CAEjF,GAAIH,EAAQI,cAAe,CACvBJ,EAAUA,EAAQI,a,KACf,CAEH,MAAMC,EAAOL,EAAQM,cACrB,GAAID,GAAQA,EAAKE,KAAM,CACnBP,EAAUK,EAAKE,I,KACZ,CACH,K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AYD,EAAiBzC,cAAc,cACjDnC,GAAU,KACN,MAAM8E,EAASvG,EAAOwG,cAAgBxG,EAAOyG,SAAWH,EAAUI,wBAAwBH,OAAS,EAEnG,GAAIF,EAAiBzH,MAAM+H,iBAAiB,YAAc,GAAGJ,MAAY,OAEzE,GAAIA,IAAW,EAAG,CACdD,EAAUM,UAAUC,IAAI,aACxBR,EAAiBzH,MAAMkI,eAAe,S,KACnC,CACHR,EAAUM,UAAUG,OAAO,aAC3BV,EAAiBzH,MAAMoI,YAAY,SAAU,GAAGT,M,IAG5D,C,MAEaU,EAAe,K,QACxB,OAAOvE,GAAAnC,EAAA1B,OAAO8D,kBAAc,MAAApC,SAAA,SAAAA,EAAE0G,gBAAY,MAAAvE,SAAA,SAAAA,EAAAjC,KAAAF,EAAI,E,MAIrC2G,EAAelH,IACxB,IAAKA,EAAOmH,QAAU,CAAC,UAAW,aAAarH,SAASE,EAAOoH,OAAQ,CACnEpH,EAAOmH,OAAS,YAAYnH,EAAOoH,QACnCpH,EAAOoH,MAAQ9F,S"}
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as n,g as o}from"./p-a5f18e27.js";import{l as a,o as i}from"./p-8ba6e825.js";const r="*{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}.month-container{--comp-month-primary-background:var(--tct-btn-primary-background, var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e)));--comp-month-primary-font-color:var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--tct-white, var(--app-white, #ffffff))));--comp-month-primary-background:var(--tct-btn-secondary-background, var(--tct-btn-secondary-bg, var(--t-button-default-bg, #cccccc)));--comp-month-secondary-font-color:var(--tct-btn-secondary-font-color, var(--t-btn-secondary-font-color, var(--t-button-default-font-color, #2e2e2e)))}.month-container .navigation{display:flex;justify-content:space-between;flex-direction:row}.month-container .navigation .year-btn{padding:0 1rem;display:flex;align-items:center}.month-container .navigation .year-btn .year{margin-right:0.2rem}.month-container .navigation .year-btn .year-icon{--t-icon-stroke-width:2px;width:16px;height:16px;transition:all 0.3s ease-in-out}.month-container .navigation .year-btn .year-icon.on{transform:rotate(-180deg)}.month-container .navigation .month-controller{display:flex;align-items:center}.month-container .month-list{display:grid;grid-template-columns:auto auto auto}.month-container .month-list .month{display:flex;justify-content:center;align-items:center;padding:0.5rem 0}.month-container .month-list .month .month-button{border-radius:50%;aspect-ratio:1;width:50px;display:flex;justify-content:center;align-items:center}.month-container .month-list .month .month-button:hover{background:var(--comp-month-primary-background);color:var(--comp-month-secondary-font-color);cursor:pointer}.month-container .month-list .month .month-button:active,.month-container .month-list .month .month-button.active{background:var(--comp-month-primary-background);color:var(--comp-month-primary-font-color)}.month-container .today-label{padding:0.5rem 0;color:var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))))}";const c=r;const s=class{constructor(n){t(this,n);this.viewChange=e(this,"viewChange",7);this.toggleChange=e(this,"toggleChange",7);this.scheduledAfterRender=[];this.monthGrid=[[0,1,2],[3,4,5],[6,7,8],[9,10,11]];this.months=["January","February","March","April","May","June","July","August","September","October","November","December"].map((t=>({label:a(`tecton.element.calendar.months.${t}`),abbr:a(`tecton.element.calendar.months.abbr.${t}`)})));this.onMonthSelection=t=>{var e,n;const o=t.target.closest(".month-button");if((e=o===null||o===void 0?void 0:o.dataset)===null||e===void 0?void 0:e.index){this.selectMonth(Number((n=o===null||o===void 0?void 0:o.dataset)===null||n===void 0?void 0:n.index))}};this.onMonthKeydown=t=>{if(t.key==="Escape"||t.key==="Esc"){this.toggleChange.emit({close:true});return}const e=t.target.dataset.index;if(!e)return;if(t.key==="Enter"||t.key===" "){t.preventDefault();t.stopPropagation();this.selectMonth(Number(e))}else{const n=this.moveMonth(this.monthGrid,Number(e),t);this.focusMonth(n)}};this.moveMonth=(t,e,n)=>{const o=t.length;const a=t[0].length;const i=Math.floor(e/a);const r=e%a;const c=[i,r];if(n.key==="ArrowUp"){n.stopPropagation();n.preventDefault();return t[Math.max(0,c[0]-1)][c[1]]}else if(n.key==="ArrowDown"){n.stopPropagation();n.preventDefault();return t[Math.min(o-1,c[0]+1)][c[1]]}else if(n.key==="ArrowLeft"){n.stopPropagation();n.preventDefault();return Math.max(0,e-1)}else if(n.key==="ArrowRight"){n.stopPropagation();n.preventDefault();return Math.min(this.months.length-1,e+1)}else{return t[c[0]][c[1]]}};this.focusMonth=t=>{const e=this.hostElement.shadowRoot.querySelector(`.month-button[data-index="${t}"]`);if(e){this.focusedIndex=t;e.focus()}};this.selectMonth=t=>{var e,n,o;this.selectedIndex=t;this.focusedIndex=t;const a=this.hostElement.shadowRoot.querySelector(`.month-button[data-index="${t}"]`);(e=this.hostElement.shadowRoot.querySelectorAll(`.month-button`))===null||e===void 0?void 0:e.forEach((t=>t.classList.remove("active")));a===null||a===void 0?void 0:a.classList.add("active");a===null||a===void 0?void 0:a.focus();const i={view:"day",monthIndex:t,selectedYear:this.year};(o=(n=this.hostElement).onchange)===null||o===void 0?void 0:o.call(n,new CustomEvent("click",{bubbles:true,detail:i}));this.viewChange.emit(i)};this.selectYear=t=>{this.year=Math.max(1970,t)};this.year=Number((new Date).toLocaleString("en-US",{year:"numeric"}));this.disabledMonths=undefined;this.today=undefined;this.selectedIndex=0;this.focusedIndex=0;this.showYearLayer=false}componentDidRender(){var t;(t=this.scheduledAfterRender)===null||t===void 0?void 0:t.forEach((t=>t()));this.scheduledAfterRender=[]}componentDidLoad(){i(this.hostElement)}render(){return n("div",{key:"40462c486de4c00ec98af8e8a021d878b5d18617",class:"month-container",onKeyDown:this.onMonthKeydown},n("div",{key:"44694fbe172115218b0ddf0085d7778a030b8e7f",class:"navigation"},n("q2-btn",{key:"dedfdcc6e6cf89f5467d30a124e5bcea507f87ae",class:"year-btn",onClick:()=>this.viewChange.emit({view:"year",selectedYear:this.year})},n("span",{key:"0a15bed1946b1751d817b0ff447a70637a98e79f",class:"year"},this.year),n("q2-icon",{key:"6e2086593a5c4494cee2fe3e97a74cb2764159c5",class:"year-icon off",type:"chevron-down"})),n("div",{key:"ca2967da7d891974e39f0bad6ad65eecf508aa8a",class:"month-controller"},n("div",{key:"4bc0cc50ec1eb084bad404a8b4173ed16644d99c",class:"cal-year-prev-next"},n("q2-btn",{key:"dcb43f067ee807ce10cd013cd1a658ce39982b0b",label:a("tecton.element.calendar.previousYear"),"hide-label":true,class:"cal-nav-btn prev-year","test-id":"previousYearButton",onClick:()=>this.selectYear(this.year-1)},n("q2-icon",{key:"7a293700c3c5e9579abed00a017e13531bd9d25c",type:"arrow-left"})),n("q2-btn",{key:"2b4964e124d514a05697f44aa0c88071be3c8b29",label:a("tecton.element.calendar.nextYear"),"hide-label":true,class:"cal-nav-btn next-year","test-id":"nextYearButton",onClick:()=>this.selectYear(this.year+1)},n("q2-icon",{key:"fab7dd9246253a50df0eb6a5713749f20da51a75",type:"arrow-right"}))))),n("div",{key:"ea3eb812f453f6c482283876354723883f8ca72b",class:"month-list",onClick:this.onMonthSelection},this.months.map(((t,e)=>n("div",{class:"month"},n("span",{role:"button",class:"month-button","data-index":e,"aria-label":t.label,tabindex:e===this.focusedIndex?0:-1},t.abbr))))),this.today&&n("div",{key:"212f3484b4479d4dee521216525738f3f3c4e806",class:"today-label"},a("tecton.element.calendar.today"),": ",this.today))}get hostElement(){return o(this)}};s.style=c;export{s as q2_month_picker};
2
- //# sourceMappingURL=p-8e047dc7.entry.js.map
1
+ import{r as t,c as e,h as n,g as o}from"./p-a5f18e27.js";import{l as a,o as i}from"./p-c49e1a96.js";const r="*{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}.month-container{--comp-month-primary-background:var(--tct-btn-primary-background, var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e)));--comp-month-primary-font-color:var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--tct-white, var(--app-white, #ffffff))));--comp-month-primary-background:var(--tct-btn-secondary-background, var(--tct-btn-secondary-bg, var(--t-button-default-bg, #cccccc)));--comp-month-secondary-font-color:var(--tct-btn-secondary-font-color, var(--t-btn-secondary-font-color, var(--t-button-default-font-color, #2e2e2e)))}.month-container .navigation{display:flex;justify-content:space-between;flex-direction:row}.month-container .navigation .year-btn{padding:0 1rem;display:flex;align-items:center}.month-container .navigation .year-btn .year{margin-right:0.2rem}.month-container .navigation .year-btn .year-icon{--t-icon-stroke-width:2px;width:16px;height:16px;transition:all 0.3s ease-in-out}.month-container .navigation .year-btn .year-icon.on{transform:rotate(-180deg)}.month-container .navigation .month-controller{display:flex;align-items:center}.month-container .month-list{display:grid;grid-template-columns:auto auto auto}.month-container .month-list .month{display:flex;justify-content:center;align-items:center;padding:0.5rem 0}.month-container .month-list .month .month-button{border-radius:50%;aspect-ratio:1;width:50px;display:flex;justify-content:center;align-items:center}.month-container .month-list .month .month-button:hover{background:var(--comp-month-primary-background);color:var(--comp-month-secondary-font-color);cursor:pointer}.month-container .month-list .month .month-button:active,.month-container .month-list .month .month-button.active{background:var(--comp-month-primary-background);color:var(--comp-month-primary-font-color)}.month-container .today-label{padding:0.5rem 0;color:var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))))}";const c=r;const s=class{constructor(n){t(this,n);this.viewChange=e(this,"viewChange",7);this.toggleChange=e(this,"toggleChange",7);this.scheduledAfterRender=[];this.monthGrid=[[0,1,2],[3,4,5],[6,7,8],[9,10,11]];this.months=["January","February","March","April","May","June","July","August","September","October","November","December"].map((t=>({label:a(`tecton.element.calendar.months.${t}`),abbr:a(`tecton.element.calendar.months.abbr.${t}`)})));this.onMonthSelection=t=>{var e,n;const o=t.target.closest(".month-button");if((e=o===null||o===void 0?void 0:o.dataset)===null||e===void 0?void 0:e.index){this.selectMonth(Number((n=o===null||o===void 0?void 0:o.dataset)===null||n===void 0?void 0:n.index))}};this.onMonthKeydown=t=>{if(t.key==="Escape"||t.key==="Esc"){this.toggleChange.emit({close:true});return}const e=t.target.dataset.index;if(!e)return;if(t.key==="Enter"||t.key===" "){t.preventDefault();t.stopPropagation();this.selectMonth(Number(e))}else{const n=this.moveMonth(this.monthGrid,Number(e),t);this.focusMonth(n)}};this.moveMonth=(t,e,n)=>{const o=t.length;const a=t[0].length;const i=Math.floor(e/a);const r=e%a;const c=[i,r];if(n.key==="ArrowUp"){n.stopPropagation();n.preventDefault();return t[Math.max(0,c[0]-1)][c[1]]}else if(n.key==="ArrowDown"){n.stopPropagation();n.preventDefault();return t[Math.min(o-1,c[0]+1)][c[1]]}else if(n.key==="ArrowLeft"){n.stopPropagation();n.preventDefault();return Math.max(0,e-1)}else if(n.key==="ArrowRight"){n.stopPropagation();n.preventDefault();return Math.min(this.months.length-1,e+1)}else{return t[c[0]][c[1]]}};this.focusMonth=t=>{const e=this.hostElement.shadowRoot.querySelector(`.month-button[data-index="${t}"]`);if(e){this.focusedIndex=t;e.focus()}};this.selectMonth=t=>{var e,n,o;this.selectedIndex=t;this.focusedIndex=t;const a=this.hostElement.shadowRoot.querySelector(`.month-button[data-index="${t}"]`);(e=this.hostElement.shadowRoot.querySelectorAll(`.month-button`))===null||e===void 0?void 0:e.forEach((t=>t.classList.remove("active")));a===null||a===void 0?void 0:a.classList.add("active");a===null||a===void 0?void 0:a.focus();const i={view:"day",monthIndex:t,selectedYear:this.year};(o=(n=this.hostElement).onchange)===null||o===void 0?void 0:o.call(n,new CustomEvent("click",{bubbles:true,detail:i}));this.viewChange.emit(i)};this.selectYear=t=>{this.year=Math.max(1970,t)};this.year=Number((new Date).toLocaleString("en-US",{year:"numeric"}));this.disabledMonths=undefined;this.today=undefined;this.selectedIndex=0;this.focusedIndex=0;this.showYearLayer=false}componentDidRender(){var t;(t=this.scheduledAfterRender)===null||t===void 0?void 0:t.forEach((t=>t()));this.scheduledAfterRender=[]}componentDidLoad(){i(this.hostElement)}render(){return n("div",{key:"40462c486de4c00ec98af8e8a021d878b5d18617",class:"month-container",onKeyDown:this.onMonthKeydown},n("div",{key:"44694fbe172115218b0ddf0085d7778a030b8e7f",class:"navigation"},n("q2-btn",{key:"dedfdcc6e6cf89f5467d30a124e5bcea507f87ae",class:"year-btn",onClick:()=>this.viewChange.emit({view:"year",selectedYear:this.year})},n("span",{key:"0a15bed1946b1751d817b0ff447a70637a98e79f",class:"year"},this.year),n("q2-icon",{key:"6e2086593a5c4494cee2fe3e97a74cb2764159c5",class:"year-icon off",type:"chevron-down"})),n("div",{key:"ca2967da7d891974e39f0bad6ad65eecf508aa8a",class:"month-controller"},n("div",{key:"4bc0cc50ec1eb084bad404a8b4173ed16644d99c",class:"cal-year-prev-next"},n("q2-btn",{key:"dcb43f067ee807ce10cd013cd1a658ce39982b0b",label:a("tecton.element.calendar.previousYear"),"hide-label":true,class:"cal-nav-btn prev-year","test-id":"previousYearButton",onClick:()=>this.selectYear(this.year-1)},n("q2-icon",{key:"7a293700c3c5e9579abed00a017e13531bd9d25c",type:"arrow-left"})),n("q2-btn",{key:"2b4964e124d514a05697f44aa0c88071be3c8b29",label:a("tecton.element.calendar.nextYear"),"hide-label":true,class:"cal-nav-btn next-year","test-id":"nextYearButton",onClick:()=>this.selectYear(this.year+1)},n("q2-icon",{key:"fab7dd9246253a50df0eb6a5713749f20da51a75",type:"arrow-right"}))))),n("div",{key:"ea3eb812f453f6c482283876354723883f8ca72b",class:"month-list",onClick:this.onMonthSelection},this.months.map(((t,e)=>n("div",{class:"month"},n("span",{role:"button",class:"month-button","data-index":e,"aria-label":t.label,tabindex:e===this.focusedIndex?0:-1},t.abbr))))),this.today&&n("div",{key:"212f3484b4479d4dee521216525738f3f3c4e806",class:"today-label"},a("tecton.element.calendar.today"),": ",this.today))}get hostElement(){return o(this)}};s.style=c;export{s as q2_month_picker};
2
+ //# sourceMappingURL=p-d262377b.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,g as i}from"./p-a5f18e27.js";import{f as l,l as s}from"./p-8ba6e825.js";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{display:block}::slotted([slot]){display:flex;align-items:center;--tct-icon-size:var(--tct-detail-label-icon-size, 16px)}.detail{column-gap:var(--tct-detail-gap-column, var(--app-scale-1x, 5px));row-gap:var(--tct-detail-gap-row, 0px)}.detail-block{display:flex;width:100%}.detail-inline{display:flex}.detail-horizontal{align-items:var(--tct-detail-vertical-alignment, baseline);flex-direction:row}.detail-stacked{flex-direction:column}.detail-stacked-alignment-left{align-items:flex-start}.detail-stacked-alignment-right{align-items:flex-end}.label{flex:1;text-align:left;line-height:1.5;color:var(--tct-detail-label-font-color, #141430)}.label-size-xsmall{color:var(--tct-detail-label-xsmall-font-color, #6f6f82);font-size:var(--tct-detail-label-xsmall-font-size, 14px)}.label-size-small{color:var(--tct-detail-label-small-font-color);font-size:var(--tct-detail-label-small-font-size, 14px)}.label-size-medium{color:var(--tct-detail-label-medium-font-color);font-size:var(--tct-detail-label-medium-font-size, 14px)}.label-size-large{color:var(--tct-detail-label-large-font-color);font-size:var(--tct-detail-label-large-font-size, 16px)}.label-size-xlarge{color:var(--tct-detail-label-xlarge-font-color);font-size:var(--tct-detail-label-xlarge-font-size, 18px)}.label-size-inline{font-size:var(--tct-detail-label-inline-font-size, 1em);color:inherit}.description{flex:1;display:flex;align-items:center;line-height:1.5;color:var(--tct-detail-description-font-color, #141430);column-gap:var(--tct-detail-description-gap-column, var(--app-scale-1x, 5px))}.description-alignment-right{justify-content:flex-end}.description-size-xsmall{color:var(--tct-detail-description-xsmall-font-color, #6f6f82);font-size:var(--tct-detail-description-xsmall-font-size, 14px)}.description-size-small{color:var(--tct-detail-description-small-font-color);font-size:var(--tct-detail-description-small-font-size, 14px)}.description-size-medium{color:var(--tct-detail-description-medium-font-color);font-size:var(--tct-detail-description-medium-font-size, 24px)}.description-size-large{color:var(--tct-detail-description-large-font-color);font-size:var(--tct-detail-description-large-font-size, 28px)}.description-size-xlarge{color:var(--tct-detail-description-xlarge-font-color);font-size:var(--tct-detail-description-xlarge-font-size, 32px)}.description-size-inline{font-size:var(--tct-detail-description-inline-font-size, 1em);color:inherit}";const a=o;const n=class{constructor(e){t(this,e);this.alignment="left";this.description=undefined;this.label=undefined;this.size=undefined;this.stacked=false}componentWillLoad(){this.setSlotSizeProps()}get detailClasses(){const t=["detail"];if(this.size){t.push(`detail-block`)}else{t.push(`detail-inline`)}if(this.stacked||this.onlyHasDescripiton||this.onlyHasLabel){t.push("detail-stacked",`detail-stacked-alignment-${this.alignment}`)}else{t.push("detail-horizontal")}return t.join(" ")}get descriptionClasses(){const t=["description"];if(this.size){t.push(`description-size-${this.size}`)}else{t.push(`description-size-inline`)}if(!this.stacked){t.push(`description-alignment-right`)}return t.join(" ")}get hasDescripiton(){return!!this.description||this.hasDefaultSlotContent}get hasLabel(){return!!this.label||this.hasLabelSlotContent}get hasDefaultSlotContent(){const t=!!this.hostElement.innerHTML.trim();const e=this.hostElement.querySelectorAll(":scope > [slot]").length;const i=this.hostElement.childNodes.length;return t&&i>e}get hasLabelSlotContent(){return l(this.hostElement,"label")}get labelClasses(){const t=["label"];if(this.size){t.push(`label-size-${this.size}`)}else{t.push(`label-size-inline`)}if(!this.stacked){t.push(`label-align-left`)}return t.join(" ")}get onlyHasDescripiton(){return this.hasDescripiton&&!this.hasLabel}get onlyHasLabel(){return this.hasLabel&&!this.hasDescripiton}setSlotSizeProps(){const t=Array.from(this.hostElement.querySelectorAll(':scope > *:not([slot]), :scope > [slot="label"] > *'));t.forEach((t=>{t.slotSize=this.size}))}render(){return e("div",{key:"2c7660548c3c51dda28bef688513c3f586ddf7fd",class:this.detailClasses},this.hasLabel&&e("div",{key:"2c7a56aae53d6e0edd90effd4f1dbdb93ef8b480",class:this.labelClasses,"aria-describedby":!!this.description?"label-description":undefined},!!this.label?s(this.label):this.hasLabelSlotContent?e("slot",{name:"label"}):""),this.hasDescripiton&&e("div",{key:"f1f1cb3d6d207c9185edf7a3f1a816fac43b9d7c",id:"label-description",class:this.descriptionClasses},!!this.description?s(this.description):this.hasDefaultSlotContent?e("slot",null):""))}get hostElement(){return i(this)}};n.style=a;export{n as q2_detail};
2
- //# sourceMappingURL=p-49b6b300.entry.js.map
1
+ import{r as t,h as e,g as i}from"./p-a5f18e27.js";import{f as l,l as s}from"./p-c49e1a96.js";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{display:block}::slotted([slot]){display:flex;align-items:center;--tct-icon-size:var(--tct-detail-label-icon-size, 16px)}.detail{column-gap:var(--tct-detail-gap-column, var(--app-scale-1x, 5px));row-gap:var(--tct-detail-gap-row, 0px)}.detail-block{display:flex;width:100%}.detail-inline{display:flex}.detail-horizontal{align-items:var(--tct-detail-vertical-alignment, baseline);flex-direction:row}.detail-stacked{flex-direction:column}.detail-stacked-alignment-left{align-items:flex-start}.detail-stacked-alignment-right{align-items:flex-end}.label{flex:1;text-align:left;line-height:1.5;color:var(--tct-detail-label-font-color, #141430)}.label-size-xsmall{color:var(--tct-detail-label-xsmall-font-color, #6f6f82);font-size:var(--tct-detail-label-xsmall-font-size, 14px)}.label-size-small{color:var(--tct-detail-label-small-font-color);font-size:var(--tct-detail-label-small-font-size, 14px)}.label-size-medium{color:var(--tct-detail-label-medium-font-color);font-size:var(--tct-detail-label-medium-font-size, 14px)}.label-size-large{color:var(--tct-detail-label-large-font-color);font-size:var(--tct-detail-label-large-font-size, 16px)}.label-size-xlarge{color:var(--tct-detail-label-xlarge-font-color);font-size:var(--tct-detail-label-xlarge-font-size, 18px)}.label-size-inline{font-size:var(--tct-detail-label-inline-font-size, 1em);color:inherit}.description{flex:1;display:flex;align-items:center;line-height:1.5;color:var(--tct-detail-description-font-color, #141430);column-gap:var(--tct-detail-description-gap-column, var(--app-scale-1x, 5px))}.description-alignment-right{justify-content:flex-end}.description-size-xsmall{color:var(--tct-detail-description-xsmall-font-color, #6f6f82);font-size:var(--tct-detail-description-xsmall-font-size, 14px)}.description-size-small{color:var(--tct-detail-description-small-font-color);font-size:var(--tct-detail-description-small-font-size, 14px)}.description-size-medium{color:var(--tct-detail-description-medium-font-color);font-size:var(--tct-detail-description-medium-font-size, 24px)}.description-size-large{color:var(--tct-detail-description-large-font-color);font-size:var(--tct-detail-description-large-font-size, 28px)}.description-size-xlarge{color:var(--tct-detail-description-xlarge-font-color);font-size:var(--tct-detail-description-xlarge-font-size, 32px)}.description-size-inline{font-size:var(--tct-detail-description-inline-font-size, 1em);color:inherit}";const a=o;const n=class{constructor(e){t(this,e);this.alignment="left";this.description=undefined;this.label=undefined;this.size=undefined;this.stacked=false}componentWillLoad(){this.setSlotSizeProps()}get detailClasses(){const t=["detail"];if(this.size){t.push(`detail-block`)}else{t.push(`detail-inline`)}if(this.stacked||this.onlyHasDescripiton||this.onlyHasLabel){t.push("detail-stacked",`detail-stacked-alignment-${this.alignment}`)}else{t.push("detail-horizontal")}return t.join(" ")}get descriptionClasses(){const t=["description"];if(this.size){t.push(`description-size-${this.size}`)}else{t.push(`description-size-inline`)}if(!this.stacked){t.push(`description-alignment-right`)}return t.join(" ")}get hasDescripiton(){return!!this.description||this.hasDefaultSlotContent}get hasLabel(){return!!this.label||this.hasLabelSlotContent}get hasDefaultSlotContent(){const t=!!this.hostElement.innerHTML.trim();const e=this.hostElement.querySelectorAll(":scope > [slot]").length;const i=this.hostElement.childNodes.length;return t&&i>e}get hasLabelSlotContent(){return l(this.hostElement,"label")}get labelClasses(){const t=["label"];if(this.size){t.push(`label-size-${this.size}`)}else{t.push(`label-size-inline`)}if(!this.stacked){t.push(`label-align-left`)}return t.join(" ")}get onlyHasDescripiton(){return this.hasDescripiton&&!this.hasLabel}get onlyHasLabel(){return this.hasLabel&&!this.hasDescripiton}setSlotSizeProps(){const t=Array.from(this.hostElement.querySelectorAll(':scope > *:not([slot]), :scope > [slot="label"] > *'));t.forEach((t=>{t.slotSize=this.size}))}render(){return e("div",{key:"2c7660548c3c51dda28bef688513c3f586ddf7fd",class:this.detailClasses},this.hasLabel&&e("div",{key:"2c7a56aae53d6e0edd90effd4f1dbdb93ef8b480",class:this.labelClasses,"aria-describedby":!!this.description?"label-description":undefined},!!this.label?s(this.label):this.hasLabelSlotContent?e("slot",{name:"label"}):""),this.hasDescripiton&&e("div",{key:"f1f1cb3d6d207c9185edf7a3f1a816fac43b9d7c",id:"label-description",class:this.descriptionClasses},!!this.description?s(this.description):this.hasDefaultSlotContent?e("slot",null):""))}get hostElement(){return i(this)}};n.style=a;export{n as q2_detail};
2
+ //# sourceMappingURL=p-d3af153e.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as o,g as i}from"./p-a5f18e27.js";import{o as e,i as r}from"./p-8ba6e825.js";const a='*{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:inline-block}:host([block]){display:block}.tooltip{--comp-background:var(--tct-tooltip-background, var(--tct-tooltip-background-color, var(--t-tooltip-background-color, var(--t-top-a3, rgba(13, 13, 13, 0.85)))));--comp-offset-default:calc(var(--app-scale-1x, 5px) * -1);--comp-offset:var(--tct-tooltip-offset, var(--t-tooltip-offset, var(--comp-offset-default)));--comp-position:var(--tct-tooltip-position, var(--t-tooltip-position, var(--app-scale-1x, 5px)));--comp-body-offset-default:calc(var(--app-scale-3x, 15px) * -1);--comp-body-offset:var(--tct-tooltip-body-offset, var(--t-tooltip-body-offset, var(--comp-body-offset-default)));--comp-duration:var(--tct-tooltip-transition-duration, var(--t-tooltip-transition-duration, var(--app-duration-1, 0.2s)));--comp-visible-duration:var(--tct-tooltip-transition-visible-duration, var(--t-tooltip-transition-visible-duration, 2s));--comp-delay:var(--tct-tooltip-transition-delay, var(--t-tooltip-transition-delay, 0s));display:inline-block;position:relative}.tooltip:hover{--comp-delay:var(--tct-tooltip-transition-delay, var(--t-tooltip-transition-delay, 1s))}.tooltip:before{position:absolute;z-index:2;width:0;height:0;color:var(--comp-background);pointer-events:none;content:"";border:var(--tct-tooltip-arrow-size, var(--t-tooltip-arrow-size, var(--app-scale-1x, 5px))) solid transparent}.tooltip:after{--comp-padding:var(--app-scale-1x, 5px) 8px;position:absolute;z-index:1;padding:var(--tct-tooltip-padding, var(--t-tooltip-padding, var(--comp-padding)));font-weight:var(--tct-tooltip-font-weight, var(--t-tooltip-font-weight, 600));font-size:var(--tct-tooltip-font-size, var(--t-tooltip-font-size, var(--app-font-size-small, 12px)));line-height:1.5;color:var(--tct-tooltip-color, var(--t-tooltip-color, var(--app-white, #ffffff)));text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:var(--comp-background);border-radius:var(--tct-tooltip-border-radius, var(--t-tooltip-border-radius, var(--app-border-radius-1, 3px)))}.tooltip:before,.tooltip:after{display:inline-block;visibility:hidden;opacity:0;transition:all var(--comp-duration) ease-in-out var(--comp-delay)}:host([block]) .tooltip{display:block}.tooltip:hover:before,.tooltip:hover:after,.tooltip.has-keyboard-focus:focus-within:before,.tooltip.has-keyboard-focus:focus-within:after,:host([persistent]) .tooltip:before,:host([persistent]) .tooltip:after{text-decoration:none;visibility:visible;opacity:1}@keyframes tooltippedFade{from{opacity:0}to{opacity:1}}.tooltip.has-generic-focus:focus-within:before,.tooltip.has-generic-focus:focus-within:after{visibility:visible;opacity:0;transition:none;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-name:tooltippedFade, tooltippedFade;animation-direction:normal, reverse;animation-duration:var(--comp-duration);animation-delay:0ms, calc(var(--comp-visible-duration) + var(--comp-duration))}.tooltip.has-generic-focus-out:before,.tooltip.has-generic-focus-out:after{visibility:visible;opacity:0;transition:none;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-name:tooltippedFade;animation-direction:reverse;animation-duration:var(--comp-duration)}:host([multiline]) .tooltip:after{width:max-content;max-width:var(--tct-tooltip-max-width, var(--t-tooltip-max-width, 200px));word-break:break-word;word-wrap:normal;white-space:pre-line;border-collapse:separate;text-align:left}:host([position=s]) :host([multiline]) .tooltip:after,:host([position=n]) :host([multiline]) .tooltip:after{right:auto;left:50%;transform:translateX(-50%)}:host([position=w]) :host([multiline]) .tooltip:after,:host([position=e]) :host([multiline]) .tooltip:after{right:100%}:host([multiline]) .tooltip:hover:after,:host([multiline]) .tooltip:active:after,:host([multiline]) .tooltip:focus:after{display:table-cell}:host([multiline]) .tooltip:focus-within:after{display:table-cell}:host([position=s]) .tooltip:after,:host([position=se]) .tooltip:after,:host([position=sw]) .tooltip:after{top:100%;right:50%;margin-top:var(--comp-position)}:host([position=s]) .tooltip:before,:host([position=se]) .tooltip:before,:host([position=sw]) .tooltip:before{top:auto;right:50%;bottom:var(--comp-offset);margin-right:var(--comp-offset);border-bottom-color:var(--comp-background)}:host([position=n]) .tooltip:after,:host([position=ne]) .tooltip:after,:host([position=nw]) .tooltip:after{right:50%;bottom:100%;margin-bottom:var(--comp-position)}:host([position=n]) .tooltip:before,:host([position=ne]) .tooltip:before,:host([position=nw]) .tooltip:before{top:var(--comp-offset);right:50%;bottom:auto;margin-right:var(--comp-offset);border-top-color:var(--comp-background)}:host([position=se]) .tooltip:after,:host([position=ne]) .tooltip:after{right:auto;left:50%;margin-left:var(--comp-body-offset)}:host([position=sw]) .tooltip:after{margin-right:var(--comp-body-offset)}:host([position=nw]) .tooltip:after{margin-right:var(--comp-body-offset)}:host([position=s]) .tooltip:after,:host([position=n]) .tooltip:after{transform:translateX(50%)}:host([position=w]) .tooltip:after{right:100%;bottom:50%;margin-right:var(--comp-position);transform:translateY(50%)}:host([position=w]) .tooltip:before{top:50%;bottom:50%;left:var(--comp-offset);margin-top:var(--comp-offset);border-left-color:var(--comp-background)}:host([position=e]) .tooltip:after{bottom:50%;left:100%;margin-left:var(--comp-position);transform:translateY(50%)}:host([position=e]) .tooltip:before{top:50%;right:var(--comp-offset);bottom:50%;margin-top:var(--comp-offset);border-right-color:var(--comp-background)}';const n=a;const s=class{constructor(o){t(this,o);this.animationEndCount=0;this.block=undefined;this.focusable=false;this.immediate=undefined;this.label=undefined;this.multiline=undefined;this.persistent=undefined;this.position="n";this.focusClass=undefined}componentDidLoad(){e(this.hostElement)}get shouldBeVisible(){if(this.persistent)return true;return this.hostElement.matches(":hover, :focus-within")}checkFocusClass(){if(!this.shouldBeVisible)return;const t=!!this.findFocusVisibleElement(document.activeElement);this.focusClass=t?"has-keyboard-focus":"has-generic-focus";if(t)return}hideTooltip(){if(this.focusClass==="has-generic-focus")this.focusClass="has-generic-focus-out";else this.focusClass=null}animationEndHandler(){this.animationEndCount=this.animationEndCount+1;const{focusClass:t,animationEndCount:o}=this;if(t==="has-generic-focus-out"||t==="has-generic-focus"&&o===4){this.focusClass=null;this.animationEndCount=0}}findFocusVisibleElement(t){if(!t)return;if(t.shadowRoot)t=this.findFocusVisibleElement(t.shadowRoot.activeElement);return(t===null||t===void 0?void 0:t.matches(":focus-visible"))?t:null}keyUpHandler(t){switch(t.key){case"Esc":case"Escape":this.hideTooltip();break}}focusCaptureHandler(){this.checkFocusClass()}focusHandler(t){if(!r(t,this.hostElement))return;if(!this.focusable)return;this.tooltipElement.focus()}focusOutHandler(){if(this.shouldBeVisible)return;if(this.focusClass==="has-generic-focus")this.focusClass="has-generic-focus-out";else this.focusClass=null}render(){const{focusClass:t}=this;const i=["tooltip"];if(t)i.push(t);return this.label?o("div",{tabindex:this.focusable?0:undefined,ref:t=>this.tooltipElement=t,class:i.join(" "),"aria-label":this.label,onAnimationEnd:()=>this.animationEndHandler(),role:"tooltip","test-id":"tooltipContainer"},o("slot",null)):o("slot",null)}get hostElement(){return i(this)}};s.style=n;export{s as q2_tooltip};
2
- //# sourceMappingURL=p-a39898b8.entry.js.map
1
+ import{r as t,h as o,g as i}from"./p-a5f18e27.js";import{o as e,i as r}from"./p-c49e1a96.js";const a='*{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:inline-block}:host([block]){display:block}.tooltip{--comp-background:var(--tct-tooltip-background, var(--tct-tooltip-background-color, var(--t-tooltip-background-color, var(--t-top-a3, rgba(13, 13, 13, 0.85)))));--comp-offset-default:calc(var(--app-scale-1x, 5px) * -1);--comp-offset:var(--tct-tooltip-offset, var(--t-tooltip-offset, var(--comp-offset-default)));--comp-position:var(--tct-tooltip-position, var(--t-tooltip-position, var(--app-scale-1x, 5px)));--comp-body-offset-default:calc(var(--app-scale-3x, 15px) * -1);--comp-body-offset:var(--tct-tooltip-body-offset, var(--t-tooltip-body-offset, var(--comp-body-offset-default)));--comp-duration:var(--tct-tooltip-transition-duration, var(--t-tooltip-transition-duration, var(--app-duration-1, 0.2s)));--comp-visible-duration:var(--tct-tooltip-transition-visible-duration, var(--t-tooltip-transition-visible-duration, 2s));--comp-delay:var(--tct-tooltip-transition-delay, var(--t-tooltip-transition-delay, 0s));display:inline-block;position:relative}.tooltip:hover{--comp-delay:var(--tct-tooltip-transition-delay, var(--t-tooltip-transition-delay, 1s))}.tooltip:before{position:absolute;z-index:2;width:0;height:0;color:var(--comp-background);pointer-events:none;content:"";border:var(--tct-tooltip-arrow-size, var(--t-tooltip-arrow-size, var(--app-scale-1x, 5px))) solid transparent}.tooltip:after{--comp-padding:var(--app-scale-1x, 5px) 8px;position:absolute;z-index:1;padding:var(--tct-tooltip-padding, var(--t-tooltip-padding, var(--comp-padding)));font-weight:var(--tct-tooltip-font-weight, var(--t-tooltip-font-weight, 600));font-size:var(--tct-tooltip-font-size, var(--t-tooltip-font-size, var(--app-font-size-small, 12px)));line-height:1.5;color:var(--tct-tooltip-color, var(--t-tooltip-color, var(--app-white, #ffffff)));text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:var(--comp-background);border-radius:var(--tct-tooltip-border-radius, var(--t-tooltip-border-radius, var(--app-border-radius-1, 3px)))}.tooltip:before,.tooltip:after{display:inline-block;visibility:hidden;opacity:0;transition:all var(--comp-duration) ease-in-out var(--comp-delay)}:host([block]) .tooltip{display:block}.tooltip:hover:before,.tooltip:hover:after,.tooltip.has-keyboard-focus:focus-within:before,.tooltip.has-keyboard-focus:focus-within:after,:host([persistent]) .tooltip:before,:host([persistent]) .tooltip:after{text-decoration:none;visibility:visible;opacity:1}@keyframes tooltippedFade{from{opacity:0}to{opacity:1}}.tooltip.has-generic-focus:focus-within:before,.tooltip.has-generic-focus:focus-within:after{visibility:visible;opacity:0;transition:none;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-name:tooltippedFade, tooltippedFade;animation-direction:normal, reverse;animation-duration:var(--comp-duration);animation-delay:0ms, calc(var(--comp-visible-duration) + var(--comp-duration))}.tooltip.has-generic-focus-out:before,.tooltip.has-generic-focus-out:after{visibility:visible;opacity:0;transition:none;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-name:tooltippedFade;animation-direction:reverse;animation-duration:var(--comp-duration)}:host([multiline]) .tooltip:after{width:max-content;max-width:var(--tct-tooltip-max-width, var(--t-tooltip-max-width, 200px));word-break:break-word;word-wrap:normal;white-space:pre-line;border-collapse:separate;text-align:left}:host([position=s]) :host([multiline]) .tooltip:after,:host([position=n]) :host([multiline]) .tooltip:after{right:auto;left:50%;transform:translateX(-50%)}:host([position=w]) :host([multiline]) .tooltip:after,:host([position=e]) :host([multiline]) .tooltip:after{right:100%}:host([multiline]) .tooltip:hover:after,:host([multiline]) .tooltip:active:after,:host([multiline]) .tooltip:focus:after{display:table-cell}:host([multiline]) .tooltip:focus-within:after{display:table-cell}:host([position=s]) .tooltip:after,:host([position=se]) .tooltip:after,:host([position=sw]) .tooltip:after{top:100%;right:50%;margin-top:var(--comp-position)}:host([position=s]) .tooltip:before,:host([position=se]) .tooltip:before,:host([position=sw]) .tooltip:before{top:auto;right:50%;bottom:var(--comp-offset);margin-right:var(--comp-offset);border-bottom-color:var(--comp-background)}:host([position=n]) .tooltip:after,:host([position=ne]) .tooltip:after,:host([position=nw]) .tooltip:after{right:50%;bottom:100%;margin-bottom:var(--comp-position)}:host([position=n]) .tooltip:before,:host([position=ne]) .tooltip:before,:host([position=nw]) .tooltip:before{top:var(--comp-offset);right:50%;bottom:auto;margin-right:var(--comp-offset);border-top-color:var(--comp-background)}:host([position=se]) .tooltip:after,:host([position=ne]) .tooltip:after{right:auto;left:50%;margin-left:var(--comp-body-offset)}:host([position=sw]) .tooltip:after{margin-right:var(--comp-body-offset)}:host([position=nw]) .tooltip:after{margin-right:var(--comp-body-offset)}:host([position=s]) .tooltip:after,:host([position=n]) .tooltip:after{transform:translateX(50%)}:host([position=w]) .tooltip:after{right:100%;bottom:50%;margin-right:var(--comp-position);transform:translateY(50%)}:host([position=w]) .tooltip:before{top:50%;bottom:50%;left:var(--comp-offset);margin-top:var(--comp-offset);border-left-color:var(--comp-background)}:host([position=e]) .tooltip:after{bottom:50%;left:100%;margin-left:var(--comp-position);transform:translateY(50%)}:host([position=e]) .tooltip:before{top:50%;right:var(--comp-offset);bottom:50%;margin-top:var(--comp-offset);border-right-color:var(--comp-background)}';const n=a;const s=class{constructor(o){t(this,o);this.animationEndCount=0;this.block=undefined;this.focusable=false;this.immediate=undefined;this.label=undefined;this.multiline=undefined;this.persistent=undefined;this.position="n";this.focusClass=undefined}componentDidLoad(){e(this.hostElement)}get shouldBeVisible(){if(this.persistent)return true;return this.hostElement.matches(":hover, :focus-within")}checkFocusClass(){if(!this.shouldBeVisible)return;const t=!!this.findFocusVisibleElement(document.activeElement);this.focusClass=t?"has-keyboard-focus":"has-generic-focus";if(t)return}hideTooltip(){if(this.focusClass==="has-generic-focus")this.focusClass="has-generic-focus-out";else this.focusClass=null}animationEndHandler(){this.animationEndCount=this.animationEndCount+1;const{focusClass:t,animationEndCount:o}=this;if(t==="has-generic-focus-out"||t==="has-generic-focus"&&o===4){this.focusClass=null;this.animationEndCount=0}}findFocusVisibleElement(t){if(!t)return;if(t.shadowRoot)t=this.findFocusVisibleElement(t.shadowRoot.activeElement);return(t===null||t===void 0?void 0:t.matches(":focus-visible"))?t:null}keyUpHandler(t){switch(t.key){case"Esc":case"Escape":this.hideTooltip();break}}focusCaptureHandler(){this.checkFocusClass()}focusHandler(t){if(!r(t,this.hostElement))return;if(!this.focusable)return;this.tooltipElement.focus()}focusOutHandler(){if(this.shouldBeVisible)return;if(this.focusClass==="has-generic-focus")this.focusClass="has-generic-focus-out";else this.focusClass=null}render(){const{focusClass:t}=this;const i=["tooltip"];if(t)i.push(t);return this.label?o("div",{tabindex:this.focusable?0:undefined,ref:t=>this.tooltipElement=t,class:i.join(" "),"aria-label":this.label,onAnimationEnd:()=>this.animationEndHandler(),role:"tooltip","test-id":"tooltipContainer"},o("slot",null)):o("slot",null)}get hostElement(){return i(this)}};s.style=n;export{s as q2_tooltip};
2
+ //# sourceMappingURL=p-d8b1ab7f.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,g as o}from"./p-a5f18e27.js";import{h as r,l as n}from"./p-8ba6e825.js";const i="*{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}.dropdown-separator{--comp-default-separator-margin:0 var(--tct-scale-1, var(--app-scale-3x, 15px));margin:var(--tct-dropdown-separator-margin, var(--t-dropdown-separator-margin, var(--comp-default-separator-margin)));border-bottom:1px solid var(--tct-dropdown-item-separator-color, var(--t-dropdown-item-separator-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))}.dropdown-item-wrapper{display:flex}.dropdown-item{min-height:44px;flex:1 1 100%;padding:var(--tct-dropdown-item-padding, var(--t-dropdown-item-padding, 2px))}.dropdown-item-content{--comp-default-content-padding:12px var(--app-scale-3x, 15px);padding:var(--tct-dropdown-item-content-padding, var(--t-dropdown-item-content-padding, var(--comp-default-content-padding)));text-align:left;background:var(--tct-dropdown-item-background, var(--tct-dropdown-item-bg, var(--t-dropdown-item-bg, var(--tct-white, var(--t-base, var(--app-white, #ffffff))))));color:var(--tct-dropdown-item-font-color, var(--t-dropdown-item-font-color, inherit));transition:background-color var(--tct-dropdown-item-content-tween, var(--t-dropdown-item-content-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));overflow:hidden;text-overflow:ellipsis;flex:1}:host(:not([disabled])) .dropdown-item-content:hover,:host(:not([disabled])) .dropdown-item:focus-within .dropdown-item-content{background:var(--tct-dropdown-item-hover-background, var(--tct-dropdown-item-selected-bg, var(--t-dropdown-item-selected-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, var(--t-base, #f2f2f2))))))));color:var(--tct-dropdown-item-hover-color, var(--tct-dropdown-item-selected-font-color, var(--t-dropdown-item-selected-font-color, inherit)))}.remove-dropdown-item{flex:0 0 44px;margin:2px}";const d=i;const a=class{constructor(e){t(this,e);this.onItemClick=t=>{t.stopImmediatePropagation();this.hostElement.dispatchEvent(new CustomEvent("click",{detail:{type:"select",value:this.value||""},bubbles:true}))};this.onItemKeydown=t=>{if(["ArrowRight","Right"].includes(t.key)){this.focusRemoveBtn()}};this.onItemFocus=t=>{t.stopPropagation()};this.onRemoveBtnClick=t=>{t.stopImmediatePropagation();this.hostElement.dispatchEvent(new CustomEvent("click",{detail:{type:"remove",value:this.value||""},bubbles:true}))};this.onRemoveBtnKeydown=t=>{if(["ArrowLeft","Left"].includes(t.key)){this.focusItem()}};this.onRemoveBtnFocus=t=>{t.stopPropagation()};this.disabled=undefined;this.label=undefined;this.removable=undefined;this.separator=undefined;this.value=undefined;this.ariaLabel=undefined}componentWillLoad(){r(this)}ariaLabelObserver(){r(this)}get removeLabel(){return n("tecton.element.dropdownItem.remove",[this.label||""])}get dropdownItemBtn(){return this.hostElement.shadowRoot.querySelector(".dropdown-item")}get innerLabel(){return this.label||this.hostElement.textContent}get removeBtn(){return this.hostElement.shadowRoot.querySelector(".remove-dropdown-item")}onHostElementFocus(){if(event.target===this.hostElement){this.focusItem()}}focusItem(){this.dropdownItemBtn.dispatchEvent(new FocusEvent("focus",{bubbles:false}))}focusRemoveBtn(){this.removeBtn&&this.removeBtn.dispatchEvent(new FocusEvent("focus",{bubbles:false}))}render(){if(!!this.separator){return this.separatorDOM()}return this.itemDOM()}separatorDOM(){return e("div",{class:"dropdown-separator",role:"separator","test-id":"dropdownItemSeparator"})}itemDOM(){return e("div",{class:"dropdown-item-wrapper"},e("q2-btn",{class:"dropdown-item",label:this.innerLabel,"hide-label":true,disabled:!!this.disabled,role:"menuitem",onClick:this.onItemClick,onKeyDown:this.onItemKeydown,onFocus:this.onItemFocus,"test-id":"dropdownItem"},e("div",{class:"dropdown-item-content"},e("slot",null))),!!this.removable?e("q2-btn",{class:"remove-dropdown-item",label:this.removeLabel,"hide-label":true,disabled:!!this.disabled,role:"menuitem",onClick:this.onRemoveBtnClick,onKeyDown:this.onRemoveBtnKeydown,onFocus:this.onRemoveBtnFocus,"test-id":"removeDropdownItem"},e("q2-icon",{type:"close"})):"")}get hostElement(){return o(this)}static get watchers(){return{ariaLabel:["ariaLabelObserver"]}}};a.style=d;export{a as q2_dropdown_item};
2
- //# sourceMappingURL=p-33ac1c35.entry.js.map
1
+ import{r as t,h as e,g as o}from"./p-a5f18e27.js";import{h as r,l as n}from"./p-c49e1a96.js";const i="*{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}.dropdown-separator{--comp-default-separator-margin:0 var(--tct-scale-1, var(--app-scale-3x, 15px));margin:var(--tct-dropdown-separator-margin, var(--t-dropdown-separator-margin, var(--comp-default-separator-margin)));border-bottom:1px solid var(--tct-dropdown-item-separator-color, var(--t-dropdown-item-separator-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))}.dropdown-item-wrapper{display:flex}.dropdown-item{min-height:44px;flex:1 1 100%;padding:var(--tct-dropdown-item-padding, var(--t-dropdown-item-padding, 2px))}.dropdown-item-content{--comp-default-content-padding:12px var(--app-scale-3x, 15px);padding:var(--tct-dropdown-item-content-padding, var(--t-dropdown-item-content-padding, var(--comp-default-content-padding)));text-align:left;background:var(--tct-dropdown-item-background, var(--tct-dropdown-item-bg, var(--t-dropdown-item-bg, var(--tct-white, var(--t-base, var(--app-white, #ffffff))))));color:var(--tct-dropdown-item-font-color, var(--t-dropdown-item-font-color, inherit));transition:background-color var(--tct-dropdown-item-content-tween, var(--t-dropdown-item-content-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));overflow:hidden;text-overflow:ellipsis;flex:1}:host(:not([disabled])) .dropdown-item-content:hover,:host(:not([disabled])) .dropdown-item:focus-within .dropdown-item-content{background:var(--tct-dropdown-item-hover-background, var(--tct-dropdown-item-selected-bg, var(--t-dropdown-item-selected-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, var(--t-base, #f2f2f2))))))));color:var(--tct-dropdown-item-hover-color, var(--tct-dropdown-item-selected-font-color, var(--t-dropdown-item-selected-font-color, inherit)))}.remove-dropdown-item{flex:0 0 44px;margin:2px}";const d=i;const a=class{constructor(e){t(this,e);this.onItemClick=t=>{t.stopImmediatePropagation();this.hostElement.dispatchEvent(new CustomEvent("click",{detail:{type:"select",value:this.value||""},bubbles:true}))};this.onItemKeydown=t=>{if(["ArrowRight","Right"].includes(t.key)){this.focusRemoveBtn()}};this.onItemFocus=t=>{t.stopPropagation()};this.onRemoveBtnClick=t=>{t.stopImmediatePropagation();this.hostElement.dispatchEvent(new CustomEvent("click",{detail:{type:"remove",value:this.value||""},bubbles:true}))};this.onRemoveBtnKeydown=t=>{if(["ArrowLeft","Left"].includes(t.key)){this.focusItem()}};this.onRemoveBtnFocus=t=>{t.stopPropagation()};this.disabled=undefined;this.label=undefined;this.removable=undefined;this.separator=undefined;this.value=undefined;this.ariaLabel=undefined}componentWillLoad(){r(this)}ariaLabelObserver(){r(this)}get removeLabel(){return n("tecton.element.dropdownItem.remove",[this.label||""])}get dropdownItemBtn(){return this.hostElement.shadowRoot.querySelector(".dropdown-item")}get innerLabel(){return this.label||this.hostElement.textContent}get removeBtn(){return this.hostElement.shadowRoot.querySelector(".remove-dropdown-item")}onHostElementFocus(){if(event.target===this.hostElement){this.focusItem()}}focusItem(){this.dropdownItemBtn.dispatchEvent(new FocusEvent("focus",{bubbles:false}))}focusRemoveBtn(){this.removeBtn&&this.removeBtn.dispatchEvent(new FocusEvent("focus",{bubbles:false}))}render(){if(!!this.separator){return this.separatorDOM()}return this.itemDOM()}separatorDOM(){return e("div",{class:"dropdown-separator",role:"separator","test-id":"dropdownItemSeparator"})}itemDOM(){return e("div",{class:"dropdown-item-wrapper"},e("q2-btn",{class:"dropdown-item",label:this.innerLabel,"hide-label":true,disabled:!!this.disabled,role:"menuitem",onClick:this.onItemClick,onKeyDown:this.onItemKeydown,onFocus:this.onItemFocus,"test-id":"dropdownItem"},e("div",{class:"dropdown-item-content"},e("slot",null))),!!this.removable?e("q2-btn",{class:"remove-dropdown-item",label:this.removeLabel,"hide-label":true,disabled:!!this.disabled,role:"menuitem",onClick:this.onRemoveBtnClick,onKeyDown:this.onRemoveBtnKeydown,onFocus:this.onRemoveBtnFocus,"test-id":"removeDropdownItem"},e("q2-icon",{type:"close"})):"")}get hostElement(){return o(this)}static get watchers(){return{ariaLabel:["ariaLabelObserver"]}}};a.style=d;export{a as q2_dropdown_item};
2
+ //# sourceMappingURL=p-dbbc9877.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,g as s}from"./p-a5f18e27.js";import{d as o,l,h as n,o as r,w as a,g as c,i as h,j as d,k as p}from"./p-c49e1a96.js";import{s as u,a as v}from"./p-780a1d0e.js";const b="*{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}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{--comp-select-margin:var(--tct-select-margin, var(--tct-select-margin-top, var(--t-select-margin-top, var(--app-scale-4, 30px))) 0 var(--tct-select-margin-bottom, var(--t-select-margin-bottom, var(--app-scale-4, 30px))));display:block;margin:var(--comp-select-margin)}.q2-select-container{position:relative;display:block}.q2-select-input{margin:0;--tct-input-min-height:var(--tct-select-input-min-height, var(--t-select-input-min-height));--tct-input-max-height:var(--tct-select-input-max-height, var(--t-select-input-max-height, none))}::slotted([slot=_selected-display]){width:100%;min-height:var(--comp-selected-display-height, 44px)}.custom-display-content{position:absolute;bottom:0;left:calc(var(--tct-scale-2, var(--app-scale-2x, 10px)) + 1px);height:44px;width:calc(100% - 34px - var(--tct-scale-3, var(--app-scale-3x, 15px)));overflow:hidden;cursor:pointer;transition:left var(--tct-tween-2, var(--app-tween-1, 0.2s ease))}.custom-display-content:not([hidden]){display:flex;align-items:center}.is-searchable.is-focused .custom-display-content,.is-searchable .custom-display-content:active{left:calc(var(--tct-scale-3, var(--app-scale-3x, 15px)) + 1px)}.has-error .custom-display-content{width:calc(100% - 68px - var(--tct-scale-3, var(--app-scale-3x, 15px)))}.popover-content{display:flex;flex-direction:column-reverse}.popover-bottom-container{position:sticky;bottom:0;z-index:5}.popover-top-container{position:sticky;top:0;z-index:5}.popover-top-container .multi-select-header{padding:var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-2, var(--app-scale-2x, 10px));background:var(--app-white);display:flex;gap:var(--app-scale-2x, 10px);align-items:center}.popover-top-container .multi-select-header fieldset{margin:0;padding:0;border:0;display:flex;gap:var(--app-scale-2x, 10px)}.popover-top-container .multi-select-header legend{padding:0;float:left}.popover-top-container .multi-select-header label{cursor:pointer;padding:var(--tct-select-multi-select-option-padding, var(--t-select-multi-select-option-padding, var(--tct-btn-badge-padding, var(--t-btn-badge-padding, 2px 5px))));font-size:var(--tct-select-multi-select-option-font-size, var(--t-select-multi-select-option-font-size, var(--tct-btn-badge-font-size, var(--t-btn-badge-font-size, inherit))));border-radius:var(--tct-select-multi-select-option-radius, var(--t-select-multi-select-option-radius, var(--tct-btn-badge-border-radius, var(--t-btn-badge-border-radius, var(--app-border-radius-1, 3px)))));background:var(--tct-select-multi-select-option-background, var(--tct-select-multi-select-option-bg, var(--t-select-multi-select-option-bg, var(--tct-badge-background, var(--tct-btn-badge-bg, var(--t-btn-badge-bg, transparent))))));color:var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-font-color, var(--t-btn-badge-font-color, inherit))))}.popover-top-container .multi-select-header label:hover{background:var(--tct-select-multi-select-option-hover-background, var(--tct-select-multi-select-option-hover-background-color, var(--t-select-multi-select-option-hover-background-color, var(--tct-btn-badge-hover-bg, var(--t-btn-badge-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--app-gray-l3, #f2f2f2))))))));color:var(--tct-select-multi-select-option-hover-color, var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-hover-font-color, var(--t-btn-badge-hover-font-color, var(--tct-gray-5, var(--t-gray-5, var(--app-gray-d2, #404040))))))))}.popover-top-container .multi-select-header input:checked+label,.popover-top-container .multi-select-header input:checked+label:enabled:hover{background:var(--tct-select-multi-select-option-active-background, var(--tct-select-multi-select-option-active-background-color, var(--t-select-multi-select-option-active-background-color, var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e)))));color:var(--tct-select-multi-select-option-active-color, var(--t-select-multi-select-option-active-color, var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--app-white, #ffffff)))))}.popover-top-container .multi-select-header input:disabled+label{opacity:var(--tct-select-multi-select-option-disabled-opacity, var(--t-select-multi-select-option-disabled-opacity, var(--tct-btn-disabled-opacity, var(--t-btn-disabled-opacity, var(--app-disabled-opacity, 0.4)))));cursor:not-allowed}.popover-top-container .multi-select-header input:focus+label{box-shadow:var(--const-double-focus-ring)}";const f=b;const m=class{constructor(i){t(this,i);this.change=e(this,"change",7);this.input=e(this,"input",7);var s;this.lastTouchWasInPopover=false;this.scheduledAfterRender=[];this.addTouchEventListeners=()=>{if(!o()||!this.popoverElement)return;this.popoverElement.addEventListener("touchmove",this.handleTouchMove,{passive:true})};this.initEventListeners=()=>{var t;if(!o())return;(t=screen===null||screen===void 0?void 0:screen.orientation)===null||t===void 0?void 0:t.addEventListener("change",this.handleOrientationChange);window.addEventListener("resize",this.handleOrientationChange);visualViewport===null||visualViewport===void 0?void 0:visualViewport.addEventListener("resize",this.handleOrientationChange)};this.initMutationObserver=()=>{const t=new MutationObserver(this.onMutationObserved);t.observe(this.hostElement,{childList:true,subtree:true});this.mutationObserver=t;this.onMutationObserved()};this.showSelectedOptions=()=>{this.showSelected=true};this.showAllOptions=()=>{this.showSelected=false};this.onMutationObserved=()=>{const{hostElement:t,hasPopoverTop:e,hasPopoverBottom:i}=this;const s=t.querySelector(".custom-display-content");const o=t.shadowRoot.querySelector('slot[name="q2-select-display"]');const l=!!o?o.assignedNodes().length>0:s.children.length>0;if(this.hasCustomDisplay!==l){this.hasCustomDisplay=l}const n=t.shadowRoot.querySelector('slot[name="popover-top"]');const r=n.assignedNodes().length>0;if(e!==r){this.hasPopoverTop=r}const a=t.shadowRoot.querySelector('slot[name="popover-bottom"]');const c=a.assignedNodes().length>0;if(i!==c){this.hasPopoverBottom=c}this.checkSelectedOptions()};this.onOptionListChange=t=>{t.stopPropagation();const{values:e}=t.detail;if(e.length===0)this.showAllOptions();this.handleSelectionChanges(t.detail)};this.destroyEventListeners=()=>{var t;if(!o())return;(t=screen===null||screen===void 0?void 0:screen.orientation)===null||t===void 0?void 0:t.removeEventListener("change",this.handleOrientationChange);window.removeEventListener("resize",this.handleOrientationChange);visualViewport===null||visualViewport===void 0?void 0:visualViewport.removeEventListener("resize",this.handleOrientationChange);this.removeTouchEventListeners()};this.handleOrientationChange=()=>{var t,e,i;if(!o())return;let s;if(this.isModule){s=(t=window.Tecton)===null||t===void 0?void 0:t.platformDimensions.orientationType.includes("landscape")}else{s=(i=(e=screen===null||screen===void 0?void 0:screen.orientation)===null||e===void 0?void 0:e.type)===null||i===void 0?void 0:i.includes("landscape")}if(s&&this.searchable)this.searchable=false;if(!s)this.searchable=this.originalSearchable};this.handleTouchMove=t=>{if(document.activeElement===this.hostElement){const e=t.target;if(e&&e!==this.hostElement){this.inputFocused=false;this.lastTouchWasInPopover=true;e.focus()}}};this.onPopoverState=({detail:{open:t,action:e}})=>{if(!t||this.searchText){if(e!=="select"){this.optionList.setActiveElement(null)}this.inputField.focus()}if(this.open===t)return;this.open=t};this.inputKeydownHandler=t=>{if(this.readonly||this.disabled)return;const e=t.key;const i=this.hasPopoverTop||this.hasPopoverBottom;const s=e==="Tab"&&t.shiftKey;if(i&&(e==="Tab"||e==="Enter"||s))return;if(u(this,t)){return this.executeActionSheet(t)}const o=["ArrowDown","ArrowUp","PageDown","PageUp","Home","End","Escape","Tab"];if(this.searchable&&!o.includes(e))return;if(this.shouldClearSearchText(t))this.clearSearchText();if(e===" ")t.preventDefault();this.handleOptionListExternalKeydown(t)};this.visibilityToggleKeyDown=t=>{const e=t.key;const i=e==="Tab"&&t.shiftKey;const s=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e);if(s)t.stopPropagation();if(i){t.stopPropagation();if(this.hasPopoverTop)return;this.optionList.setDefaultActiveElement()}};this.inputClickHandler=async t=>{t.stopPropagation();if(this.lastTouchWasInPopover&&this.open&&this.searchable){this.lastTouchWasInPopover=false;this.focusInput();return}this.lastTouchWasInPopover=false;if(u(this)){return this.executeActionSheet(t)}this.toggleDropdown();this.focusInput()};this.inputInputHandler=t=>{t.stopPropagation();const e=t.detail.value;const i=!!this.value;if(i)this.clearValue();if(!this.open)this.openDropdownWithoutActiveElement();this.prioritizeSearch=true;this.searchText=e;this.input.emit({query:e})};this.inputFocusHandler=()=>{this.inputFocused=true};this.inputBlurHandler=()=>{this.inputFocused=false};this.inputChangeHandler=t=>{t.stopPropagation()};this.clickedElsewhere=t=>{const e=t.target;if(e.localName!=="click-elsewhere")return;t.stopPropagation();const{popoverElement:i}=this;if(!i)return;i.open=false};this.onCustomDisplayClick=t=>{t.stopPropagation();this.focusInput();this.toggleDropdown()};this.removeTouchEventListeners=()=>{if(!o()||!this.popoverElement)return;this.popoverElement.removeEventListener("touchmove",this.handleTouchMove)};this.disabled=false;this.errors=undefined;this.hideLabel=undefined;this.hoist=!!((s=window.Tecton)===null||s===void 0?void 0:s.useActionSheets);this.invalid=undefined;this.label=undefined;this.listLabel=l("tecton.element.select.listLabel");this.minRows=3;this.multilineOptions=false;this.multiple=false;this.optional=false;this.placeholder=undefined;this.popDirection=undefined;this.popoverMode=null;this.readonly=false;this.searchable=false;this.selectedOptions=[];this.value=undefined;this.ariaLabel=undefined;this.open=false;this.showSelected=false;this.searchText="";this.hasCustomDisplay=false;this.hasPopoverTop=false;this.hasPopoverBottom=false;this.inputFocused=false;this.statusMessage=undefined;this.prioritizeSearch=false;this.structuredSelectedOptions=[]}componentWillLoad(){this.originalSearchable=this.searchable;n(this);this.handleOrientationChange();this.buildStructuredSelectedOptions();this.handleMultilineOptionsUpdate(this.multilineOptions,false)}componentDidLoad(){this.initMutationObserver();this.initEventListeners();r(this.hostElement);setTimeout((()=>this.checkSelectedDisplay()),0)}componentDidRender(){setTimeout((()=>{this.scheduledAfterRender.forEach((t=>t()));this.scheduledAfterRender=[]}),25)}disconnectedCallback(){var t;(t=this.mutationObserver)===null||t===void 0?void 0:t.disconnect();this.mutationObserver=null;this.destroyEventListeners()}get isModule(){var t,e;const i=window!==window.top;const s=Object.keys((e=(t=window.Tecton)===null||t===void 0?void 0:t.platformDimensions)!==null&&e!==void 0?e:{}).length>0;return i&&s}get innerInputField(){var t,e;return(e=(t=this.inputField)===null||t===void 0?void 0:t.shadowRoot)===null||e===void 0?void 0:e.querySelector(".input-field")}get innerInputContainer(){var t,e;return(e=(t=this.inputField)===null||t===void 0?void 0:t.shadowRoot)===null||e===void 0?void 0:e.querySelector(".input-container")}get badgeValue(){var t,e;if(!this.multiple)return null;const i=(e=(t=this.selectedOptions)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0;if(this.open&&this.searchable)return i?`${i}`:null;else return i>1?`+${i-1}`:null}get popoverMinHeight(){const{minRows:t}=this;const e=this.hostElement.querySelector("q2-option:not([hidden])");let i=e&&window.getComputedStyle(e).minHeight;if(!i||i==="0px")i="44px";return t*parseInt(i)}get selectedDisplay(){if(this.prioritizeSearch||this.searchText)return this.searchText;if(this.hasCustomDisplay)return"";return this.multiple?this.calculateMultiSelectSelectedDisplay():this.calculateSingleSelectSelectedDisplay()}get selectedDisplaySlot(){return this.hostElement.querySelector('[slot="_selected-display"]')}get firstSelectedValue(){var t;return this.multiple?(t=this.selectedOptions)===null||t===void 0?void 0:t[0]:this.value}get firstSelectedOptionElement(){const{firstSelectedValue:t}=this;return t?this.optionElements.find((({value:e})=>e===t)):null}get optionElements(){return Array.from(this.hostElement.querySelectorAll("q2-option"))}get wrapperClasses(){const{errors:t}=this;const e=["q2-select-container"];if(Array.isArray(t)&&t.length>0)e.push("has-error");if(this.inputFocused)e.push("is-focused");if(this.searchable)e.push("is-searchable");return e.join(" ")}buildStructuredSelectedOptions(){const{multiple:t,selectedOptions:e,value:i}=this;if(t){this.structuredSelectedOptions=!!(e===null||e===void 0?void 0:e.length)?e.map((t=>typeof t==="string"?{value:t}:t)):[]}else{this.structuredSelectedOptions=i?[{value:i}]:[]}}ariaLabelObserver(){n(this)}valueUpdated(){if(this.multiple)return;this.clearSearchText()}handleMultilineOptionsUpdate(t,e){if(t===e)return;this.optionElements.forEach((e=>e.multiline=t))}openChanged(t){if(t){this.addTouchEventListeners()}else{this.removeTouchEventListeners()}this.scheduledAfterRender.push((async()=>{await a();const{popoverTopContainer:e,popoverElement:i}=this;const s=t&&(e===null||e===void 0?void 0:e.offsetHeight)||0;if(s){i.style.setProperty("--comp-popover-top-container-height",`${s}px`)}else{i.style.removeProperty("--comp-popover-top-container-height")}}))}_togglePopover(){const{innerInputField:t}=this;t===null||t===void 0?void 0:t.click();t===null||t===void 0?void 0:t.focus();t.dispatchEvent(new FocusEvent("focus"))}async openPopover(){if(this.open||this.disabled)return;this._togglePopover()}async closePopover(){if(!this.open||this.disabled)return;this._togglePopover()}async setValue(t,e={closePopover:true}){const i=new Set(Array.isArray(t)?t:[t]);if(!this.open){await this.openPopover();await a()}i.forEach((t=>{var e;(e=this.optionElements.find((e=>e.value===t)))===null||e===void 0?void 0:e.click()}));if(e.closePopover){await this.closePopover();await a()}}searchOptions(t){if(!this.searchable)return;const{innerInputField:e}=this;e.focus();e.dispatchEvent(new FocusEvent("focus"));e.value=t;e.dispatchEvent(new InputEvent("input"))}keydownHandler(t){this.inputKeydownHandler(t)}onHostElementChange(t){if(this.readonly||this.disabled)return;if(t.target!==this.hostElement||this.hostElement.onchange)return;if(this.multiple){this.value=null;this.selectedOptions=t.detail.selectedOptions}else{this.value=t.detail.value;this.selectedOptions=[]}}onHostElementInput(t){if(!this.searchable||t.target!==this.hostElement||this.hostElement.oninput)return;const e=this.optionElements;const i=this.searchText.trim().toLocaleLowerCase();let s=0;e.forEach((t=>{var e;if(i===""){t.hidden=false;return}const o=((e=t.firstElementChild)===null||e===void 0?void 0:e.tagName)==="Q2-CARD"?t.firstElementChild.title:null;const{display:l="",innerText:n=""}=t;const r=[l,o,n];const a=r.some((t=>{var e;return(e=t===null||t===void 0?void 0:t.toLocaleLowerCase().includes(i))!==null&&e!==void 0?e:false}));t.hidden=!a;if(a)s++}));const o=i?"tecton.element.select.searchable.results":"tecton.element.select.allOptions";const n=i?s:e.length;this.setStatusMessage(l(o,[n]))}delegateFocus(t){const e=c(t,this.hostElement);const i=this.prioritizeSearch=e&&this.searchable;if(i){this.clearSelectedDisplay()}else if(h(t,this.hostElement)){this.innerInputField.focus()}}handleFocusout(t){const e=p(t,this.hostElement);if(e)this.closeDropdown();this.prioritizeSearch=!e&&this.searchable}handleSelectedDisplay(t){if(this.multiple)return;this.inputField.value=t.detail.display}handleTctClick(){const{name:t,version:e}=d();const i=Number(e.split(".")[0]);if(this.searchable&&t==="Safari"&&!isNaN(i)&&i<18){this.scheduledAfterRender.push((()=>this.innerInputField.blur()))}}async executeActionSheet(t){const e=await v(this,t);this.handleSelectionChanges(e)}handleSelectionChanges(t){const{value:e="",values:i=[]}=t;const s=i.map((t=>t.value));const{multiple:o}=this;if(!this.hostElement.onchange){this.selectedOptions=s}this.change.emit({value:o?undefined:e,selectedOptions:o?s:undefined})}clearValue(){const{multiple:t}=this;this.value="";this.selectedOptions=[];this.change.emit({value:t?undefined:"",selectedOptions:t?[]:undefined})}calculateMultiSelectSelectedDisplay(){var t,e,i;const{firstSelectedOptionElement:s,firstSelectedValue:o,multilineOptions:n}=this;if(!o)return"";if(s===null||s===void 0?void 0:s.display)return l(s.display);if(n&&this.searchable)return this.searchText;if(n)return"";return(i=(e=(t=s===null||s===void 0?void 0:s.textContent)===null||t===void 0?void 0:t.trim())!==null&&e!==void 0?e:s===null||s===void 0?void 0:s.value)!==null&&i!==void 0?i:o}calculateSingleSelectSelectedDisplay(){var t;const{firstSelectedOptionElement:e,multilineOptions:i}=this;if(i){return(e===null||e===void 0?void 0:e.display)&&l(e.display)||this.value||""}else{return(e===null||e===void 0?void 0:e.display)&&l(e.display)||((t=e===null||e===void 0?void 0:e.textContent)===null||t===void 0?void 0:t.trim())||this.value||""}}openDropdownWithoutActiveElement(){if(this.readonly||this.disabled)return;this.optionList.setActiveElement(null);this.open=true}closeDropdown(){this.open=false;this.lastTouchWasInPopover=false;this.clearSearchText()}clearSearchText(){if(!this.searchText)return;this.searchText="";this.input.emit({query:""})}toggleDropdown(){if(this.readonly||this.disabled)return;if(this.open&&!this.searchText){this.closeDropdown()}else{this.openDropdownWithoutActiveElement()}}focusInput(){var t;(t=this.inputField)===null||t===void 0?void 0:t.dispatchEvent(new FocusEvent("focus"))}handleOptionListExternalKeydown(t){this.optionList.handleExternalKeydown(t)}setStatusMessage(t){clearTimeout(this.statusMessageTimer);this.statusMessage="";this.statusMessageTimer=setTimeout((()=>{this.statusMessage=t}),1e3)}checkSelectedOptions(){const{multiple:t,selectedOptions:e,value:i}=this;this.optionElements.forEach((s=>{if(t){s.selected=e.includes(s.value)}else{s.selected=s.value===i}}))}clearSelectedDisplay(){var t;(t=this.selectedDisplaySlot)===null||t===void 0?void 0:t.remove()}checkSelectedDisplay(){let t=this.selectedDisplaySlot;const{value:e,multiple:i,selectedOptions:s,multilineOptions:o,firstSelectedOptionElement:l,prioritizeSearch:n}=this;const r=!e&&i&&!(s===null||s===void 0?void 0:s.length);if(n||!o||r)return this.clearSelectedDisplay();if(!l||l.display)return this.clearSelectedDisplay();const a=l.firstElementChild.cloneNode(true);a.querySelectorAll("[hide-on-select]").forEach((t=>t.remove()));if(t){const e=t.clientHeight===0?"auto":`${t.clientHeight}px`;t.style.setProperty("--comp-selected-display-height",e);if(t.firstElementChild.outerHTML!==a.outerHTML){t.replaceChild(a,t.firstElementChild)}}else{t=document.createElement("div");t.slot="_selected-display";t.appendChild(a);this.hostElement.appendChild(t)}return t}checkSelectedDisplayHeight(){const{selectedDisplaySlot:t}=this;if(!t)return;t.style.setProperty("--comp-selected-display-height","44px")}shouldClearSearchText(t){return this.searchable&&!!this.searchText&&t.key==="Escape"}renderCustomDisplay(){const t=this.checkSelectedDisplay();if(!t)return;this.checkSelectedDisplayHeight();return i("slot",{name:"_selected-display",slot:"custom-display"})}render(){const t=!this.searchable;return i("click-elsewhere",{key:"fbb971bcba81c9d823c96d26c26358c12c79b8d2",class:this.wrapperClasses,onChange:this.clickedElsewhere},i("div",{key:"e5c96638b16b87d8e2b6ba08130c68d05c5fcb96","aria-live":"polite","aria-atomic":"true",role:"status",class:"sr"},this.statusMessage),i("q2-input",{key:"27ea503cca8149d043e62715c6b952388904f516",ref:t=>this.inputField=t,class:"q2-select-input",label:this.label&&l(this.label)||"",value:this.selectedDisplay,errors:Array.isArray(this.errors)&&this.errors.length>0&&this.errors.map((t=>l(t)))||this.invalid&&["tecton.element.select.invalid"]||[],disabled:this.disabled,optional:this.optional,readonly:this.readonly,placeholder:this.placeholder||undefined,hideLabel:this.hideLabel,ariaExpanded:`${this.open}`,ariaControls:"option-list",ariaHaspopup:"listbox",role:"combobox",pseudo:t,"test-id":"toggleDropdown","hide-messages":true,iconRight:"chevron-down",onClick:this.inputClickHandler,onInput:this.inputInputHandler,onKeyDown:this.inputKeydownHandler,onFocus:this.inputFocusHandler,onBlur:this.inputBlurHandler,onChange:this.inputChangeHandler,badgeValue:this.badgeValue,badgeTheme:this.inputFocused?"primary":undefined},this.renderCustomDisplay()),i("div",{key:"aecb32013322fd049869f31e68bf9700469cbf75",class:"custom-display-content",hidden:!this.hasCustomDisplay||!!this.searchText,onClick:this.onCustomDisplayClick},i("slot",{key:"96ea88bf7b81a2842489b376570633508210e506",name:"q2-select-display"})),this.optionsDropdown())}optionsDropdown(){return i("q2-popover",{ref:t=>this.popoverElement=t,controlElement:this.innerInputContainer,open:this.open,minHeight:this.popoverMinHeight,direction:this.popDirection,mode:this.popoverMode||undefined,block:true},i("div",{class:"popover-content"},i("q2-option-list",{onPopoverState:this.onPopoverState,ref:t=>this.optionList=t,type:"listbox",id:"option-list","show-selected":this.showSelected,label:this.listLabel,multiple:this.multiple,selectedOptions:this.structuredSelectedOptions,onChange:this.onOptionListChange},i("slot",null)),i("div",{class:"popover-top-container",ref:t=>this.popoverTopContainer=t,hidden:!this.multiple&&!this.hasPopoverTop,tabindex:"-1"},i("slot",{name:"popover-top"}),this.multiple&&this.visibilityToggle())),i("div",{class:"popover-bottom-container",hidden:!this.hasPopoverBottom,tabindex:"-1"},i("slot",{name:"popover-bottom"})))}visibilityToggle(){var t,e;const s=(e=(t=this.selectedOptions)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0;const{showSelected:o}=this;return i("div",{class:"multi-select-header"},i("fieldset",null,i("legend",{"aria-label":l("tecton.element.select.multiHeader.showing")},l("tecton.element.select.multiHeader.showing")),i("div",null,i("input",{class:"sr",type:"radio",id:"all",name:"viewDisplay",value:"all",checked:!o,"aria-label":l("tecton.element.select.multiHeader.allAriaLabel"),"test-id":"allOptionsButton",onClick:this.showAllOptions,onKeyDown:this.visibilityToggleKeyDown}),i("label",{htmlFor:"all"},l("tecton.element.select.multiHeader.all"))),i("div",null,i("input",{class:"sr",type:"radio",id:"selected",disabled:s===0,name:"viewDisplay",value:"selected","aria-label":l("tecton.element.select.multiHeader.selectedAriaLabel",[s]),checked:o,"test-id":"selectedOptionsButton",onClick:this.showSelectedOptions,onKeyDown:this.visibilityToggleKeyDown}),i("label",{htmlFor:"selected"},l("tecton.element.select.multiHeader.selected",[s])))))}get hostElement(){return s(this)}static get watchers(){return{value:["buildStructuredSelectedOptions","valueUpdated"],selectedOptions:["buildStructuredSelectedOptions"],ariaLabel:["ariaLabelObserver"],multilineOptions:["handleMultilineOptionsUpdate"],open:["openChanged"]}}};m.style=f;export{m as q2_select};
2
+ //# sourceMappingURL=p-e6031ff8.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["q2SelectCss","Q2SelectStyle0","Q2Select","this","lastTouchWasInPopover","scheduledAfterRender","addTouchEventListeners","isMobile","popoverElement","addEventListener","handleTouchMove","passive","initEventListeners","_a","screen","orientation","handleOrientationChange","window","visualViewport","initMutationObserver","observer","MutationObserver","onMutationObserved","observe","hostElement","childList","subtree","mutationObserver","showSelectedOptions","showSelected","showAllOptions","hasPopoverTop","hasPopoverBottom","slotContainer","querySelector","displaySlot","shadowRoot","hasCustomDisplay","assignedNodes","length","children","popTopSlot","topSlotHasNode","popBottomSlot","bottomSlotHasNode","checkSelectedOptions","onOptionListChange","event","stopPropagation","values","detail","handleSelectionChanges","destroyEventListeners","removeEventListener","removeTouchEventListeners","isLandscape","isModule","Tecton","platformDimensions","orientationType","includes","_c","_b","type","searchable","originalSearchable","document","activeElement","target","inputFocused","focus","onPopoverState","open","action","searchText","optionList","setActiveElement","inputField","inputKeydownHandler","readonly","disabled","key","hasSlot","isShiftTab","shiftKey","shouldShowActionSheet","executeActionSheet","keysForOptionListToHandle","shouldClearSearchText","clearSearchText","preventDefault","handleOptionListExternalKeydown","visibilityToggleKeyDown","isRadioControlKey","setDefaultActiveElement","inputClickHandler","async","focusInput","toggleDropdown","inputInputHandler","eventValue","value","shouldClearValue","clearValue","openDropdownWithoutActiveElement","prioritizeSearch","input","emit","query","inputFocusHandler","inputBlurHandler","inputChangeHandler","clickedElsewhere","localName","onCustomDisplayClick","useActionSheets","loc","componentWillLoad","handleAriaLabel","buildStructuredSelectedOptions","handleMultilineOptionsUpdate","multilineOptions","componentDidLoad","overrideFocus","setTimeout","checkSelectedDisplay","componentDidRender","forEach","fn","disconnectedCallback","disconnect","isIframe","top","hasPlatformDimensions","Object","keys","innerInputField","innerInputContainer","badgeValue","multiple","optionsLength","selectedOptions","popoverMinHeight","minRows","firstOption","minHeight","getComputedStyle","parseInt","selectedDisplay","calculateMultiSelectSelectedDisplay","calculateSingleSelectSelectedDisplay","selectedDisplaySlot","firstSelectedValue","firstSelectedOptionElement","optionElements","find","Array","from","querySelectorAll","wrapperClasses","errors","classes","isArray","push","join","structuredSelectedOptions","map","option","ariaLabelObserver","valueUpdated","newValue","oldValue","element","multiline","openChanged","isOpen","waitForNextPaint","popoverTopContainer","height","offsetHeight","style","setProperty","removeProperty","_togglePopover","click","dispatchEvent","FocusEvent","openPopover","closePopover","setValue","options","valuesSet","Set","searchOptions","InputEvent","keydownHandler","onHostElementChange","onchange","onHostElementInput","oninput","trim","toLocaleLowerCase","matchedCount","hidden","title","firstElementChild","tagName","display","innerText","searchParams","matched","some","text","statusMessageLocString","count","setStatusMessage","delegateFocus","fromHost","isRelatedTargetWithinHost","clearSelectedDisplay","isEventFromElement","handleFocusout","isLeavingHost","isHostLosingFocus","closeDropdown","handleSelectedDisplay","handleTctClick","name","version","getBrowserInfo","majorVersion","Number","split","isNaN","blur","result","showActionSheetList","changeDetails","selectedOptionValues","change","undefined","textContent","handleExternalKeydown","message","clearTimeout","statusMessageTimer","statusMessage","selected","remove","namedSlot","hasNoValue","selectionClone","cloneNode","clientHeight","outerHTML","replaceChild","createElement","slot","appendChild","checkSelectedDisplayHeight","renderCustomDisplay","hasSelectedDisplay","h","render","showAsPseudo","class","onChange","role","ref","el","label","error","invalid","optional","placeholder","hideLabel","ariaExpanded","ariaControls","ariaHaspopup","pseudo","iconRight","onClick","onInput","onKeyDown","onFocus","onBlur","badgeTheme","optionsDropdown","controlElement","direction","popDirection","mode","popoverMode","block","id","listLabel","tabindex","visibilityToggle","selectedOptionsCount","checked","htmlFor"],"sources":["src/components/q2-select/q2-select.scss?tag=q2-select&encapsulation=shadow","src/components/q2-select/q2-select.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n@import '../../styles/dropdowns';\n\n:host {\n --comp-select-margin: #{var-list(\n --tct-select-margin,\n unquote(\n '#{var-list(var-prefixer(select-margin-top), --app-scale-4, 30px)} 0 #{var-list(var-prefixer(select-margin-bottom), --app-scale-4, 30px)}'\n )\n )};\n display: block;\n margin: var(--comp-select-margin);\n}\n\n.q2-select-container {\n position: relative;\n display: block;\n}\n\n.q2-select-input {\n margin: 0;\n\n --tct-input-min-height: #{var-list(var-prefixer(select-input-min-height))};\n --tct-input-max-height: #{var-list(var-prefixer(select-input-max-height), none)};\n}\n\n::slotted([slot='_selected-display']) {\n width: 100%;\n min-height: var(--comp-selected-display-height, 44px);\n}\n\n.custom-display-content {\n position: absolute;\n bottom: 0;\n left: calc(var-list(--tct-scale-2, --app-scale-2x, 10px) + 1px);\n height: 44px;\n width: calc(100% - 34px - var-list(--tct-scale-3, --app-scale-3x, 15px));\n overflow: hidden;\n cursor: pointer;\n transition: left var-list(--tct-tween-2, --app-tween-1, unquote('0.2s ease'));\n}\n\n.custom-display-content:not([hidden]) {\n display: flex;\n align-items: center;\n}\n\n.is-searchable.is-focused .custom-display-content,\n.is-searchable .custom-display-content:active {\n left: calc(var-list(--tct-scale-3, --app-scale-3x, 15px) + 1px);\n}\n\n.has-error .custom-display-content {\n width: calc(100% - 68px - var-list(--tct-scale-3, --app-scale-3x, 15px));\n}\n\n.popover-content {\n display: flex;\n flex-direction: column-reverse;\n}\n\n.popover-bottom-container {\n position: sticky;\n bottom: 0;\n z-index: 5;\n}\n\n.popover-top-container {\n position: sticky;\n top: 0;\n z-index: 5;\n .multi-select-header {\n padding: var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-2, var(--app-scale-2x, 10px));\n background: var(--app-white);\n display: flex;\n gap: var-list(--app-scale-2x, 10px);\n align-items: center;\n\n fieldset {\n margin: 0;\n padding: 0;\n border: 0;\n display: flex;\n gap: var-list(--app-scale-2x, 10px);\n }\n\n legend {\n padding: 0;\n float: left;\n }\n\n label {\n cursor: pointer;\n padding: var-list(\n var-prefixer(select-multi-select-option-padding),\n var-prefixer(btn-badge-padding),\n unquote('2px 5px')\n );\n font-size: var-list(\n var-prefixer(select-multi-select-option-font-size),\n var-prefixer(btn-badge-font-size),\n inherit\n );\n border-radius: var-list(\n var-prefixer(select-multi-select-option-radius),\n var-prefixer(btn-badge-border-radius),\n --app-border-radius-1,\n 3px\n );\n background: var-list(\n --tct-select-multi-select-option-background,\n var-prefixer(select-multi-select-option-bg),\n --tct-badge-background,\n var-prefixer(btn-badge-bg),\n transparent\n );\n color: var-list(\n var-prefixer(select-multi-select-option-color),\n var-prefixer(btn-badge-font-color),\n inherit\n );\n\n &:hover {\n background: var-list(\n --tct-select-multi-select-option-hover-background,\n var-prefixer(select-multi-select-option-hover-background-color),\n var-prefixer(btn-badge-hover-bg),\n var-prefixer(gray-14),\n --app-gray-l3,\n #f2f2f2\n );\n color: var-list(\n --tct-select-multi-select-option-hover-color,\n var-prefixer(select-multi-select-option-color),\n var-prefixer(btn-badge-hover-font-color),\n var-prefixer(gray-5),\n --app-gray-d2,\n #404040\n );\n }\n }\n\n input {\n &:checked + label {\n &,\n &:enabled:hover {\n background: var-list(\n --tct-select-multi-select-option-active-background,\n var-prefixer(select-multi-select-option-active-background-color),\n var-prefixer(btn-primary-bg),\n #2e2e2e\n );\n color: var-list(\n var-prefixer(select-multi-select-option-active-color),\n var-prefixer(btn-primary-font-color),\n --app-white,\n #ffffff\n );\n }\n }\n\n &:disabled + label {\n opacity: var-list(\n var-prefixer(select-multi-select-option-disabled-opacity),\n var-prefixer(btn-disabled-opacity),\n --app-disabled-opacity,\n 0.4\n );\n cursor: not-allowed;\n }\n\n &:focus + label {\n box-shadow: var(--const-double-focus-ring);\n }\n }\n }\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n State,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Method,\n} from '@stencil/core';\nimport { IEventDetail, Q2InputCustomEvent, Q2OptionListCustomEvent } from 'src/components';\nimport {\n getBrowserInfo,\n handleAriaLabel,\n isEventFromElement,\n isHostLosingFocus,\n isRelatedTargetWithinHost,\n loc,\n overrideFocus,\n waitForNextPaint,\n isMobile,\n} from '../../utils';\nimport { IOptionValue } from '../q2-option-list/q2-option-list';\nimport { shouldShowActionSheet, showActionSheetList } from 'src/utils/action-sheet';\n\n@Component({ tag: 'q2-select', shadow: true, styleUrl: 'q2-select.scss' })\nexport class Q2Select implements ComponentInterface {\n /** Disables all interaction with the field and leverages the disabled visual style of `q2-input`. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * The presence of `errors` will mark the field as invalid, putting it into an error state.\n * @localizable\n */\n @Prop() errors: string[];\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * Instructs the component to use the action sheet workflow for displaying its options.\n *\n * For more information, see [Action Sheets](https://tecton.q2developer.com/guides/action-sheets/).\n * @warning\n * If your `q2-select` renders inside of an iframe, and you are using multiline/robust content options,\n * any custom CSS you apply to your options will not get passed up to the platform which displays the action sheet.\n * For this reason, we strongly suggest using the [q2-card](https://tecton.q2developer.com/ui/q2-card/) component since its styling is managed by Tecton.\n */\n @Prop() hoist: boolean = !!window.Tecton?.useActionSheets;\n\n /** Determines whether to show an error state. Its primary use-case is for an unfilled field. */\n @Prop({ reflect: true }) invalid: boolean;\n\n /**\n * The text that will be used as the label for the field.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true }) label: string;\n\n /**\n * Determines the label that is applied to the option list for accessibility purposes.\n * @localizable\n */\n @Prop() listLabel: string = loc('tecton.element.select.listLabel');\n\n /** The minimum number of rows the component will try to display below or above the component when opened. */\n @Prop() minRows: number = 3;\n\n /** Enables text wrapping for `q2-option` elements. When `false`, the text truncates and does not wrap. */\n @Prop({ reflect: true }) multilineOptions: boolean = false;\n\n /** Enables multi-select functionality. */\n @Prop({ reflect: true }) multiple: boolean = false;\n\n /** Appends \"(optional)\" to the field label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true }) optional: boolean = false;\n\n /**\n * Text that appears within the field when it is blurred and empty.\n * Placeholder text disappears when the user selects an option.\n * @localizable\n */\n @Prop({ reflect: true }) placeholder: string;\n\n /** @deprecated */\n @Prop({ reflect: true }) popDirection: 'up' | 'down';\n\n /**\n * Determines the display mode of the popover.\n *\n * Providing a value of `legacy` instructs the popover to use absolute positioning instead of fixed positioning.\n *\n * @info\n * This is a temporary solution to work around styling issues related to using fixed positioning for the popover\n * when nested inside of elements with transform properties. This will be removed once the popover API is available\n * for use.\n */\n @Prop({ mutable: true }) popoverMode: 'legacy' = null;\n\n /**\n * Appends \"(read only)\" to the field label, and field becomes unusable, but remains focusable.\n * Takes priority over `optional` if both are `true`.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Enables search functionality. */\n @Prop({ reflect: true, mutable: true }) searchable: boolean = false;\n\n /**\n * Each item in this array should correspond to the value of a `q2-option` element.\n * This property is only relevant for `multiple` (i.e., multi-select) implementations.\n */\n @Prop({ mutable: true }) selectedOptions: string[] = [];\n\n /**\n * The current value for the select. This should correspond to the value of a nested q2-option element.\n * This property is only relevant for single-select implementations.\n */\n @Prop({ mutable: true }) value: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Element() hostElement: HTMLElement;\n\n @State() open: boolean = false;\n @State() showSelected: boolean = false;\n @State() searchText: string = '';\n @State() hasCustomDisplay: boolean = false;\n @State() hasPopoverTop: boolean = false;\n @State() hasPopoverBottom: boolean = false;\n @State() inputFocused: boolean = false;\n @State() statusMessage: string;\n @State() prioritizeSearch: boolean = false;\n @State() structuredSelectedOptions: IOptionValue[] = [];\n\n inputField?: HTMLQ2InputElement;\n lastTouchWasInPopover: boolean = false;\n optionList: HTMLQ2OptionListElement;\n popoverElement?: HTMLQ2PopoverElement;\n popoverTopContainer?: HTMLDivElement;\n scheduledAfterRender: (() => void)[] = [];\n mutationObserver: MutationObserver;\n originalSearchable: boolean;\n\n /// Lifecycle Hooks ///\n componentWillLoad() {\n this.originalSearchable = this.searchable;\n handleAriaLabel(this);\n this.handleOrientationChange();\n this.buildStructuredSelectedOptions();\n this.handleMultilineOptionsUpdate(this.multilineOptions, false);\n }\n\n componentDidLoad() {\n this.initMutationObserver();\n this.initEventListeners();\n overrideFocus(this.hostElement);\n setTimeout(() => this.checkSelectedDisplay(), 0);\n }\n\n componentDidRender() {\n setTimeout(() => {\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }, 25);\n }\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n this.destroyEventListeners();\n }\n\n /// Getters ///\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 innerInputField(): HTMLInputElement | HTMLButtonElement {\n return this.inputField?.shadowRoot?.querySelector('.input-field');\n }\n\n get innerInputContainer(): HTMLElement {\n return this.inputField?.shadowRoot?.querySelector('.input-container');\n }\n\n get badgeValue(): string {\n if (!this.multiple) return null;\n const optionsLength = this.selectedOptions?.length ?? 0;\n if (this.open && this.searchable) return optionsLength ? `${optionsLength}` : null;\n else return optionsLength > 1 ? `+${optionsLength - 1}` : null;\n }\n\n get popoverMinHeight() {\n const { minRows } = this;\n const firstOption = this.hostElement.querySelector<HTMLQ2OptionElement>('q2-option:not([hidden])');\n let minHeight = firstOption && window.getComputedStyle(firstOption).minHeight;\n\n // Safari doesn't return a min-height for non-visible items\n if (!minHeight || minHeight === '0px') minHeight = '44px';\n\n return minRows * parseInt(minHeight);\n }\n\n get selectedDisplay() {\n if (this.prioritizeSearch || this.searchText) return this.searchText;\n if (this.hasCustomDisplay) return '';\n return this.multiple ? this.calculateMultiSelectSelectedDisplay() : this.calculateSingleSelectSelectedDisplay();\n }\n\n get selectedDisplaySlot() {\n return this.hostElement.querySelector<HTMLElement>('[slot=\"_selected-display\"]');\n }\n\n get firstSelectedValue() {\n return this.multiple ? this.selectedOptions?.[0] : this.value;\n }\n\n get firstSelectedOptionElement() {\n const { firstSelectedValue } = this;\n return firstSelectedValue ? this.optionElements.find(({ value }) => value === firstSelectedValue) : null;\n }\n\n get optionElements() {\n return Array.from(this.hostElement.querySelectorAll<HTMLQ2OptionElement>('q2-option'));\n }\n\n get wrapperClasses() {\n const { errors } = this;\n const classes = ['q2-select-container'];\n if (Array.isArray(errors) && errors.length > 0) classes.push('has-error');\n if (this.inputFocused) classes.push('is-focused');\n if (this.searchable) classes.push('is-searchable');\n return classes.join(' ');\n }\n\n /// Watchers ///\n @Watch('value')\n @Watch('selectedOptions')\n buildStructuredSelectedOptions() {\n const { multiple, selectedOptions, value } = this;\n if (multiple) {\n this.structuredSelectedOptions = !!selectedOptions?.length\n ? selectedOptions.map(option => (typeof option === 'string' ? { value: option } : option))\n : [];\n } else {\n this.structuredSelectedOptions = value ? [{ value }] : [];\n }\n }\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n @Watch('value')\n valueUpdated() {\n if (this.multiple) return;\n this.clearSearchText();\n }\n\n @Watch('multilineOptions')\n handleMultilineOptionsUpdate(newValue, oldValue) {\n if (newValue === oldValue) return;\n this.optionElements.forEach(element => (element.multiline = newValue));\n }\n\n @Watch('open')\n openChanged(isOpen: boolean) {\n if (isOpen) {\n this.addTouchEventListeners();\n } else {\n this.removeTouchEventListeners();\n }\n this.scheduledAfterRender.push(async () => {\n await waitForNextPaint();\n const { popoverTopContainer, popoverElement } = this;\n const height = (isOpen && popoverTopContainer?.offsetHeight) || 0;\n if (height) {\n popoverElement.style.setProperty('--comp-popover-top-container-height', `${height}px`);\n } else {\n popoverElement.style.removeProperty('--comp-popover-top-container-height');\n }\n });\n }\n\n /// Events ///\n /**\n * Emitted when an option is selected or deselected.\n *\n * When the multi-select is enabled, the `value` property will be `undefined` and the `selectedOptions` property\n * will contain the selected option values.\n *\n * @legacyEvent\n */\n @Event() change: EventEmitter<{ value: string; selectedOptions: string[] }>;\n\n /**\n * Emitted when the input value changes.\n *\n * Requires the `searchable` prop to be set to `true`.\n */\n @Event() input: EventEmitter<{ query: string }>;\n\n /// Methods ///\n _togglePopover() {\n const { innerInputField } = this;\n innerInputField?.click();\n innerInputField?.focus();\n innerInputField.dispatchEvent(new FocusEvent('focus'));\n }\n\n /**\n * Emulates clicking the `<input>` to display the popover if it is hidden.\n *\n * @testOnly\n */\n @Method()\n async openPopover() {\n if (this.open || this.disabled) return;\n this._togglePopover();\n }\n\n /**\n * Emulates clicking the `<input>` to hide the popover if it is visible.\n *\n * @testOnly\n */\n @Method()\n async closePopover() {\n if (!this.open || this.disabled) return;\n this._togglePopover();\n }\n\n /**\n * Emulates clicking the `<input>` to display the popover and selecting the option(s) with the specified value(s).\n *\n * If the multi-select is enabled and the `closePopover` argument is `true` (default), the popover will be closed\n * after the option(s) are selected.\n *\n * @testOnly\n */\n @Method()\n async setValue(values: string | string[], options: { closePopover?: boolean } = { closePopover: true }) {\n const valuesSet = new Set(Array.isArray(values) ? values : [values]);\n if (!this.open) {\n await this.openPopover();\n await waitForNextPaint();\n }\n\n valuesSet.forEach(value => {\n this.optionElements.find(option => option.value === value)?.click();\n });\n\n if (options.closePopover) {\n await this.closePopover();\n await waitForNextPaint();\n }\n }\n\n /**\n * Emulates focusing the `<input>`, entering the provided value, and emitting an `input` event.\n *\n * @warning\n * Only applicable when the input is searchable.\n *\n * @testOnly\n */\n @Method()\n searchOptions(query: string) {\n if (!this.searchable) return;\n\n const { innerInputField } = this;\n innerInputField.focus();\n innerInputField.dispatchEvent(new FocusEvent('focus'));\n innerInputField.value = query;\n innerInputField.dispatchEvent(new InputEvent('input'));\n }\n\n /// Listeners ///\n @Listen('keydown')\n keydownHandler(event: KeyboardEvent) {\n this.inputKeydownHandler(event);\n }\n\n @Listen('change')\n onHostElementChange(event: CustomEvent<{ value: string; selectedOptions: string[] }>) {\n if (this.readonly || this.disabled) return;\n if (event.target !== this.hostElement || this.hostElement.onchange) return;\n if (this.multiple) {\n this.value = null;\n this.selectedOptions = event.detail.selectedOptions;\n } else {\n this.value = event.detail.value;\n this.selectedOptions = [];\n }\n }\n\n @Listen('input')\n onHostElementInput(event: CustomEvent) {\n if (!this.searchable || event.target !== this.hostElement || this.hostElement.oninput) return;\n const options = this.optionElements;\n const query = this.searchText.trim().toLocaleLowerCase();\n let matchedCount = 0;\n options.forEach(option => {\n if (query === '') {\n option.hidden = false;\n return;\n }\n\n const title =\n option.firstElementChild?.tagName === 'Q2-CARD'\n ? (option.firstElementChild as HTMLQ2CardElement).title\n : null;\n const { display = '', innerText = '' } = option;\n const searchParams = [display, title, innerText];\n const matched = searchParams.some(text => text?.toLocaleLowerCase().includes(query) ?? false);\n\n option.hidden = !matched;\n if (matched) matchedCount++;\n });\n\n const statusMessageLocString = query\n ? 'tecton.element.select.searchable.results'\n : 'tecton.element.select.allOptions';\n const count = query ? matchedCount : options.length;\n this.setStatusMessage(loc(statusMessageLocString, [count]));\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n const fromHost = isRelatedTargetWithinHost(event, this.hostElement);\n const prioritizeSearch = (this.prioritizeSearch = fromHost && this.searchable);\n if (prioritizeSearch) {\n this.clearSelectedDisplay();\n } else if (isEventFromElement(event, this.hostElement)) {\n this.innerInputField.focus();\n }\n }\n\n @Listen('focusout')\n handleFocusout(event: FocusEvent) {\n const isLeavingHost = isHostLosingFocus(event, this.hostElement);\n if (isLeavingHost) this.closeDropdown();\n this.prioritizeSearch = !isLeavingHost && this.searchable;\n }\n\n @Listen('displayChanged')\n handleSelectedDisplay(event: CustomEvent) {\n if (this.multiple) return;\n this.inputField.value = event.detail.display;\n }\n\n @Listen('tctClick')\n handleTctClick() {\n const { name, version } = getBrowserInfo();\n const majorVersion = Number(version.split('.')[0]);\n // Only Safari under iOS 18 having issue when searchable\n if (this.searchable && name === 'Safari' && !isNaN(majorVersion) && majorVersion < 18) {\n this.scheduledAfterRender.push(() => this.innerInputField.blur());\n }\n }\n\n /// Helpers ///\n async executeActionSheet(event: MouseEvent | KeyboardEvent) {\n const result = await showActionSheetList(this, event);\n this.handleSelectionChanges(result);\n }\n\n addTouchEventListeners = () => {\n if (!isMobile() || !this.popoverElement) return;\n\n this.popoverElement.addEventListener('touchmove', this.handleTouchMove, { passive: true });\n };\n\n handleSelectionChanges(changeDetails: { value?: string; values?: IOptionValue[] }) {\n const { value = '', values = [] } = changeDetails;\n const selectedOptionValues = values.map(value => value.value);\n const { multiple } = this;\n if (!this.hostElement.onchange) {\n this.selectedOptions = selectedOptionValues;\n }\n\n this.change.emit({\n value: multiple ? undefined : value,\n selectedOptions: multiple ? selectedOptionValues : undefined,\n });\n }\n\n initEventListeners = () => {\n if (!isMobile()) return;\n screen?.orientation?.addEventListener('change', this.handleOrientationChange);\n window.addEventListener('resize', this.handleOrientationChange);\n visualViewport?.addEventListener('resize', this.handleOrientationChange);\n };\n\n initMutationObserver = () => {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true, subtree: true });\n this.mutationObserver = observer;\n this.onMutationObserved();\n };\n\n showSelectedOptions = () => {\n this.showSelected = true;\n };\n\n showAllOptions = () => {\n this.showSelected = false;\n };\n\n clearValue() {\n const { multiple } = this;\n this.value = '';\n this.selectedOptions = [];\n this.change.emit({ value: multiple ? undefined : '', selectedOptions: multiple ? [] : undefined });\n }\n\n calculateMultiSelectSelectedDisplay() {\n const { firstSelectedOptionElement, firstSelectedValue, multilineOptions } = this;\n if (!firstSelectedValue) return '';\n if (firstSelectedOptionElement?.display) return loc(firstSelectedOptionElement.display);\n if (multilineOptions && this.searchable) return this.searchText;\n if (multilineOptions) return '';\n return (\n firstSelectedOptionElement?.textContent?.trim() ?? firstSelectedOptionElement?.value ?? firstSelectedValue\n );\n }\n\n calculateSingleSelectSelectedDisplay() {\n const { firstSelectedOptionElement, multilineOptions } = this;\n if (multilineOptions) {\n return (firstSelectedOptionElement?.display && loc(firstSelectedOptionElement.display)) || this.value || '';\n } else {\n return (\n (firstSelectedOptionElement?.display && loc(firstSelectedOptionElement.display)) ||\n firstSelectedOptionElement?.textContent?.trim() ||\n this.value ||\n ''\n );\n }\n }\n\n onMutationObserved = () => {\n const { hostElement, hasPopoverTop, hasPopoverBottom } = this;\n const slotContainer = hostElement.querySelector('.custom-display-content');\n const displaySlot = hostElement.shadowRoot.querySelector<HTMLSlotElement>('slot[name=\"q2-select-display\"]');\n const hasCustomDisplay = !!displaySlot\n ? displaySlot.assignedNodes().length > 0\n : slotContainer.children.length > 0;\n\n if (this.hasCustomDisplay !== hasCustomDisplay) {\n this.hasCustomDisplay = hasCustomDisplay;\n }\n\n const popTopSlot = hostElement.shadowRoot.querySelector<HTMLSlotElement>('slot[name=\"popover-top\"]');\n const topSlotHasNode = popTopSlot.assignedNodes().length > 0;\n if (hasPopoverTop !== topSlotHasNode) {\n this.hasPopoverTop = topSlotHasNode;\n }\n\n const popBottomSlot = hostElement.shadowRoot.querySelector<HTMLSlotElement>('slot[name=\"popover-bottom\"]');\n const bottomSlotHasNode = popBottomSlot.assignedNodes().length > 0;\n if (hasPopoverBottom !== bottomSlotHasNode) {\n this.hasPopoverBottom = bottomSlotHasNode;\n }\n\n this.checkSelectedOptions();\n };\n\n onOptionListChange = (event: Q2OptionListCustomEvent<{ value: string; values: IOptionValue[] }>) => {\n event.stopPropagation();\n const { values } = event.detail;\n\n if (values.length === 0) this.showAllOptions();\n this.handleSelectionChanges(event.detail);\n };\n\n openDropdownWithoutActiveElement() {\n if (this.readonly || this.disabled) return;\n this.optionList.setActiveElement(null);\n this.open = true;\n }\n\n closeDropdown() {\n this.open = false;\n this.lastTouchWasInPopover = false;\n this.clearSearchText();\n }\n\n destroyEventListeners = () => {\n if (!isMobile()) return;\n screen?.orientation?.removeEventListener('change', this.handleOrientationChange);\n window.removeEventListener('resize', this.handleOrientationChange);\n visualViewport?.removeEventListener('resize', this.handleOrientationChange);\n this.removeTouchEventListeners();\n };\n\n clearSearchText() {\n if (!this.searchText) return;\n this.searchText = '';\n this.input.emit({ query: '' });\n }\n\n toggleDropdown() {\n if (this.readonly || this.disabled) return;\n\n if (this.open && !this.searchText) {\n this.closeDropdown();\n } else {\n this.openDropdownWithoutActiveElement();\n }\n }\n\n focusInput() {\n this.inputField?.dispatchEvent(new FocusEvent('focus'));\n }\n\n handleOptionListExternalKeydown(event: KeyboardEvent) {\n this.optionList.handleExternalKeydown(event);\n }\n\n handleOrientationChange = () => {\n if (!isMobile()) return;\n\n let isLandscape: boolean;\n if (this.isModule) {\n isLandscape = window.Tecton?.platformDimensions.orientationType.includes('landscape');\n } else {\n isLandscape = screen?.orientation?.type?.includes('landscape');\n }\n if (isLandscape && this.searchable) this.searchable = false;\n if (!isLandscape) this.searchable = this.originalSearchable;\n };\n\n handleTouchMove = (event: TouchEvent) => {\n if (document.activeElement === this.hostElement) {\n const target = event.target as HTMLElement;\n if (target && target !== this.hostElement) {\n this.inputFocused = false;\n this.lastTouchWasInPopover = true;\n target.focus();\n }\n }\n };\n\n statusMessageTimer: NodeJS.Timeout;\n setStatusMessage(message) {\n clearTimeout(this.statusMessageTimer);\n this.statusMessage = '';\n this.statusMessageTimer = setTimeout(() => {\n this.statusMessage = message;\n }, 1000);\n }\n\n checkSelectedOptions() {\n const { multiple, selectedOptions, value } = this;\n this.optionElements.forEach(option => {\n if (multiple) {\n option.selected = selectedOptions.includes(option.value);\n } else {\n option.selected = option.value === value;\n }\n });\n }\n\n clearSelectedDisplay() {\n this.selectedDisplaySlot?.remove();\n }\n\n checkSelectedDisplay() {\n // This prevents a an undefined property error when the spec tests are run\n try {\n this.hostElement;\n } catch (error) {\n return null;\n }\n\n let namedSlot = this.selectedDisplaySlot;\n const { value, multiple, selectedOptions, multilineOptions, firstSelectedOptionElement, prioritizeSearch } =\n this;\n const hasNoValue = !value && multiple && !selectedOptions?.length;\n if (prioritizeSearch || !multilineOptions || hasNoValue) return this.clearSelectedDisplay();\n\n if (!firstSelectedOptionElement || firstSelectedOptionElement.display) return this.clearSelectedDisplay();\n\n // Clone selected option and remove elements with hide-on-select attribute\n const selectionClone = firstSelectedOptionElement.firstElementChild.cloneNode(true) as HTMLElement;\n selectionClone.querySelectorAll('[hide-on-select]').forEach(element => element.remove());\n\n if (namedSlot) {\n const height = namedSlot.clientHeight === 0 ? 'auto' : `${namedSlot.clientHeight}px`;\n namedSlot.style.setProperty('--comp-selected-display-height', height);\n if (namedSlot.firstElementChild.outerHTML !== selectionClone.outerHTML) {\n namedSlot.replaceChild(selectionClone, namedSlot.firstElementChild);\n }\n } else {\n namedSlot = document.createElement('div');\n namedSlot.slot = '_selected-display';\n namedSlot.appendChild(selectionClone);\n this.hostElement.appendChild(namedSlot);\n }\n return namedSlot;\n }\n\n checkSelectedDisplayHeight() {\n const { selectedDisplaySlot } = this;\n if (!selectedDisplaySlot) return;\n selectedDisplaySlot.style.setProperty('--comp-selected-display-height', '44px');\n }\n\n /// Event handlers ///\n onPopoverState = ({\n detail: { open, action },\n }: CustomEvent<{ open: boolean; action: 'close' | 'select' | 'open' }>) => {\n if (!open || this.searchText) {\n if (action !== 'select') {\n this.optionList.setActiveElement(null);\n }\n this.inputField.focus();\n }\n\n if (this.open === open) return;\n this.open = open;\n };\n\n inputKeydownHandler = (event: KeyboardEvent) => {\n if (this.readonly || this.disabled) return;\n const key = event.key;\n const hasSlot = this.hasPopoverTop || this.hasPopoverBottom;\n const isShiftTab = key === 'Tab' && event.shiftKey;\n if (hasSlot && (key === 'Tab' || key === 'Enter' || isShiftTab)) return;\n if (shouldShowActionSheet(this, event)) {\n return this.executeActionSheet(event);\n }\n\n const keysForOptionListToHandle = [\n 'ArrowDown',\n 'ArrowUp',\n 'PageDown',\n 'PageUp',\n 'Home',\n 'End',\n 'Escape',\n 'Tab',\n ];\n if (this.searchable && !keysForOptionListToHandle.includes(key)) return;\n if (this.shouldClearSearchText(event)) this.clearSearchText();\n\n // Prevent click event from firing when spacebar is pressed\n if (key === ' ') event.preventDefault();\n\n this.handleOptionListExternalKeydown(event);\n };\n\n shouldClearSearchText(event: KeyboardEvent) {\n return this.searchable && !!this.searchText && event.key === 'Escape';\n }\n\n visibilityToggleKeyDown = (event: KeyboardEvent) => {\n const key = event.key;\n const isShiftTab = key === 'Tab' && event.shiftKey;\n const isRadioControlKey = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(key);\n if (isRadioControlKey) event.stopPropagation();\n if (isShiftTab) {\n event.stopPropagation();\n // allows shift+tab keys to select the top slot when present\n if (this.hasPopoverTop) return;\n\n this.optionList.setDefaultActiveElement();\n }\n };\n\n inputClickHandler = async (event: MouseEvent) => {\n event.stopPropagation();\n // Check if the last interaction was a touch within the popover\n // If so, don't toggle the dropdown as the user is likely continuing to interact\n if (this.lastTouchWasInPopover && this.open && this.searchable) {\n // Reset the flag and don't toggle\n this.lastTouchWasInPopover = false;\n this.focusInput();\n return;\n }\n\n // Reset the flag for any other click\n this.lastTouchWasInPopover = false;\n\n if (shouldShowActionSheet(this)) {\n return this.executeActionSheet(event);\n }\n this.toggleDropdown();\n this.focusInput();\n };\n\n inputInputHandler = (event: Q2InputCustomEvent<IEventDetail> & InputEvent) => {\n event.stopPropagation();\n const eventValue = event.detail.value;\n const shouldClearValue = !!this.value;\n\n if (shouldClearValue) this.clearValue();\n if (!this.open) this.openDropdownWithoutActiveElement();\n\n this.prioritizeSearch = true;\n this.searchText = eventValue;\n this.input.emit({ query: eventValue });\n };\n\n inputFocusHandler = () => {\n this.inputFocused = true;\n };\n\n inputBlurHandler = () => {\n this.inputFocused = false;\n };\n\n inputChangeHandler = (event: Event) => {\n event.stopPropagation();\n };\n\n clickedElsewhere = (event: CustomEvent) => {\n const target = event.target as HTMLClickElsewhereElement;\n if (target.localName !== 'click-elsewhere') return;\n event.stopPropagation();\n const { popoverElement } = this;\n if (!popoverElement) return;\n popoverElement.open = false;\n };\n\n onCustomDisplayClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.focusInput();\n this.toggleDropdown();\n };\n\n removeTouchEventListeners = () => {\n if (!isMobile() || !this.popoverElement) return;\n\n this.popoverElement.removeEventListener('touchmove', this.handleTouchMove);\n };\n\n /// DOM ///\n renderCustomDisplay() {\n const hasSelectedDisplay = this.checkSelectedDisplay();\n if (!hasSelectedDisplay) return;\n this.checkSelectedDisplayHeight();\n\n return (\n <slot\n name=\"_selected-display\"\n slot=\"custom-display\"\n />\n );\n }\n\n render() {\n const showAsPseudo = !this.searchable;\n\n return (\n <click-elsewhere\n class={this.wrapperClasses}\n onChange={this.clickedElsewhere}\n >\n <div\n aria-live=\"polite\"\n aria-atomic=\"true\"\n role=\"status\"\n class=\"sr\"\n >\n {this.statusMessage}\n </div>\n <q2-input\n ref={el => (this.inputField = el)}\n class=\"q2-select-input\"\n label={(this.label && loc(this.label)) || ''}\n value={this.selectedDisplay}\n errors={\n (Array.isArray(this.errors) &&\n this.errors.length > 0 &&\n this.errors.map(error => loc(error))) ||\n (this.invalid && ['tecton.element.select.invalid']) ||\n []\n }\n disabled={this.disabled}\n optional={this.optional}\n readonly={this.readonly}\n placeholder={this.placeholder || undefined}\n hideLabel={this.hideLabel}\n ariaExpanded={`${this.open}`}\n ariaControls=\"option-list\"\n ariaHaspopup=\"listbox\"\n role=\"combobox\"\n pseudo={showAsPseudo}\n test-id=\"toggleDropdown\"\n hide-messages\n iconRight=\"chevron-down\"\n onClick={this.inputClickHandler}\n onInput={this.inputInputHandler}\n onKeyDown={this.inputKeydownHandler}\n onFocus={this.inputFocusHandler}\n onBlur={this.inputBlurHandler}\n onChange={this.inputChangeHandler}\n badgeValue={this.badgeValue}\n badgeTheme={this.inputFocused ? 'primary' : undefined}\n >\n {this.renderCustomDisplay()}\n </q2-input>\n <div\n class=\"custom-display-content\"\n hidden={!this.hasCustomDisplay || !!this.searchText}\n onClick={this.onCustomDisplayClick}\n >\n <slot name=\"q2-select-display\" />\n </div>\n {this.optionsDropdown()}\n </click-elsewhere>\n );\n }\n\n optionsDropdown() {\n return (\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.innerInputContainer}\n open={this.open}\n minHeight={this.popoverMinHeight}\n direction={this.popDirection}\n mode={this.popoverMode || undefined}\n block\n >\n <div class=\"popover-content\">\n <q2-option-list\n onPopoverState={this.onPopoverState}\n ref={el => (this.optionList = el)}\n type=\"listbox\"\n id=\"option-list\"\n show-selected={this.showSelected}\n label={this.listLabel}\n multiple={this.multiple}\n selectedOptions={this.structuredSelectedOptions}\n onChange={this.onOptionListChange}\n >\n <slot />\n </q2-option-list>\n <div\n class=\"popover-top-container\"\n ref={el => (this.popoverTopContainer = el)}\n hidden={!this.multiple && !this.hasPopoverTop}\n tabindex=\"-1\"\n >\n <slot name=\"popover-top\"></slot>\n {this.multiple && this.visibilityToggle()}\n </div>\n </div>\n <div\n class=\"popover-bottom-container\"\n hidden={!this.hasPopoverBottom}\n tabindex=\"-1\"\n >\n <slot name=\"popover-bottom\" />\n </div>\n </q2-popover>\n );\n }\n\n visibilityToggle() {\n const selectedOptionsCount = this.selectedOptions?.length ?? 0;\n const { showSelected } = this;\n return (\n <div class=\"multi-select-header\">\n <fieldset>\n <legend aria-label={loc('tecton.element.select.multiHeader.showing')}>\n {loc('tecton.element.select.multiHeader.showing')}\n </legend>\n <div>\n <input\n class=\"sr\"\n type=\"radio\"\n id=\"all\"\n name=\"viewDisplay\"\n value=\"all\"\n checked={!showSelected}\n aria-label={loc('tecton.element.select.multiHeader.allAriaLabel')}\n test-id=\"allOptionsButton\"\n onClick={this.showAllOptions}\n onKeyDown={this.visibilityToggleKeyDown}\n />\n <label htmlFor=\"all\">{loc('tecton.element.select.multiHeader.all')}</label>\n </div>\n\n <div>\n <input\n class=\"sr\"\n type=\"radio\"\n id=\"selected\"\n disabled={selectedOptionsCount === 0}\n name=\"viewDisplay\"\n value=\"selected\"\n aria-label={loc('tecton.element.select.multiHeader.selectedAriaLabel', [\n selectedOptionsCount,\n ])}\n checked={showSelected}\n test-id=\"selectedOptionsButton\"\n onClick={this.showSelectedOptions}\n onKeyDown={this.visibilityToggleKeyDown}\n />\n <label htmlFor=\"selected\">\n {loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount])}\n </label>\n </div>\n </fieldset>\n </div>\n );\n }\n}\n"],"mappings":"2LAAA,MAAMA,EAAc,kiNACpB,MAAAC,EAAeD,E,MC4BFE,EAAQ,M,2FAmHjBC,KAAAC,sBAAiC,MAIjCD,KAAAE,qBAAuC,GA2UvCF,KAAAG,uBAAyB,KACrB,IAAKC,MAAeJ,KAAKK,eAAgB,OAEzCL,KAAKK,eAAeC,iBAAiB,YAAaN,KAAKO,gBAAiB,CAAEC,QAAS,MAAO,EAiB9FR,KAAAS,mBAAqB,K,MACjB,IAAKL,IAAY,QACjBM,EAAAC,SAAM,MAANA,cAAM,SAANA,OAAQC,eAAW,MAAAF,SAAA,SAAAA,EAAEJ,iBAAiB,SAAUN,KAAKa,yBACrDC,OAAOR,iBAAiB,SAAUN,KAAKa,yBACvCE,iBAAc,MAAdA,sBAAc,SAAdA,eAAgBT,iBAAiB,SAAUN,KAAKa,wBAAwB,EAG5Eb,KAAAgB,qBAAuB,KACnB,MAAMC,EAAW,IAAIC,iBAAiBlB,KAAKmB,oBAC3CF,EAASG,QAAQpB,KAAKqB,YAAa,CAAEC,UAAW,KAAMC,QAAS,OAC/DvB,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NG,IAAKC,GAAO1Q,KAAK8K,oBAAsB4F,EACvClE,QAASxM,KAAKwI,WAAaxI,KAAK4B,cAChCyQ,SAAS,MAETlC,EAAA,QAAMnC,KAAK,gBACVhO,KAAKwI,UAAYxI,KAAKsS,qBAG/BnC,EAAA,OACIG,MAAM,2BACN9D,QAASxM,KAAK6B,iBACdwQ,SAAS,MAETlC,EAAA,QAAMnC,KAAK,oB,CAM3B,gBAAAsE,G,QACI,MAAMC,GAAuB5O,GAAAjD,EAAAV,KAAK0I,mBAAe,MAAAhI,SAAA,SAAAA,EAAE0B,UAAM,MAAAuB,SAAA,EAAAA,EAAI,EAC7D,MAAMjC,aAAEA,GAAiB1B,KACzB,OACImQ,EAAA,OAAKG,MAAM,uBACPH,EAAA,gBACIA,EAAA,uBAAoBlJ,EAAI,8CACnBA,EAAI,8CAETkJ,EAAA,WACIA,EAAA,SACIG,MAAM,KACN1M,KAAK,QACLuO,GAAG,MACHnE,KAAK,cACL9H,MAAM,MACNsM,SAAU9Q,EAAY,aACVuF,EAAI,kDAAiD,UACzD,mBACRqK,QAAStR,KAAK2B,eACd6P,UAAWxR,KAAKyF,0BAEpB0K,EAAA,SAAOsC,QAAQ,OAAOxL,EAAI,2CAG9BkJ,EAAA,WACIA,EAAA,SACIG,MAAM,KACN1M,KAAK,QACLuO,GAAG,WACHtN,SAAU0N,IAAyB,EACnCvE,KAAK,cACL9H,MAAM,WAAU,aACJe,EAAI,sDAAuD,CACnEsL,IAEJC,QAAS9Q,EAAY,UACb,wBACR4P,QAAStR,KAAKyB,oBACd+P,UAAWxR,KAAKyF,0BAEpB0K,EAAA,SAAOsC,QAAQ,YACVxL,EAAI,6CAA8C,CAACsL,O"}
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,g as a}from"./p-a5f18e27.js";import{r as n,o as s,i as r,n as o,l as c}from"./p-8ba6e825.js";const d="*{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;background:var(--tct-section-background, var(--tct-section-background-color, var(--t-section-background-color, var(--tct-section-bg, var(--t-section-bg, var(--app-white, #ffffff))))));color:var(--tct-section-font-color, var(--t-section-font-color, var(--t-text, #4d4d4d)));border-radius:var(--tct-section-border-radius, var(--t-section-border-radius, var(--app-border-radius-1, 3px)));margin:var(--tct-section-margin, var(--t-section-margin, var(--app-scale-3x, 15px)));border-width:var(--tct-section-border-width, 0);border-style:var(--tct-section-border-style, solid);border-color:var(--tct-section-border-color, none)}@media screen and (max-width: 767px){:host{--comp-default-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-section-margin, var(--t-section-margin, var(--comp-default-margin)))}}@media print{:host{--comp-default-print-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-section-print-margin, var(--comp-default-print-margin))}}.wrapper{--comp-tween:var(--tct-section-tween, var(--t-section-tween, var(--app-tween-1, 0.2s ease)));--comp-default-wrapper-padding:var(--app-scale-1x, 5px) 0;display:block;padding:var(--tct-section-wrapper-padding, var(--t-section-wrapper-padding, var(--comp-default-wrapper-padding)))}.wrapper:hover{box-shadow:var(--tct-section-wrapper-hover-box-shadow, var(--t-section-wrapper-hover-box-shadow, inherit))}:host([collapsible]) .wrapper{--comp-tween:var(--tct-section-tween, var(--t-section-tween, var(--app-tween-2, 0.4s ease)))}header{--comp-default-header-padding:0 var(--app-scale-3x, 15px);padding:var(--tct-section-header-padding, var(--t-section-header-padding, var(--comp-default-header-padding)));display:flex}@media print{header{padding:var(--tct-section-header-print-padding, 0)}}header.has-header{min-height:var(--tct-section-header-min-height, var(--t-section-header-min-height, 44px))}.header-content{flex:1 1 100%;min-width:0;align-self:center}:host([collapsible]) .header-content{cursor:pointer}.title{margin:var(--tct-section-title-margin, 0);font-size:var(--tct-section-title-font-size, 20px);font-weight:var(--tct-section-title-font-weight, 600);text-transform:var(--tct-section-title-text-transform, uppercase);letter-spacing:var(--tct-section-title-letter-spacing, 0.5px)}q2-icon{transition:transform var(--comp-tween)}:host(:not([expanded])) q2-icon,:host([expanded=false]) q2-icon{transform:rotate(180deg)}.content-wrapper{height:auto}.content-wrapper.is-closed{display:none;overflow:hidden}.content-wrapper.is-transitioning{overflow:hidden}:host([collapsible]) .content-wrapper{transition:height var(--comp-tween)}.content{--comp-default-content-padding:var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);padding:var(--tct-section-content-padding, var(--t-section-content-padding, var(--comp-default-content-padding)))}@media print{.content{padding:var(--tct-section-content-print-padding, 0)}}.content:focus{box-shadow:none}:host([collapsible]) :host(:not([expanded])) .content{visibility:hidden}";const h=d;const p=class{constructor(i){t(this,i);this.change=e(this,"change",7);this.titleId="title";this.contentId="content";this.onHeaderClick=()=>{this.change.emit({expanded:!this.expanded})};this.onTransitionEnd=()=>{if(this.expanded){this.contentHeight=undefined}else{this.hideContent=true}setTimeout((()=>{this.clearResizeInterval()}),1e3)};this.onHeaderSlotChange=()=>{const t=!!this.hostElement.querySelector('[slot="q2-section-header"]');if(this.hasYieldedHeader!==t){this.hasYieldedHeader=!!t}};this.clearResizeInterval=()=>{this.resizerFn&&clearInterval(this.resizerFn)};this.addHeaderSlotListener=()=>{if(this.headerSlot){this.headerSlot.addEventListener("slotchange",this.onHeaderSlotChange);return}const t=new MutationObserver(this.onHeaderSlotChange);t.observe(this.headerSlotWrapper,{childList:true});this.headerSlotMutationObserver=t};this.removeHeaderSlotListener=()=>{if(this.headerSlot){this.headerSlot.removeEventListener("slotchange",this.onHeaderSlotChange);return}this.headerSlotMutationObserver.disconnect()};this.addContentSlotListener=()=>{if(this.contentSlot){this.contentSlot.addEventListener("slotchange",n);return}const t=new MutationObserver(n);t.observe(this.contentContainer,{childList:true,subtree:true});this.contentSlotMutationObserver=t};this.removeContentSlotListener=()=>{if(this.contentSlot){this.contentSlot.removeEventListener("slotchange",n);return}this.contentSlotMutationObserver.disconnect()};this.collapsible=undefined;this.expanded=undefined;this.label=undefined;this.noCollapseIcon=undefined;this.contentHeight=undefined;this.hideContent=false;this.hasYieldedHeader=false}componentWillLoad(){this.onHeaderSlotChange();const{collapsible:t,expanded:e}=this;this.contentHeight=t&&e?undefined:"0px";this.hideContent=!e}componentDidLoad(){this.addHeaderSlotListener();this.addContentSlotListener();s(this.hostElement)}disconnectedCallback(){this.removeHeaderSlotListener();this.removeContentSlotListener()}defaultChangeHandler(t){if(t.target===this.hostElement&&!this.hostElement.onchange&&!!t.detail){this.expanded=t.detail.expanded}}delegateFocus(t){if(!r(t,this.hostElement))return;this.contentContainer.focus()}async expandedObserver(t){this.clearResizeInterval();this.resizerFn=setInterval(n,5);if(t){this.expandSection()}else{this.collapseSection()}}async collapseSection(){this.contentHeight=this.contentContainerHeight;await o((()=>{this.contentHeight=this.currentHeight}))}async expandSection(){this.hideContent=false;await o((()=>{this.contentHeight=this.currentHeight}))}collapsibleObserver(){this.contentHeight=this.currentHeight}get currentHeight(){const{collapsible:t,expanded:e}=this;if(!t){return null}else if(e){return this.contentContainerHeight}else{return"0"}}get contentContainerHeight(){return`${this.contentContainer.offsetHeight||0}px`}render(){const t=this.label||this.hasYieldedHeader;const e=["content-wrapper"];const{collapsible:a,hideContent:n,contentHeight:s}=this;if(a){if(n)e.push("is-closed");else if(s)e.push("is-transitioning")}const r=!this.hasYieldedHeader&&!!this.label;return i("section",{key:"1d43fa427c5c4a212d5464325e5f9e6fc507700d",class:"wrapper"},i("header",{key:"9a6b04ca3c9f3e08fc2a961d565085bbc7012b8f",class:t?"has-header":""},i("div",{key:"3964bbe9fc84f487fb6354ce551fd44263cdacb2",class:"header-content",id:this.titleId,onClick:this.collapsible&&this.onHeaderClick},r&&i("h2",{key:"54cdfae8a2ee5006c325ef19a003ace875ca07d5",class:"title"},c(this.label)),i("div",{key:"df75782c90dcb95be68619d1cef54878a1abd0fa",ref:t=>this.headerSlotWrapper=t,class:"header-slot-wrapper"},i("slot",{key:"903a1856f291553429154d32bab1a554a8ae129f",ref:t=>this.headerSlot=t,name:"q2-section-header"}))),this.collapsible&&!this.noCollapseIcon&&i("q2-btn",{key:"a5eb782978d91f927756acfda7c5ee3c48e91c85",label:c(this.label||"tecton.element.section.defaultToggleLabel"),ariaExpanded:`${!!this.expanded}`,ariaControls:this.contentId,"test-id":"toggleButton","hide-label":true,onClick:this.onHeaderClick},i("q2-icon",{key:"702f4cb05a8427d0b5f28874841f62e94d976743",type:"chevron-up"}))),i("div",{key:"0543ebeacfacb6ff13e045a8acd139c06103da44",class:e.join(" "),id:this.contentId,"aria-labelledby":this.titleId,role:"region",onTransitionEnd:this.onTransitionEnd,style:this.collapsible&&{height:this.contentHeight}},i("div",{key:"e3f627ad62b6005701bf9e10b082b8d1b3e262b0",ref:t=>this.contentContainer=t,class:"content",tabindex:"-1"},i("slot",{key:"736ef266ec54a39f61fec0c5ec5c4591542a1d75",ref:t=>this.contentSlot=t}))))}get hostElement(){return a(this)}static get watchers(){return{expanded:["expandedObserver"],collapsible:["collapsibleObserver"]}}};p.style=h;export{p as q2_section};
2
- //# sourceMappingURL=p-3cf22783.entry.js.map
1
+ import{r as t,c as e,h as i,g as a}from"./p-a5f18e27.js";import{r as n,o as s,i as r,n as o,l as c}from"./p-c49e1a96.js";const d="*{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;background:var(--tct-section-background, var(--tct-section-background-color, var(--t-section-background-color, var(--tct-section-bg, var(--t-section-bg, var(--app-white, #ffffff))))));color:var(--tct-section-font-color, var(--t-section-font-color, var(--t-text, #4d4d4d)));border-radius:var(--tct-section-border-radius, var(--t-section-border-radius, var(--app-border-radius-1, 3px)));margin:var(--tct-section-margin, var(--t-section-margin, var(--app-scale-3x, 15px)));border-width:var(--tct-section-border-width, 0);border-style:var(--tct-section-border-style, solid);border-color:var(--tct-section-border-color, none)}@media screen and (max-width: 767px){:host{--comp-default-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-section-margin, var(--t-section-margin, var(--comp-default-margin)))}}@media print{:host{--comp-default-print-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-section-print-margin, var(--comp-default-print-margin))}}.wrapper{--comp-tween:var(--tct-section-tween, var(--t-section-tween, var(--app-tween-1, 0.2s ease)));--comp-default-wrapper-padding:var(--app-scale-1x, 5px) 0;display:block;padding:var(--tct-section-wrapper-padding, var(--t-section-wrapper-padding, var(--comp-default-wrapper-padding)))}.wrapper:hover{box-shadow:var(--tct-section-wrapper-hover-box-shadow, var(--t-section-wrapper-hover-box-shadow, inherit))}:host([collapsible]) .wrapper{--comp-tween:var(--tct-section-tween, var(--t-section-tween, var(--app-tween-2, 0.4s ease)))}header{--comp-default-header-padding:0 var(--app-scale-3x, 15px);padding:var(--tct-section-header-padding, var(--t-section-header-padding, var(--comp-default-header-padding)));display:flex}@media print{header{padding:var(--tct-section-header-print-padding, 0)}}header.has-header{min-height:var(--tct-section-header-min-height, var(--t-section-header-min-height, 44px))}.header-content{flex:1 1 100%;min-width:0;align-self:center}:host([collapsible]) .header-content{cursor:pointer}.title{margin:var(--tct-section-title-margin, 0);font-size:var(--tct-section-title-font-size, 20px);font-weight:var(--tct-section-title-font-weight, 600);text-transform:var(--tct-section-title-text-transform, uppercase);letter-spacing:var(--tct-section-title-letter-spacing, 0.5px)}q2-icon{transition:transform var(--comp-tween)}:host(:not([expanded])) q2-icon,:host([expanded=false]) q2-icon{transform:rotate(180deg)}.content-wrapper{height:auto}.content-wrapper.is-closed{display:none;overflow:hidden}.content-wrapper.is-transitioning{overflow:hidden}:host([collapsible]) .content-wrapper{transition:height var(--comp-tween)}.content{--comp-default-content-padding:var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);padding:var(--tct-section-content-padding, var(--t-section-content-padding, var(--comp-default-content-padding)))}@media print{.content{padding:var(--tct-section-content-print-padding, 0)}}.content:focus{box-shadow:none}:host([collapsible]) :host(:not([expanded])) .content{visibility:hidden}";const h=d;const p=class{constructor(i){t(this,i);this.change=e(this,"change",7);this.titleId="title";this.contentId="content";this.onHeaderClick=()=>{this.change.emit({expanded:!this.expanded})};this.onTransitionEnd=()=>{if(this.expanded){this.contentHeight=undefined}else{this.hideContent=true}setTimeout((()=>{this.clearResizeInterval()}),1e3)};this.onHeaderSlotChange=()=>{const t=!!this.hostElement.querySelector('[slot="q2-section-header"]');if(this.hasYieldedHeader!==t){this.hasYieldedHeader=!!t}};this.clearResizeInterval=()=>{this.resizerFn&&clearInterval(this.resizerFn)};this.addHeaderSlotListener=()=>{if(this.headerSlot){this.headerSlot.addEventListener("slotchange",this.onHeaderSlotChange);return}const t=new MutationObserver(this.onHeaderSlotChange);t.observe(this.headerSlotWrapper,{childList:true});this.headerSlotMutationObserver=t};this.removeHeaderSlotListener=()=>{if(this.headerSlot){this.headerSlot.removeEventListener("slotchange",this.onHeaderSlotChange);return}this.headerSlotMutationObserver.disconnect()};this.addContentSlotListener=()=>{if(this.contentSlot){this.contentSlot.addEventListener("slotchange",n);return}const t=new MutationObserver(n);t.observe(this.contentContainer,{childList:true,subtree:true});this.contentSlotMutationObserver=t};this.removeContentSlotListener=()=>{if(this.contentSlot){this.contentSlot.removeEventListener("slotchange",n);return}this.contentSlotMutationObserver.disconnect()};this.collapsible=undefined;this.expanded=undefined;this.label=undefined;this.noCollapseIcon=undefined;this.contentHeight=undefined;this.hideContent=false;this.hasYieldedHeader=false}componentWillLoad(){this.onHeaderSlotChange();const{collapsible:t,expanded:e}=this;this.contentHeight=t&&e?undefined:"0px";this.hideContent=!e}componentDidLoad(){this.addHeaderSlotListener();this.addContentSlotListener();s(this.hostElement)}disconnectedCallback(){this.removeHeaderSlotListener();this.removeContentSlotListener()}defaultChangeHandler(t){if(t.target===this.hostElement&&!this.hostElement.onchange&&!!t.detail){this.expanded=t.detail.expanded}}delegateFocus(t){if(!r(t,this.hostElement))return;this.contentContainer.focus()}async expandedObserver(t){this.clearResizeInterval();this.resizerFn=setInterval(n,5);if(t){this.expandSection()}else{this.collapseSection()}}async collapseSection(){this.contentHeight=this.contentContainerHeight;await o((()=>{this.contentHeight=this.currentHeight}))}async expandSection(){this.hideContent=false;await o((()=>{this.contentHeight=this.currentHeight}))}collapsibleObserver(){this.contentHeight=this.currentHeight}get currentHeight(){const{collapsible:t,expanded:e}=this;if(!t){return null}else if(e){return this.contentContainerHeight}else{return"0"}}get contentContainerHeight(){return`${this.contentContainer.offsetHeight||0}px`}render(){const t=this.label||this.hasYieldedHeader;const e=["content-wrapper"];const{collapsible:a,hideContent:n,contentHeight:s}=this;if(a){if(n)e.push("is-closed");else if(s)e.push("is-transitioning")}const r=!this.hasYieldedHeader&&!!this.label;return i("section",{key:"1d43fa427c5c4a212d5464325e5f9e6fc507700d",class:"wrapper"},i("header",{key:"9a6b04ca3c9f3e08fc2a961d565085bbc7012b8f",class:t?"has-header":""},i("div",{key:"3964bbe9fc84f487fb6354ce551fd44263cdacb2",class:"header-content",id:this.titleId,onClick:this.collapsible&&this.onHeaderClick},r&&i("h2",{key:"54cdfae8a2ee5006c325ef19a003ace875ca07d5",class:"title"},c(this.label)),i("div",{key:"df75782c90dcb95be68619d1cef54878a1abd0fa",ref:t=>this.headerSlotWrapper=t,class:"header-slot-wrapper"},i("slot",{key:"903a1856f291553429154d32bab1a554a8ae129f",ref:t=>this.headerSlot=t,name:"q2-section-header"}))),this.collapsible&&!this.noCollapseIcon&&i("q2-btn",{key:"a5eb782978d91f927756acfda7c5ee3c48e91c85",label:c(this.label||"tecton.element.section.defaultToggleLabel"),ariaExpanded:`${!!this.expanded}`,ariaControls:this.contentId,"test-id":"toggleButton","hide-label":true,onClick:this.onHeaderClick},i("q2-icon",{key:"702f4cb05a8427d0b5f28874841f62e94d976743",type:"chevron-up"}))),i("div",{key:"0543ebeacfacb6ff13e045a8acd139c06103da44",class:e.join(" "),id:this.contentId,"aria-labelledby":this.titleId,role:"region",onTransitionEnd:this.onTransitionEnd,style:this.collapsible&&{height:this.contentHeight}},i("div",{key:"e3f627ad62b6005701bf9e10b082b8d1b3e262b0",ref:t=>this.contentContainer=t,class:"content",tabindex:"-1"},i("slot",{key:"736ef266ec54a39f61fec0c5ec5c4591542a1d75",ref:t=>this.contentSlot=t}))))}get hostElement(){return a(this)}static get watchers(){return{expanded:["expandedObserver"],collapsible:["collapsibleObserver"]}}};p.style=h;export{p as q2_section};
2
+ //# sourceMappingURL=p-f00ce995.entry.js.map