q2-tecton-elements 1.55.5 → 1.55.6

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 (207) hide show
  1. package/dist/bundle-report.json +92 -46
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
  4. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  5. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-badge_7.cjs.entry.js +3 -3
  7. package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
  8. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-dropdown.cjs.entry.js +24 -21
  14. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  15. package/dist/cjs/q2-example.cjs.entry.js +1 -1
  16. package/dist/cjs/q2-form.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-item_3.cjs.entry.js +2 -2
  19. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-modal.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
  23. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-option-list_2.cjs.entry.js +58 -59
  25. package/dist/cjs/q2-option-list_2.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
  27. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-select.cjs.entry.js +80 -10
  32. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  33. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  34. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  37. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  38. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  39. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  40. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  41. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  42. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  43. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +2 -2
  44. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  45. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  46. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  47. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  48. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  49. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  50. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  51. package/dist/collection/components/q2-dropdown/q2-dropdown.js +25 -21
  52. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  53. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +34 -32
  54. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  55. package/dist/collection/components/q2-example/q2-example.js +1 -1
  56. package/dist/collection/components/q2-form/q2-form.js +1 -1
  57. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  58. package/dist/collection/components/q2-input/q2-input.js +1 -1
  59. package/dist/collection/components/q2-item/q2-item.js +1 -1
  60. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  61. package/dist/collection/components/q2-list/q2-list.js +1 -1
  62. package/dist/collection/components/q2-message/q2-message.js +1 -1
  63. package/dist/collection/components/q2-modal/q2-modal.js +1 -1
  64. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  65. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  66. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +1 -0
  67. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  68. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  69. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  70. package/dist/collection/components/q2-popover/q2-popover.js +59 -59
  71. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  72. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -34
  73. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  74. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +743 -435
  75. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  76. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  77. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  78. package/dist/collection/components/q2-section/q2-section.js +2 -2
  79. package/dist/collection/components/q2-select/q2-select.js +96 -14
  80. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  81. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +327 -0
  82. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -1
  83. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  84. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  85. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  86. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  87. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  88. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +5 -0
  89. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  90. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  91. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  92. package/dist/components/q2-action-group2.js +1 -1
  93. package/dist/components/q2-action-sheet.js +1 -1
  94. package/dist/components/q2-avatar2.js +1 -1
  95. package/dist/components/q2-carousel-pane.js +2 -2
  96. package/dist/components/q2-chart-area.js +1 -1
  97. package/dist/components/q2-chart-bar.js +1 -1
  98. package/dist/components/q2-chart-donut.js +1 -1
  99. package/dist/components/q2-currency.js +1 -1
  100. package/dist/components/q2-detail.js +1 -1
  101. package/dist/components/q2-dropdown.js +24 -21
  102. package/dist/components/q2-dropdown.js.map +1 -1
  103. package/dist/components/q2-example.js +1 -1
  104. package/dist/components/q2-form.js +1 -1
  105. package/dist/components/q2-formatted-text.js +1 -1
  106. package/dist/components/q2-input2.js +1 -1
  107. package/dist/components/q2-item2.js +1 -1
  108. package/dist/components/q2-legend2.js +1 -1
  109. package/dist/components/q2-list2.js +1 -1
  110. package/dist/components/q2-message2.js +1 -1
  111. package/dist/components/q2-modal.js +1 -1
  112. package/dist/components/q2-month-picker.js +2 -2
  113. package/dist/components/q2-optgroup2.js +1 -1
  114. package/dist/components/q2-pagination.js +3 -3
  115. package/dist/components/q2-pill.js +1 -1
  116. package/dist/components/q2-popover2.js +58 -59
  117. package/dist/components/q2-popover2.js.map +1 -1
  118. package/dist/components/q2-relative-time.js +1 -1
  119. package/dist/components/q2-resize-observer2.js +1 -1
  120. package/dist/components/q2-section.js +2 -2
  121. package/dist/components/q2-select2.js +84 -14
  122. package/dist/components/q2-select2.js.map +1 -1
  123. package/dist/components/q2-stepper-vertical.js +1 -1
  124. package/dist/components/q2-stepper.js +1 -1
  125. package/dist/components/q2-tab-container.js +1 -1
  126. package/dist/components/q2-tab-pane.js +1 -1
  127. package/dist/components/q2-tag.js +1 -1
  128. package/dist/components/q2-textarea.js +1 -1
  129. package/dist/components/tecton-tab-pane.js +2 -2
  130. package/dist/esm/loader.js +1 -1
  131. package/dist/esm/q2-action-group.entry.js +1 -1
  132. package/dist/esm/q2-action-sheet.entry.js +1 -1
  133. package/dist/esm/q2-avatar.entry.js +1 -1
  134. package/dist/esm/q2-badge_7.entry.js +3 -3
  135. package/dist/esm/q2-carousel-pane.entry.js +2 -2
  136. package/dist/esm/q2-chart-area.entry.js +1 -1
  137. package/dist/esm/q2-chart-bar.entry.js +1 -1
  138. package/dist/esm/q2-chart-donut.entry.js +1 -1
  139. package/dist/esm/q2-currency.entry.js +1 -1
  140. package/dist/esm/q2-detail.entry.js +1 -1
  141. package/dist/esm/q2-dropdown.entry.js +24 -21
  142. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  143. package/dist/esm/q2-example.entry.js +1 -1
  144. package/dist/esm/q2-form.entry.js +1 -1
  145. package/dist/esm/q2-formatted-text.entry.js +1 -1
  146. package/dist/esm/q2-item_3.entry.js +2 -2
  147. package/dist/esm/q2-legend.entry.js +1 -1
  148. package/dist/esm/q2-message.entry.js +1 -1
  149. package/dist/esm/q2-modal.entry.js +1 -1
  150. package/dist/esm/q2-month-picker.entry.js +2 -2
  151. package/dist/esm/q2-optgroup.entry.js +1 -1
  152. package/dist/esm/q2-option-list_2.entry.js +58 -59
  153. package/dist/esm/q2-option-list_2.entry.js.map +1 -1
  154. package/dist/esm/q2-pagination.entry.js +3 -3
  155. package/dist/esm/q2-pill.entry.js +1 -1
  156. package/dist/esm/q2-relative-time.entry.js +1 -1
  157. package/dist/esm/q2-resize-observer.entry.js +1 -1
  158. package/dist/esm/q2-section.entry.js +2 -2
  159. package/dist/esm/q2-select.entry.js +82 -12
  160. package/dist/esm/q2-select.entry.js.map +1 -1
  161. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  162. package/dist/esm/q2-stepper.entry.js +1 -1
  163. package/dist/esm/q2-tag.entry.js +1 -1
  164. package/dist/esm/q2-tecton-elements.js +1 -1
  165. package/dist/esm/q2-textarea.entry.js +1 -1
  166. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  167. package/dist/q2-tecton-elements/q2-action-group.entry.js +3 -3
  168. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +8 -8
  169. package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
  170. package/dist/q2-tecton-elements/q2-badge_7.entry.js +16 -16
  171. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +3 -3
  172. package/dist/q2-tecton-elements/q2-chart-area.entry.js +2 -2
  173. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +79 -79
  174. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +100 -100
  175. package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
  176. package/dist/q2-tecton-elements/q2-detail.entry.js +3 -3
  177. package/dist/q2-tecton-elements/q2-dropdown.entry.js +26 -22
  178. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  179. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  180. package/dist/q2-tecton-elements/q2-form.entry.js +7 -7
  181. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  182. package/dist/q2-tecton-elements/q2-item_3.entry.js +21 -21
  183. package/dist/q2-tecton-elements/q2-legend.entry.js +5 -5
  184. package/dist/q2-tecton-elements/q2-message.entry.js +20 -20
  185. package/dist/q2-tecton-elements/q2-modal.entry.js +17 -17
  186. package/dist/q2-tecton-elements/q2-month-picker.entry.js +13 -13
  187. package/dist/q2-tecton-elements/q2-optgroup.entry.js +4 -4
  188. package/dist/q2-tecton-elements/q2-option-list_2.entry.js +128 -123
  189. package/dist/q2-tecton-elements/q2-option-list_2.entry.js.map +1 -1
  190. package/dist/q2-tecton-elements/q2-pagination.entry.js +37 -37
  191. package/dist/q2-tecton-elements/q2-pill.entry.js +13 -13
  192. package/dist/q2-tecton-elements/q2-relative-time.entry.js +4 -4
  193. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
  194. package/dist/q2-tecton-elements/q2-section.entry.js +11 -11
  195. package/dist/q2-tecton-elements/q2-select.entry.js +146 -88
  196. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  197. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +28 -28
  198. package/dist/q2-tecton-elements/q2-stepper.entry.js +20 -20
  199. package/dist/q2-tecton-elements/q2-tag.entry.js +5 -5
  200. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  201. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  202. package/dist/q2-tecton-elements/q2-textarea.entry.js +2 -2
  203. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
  204. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +6 -4
  205. package/dist/types/components/q2-popover/q2-popover.d.ts +4 -4
  206. package/dist/types/components/q2-select/q2-select.d.ts +18 -0
  207. package/package.json +3 -3
@@ -4526,7 +4526,7 @@ const Q2Input = class {
4526
4526
  return (index.h(index.Fragment, null, hasCustomDisplaySlot && (index.h("div", { class: "custom-display-container" }, index.h("slot", { name: "custom-display" }))), index.h("input", { ref: el => (this.inputRef = el), class: inputClasses.join(' '), id: this.inputId, type: this.computedType, size: this.formattedValueObject.prefix ? 10 : undefined, maxlength: ['date', 'currency'].includes(this.type) ? undefined : this.maxlength || undefined, max: this.max, min: this.min, step: this.step, "aria-current": this.current || undefined, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-owns": ariaOwns, "aria-haspopup": ariaHaspopup, "aria-expanded": ariaExpanded, "aria-activedescendant": ariaActivedescendant, autocomplete: this.computedAutocomplete, autocapitalize: this.autocapitalize, autocorrect: this.autocorrect === 'on' ? 'on' : 'off', autofocus: this.autofocus, placeholder: (this.placeholder && index$1.loc(this.placeholder)) || undefined, role: this._role, "test-id": "inputField", readonly: this.readonly || this._preventEntry, disabled: !!this.disabled, onFocus: this.onInputFocus, onBlur: this.onInputBlur, onClick: this.onInputClick, onKeyDown: this.onInputKeydown, onInput: this.onInputInput, onPaste: this.onInputPaste, inputmode: this.inputMode, pattern: this.pattern || undefined })));
4527
4527
  }
4528
4528
  render() {
4529
- return (index.h("div", { key: '2cc30e91a73c9add9f82e794a0e04266fe5e8e78', class: this.wrapperClasses }, index.h("div", { key: '64baf86fc032a16240e7d4afb9985de4ed63346f', class: "label-wrapper" }, index$1.renderLabel(this), this.renderCountDOM()), this.renderInputContainerDOM(), index$1.renderMessages(this)));
4529
+ return (index.h("div", { key: '2386287415e06745ae371d98e72c51c08db45568', class: this.wrapperClasses }, index.h("div", { key: 'a217a2c8c56174d5f6198a4b4fd2269243c1be17', class: "label-wrapper" }, index$1.renderLabel(this), this.renderCountDOM()), this.renderInputContainerDOM(), index$1.renderMessages(this)));
4530
4530
  }
4531
4531
  get hostElement() { return index.getElement(this); }
4532
4532
  static get watchers() { return {
@@ -4879,7 +4879,7 @@ const Q2TabContainer = class {
4879
4879
  return (index.h("div", { class: "tab-pane-badge", "aria-label": `${tab.label}, ${tab.badgeCount} ${description}` }, tab.label, index.h("q2-badge", { value: tab.badgeCount, theme: theme, status: tab.badgeStatus })));
4880
4880
  }
4881
4881
  render() {
4882
- return (index.h(index.Fragment, { key: '97f2da0c2b5b73725ba7df8df2a0eb549f9cfd88' }, index.h("div", { key: 'ff697afe9618dfc6e262701febdca55b279de4d5', class: "tab-container" }, this.scrollEnabled && (index.h(index.Fragment, { key: '11151d37351e2770f29f5f0b31df5afb68855dc2' }, index.h("div", { key: 'd2bf7ed9da0348421a767ba7d38faf942ad44634', class: "gradient-left", hidden: !this.showScrollLeft }), index.h("div", { key: 'f53cc922938e075b524cae7289a4b5645b867078', class: "gradient-right", hidden: !this.showScrollRight }), index.h("q2-btn", { key: '0c17c23b928f2aab34632073d3b3ba380e153865', class: "btn-left", hidden: !this.showScrollLeft, onClick: () => this.onScrollBtnClick('left') }, index.h("q2-icon", { key: 'ea146cfc55d86e1531bbe94a9a217b93463f9fea', type: "chevron-left", label: "scroll left" })), index.h("q2-btn", { key: 'fce01f8a17e78df73cc834a203b55b9427c4facc', class: "btn-right", hidden: !this.showScrollRight, onClick: () => this.onScrollBtnClick('right') }, index.h("q2-icon", { key: 'd379b82bd9465278b1e40f82137fc08bd8b0c750', type: "chevron-right", label: "scroll right" })))), index.h("ul", { key: '97d39c2ff74ac064da28ca763fbd3d6e98a952dd', onScroll: this.checkScrollState, ref: el => (this.listElement = el), class: this.noPrint ? 'no-print' : null, role: "tablist" }, this.tabs.map((tab, index) => this.renderTab(tab, index)))), index.h("div", { key: '5a9a728931e3dfafe2b20b5a1d1e72b5ef67913c', class: "tab-content" }, index.h("slot", { key: 'e10400800c9ff9e3b7d9947a32abeeb146981f8b', onSlotchange: () => this.onSlotChange() }))));
4882
+ return (index.h(index.Fragment, { key: 'c89fe2837c1075d6b456aa81c0bbfdbd1adb216b' }, index.h("div", { key: 'd0e015387c1cf3c4e9e3c645a345e2ab1e7385c0', class: "tab-container" }, this.scrollEnabled && (index.h(index.Fragment, { key: 'f46f428c45eb6708dac66595270cf8eb2058dea3' }, index.h("div", { key: '78e5e6bb2fc0de116e0a7a73f0598317c3881868', class: "gradient-left", hidden: !this.showScrollLeft }), index.h("div", { key: '6e923a319b64508310de2135a3f76249fefe33f3', class: "gradient-right", hidden: !this.showScrollRight }), index.h("q2-btn", { key: '3e6a69a9dd8977a57c5ad645e47697eafb9a7b5b', class: "btn-left", hidden: !this.showScrollLeft, onClick: () => this.onScrollBtnClick('left') }, index.h("q2-icon", { key: '258bb459c027cff471ae752fa1abe623f718d94e', type: "chevron-left", label: "scroll left" })), index.h("q2-btn", { key: '732a1f3f5081de393735a859d85a6b424e79d59b', class: "btn-right", hidden: !this.showScrollRight, onClick: () => this.onScrollBtnClick('right') }, index.h("q2-icon", { key: 'f4f4aae0b2c9589376fcfea523481709f8b1a678', type: "chevron-right", label: "scroll right" })))), index.h("ul", { key: '85ffe9e0129ef306611316a4a5be918937d9e139', onScroll: this.checkScrollState, ref: el => (this.listElement = el), class: this.noPrint ? 'no-print' : null, role: "tablist" }, this.tabs.map((tab, index) => this.renderTab(tab, index)))), index.h("div", { key: '9dfa00e1e412dc7b9dc38559183460c8da814a97', class: "tab-content" }, index.h("slot", { key: '985d948ee990ab8861537bc7f9f0ac1fd8dfeb90', onSlotchange: () => this.onSlotChange() }))));
4883
4883
  }
4884
4884
  get hostElement() { return index.getElement(this); }
4885
4885
  static get watchers() { return {
@@ -4915,7 +4915,7 @@ const Q2TabPane = class {
4915
4915
  // #endregion
4916
4916
  // #region Render Methods
4917
4917
  render() {
4918
- return (index.h("div", { key: '8f27e390528c79ae1589e1a7614c72455ebbdd32', id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, index.h("slot", { key: '2d00ea2e03bbac11a63193debd2bb9904050ba37' })));
4918
+ return (index.h("div", { key: 'cf5a8eb75b97459214c279b02f0fdd7c3fe1b203', id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, index.h("slot", { key: '00b05dbda891dbbbc3f40d6dc531e8940edbe761' })));
4919
4919
  }
4920
4920
  static get watchers() { return {
4921
4921
  "badgeCount": ["badgeObserver"],
@@ -102,12 +102,12 @@ const Q2CarouselPane = class {
102
102
  // #region Render Methods
103
103
  render() {
104
104
  const { label } = this;
105
- return (index.h(index.Host, { key: '2aedd4957b29975f2a33168729e4764f9a5054f4', class: this.generatePaneClass(this.currentPaneIndex), tabIndex: this.isActivePane ? 0 : -1, role: "group", "aria-roledescription": "slide", "aria-hidden": this.isActivePane ? undefined : 'true', "aria-label": label
105
+ return (index.h(index.Host, { key: 'cd1455adf662c5c746a4521da041ddfba07282a8', class: this.generatePaneClass(this.currentPaneIndex), tabIndex: this.isActivePane ? 0 : -1, role: "group", "aria-roledescription": "slide", "aria-hidden": this.isActivePane ? undefined : 'true', "aria-label": label
106
106
  ? index$1.loc(label)
107
107
  : index$1.loc('tecton.element.carousel.itemDescription', [
108
108
  (this.currentPaneIndex + 1).toString(),
109
109
  (this.siblingCount || 0).toString(),
110
- ]), onClick: this.paneClicked }, index.h("article", { key: '1b1f852451f3f58f96b0e38a6051b49f83b9fb3c', class: "q2-carousel-pane-main-content" }, index.h("slot", { key: '00bec6dca522ec9ebea3285405ed3bf94eea65ae' }))));
110
+ ]), onClick: this.paneClicked }, index.h("article", { key: '5f3c81731a5ec90fcb5af184396d3e430be61b19', class: "q2-carousel-pane-main-content" }, index.h("slot", { key: '556cf2a83bc1c6715b9693d1d9eaa651ba83785a' }))));
111
111
  }
112
112
  get hostElement() { return index.getElement(this); }
113
113
  static get watchers() { return {
@@ -4208,7 +4208,7 @@ const Q2ChartArea = class {
4208
4208
  // #endregion
4209
4209
  // #region Render Methods
4210
4210
  render() {
4211
- return (index.h("div", { key: '30a28bc85debc198a9f18f255921135b894c1977', class: "container" }, index.h("div", { key: '2809c713137cc4469eff5a65c3680da8f9b83a37', ref: el => (this.chartContainer = el), class: "chart-container", role: "img", "test-id": "areaChartContainer" })));
4211
+ return (index.h("div", { key: '9d314fbeaf3f97a5845fc7e7c990abfc1107dd45', class: "container" }, index.h("div", { key: '4be51fb27a8307dd80a6872babfc4a520c14bde5', ref: el => (this.chartContainer = el), class: "chart-container", role: "img", "test-id": "areaChartContainer" })));
4212
4212
  }
4213
4213
  get hostElement() { return index.getElement(this); }
4214
4214
  static get watchers() { return {
@@ -1414,7 +1414,7 @@ const Q2ChartBar = class {
1414
1414
  // #endregion
1415
1415
  // #region Render Methods
1416
1416
  render() {
1417
- return (index.h("div", { key: '40fbc74d1ee54a918bdbdcd0cd21369576bb175c', class: "container" }, index.h("div", { key: '3646090b3d0f826a91f01afb0413fb674380b025', ref: el => (this.chartContainer = el), class: "chart-container", role: "img", "test-id": "barChartContainer" })));
1417
+ return (index.h("div", { key: 'cd7321cfeb85ccdecc4028ec46933c5e4a5b21f5', class: "container" }, index.h("div", { key: '54f6f0b9c291a126fdab28abd0ad54a9a03c058c', ref: el => (this.chartContainer = el), class: "chart-container", role: "img", "test-id": "barChartContainer" })));
1418
1418
  }
1419
1419
  get hostElement() { return index.getElement(this); }
1420
1420
  static get watchers() { return {
@@ -4511,7 +4511,7 @@ const Q2ChartDonut = class {
4511
4511
  } })), !!name && index.h("div", { class: "name" }, name), !isNaN(value) && index.h("div", { class: "value" }, displayValue))));
4512
4512
  }
4513
4513
  render() {
4514
- return (index.h("click-elsewhere", { key: '46371f94c2bd94407b40585b73f0bb47c5e315f6', onChange: this.onClickElsewhere }, index.h("figure", { key: '9481cae2bb3c65f0c3a0ffb839bde2688808777d' }, index.h("div", { key: '13865b38e703c6deaf921d3bdf228f3b8fa42486', class: "container" }, index.h("div", { key: '7020e99dc26d9127e255b0609d6f8d9de2ad14a7', ref: el => (this.chartContainer = el), "aria-describedby": !this.isClickable ? 'center-card-description' : undefined, class: "chart-container", role: "img", "test-id": "chartContainer", onClick: this.onContainerClick, tabIndex: !this.isClickable ? 0 : undefined, onKeyDown: !this.isClickable ? this.onButtonKeyDown : undefined }), this.renderCenterBlock()), this.showLegend && (index.h("figcaption", { key: '0fc4fa0da6f895a5f0d0fd044739652ccb0b87f1' }, index.h("q2-legend", { key: '1ab827762eb139944842075305f3b2628ec59d32', class: "legend", data: this.legendData, format: this.format, hoveredItemId: this.legendHoveredId, onClick: this.onLegendClick, onMouseleave: this.onLegendMouseleave, onMouseenter: this.onLegendMouseenter, selectedItemId: this.selectedId }))))));
4514
+ return (index.h("click-elsewhere", { key: '70caeadafd7c6d901e1689917c96285c7f208d53', onChange: this.onClickElsewhere }, index.h("figure", { key: '8a826acfc19fd852554336a6eacdd42e4dd514e8' }, index.h("div", { key: '76a2b25fe85c4562e5faf61030b9ff43b6d531ad', class: "container" }, index.h("div", { key: '16d64a7c69ae3f681d67c45bb832e4ccb443fc5f', ref: el => (this.chartContainer = el), "aria-describedby": !this.isClickable ? 'center-card-description' : undefined, class: "chart-container", role: "img", "test-id": "chartContainer", onClick: this.onContainerClick, tabIndex: !this.isClickable ? 0 : undefined, onKeyDown: !this.isClickable ? this.onButtonKeyDown : undefined }), this.renderCenterBlock()), this.showLegend && (index.h("figcaption", { key: '6e543ace8a71d24e3fb0144c825af22c79e8d0d7' }, index.h("q2-legend", { key: '8d7d38f4f720cec6b583a3c9bb17e8a8a80aa301', class: "legend", data: this.legendData, format: this.format, hoveredItemId: this.legendHoveredId, onClick: this.onLegendClick, onMouseleave: this.onLegendMouseleave, onMouseenter: this.onLegendMouseenter, selectedItemId: this.selectedId }))))));
4515
4515
  }
4516
4516
  get hostElement() { return index.getElement(this); }
4517
4517
  static get watchers() { return {
@@ -125,7 +125,7 @@ const Q2Currency = class {
125
125
  // #region Render Methods
126
126
  render() {
127
127
  const { hasPlusMinusSign, plusMinusSign, currencyIsFront, currencySymbol, shouldSuperscriptSymbol, amountCore, fraction, shouldSuperscriptFraction, readableCurrency, currencyClasses, } = this;
128
- return (index.h("div", { key: '85d715e4a420d06562d2d64f389ea0a5929cdc98', "test-id": "q2CurrencyInner", class: currencyClasses, "aria-label": readableCurrency }, hasPlusMinusSign && index.h("span", { key: 'ee6691d5e476d0f3d7285ecf8b5f251a6a6e417b' }, plusMinusSign), currencyIsFront && index.h("span", { key: 'ed8e2a1bea42bfd3e3d218dd5831ef15ceb75502', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol), index.h("span", { key: 'f9aa62f179a5d9c67b154df4f28113d4993a3ec3' }, amountCore), index.h("span", { key: '9049169b8d30ff721ba251a13c63c599dc9491aa', class: shouldSuperscriptFraction ? 'superscript' : '' }, fraction), !currencyIsFront && index.h("span", { key: 'e1cd352956a793cb4626d9f8f72b3ca759a471e6', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol)));
128
+ return (index.h("div", { key: '4c2f61b4d19f3e88ad1319e12256badb43d0d52d', "test-id": "q2CurrencyInner", class: currencyClasses, "aria-label": readableCurrency }, hasPlusMinusSign && index.h("span", { key: '2f4e0438bba6109a8c20d91c277529725c0279c7' }, plusMinusSign), currencyIsFront && index.h("span", { key: 'ebe11ebd4fd2d6ccbf42399ede792cc4040fe4df', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol), index.h("span", { key: '80ea418779d3129251123d3149a029fd0b539165' }, amountCore), index.h("span", { key: '425854a1827c3eb83bbc49e8742dd2a54c103ebd', class: shouldSuperscriptFraction ? 'superscript' : '' }, fraction), !currencyIsFront && index.h("span", { key: '8f0ac5f4541a86e30ffd79ea298d4566cdb4328b', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol)));
129
129
  }
130
130
  get hostElement() { return index.getElement(this); }
131
131
  static get watchers() { return {
@@ -107,7 +107,7 @@ const Q2Detail = class {
107
107
  // #endregion
108
108
  // #region Render Methods
109
109
  render() {
110
- return (index.h("div", { key: '5266648e705eff434fd3f70992e4131b465093a1', class: this.detailClasses }, this.hasLabel && (index.h("div", { key: '8790254081b4a51a2e71ffd0342f5946b0d49bfe', class: this.labelClasses, "aria-describedby": !!this.description ? 'label-description' : undefined }, !!this.label ? index$1.loc(this.label) : this.hasLabelSlotContent ? index.h("slot", { name: "label" }) : '')), this.hasDescripiton && (index.h("div", { key: '226f0df4f71a50e44cb8eafff8d1f74d3a9a7b33', id: "label-description", class: this.descriptionClasses }, !!this.description ? index$1.loc(this.description) : this.hasDefaultSlotContent ? index.h("slot", null) : ''))));
110
+ return (index.h("div", { key: '95bb58a7421355483a20d8eb1e0f0716289246e4', class: this.detailClasses }, this.hasLabel && (index.h("div", { key: '35e8b3880bc8013160901a34f59d2d1d9c0ad954', class: this.labelClasses, "aria-describedby": !!this.description ? 'label-description' : undefined }, !!this.label ? index$1.loc(this.label) : this.hasLabelSlotContent ? index.h("slot", { name: "label" }) : '')), this.hasDescripiton && (index.h("div", { key: '87face56b1ebe90c967bf6b0c026734c10871751', id: "label-description", class: this.descriptionClasses }, !!this.description ? index$1.loc(this.description) : this.hasDefaultSlotContent ? index.h("slot", null) : ''))));
111
111
  }
112
112
  get hostElement() { return index.getElement(this); }
113
113
  };
@@ -14,9 +14,19 @@ const Q2Dropdown = class {
14
14
  index.registerInstance(this, hostRef);
15
15
  var _a;
16
16
  this.dropdownItemSelector = 'q2-dropdown-item:not([disabled]):not([separator])';
17
+ this.optionSelector = 'q2-option:not([disabled]):not([separator])';
17
18
  this.focusToggle = () => {
18
19
  this.controlElement.focus();
19
20
  };
21
+ this.handleFocusOut = (event) => {
22
+ var _a;
23
+ const relatedTarget = event.relatedTarget;
24
+ if ((_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.contains(relatedTarget))
25
+ return;
26
+ if (this.hostElement.contains(relatedTarget))
27
+ return;
28
+ this.open = false;
29
+ };
20
30
  this.onClickElsewhere = (event) => {
21
31
  const target = event.target;
22
32
  if (target.localName === 'q2-option-list') {
@@ -30,6 +40,11 @@ const Q2Dropdown = class {
30
40
  popoverElement.open = false;
31
41
  }
32
42
  };
43
+ this.onPopoverState = (event) => {
44
+ if (event.detail.open)
45
+ return;
46
+ this.controlElement.focus();
47
+ };
33
48
  this.onToggleClick = async (event) => {
34
49
  event.stopPropagation();
35
50
  if (actionSheet.shouldShowActionSheet(this)) {
@@ -51,20 +66,6 @@ const Q2Dropdown = class {
51
66
  this.optionList.handleExternalKeydown(event);
52
67
  }
53
68
  };
54
- this.onPopoverState = (event) => {
55
- if (event.detail.open)
56
- return;
57
- this.controlElement.focus();
58
- };
59
- this.handleFocusOut = (event) => {
60
- var _a;
61
- const relatedTarget = event.relatedTarget;
62
- if ((_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.contains(relatedTarget))
63
- return;
64
- if (this.hostElement.contains(relatedTarget))
65
- return;
66
- this.open = false;
67
- };
68
69
  this.additionalContext = undefined;
69
70
  this.alignment = undefined;
70
71
  this.ariaLabel = undefined;
@@ -111,7 +112,9 @@ const Q2Dropdown = class {
111
112
  if (this.open !== open)
112
113
  this.open = open;
113
114
  (_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.scrollContainerTo({ top: 0 });
114
- this.optionList.setActiveElement(null);
115
+ if (!open) {
116
+ this.optionList.setActiveElement(null);
117
+ }
115
118
  }
116
119
  // #endregion
117
120
  // #region Public Methods API
@@ -238,13 +241,13 @@ const Q2Dropdown = class {
238
241
  };
239
242
  }
240
243
  _clickItem(value) {
241
- if (!value)
244
+ var _a;
245
+ if (!value || this.disabled)
242
246
  return;
243
247
  const item = this.hostElement.querySelector(`${this.dropdownItemSelector}[value="${value}"]`);
244
- const itemBtn = item === null || item === void 0 ? void 0 : item.shadowRoot.querySelector('.dropdown-item');
245
- if (!item || this.disabled)
246
- return;
247
- itemBtn.click();
248
+ const option = this.hostElement.querySelector(`${this.optionSelector}[value="${value}"]`);
249
+ (_a = item === null || item === void 0 ? void 0 : item.shadowRoot.querySelector('.dropdown-item')) === null || _a === void 0 ? void 0 : _a.click();
250
+ option === null || option === void 0 ? void 0 : option.click();
248
251
  }
249
252
  async _handleActionSheet(event) {
250
253
  const { value } = await actionSheet.showActionSheetList(this, event);
@@ -322,7 +325,7 @@ const Q2Dropdown = class {
322
325
  // #region Render Methods
323
326
  render() {
324
327
  const btnProps = this.toggleButtonProps;
325
- return (index.h("click-elsewhere", { key: '8d69d7aa921eb47490810b0bbd79eea475d81dd4', class: this.open ? 'dropdown-open' : '', onChange: this.onClickElsewhere, "test-id": "dropdownContainer" }, index.h("q2-btn", { key: '56006f92f9264791041a9c40b83bf518e24ac8e6', ref: el => (this.controlElement = el), class: btnProps.className, onClick: this.onToggleClick, onKeyDown: this.onToggleKeydown, fab: btnProps.fab, intent: btnProps.intent, onFocusout: this.handleFocusOut, active: btnProps.active, disabled: btnProps.disabled, ariaExpanded: `${!!btnProps.ariaExpanded}`, label: this.hideLabel && this.label ? index$1.loc(this.label) : undefined, hideLabel: this.hideLabel, ariaHasPopup: "menu", "test-id": "dropdownButton", block: this.block, description: index$1.loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount]) }, this.hasCustomControl ? (index.h("div", { "test-id": "dropdownControl", class: btnProps.custom ? '' : 'hidden' }, index.h("slot", { name: "control" }))) : (index.h(index.Fragment, null, this.icon ? index.h("q2-icon", { type: this.icon }) : ' ', this.label && !this.hideLabel && (index.h("span", { class: "dropdown-button-text" }, index$1.loc(this.label)))))), index.h("q2-popover", { key: '083bc7ccac20ad02e33497aec0a7ca8bf67da385', ref: el => (this.popoverElement = el), controlElement: this.controlElement, open: this.open, "max-height": this.popoverMaxHeight, onFocusout: this.handleFocusOut, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, mode: this.popoverMode || undefined, block: this.block }, index.h("q2-option-list", { key: '5857bb4fc0c0519f8dde1b4b6d2df2181511c41d', onPopoverState: this.onPopoverState, id: "option-list", ref: el => (this.optionList = el), type: "menu", label: index$1.loc('tecton.element.optionList.label', [this.optionListLabel]), "no-select": true }, index.h("slot", { key: '7b1bbde4dd17cb41ba230f4518b5b345052ed037' })))));
328
+ return (index.h("click-elsewhere", { key: 'e03e38faaa27ea520e902acbb03875e7cdec33c6', class: this.open ? 'dropdown-open' : '', onChange: this.onClickElsewhere, "test-id": "dropdownContainer" }, index.h("q2-btn", { key: 'cb379d4cb55631a5ba148df0716bbc7e19575c70', ref: el => (this.controlElement = el), class: btnProps.className, onClick: this.onToggleClick, onKeyDown: this.onToggleKeydown, fab: btnProps.fab, intent: btnProps.intent, onFocusout: this.handleFocusOut, active: btnProps.active, disabled: btnProps.disabled, ariaExpanded: `${!!btnProps.ariaExpanded}`, label: this.hideLabel && this.label ? index$1.loc(this.label) : undefined, hideLabel: this.hideLabel, ariaHasPopup: "menu", "test-id": "dropdownButton", block: this.block, description: index$1.loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount]) }, this.hasCustomControl ? (index.h("div", { "test-id": "dropdownControl", class: btnProps.custom ? '' : 'hidden' }, index.h("slot", { name: "control" }))) : (index.h(index.Fragment, null, this.icon ? index.h("q2-icon", { type: this.icon }) : ' ', this.label && !this.hideLabel && (index.h("span", { class: "dropdown-button-text" }, index$1.loc(this.label)))))), index.h("q2-popover", { key: 'bfad0484d72855a359bd45aeecf9107ff879e81b', ref: el => (this.popoverElement = el), controlElement: this.controlElement, open: this.open, "max-height": this.popoverMaxHeight, onFocusout: this.handleFocusOut, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, mode: this.popoverMode || undefined, block: this.block }, index.h("q2-option-list", { key: '9b6f172128fa8265e92330b2333cbef501e060f1', onPopoverState: this.onPopoverState, id: "option-list", ref: el => (this.optionList = el), type: "menu", label: index$1.loc('tecton.element.optionList.label', [this.optionListLabel]), "no-select": true }, index.h("slot", { key: '6460a769807e87648b6caea209d4f679035eb362' })))));
326
329
  }
327
330
  get hostElement() { return index.getElement(this); }
328
331
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"q2-dropdown.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,s4BAAs4B,CAAC;AAC75B,yBAAe,aAAa;;MCWf,UAAU;;;;QAInB,yBAAoB,GAAW,mDAAmD,CAAC;QAyWnF,gBAAW,GAAG;YACV,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;SAC/B,CAAC;QAEF,qBAAgB,GAAG,CAAC,KAAkB;YAClC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;YAC3C,IAAI,MAAM,CAAC,SAAS,KAAK,gBAAgB,EAAE;gBACvC,KAAK,CAAC,eAAe,EAAE,CAAC;aAC3B;YACD,IAAI,MAAM,CAAC,SAAS,KAAK,iBAAiB,EAAE;gBACxC,KAAK,CAAC,eAAe,EAAE,CAAC;gBACx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,CAAC,WAAW,IAAI,SAAS,EACnC,KAAK,EAAE,IAAI,CAAC,KAAK,IAEjBA,6EACI,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,EAAE,EAAC,aAAa,EAChB,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,EACjC,IAAI,EAAC,MAAM,EACX,KAAK,EAAEC,WAAG,CAAC,iCAAiC,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,uBAGrED,oEAAQ,CACK,CACR,CACC,EACpB;KACL;;;;;;;;;;;;;;;;;","names":["shouldShowActionSheet","overrideFocus","isEventFromElement","waitForNextPaint","handleRenamedProp","handleAriaLabel","showActionSheetList","h","loc","Fragment"],"sources":["src/components/q2-dropdown/q2-dropdown.scss?tag=q2-dropdown&encapsulation=shadow","src/components/q2-dropdown/q2-dropdown.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: inline-flex;\n}\n\n:host([block]) {\n display: block;\n}\n\nq2-icon {\n pointer-events: none;\n margin-block: -100px;\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n\nq2-popover {\n --tct-popover-min-width: #{var-list(var-prefixer(dropdown-width))};\n}\n","import { shouldShowActionSheet, showActionSheetList } from '@/utils/action-sheet';\nimport { Component, ComponentInterface, Prop, Method, Element, Watch, h, Fragment, Listen } from '@stencil/core';\nimport {\n handleAriaLabel,\n handleRenamedProp,\n isEventFromElement,\n loc,\n overrideFocus,\n waitForNextPaint,\n} from 'src/utils';\n\n@Component({ tag: 'q2-dropdown', shadow: true, styleUrl: 'q2-dropdown.scss' })\nexport class Q2Dropdown implements ComponentInterface {\n // #region Own Properties\n\n controlElement?: HTMLQ2BtnElement;\n dropdownItemSelector: string = 'q2-dropdown-item:not([disabled]):not([separator])';\n popoverElement?: HTMLQ2PopoverElement;\n optionList: HTMLQ2OptionListElement;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n @Prop({ reflect: true })\n additionalContext: string;\n\n /** @deprecated */\n @Prop({ reflect: true })\n alignment: 'left' | 'right';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** If `true`, component expands to fill the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /**\n * Tells the outlet what the type of object being passed in as contextValue.\n * This will allow for the hierarchy resolution logic to work to determine if an option should or should not be shown.\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n context: string;\n\n /**\n * Passes important information to the outlet (e.g., pass an account id that your platform can use to look up what module to show for that account type).\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n contextValue: string;\n\n /** Indicates the menu cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean;\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 })\n 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 */\n @Prop()\n hoist: boolean = !!window.Tecton?.useActionSheets;\n\n /** The icon that will render within the toggle button. You may use any of the `q2-icon` types. */\n @Prop({ reflect: true })\n icon: string;\n\n /**\n * The text that appears within the button.\n * @warning\n * This property should not be used if the `type` is `icon`.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * Identifies this menu as an outlet. Used in conjunction with context and, optionally, `contextValue`.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n name: string;\n\n /**\n * Determine whether the popover is open or closed.\n *\n * @readonly\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n /** Determines the label that is applied to the option list for accessibility purposes. */\n @Prop()\n optionListLabel: string;\n\n /** @deprecated */\n @Prop({ reflect: true })\n popDirection: 'up' | 'down';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true })\n popoverAlignment: 'left' | 'right' = 'left'; // being used in dropdown.scss\n\n /**\n * Force the direction of the popover dropdown when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ mutable: true })\n popoverDirection: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n popoverMaxHeight: number;\n\n /** @deprecated */\n @Prop()\n popoverMinHeight: number;\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 })\n popoverMode: 'legacy' = null;\n\n /**\n * Use with `context` to tell the outlet where it appears. It will be matched with the appropriately configured module for that context.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n resolvedType: string;\n\n /** The type of button used as the menu toggle.\n * @info\n * Type must be \"custom\" to use the custom button slot.\n */\n @Prop({ reflect: true })\n type: 'icon' | 'fab' | 'custom' | 'primary' | 'secondary' | 'neutral' = 'icon';\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.popDirectionHandler();\n this.alignmentHandler();\n this.ariaLabelHandler();\n }\n\n componentDidLoad() {\n this.orchestrateResolvedMenuItems();\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.focusToggle();\n }\n\n @Listen('popoverStateChanged')\n popoverStateChangeHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n this.popoverElement?.scrollContainerTo({ top: 0 });\n this.optionList.setActiveElement(null);\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the dropdown `<button>` to hide the popover if it is showing.\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 dropdown `<button>` to show the popover if it is hidden.\n * @testOnly\n */\n @Method()\n async openPopover() {\n if (this.open || this.disabled) return;\n this._togglePopover();\n }\n\n /**\n * Emulates opening the dropdown and selecting a [Dropdown Item](https://tecton.q2developer.com/design-system/q2-dropdown-item/).\n *\n * If the dropdown is closed, this will open it before selecting the item.\n *\n * If the value does not match any item's value, this method does nothing.\n * @testOnly\n */\n @Method()\n async selectItem(value: string) {\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const itemBtn = item?.shadowRoot.querySelector<HTMLButtonElement>('.dropdown-item');\n if (!item || this.disabled) return;\n if (!this.open) {\n this.controlElement?.click();\n await waitForNextPaint();\n }\n itemBtn.click();\n await waitForNextPaint();\n }\n\n /**\n * Emulates opening the dropdown and selecting a [Dropdown Item](https://tecton.q2developer.com/design-system/q2-dropdown-item/)'s *remove* button.\n *\n * If the dropdown is closed, this will open it before selecting the remove item button.\n *\n * Requirements for this method to work properly:\n * - Provided `value` matches the item's `value` property\n * - Item has the `removable` property enabled\n * @testOnly\n */\n @Method()\n async selectRemoveItem(value: string) {\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const removeButton = item?.shadowRoot.querySelector<HTMLButtonElement>('.remove-dropdown-item');\n if (!item || !removeButton || this.disabled) return;\n if (!this.open) {\n this.controlElement?.click();\n await waitForNextPaint();\n }\n removeButton.click();\n await waitForNextPaint();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('additionalContext')\n additionalContextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('alignment')\n alignmentHandler() {\n handleRenamedProp(this, 'alignment', 'popoverAlignment');\n }\n\n @Watch('ariaLabel')\n ariaLabelHandler() {\n handleAriaLabel(this);\n }\n\n @Watch('context')\n contextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('contextValue')\n contextValueHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('name')\n nameHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('popDirection')\n popDirectionHandler() {\n handleRenamedProp(this, 'popDirection', 'popoverDirection');\n }\n\n @Watch('resolvedType')\n resolvedTypeHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n // #endregion\n // #region Local Methods\n\n get determineDropdownItemCount() {\n return this.hostElement.querySelectorAll(this.dropdownItemSelector).length;\n }\n\n get hasCustomControl() {\n return !!this.hostElement.querySelector('[slot=control]');\n }\n\n get toggleButtonProps() {\n const allowedIntents = ['primary', 'secondary', 'neutral'];\n const allowedTypes = ['icon', 'fab', 'custom', ...allowedIntents];\n const type = allowedTypes.includes(this.type) ? this.type : '';\n const icon = type === 'icon';\n const fab = type === 'fab';\n const custom = type === 'custom';\n let intent;\n if (allowedIntents.includes(type)) {\n intent = type === 'neutral' ? type : `workflow-${type}`;\n }\n const active = this.open;\n const disabled = !!this.disabled;\n const ariaExpanded = this.open;\n const className = !icon && !fab && !intent ? 'unstyled' : '';\n\n return {\n icon,\n fab,\n intent,\n active,\n disabled,\n ariaExpanded,\n className,\n custom,\n };\n }\n\n _clickItem(value: string) {\n if (!value) return;\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const itemBtn = item?.shadowRoot.querySelector<HTMLButtonElement>('.dropdown-item');\n if (!item || this.disabled) return;\n itemBtn.click();\n }\n\n async _handleActionSheet(event: MouseEvent | KeyboardEvent) {\n const { value } = await showActionSheetList(this, event);\n this._clickItem(value);\n this.controlElement.focus();\n }\n\n _togglePopover() {\n const { controlElement } = this;\n if (!controlElement) return;\n controlElement.click();\n controlElement.focus();\n controlElement.dispatchEvent(new FocusEvent('focus'));\n }\n\n focusToggle = () => {\n this.controlElement.focus();\n };\n\n onClickElsewhere = (event: CustomEvent) => {\n const target = event.target as HTMLElement;\n if (target.localName === 'q2-option-list') {\n event.stopPropagation();\n }\n if (target.localName === 'click-elsewhere') {\n event.stopPropagation();\n const { popoverElement } = this;\n if (!popoverElement) return;\n popoverElement.open = false;\n }\n };\n\n onToggleClick = async (event: MouseEvent) => {\n event.stopPropagation();\n if (shouldShowActionSheet(this)) {\n this._handleActionSheet(event);\n } else {\n await this.popoverElement.toggle();\n }\n };\n\n onToggleKeydown = async (event: KeyboardEvent) => {\n const isTabMetaOrCtrl = event.metaKey || event.ctrlKey || event.key === 'Tab';\n if (isTabMetaOrCtrl) return;\n\n event.preventDefault();\n if (shouldShowActionSheet(this, event)) {\n this._handleActionSheet(event);\n } else {\n this.optionList.handleExternalKeydown(event);\n }\n };\n\n onPopoverState = (event: CustomEvent<{ open: boolean; action: string }>) => {\n if (event.detail.open) return;\n this.controlElement.focus();\n };\n\n handleFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as unknown as HTMLElement;\n if (this.popoverElement?.contains(relatedTarget)) return;\n if (this.hostElement.contains(relatedTarget)) return;\n this.open = false;\n };\n\n orchestrateResolvedMenuItems() {\n if (!this.name || !this.context) {\n // this is only for contextual menu outlets\n this.removeResolvedElements();\n return;\n }\n\n this.resolveMenuItemElements()\n .then(data => {\n this.removeResolvedElements();\n data.forEach(element => {\n this.hostElement.appendChild(element);\n });\n })\n .catch(err => {\n this.removeResolvedElements();\n throw err;\n });\n }\n\n removeResolvedElements() {\n const resolvedElements = this.hostElement.querySelectorAll('q2-dropdown-item.resolved-menu-item');\n resolvedElements.forEach(element => this.hostElement.removeChild(element));\n }\n\n resolveMenu() {\n return (\n this.name &&\n window.TectonElements &&\n window.TectonElements.resolveMenu(this.name, this.contextValue, this.resolvedType, this.additionalContext)\n );\n }\n\n resolveMenuItemElements() {\n return this.resolveMenu().then(datas => {\n return datas.map(menuItemData => {\n let onClickFn;\n let queryParams;\n if (menuItemData['tct-ctxid']) {\n queryParams = {};\n queryParams[menuItemData.contextIdParamName] = menuItemData['tct-ctxid'];\n }\n\n switch (menuItemData.action) {\n case 'navigateTo':\n onClickFn = function () {\n return window.TectonElements?.navigateTo?.(\n menuItemData.featureName,\n menuItemData.moduleName,\n queryParams\n );\n };\n break;\n case 'showOverpanel':\n onClickFn = function () {\n return window.TectonElements?.showOverpanel?.(\n `${menuItemData.featureName}.${menuItemData.moduleName}`,\n queryParams,\n undefined,\n true\n );\n };\n break;\n }\n\n const newDropdownItem = document.createElement('q2-dropdown-item');\n newDropdownItem.setAttribute('value', menuItemData.itemLabel);\n newDropdownItem.classList.add('resolved-menu-item');\n newDropdownItem.textContent = menuItemData.itemLabel;\n newDropdownItem.onclick = onClickFn;\n\n return newDropdownItem;\n });\n });\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const btnProps = this.toggleButtonProps;\n\n return (\n <click-elsewhere\n class={this.open ? 'dropdown-open' : ''}\n onChange={this.onClickElsewhere}\n test-id=\"dropdownContainer\"\n >\n <q2-btn\n ref={el => (this.controlElement = el)}\n class={btnProps.className}\n onClick={this.onToggleClick}\n onKeyDown={this.onToggleKeydown}\n fab={btnProps.fab}\n intent={btnProps.intent}\n onFocusout={this.handleFocusOut}\n active={btnProps.active}\n disabled={btnProps.disabled}\n ariaExpanded={`${!!btnProps.ariaExpanded}`}\n label={this.hideLabel && this.label ? loc(this.label) : undefined}\n hideLabel={this.hideLabel}\n ariaHasPopup=\"menu\"\n test-id=\"dropdownButton\"\n block={this.block}\n description={loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount])}\n >\n {this.hasCustomControl ? (\n <div\n test-id=\"dropdownControl\"\n class={btnProps.custom ? '' : 'hidden'}\n >\n <slot name=\"control\" />\n </div>\n ) : (\n <Fragment>\n {this.icon ? <q2-icon type={this.icon} /> : ' '}\n {this.label && !this.hideLabel && (\n <span class=\"dropdown-button-text\">{loc(this.label)}</span>\n )}\n </Fragment>\n )}\n </q2-btn>\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.controlElement}\n open={this.open}\n max-height={this.popoverMaxHeight}\n onFocusout={this.handleFocusOut}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n mode={this.popoverMode || undefined}\n block={this.block}\n >\n <q2-option-list\n onPopoverState={this.onPopoverState}\n id=\"option-list\"\n ref={el => (this.optionList = el)}\n type=\"menu\"\n label={loc('tecton.element.optionList.label', [this.optionListLabel])}\n no-select\n >\n <slot />\n </q2-option-list>\n </q2-popover>\n </click-elsewhere>\n );\n }\n\n // #endregion\n}\n"],"version":3}
1
+ {"file":"q2-dropdown.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,s4BAAs4B,CAAC;AAC75B,yBAAe,aAAa;;MCYf,UAAU;;;;QAInB,yBAAoB,GAAW,mDAAmD,CAAC;QACnF,mBAAc,GAAW,4CAA4C,CAAC;QA2WtE,gBAAW,GAAG;YACV,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;SAC/B,CAAC;QAEF,mBAAc,GAAG,CAAC,KAAiB;;YAC/B,MAAM,aAAa,GAAG,KAAK,CAAC,aAAuC,CAAC;YACpE,IAAI,MAAA,IAAI,CAAC,cAAc,0CAAE,QAAQ,CAAC,aAAa,CAAC;gBAAE,OAAO;YACzD,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC;gBAAE,OAAO;YACrD,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;SACrB,CAAC;QAEF,qBAAgB,GAAG,CAAC,KAAkB;YAClC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;YAC3C,IAAI,MAAM,CAAC,SAAS,KAAK,gBAAgB,EAAE;gBACvC,KAAK,CAAC,eAAe,EAAE,CAAC;aAC3B;YACD,IAAI,MAAM,CAAC,S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cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,EAAE,EAAC,aAAa,EAChB,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,EACjC,IAAI,EAAC,MAAM,EACX,KAAK,EAAEC,WAAG,CAAC,iCAAiC,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,uBAGrED,oEAAQ,CACK,CACR,CACC,EACpB;KACL;;;;;;;;;;;;;;;;;","names":["shouldShowActionSheet","overrideFocus","isEventFromElement","waitForNextPaint","handleRenamedProp","handleAriaLabel","showActionSheetList","h","loc","Fragment"],"sources":["src/components/q2-dropdown/q2-dropdown.scss?tag=q2-dropdown&encapsulation=shadow","src/components/q2-dropdown/q2-dropdown.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: inline-flex;\n}\n\n:host([block]) {\n display: block;\n}\n\nq2-icon {\n pointer-events: none;\n margin-block: -100px;\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n\nq2-popover {\n --tct-popover-min-width: #{var-list(var-prefixer(dropdown-width))};\n}\n","import { shouldShowActionSheet, showActionSheetList } from '@/utils/action-sheet';\nimport { Component, ComponentInterface, Prop, Method, Element, Watch, h, Fragment, Listen } from '@stencil/core';\nimport {\n handleAriaLabel,\n handleRenamedProp,\n isEventFromElement,\n loc,\n overrideFocus,\n waitForNextPaint,\n} from 'src/utils';\n\n/** @slot control - An optional slot to provide custom content as the clickable interface. The Dropdown **must** have `type=\"custom\"` to use the control slot. */\n@Component({ tag: 'q2-dropdown', shadow: true, styleUrl: 'q2-dropdown.scss' })\nexport class Q2Dropdown implements ComponentInterface {\n // #region Own Properties\n\n controlElement?: HTMLQ2BtnElement;\n dropdownItemSelector: string = 'q2-dropdown-item:not([disabled]):not([separator])';\n optionSelector: string = 'q2-option:not([disabled]):not([separator])';\n optionList: HTMLQ2OptionListElement;\n popoverElement?: HTMLQ2PopoverElement;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n @Prop({ reflect: true })\n additionalContext: string;\n\n /** @deprecated */\n @Prop({ reflect: true })\n alignment: 'left' | 'right';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** If `true`, component expands to fill the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /**\n * Tells the outlet what the type of object being passed in as contextValue.\n * This will allow for the hierarchy resolution logic to work to determine if an option should or should not be shown.\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n context: string;\n\n /**\n * Passes important information to the outlet (e.g., pass an account id that your platform can use to look up what module to show for that account type).\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n contextValue: string;\n\n /** Indicates the menu cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean;\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 })\n 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 */\n @Prop()\n hoist: boolean = !!window.Tecton?.useActionSheets;\n\n /** The icon that will render within the toggle button. You may use any of the `q2-icon` types. */\n @Prop({ reflect: true })\n icon: string;\n\n /**\n * The text that appears within the button.\n * @warning\n * This property should not be used if the `type` is `icon`.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * Identifies this menu as an outlet. Used in conjunction with context and, optionally, `contextValue`.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n name: string;\n\n /**\n * Determine whether the popover is open or closed.\n *\n * @readonly\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n /** Determines the label that is applied to the option list for accessibility purposes. */\n @Prop()\n optionListLabel: string;\n\n /** @deprecated */\n @Prop({ reflect: true })\n popDirection: 'up' | 'down';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true })\n popoverAlignment: 'left' | 'right' = 'left'; // being used in dropdown.scss\n\n /**\n * Force the direction of the popover dropdown when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ mutable: true })\n popoverDirection: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n popoverMaxHeight: number;\n\n /** @deprecated */\n @Prop()\n popoverMinHeight: number;\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 })\n popoverMode: 'legacy' = null;\n\n /**\n * Use with `context` to tell the outlet where it appears. It will be matched with the appropriately configured module for that context.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true })\n resolvedType: string;\n\n /** The type of button used as the menu toggle.\n * @info\n * Type must be \"custom\" to use the custom button slot.\n */\n @Prop({ reflect: true })\n type: 'icon' | 'fab' | 'custom' | 'primary' | 'secondary' | 'neutral' = 'icon';\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.popDirectionHandler();\n this.alignmentHandler();\n this.ariaLabelHandler();\n }\n\n componentDidLoad() {\n this.orchestrateResolvedMenuItems();\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.focusToggle();\n }\n\n @Listen('popoverStateChanged')\n popoverStateChangeHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n this.popoverElement?.scrollContainerTo({ top: 0 });\n if (!open) {\n this.optionList.setActiveElement(null);\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the dropdown `<button>` to hide the popover if it is showing.\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 dropdown `<button>` to show the popover if it is hidden.\n * @testOnly\n */\n @Method()\n async openPopover() {\n if (this.open || this.disabled) return;\n this._togglePopover();\n }\n\n /**\n * Emulates opening the dropdown and selecting a [Dropdown Item](https://tecton.q2developer.com/design-system/q2-dropdown-item/).\n *\n * If the dropdown is closed, this will open it before selecting the item.\n *\n * If the value does not match any item's value, this method does nothing.\n * @testOnly\n */\n @Method()\n async selectItem(value: string) {\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const itemBtn = item?.shadowRoot.querySelector<HTMLButtonElement>('.dropdown-item');\n if (!item || this.disabled) return;\n if (!this.open) {\n this.controlElement?.click();\n await waitForNextPaint();\n }\n itemBtn.click();\n await waitForNextPaint();\n }\n\n /**\n * Emulates opening the dropdown and selecting a [Dropdown Item](https://tecton.q2developer.com/design-system/q2-dropdown-item/)'s *remove* button.\n *\n * If the dropdown is closed, this will open it before selecting the remove item button.\n *\n * Requirements for this method to work properly:\n * - Provided `value` matches the item's `value` property\n * - Item has the `removable` property enabled\n * @testOnly\n */\n @Method()\n async selectRemoveItem(value: string) {\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const removeButton = item?.shadowRoot.querySelector<HTMLButtonElement>('.remove-dropdown-item');\n if (!item || !removeButton || this.disabled) return;\n if (!this.open) {\n this.controlElement?.click();\n await waitForNextPaint();\n }\n removeButton.click();\n await waitForNextPaint();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('additionalContext')\n additionalContextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('alignment')\n alignmentHandler() {\n handleRenamedProp(this, 'alignment', 'popoverAlignment');\n }\n\n @Watch('ariaLabel')\n ariaLabelHandler() {\n handleAriaLabel(this);\n }\n\n @Watch('context')\n contextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('contextValue')\n contextValueHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('name')\n nameHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('popDirection')\n popDirectionHandler() {\n handleRenamedProp(this, 'popDirection', 'popoverDirection');\n }\n\n @Watch('resolvedType')\n resolvedTypeHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n // #endregion\n // #region Local Methods\n\n get determineDropdownItemCount() {\n return this.hostElement.querySelectorAll(this.dropdownItemSelector).length;\n }\n\n get hasCustomControl() {\n return !!this.hostElement.querySelector('[slot=control]');\n }\n\n get toggleButtonProps() {\n const allowedIntents = ['primary', 'secondary', 'neutral'];\n const allowedTypes = ['icon', 'fab', 'custom', ...allowedIntents];\n const type = allowedTypes.includes(this.type) ? this.type : '';\n const icon = type === 'icon';\n const fab = type === 'fab';\n const custom = type === 'custom';\n let intent;\n if (allowedIntents.includes(type)) {\n intent = type === 'neutral' ? type : `workflow-${type}`;\n }\n const active = this.open;\n const disabled = !!this.disabled;\n const ariaExpanded = this.open;\n const className = !icon && !fab && !intent ? 'unstyled' : '';\n\n return {\n icon,\n fab,\n intent,\n active,\n disabled,\n ariaExpanded,\n className,\n custom,\n };\n }\n\n _clickItem(value: string) {\n if (!value || this.disabled) return;\n const item = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}[value=\"${value}\"]`\n );\n const option = this.hostElement.querySelector<HTMLQ2OptionElement>(`${this.optionSelector}[value=\"${value}\"]`);\n item?.shadowRoot.querySelector<HTMLButtonElement>('.dropdown-item')?.click();\n option?.click();\n }\n\n async _handleActionSheet(event: MouseEvent | KeyboardEvent) {\n const { value } = await showActionSheetList(this, event);\n this._clickItem(value);\n this.controlElement.focus();\n }\n\n _togglePopover() {\n const { controlElement } = this;\n if (!controlElement) return;\n controlElement.click();\n controlElement.focus();\n controlElement.dispatchEvent(new FocusEvent('focus'));\n }\n\n focusToggle = () => {\n this.controlElement.focus();\n };\n\n handleFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as unknown as HTMLElement;\n if (this.popoverElement?.contains(relatedTarget)) return;\n if (this.hostElement.contains(relatedTarget)) return;\n this.open = false;\n };\n\n onClickElsewhere = (event: CustomEvent) => {\n const target = event.target as HTMLElement;\n if (target.localName === 'q2-option-list') {\n event.stopPropagation();\n }\n if (target.localName === 'click-elsewhere') {\n event.stopPropagation();\n const { popoverElement } = this;\n if (!popoverElement) return;\n popoverElement.open = false;\n }\n };\n\n onPopoverState = (event: CustomEvent<{ open: boolean; action: string }>) => {\n if (event.detail.open) return;\n this.controlElement.focus();\n };\n\n onToggleClick = async (event: MouseEvent) => {\n event.stopPropagation();\n if (shouldShowActionSheet(this)) {\n this._handleActionSheet(event);\n } else {\n await this.popoverElement.toggle();\n }\n };\n\n onToggleKeydown = async (event: KeyboardEvent) => {\n const isTabMetaOrCtrl = event.metaKey || event.ctrlKey || event.key === 'Tab';\n if (isTabMetaOrCtrl) return;\n\n event.preventDefault();\n if (shouldShowActionSheet(this, event)) {\n this._handleActionSheet(event);\n } else {\n this.optionList.handleExternalKeydown(event);\n }\n };\n\n orchestrateResolvedMenuItems() {\n if (!this.name || !this.context) {\n // this is only for contextual menu outlets\n this.removeResolvedElements();\n return;\n }\n\n this.resolveMenuItemElements()\n .then(data => {\n this.removeResolvedElements();\n data.forEach(element => {\n this.hostElement.appendChild(element);\n });\n })\n .catch(err => {\n this.removeResolvedElements();\n throw err;\n });\n }\n\n removeResolvedElements() {\n const resolvedElements = this.hostElement.querySelectorAll('q2-dropdown-item.resolved-menu-item');\n resolvedElements.forEach(element => this.hostElement.removeChild(element));\n }\n\n resolveMenu() {\n return (\n this.name &&\n window.TectonElements &&\n window.TectonElements.resolveMenu(this.name, this.contextValue, this.resolvedType, this.additionalContext)\n );\n }\n\n resolveMenuItemElements() {\n return this.resolveMenu().then(datas => {\n return datas.map(menuItemData => {\n let onClickFn;\n let queryParams;\n if (menuItemData['tct-ctxid']) {\n queryParams = {};\n queryParams[menuItemData.contextIdParamName] = menuItemData['tct-ctxid'];\n }\n\n switch (menuItemData.action) {\n case 'navigateTo':\n onClickFn = function () {\n return window.TectonElements?.navigateTo?.(\n menuItemData.featureName,\n menuItemData.moduleName,\n queryParams\n );\n };\n break;\n case 'showOverpanel':\n onClickFn = function () {\n return window.TectonElements?.showOverpanel?.(\n `${menuItemData.featureName}.${menuItemData.moduleName}`,\n queryParams,\n undefined,\n true\n );\n };\n break;\n }\n\n const newDropdownItem = document.createElement('q2-dropdown-item');\n newDropdownItem.setAttribute('value', menuItemData.itemLabel);\n newDropdownItem.classList.add('resolved-menu-item');\n newDropdownItem.textContent = menuItemData.itemLabel;\n newDropdownItem.onclick = onClickFn;\n\n return newDropdownItem;\n });\n });\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const btnProps = this.toggleButtonProps;\n\n return (\n <click-elsewhere\n class={this.open ? 'dropdown-open' : ''}\n onChange={this.onClickElsewhere}\n test-id=\"dropdownContainer\"\n >\n <q2-btn\n ref={el => (this.controlElement = el)}\n class={btnProps.className}\n onClick={this.onToggleClick}\n onKeyDown={this.onToggleKeydown}\n fab={btnProps.fab}\n intent={btnProps.intent}\n onFocusout={this.handleFocusOut}\n active={btnProps.active}\n disabled={btnProps.disabled}\n ariaExpanded={`${!!btnProps.ariaExpanded}`}\n label={this.hideLabel && this.label ? loc(this.label) : undefined}\n hideLabel={this.hideLabel}\n ariaHasPopup=\"menu\"\n test-id=\"dropdownButton\"\n block={this.block}\n description={loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount])}\n >\n {this.hasCustomControl ? (\n <div\n test-id=\"dropdownControl\"\n class={btnProps.custom ? '' : 'hidden'}\n >\n <slot name=\"control\" />\n </div>\n ) : (\n <Fragment>\n {this.icon ? <q2-icon type={this.icon} /> : ' '}\n {this.label && !this.hideLabel && (\n <span class=\"dropdown-button-text\">{loc(this.label)}</span>\n )}\n </Fragment>\n )}\n </q2-btn>\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.controlElement}\n open={this.open}\n max-height={this.popoverMaxHeight}\n onFocusout={this.handleFocusOut}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n mode={this.popoverMode || undefined}\n block={this.block}\n >\n <q2-option-list\n onPopoverState={this.onPopoverState}\n id=\"option-list\"\n ref={el => (this.optionList = el)}\n type=\"menu\"\n label={loc('tecton.element.optionList.label', [this.optionListLabel])}\n no-select\n >\n <slot />\n </q2-option-list>\n </q2-popover>\n </click-elsewhere>\n );\n }\n\n // #endregion\n}\n"],"version":3}
@@ -130,7 +130,7 @@ const Q2Example = class {
130
130
  }, onClick: () => this.tctClick.emit(), role: "menu" }, index.h("slot", null))));
131
131
  }
132
132
  render() {
133
- return index.h(index.Host, { key: 'e4df51465f7c14e0ff4ae2463613e73cc6100318', attribute: "navigation" }, this.renderMenuInner());
133
+ return index.h(index.Host, { key: '2a8810e8b8152257cb5f710570a7b60708f76bde', attribute: "navigation" }, this.renderMenuInner());
134
134
  }
135
135
  get el() { return index.getElement(this); }
136
136
  static get watchers() { return {
@@ -13,7 +13,7 @@ const Q2Checkbox = class {
13
13
  this.spacing = 'normal';
14
14
  }
15
15
  render() {
16
- return (index.h("div", { key: 'aa542ff0f5ecdee36ffdb070cb863553c3d725bc', class: "container" }, index.h("slot", { key: '980dc6939c003dfbd57189e7ba9fb151033e8b29' })));
16
+ return (index.h("div", { key: 'caf601b969251105caec706267978caae64478c7', class: "container" }, index.h("slot", { key: '72983087473bc5c1eb88e0d610f54a414bad02d4' })));
17
17
  }
18
18
  };
19
19
  Q2Checkbox.style = Q2FormStyle0;
@@ -55,7 +55,7 @@ const Q2FormattedText = class {
55
55
  // #region Render Methods
56
56
  render() {
57
57
  const { formattedTextClasses } = this;
58
- return (index.h("div", { key: 'f8729c7f3dea39a14da8add529ae642e78d20643', class: formattedTextClasses, "aria-label": this.formattedValue }, index.h("span", { key: '94390c62b148e3a0ce2d470377818ac442e9257e' }, this.formattedValue)));
58
+ return (index.h("div", { key: '5361b448c2dcd9deb0b52e97c399fe70402739b6', class: formattedTextClasses, "aria-label": this.formattedValue }, index.h("span", { key: '989054158a669360d1908cd9bd613078d3fcfcb2' }, this.formattedValue)));
59
59
  }
60
60
  static get watchers() { return {
61
61
  "value": ["propsUpdated"],
@@ -109,7 +109,7 @@ const Q2Item = class {
109
109
  // #region Render Methods
110
110
  render() {
111
111
  const { clickable } = this;
112
- return (index.h("div", { key: '7b0894fa0180d68cba7b47a6e63f837255a70057', "test-id": "itemContainer", class: this.itemClasses, ref: el => (this.itemElement = el), role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined }, this.hasBulletSlotContent && (index.h("div", { key: '5ef5a26d2fb4644e9b9d902bc7ff314a90df9976', class: this.bulletClasses }, index.h("slot", { key: '7db082ffd73b04494e67cbdee93b140afb11e016', name: "bullet" }))), index.h("div", { key: '42212f56e12da4b57ae14b613efcdc59fbbc93b4', class: this.mainClasses }, this.hasHeaderSlotContent && (index.h("div", { key: '9153d8de21c4809716f17f31717d97463bb045a5', class: "header" }, index.h("slot", { key: 'ab504063f003daa1ea3984555ccf703426116dc0', name: "header" }))), this.hasBodySlotContent && (index.h("div", { key: '1a8b650df30033853919f6492aaa194f60a11c60', class: "body" }, index.h("slot", { key: 'b8262d4ef02751e63b62b525543394d0f14824db', name: "body" })))), this.hasActionSlotContent && (index.h("div", { key: '056bc3b9f932495baf46613b66857325d19c0e3b', class: this.actionClasses }, index.h("slot", { key: 'f5332dd36657b470c993b773195044f7c809fe66', name: "action" }))), this.hasFooterSlotContent && (index.h("div", { key: '111359c030a37ad8e72df6e3a40d8b8d226a4734', class: this.footerClasses }, index.h("slot", { key: '8afe6c9372a9c53663d6383116256f19b470858b', name: "footer" })))));
112
+ return (index.h("div", { key: 'bc07c660098ad5236aeb3a925541bb655272ad1d', "test-id": "itemContainer", class: this.itemClasses, ref: el => (this.itemElement = el), role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined }, this.hasBulletSlotContent && (index.h("div", { key: '9f4fc9b8d77c4ceebd1c1532288bf4f74b5ec619', class: this.bulletClasses }, index.h("slot", { key: 'b244c86afa4ce153a49eadf1ff0f975c7c22873f', name: "bullet" }))), index.h("div", { key: 'bd94e2e41171c738cc120bcac21e313d10a92d86', class: this.mainClasses }, this.hasHeaderSlotContent && (index.h("div", { key: 'a45a52eb18000754a27c9dfb5db34cd1ac7117d2', class: "header" }, index.h("slot", { key: '1caa04a58064ddadfe9838d6537e7c85860b2671', name: "header" }))), this.hasBodySlotContent && (index.h("div", { key: '5420a4bb0b8f79ddcbe7f83f35543c66a38a6eaf', class: "body" }, index.h("slot", { key: 'e21252069146947cdcfca63c42ebd9f5dabb4f64', name: "body" })))), this.hasActionSlotContent && (index.h("div", { key: 'cdb5a454b1017fd64fe535cc843dac0498220690', class: this.actionClasses }, index.h("slot", { key: 'e519a4e72b11096f941bc68d1f334afaecdf61a2', name: "action" }))), this.hasFooterSlotContent && (index.h("div", { key: 'c03d5bd27317087e8bbdf61a3b4a6ed489070ea6', class: this.footerClasses }, index.h("slot", { key: '010ef88185cc77bd471fdd1e5b0746ea77ecf5d0', name: "footer" })))));
113
113
  }
114
114
  get hostElement() { return index.getElement(this); }
115
115
  };
@@ -238,7 +238,7 @@ const Q2List = class {
238
238
  // #endregion
239
239
  // #region Render Methods
240
240
  render() {
241
- return (index.h("div", { key: 'cb7c090b2e018bc46ef3ae829f4fd7f3cbb896e8', class: this.listClasses, ref: el => (this.listElement = el) }, (this.hasFilterSlot || this.hasLabelContent) && (index.h("div", { key: '16672b343894a78a378b17e18f21b1412b103683', class: this.headerClasses }, index.h("div", { key: '4f78dabab7f982fb6e472c29195bbcc8f4c6758c', class: "label" }, this.label), this.hasFilterSlot && index.h("slot", { key: '7ce97a75b66749f137a6c1b70827ddcef60df8ce', name: "filter" }))), index.h("div", { key: '05f39d183177a30f3d5edacecafa57503e1bef9c', role: "list" }, index.h("slot", { key: '37be8bca5d3b81404db947d96605585b3a1cce32' }))));
241
+ return (index.h("div", { key: '647fd58f76aef5077994f9a23a1741d10fb5f256', class: this.listClasses, ref: el => (this.listElement = el) }, (this.hasFilterSlot || this.hasLabelContent) && (index.h("div", { key: '463450b42ec44b2ac1f22ad6b620ecc98d6db8f8', class: this.headerClasses }, index.h("div", { key: '792da568158522281d8c204759f4cfb49a62f5cc', class: "label" }, this.label), this.hasFilterSlot && index.h("slot", { key: 'ae70aee4513869c1cdc77fafeb645b4fb0a1f272', name: "filter" }))), index.h("div", { key: '6d6be3031adf8dd8a491c7a945f350d50665cbed', role: "list" }, index.h("slot", { key: 'f81aa4bb6a4d5973bd84eb482782df5da9f0fb07' }))));
242
242
  }
243
243
  get hostElement() { return index.getElement(this); }
244
244
  };
@@ -106,7 +106,7 @@ const Q2Legend = class {
106
106
  // #endregion
107
107
  // #region Render Methods
108
108
  render() {
109
- return (index.h("click-elsewhere", { key: '17df977aa81845d2b4e6db411b2860495ba61e4b', onChange: () => this.onClickElsewhere(this) }, index.h("ul", { key: '21d4f05b1b2e5f5374e04a8a93249704043ed447' }, this.dataWithClasses.map(item => (index.h("li", { class: "item" }, index.h("button", { "test-id": "item", "aria-label": `${item.name} ${this.formatValue(item.value)}`, class: item.classes, onClick: event => this.onClick(event, item), onMouseEnter: event => this.onMouseEnter(event, item), onMouseLeave: event => this.onMouseLeave(event, item) }, index.h("span", { "test-id": "itemColor", class: "item-color-indicator", style: { backgroundColor: item.color }, "aria-hidden": "true" }), index.h("span", { "test-id": "itemName", class: "item-name" }, item.name), index.h("span", { id: `item-${item.id}`, "test-id": "itemValue", class: "item-value" }, this.formatValue(item.value)))))))));
109
+ return (index.h("click-elsewhere", { key: '541be05761592ed685067cf99e9e5a9b7ce9f445', onChange: () => this.onClickElsewhere(this) }, index.h("ul", { key: '92fbbc5ae4d9ca2803645285c2faca4c9356a319' }, this.dataWithClasses.map(item => (index.h("li", { class: "item" }, index.h("button", { "test-id": "item", "aria-label": `${item.name} ${this.formatValue(item.value)}`, class: item.classes, onClick: event => this.onClick(event, item), onMouseEnter: event => this.onMouseEnter(event, item), onMouseLeave: event => this.onMouseLeave(event, item) }, index.h("span", { "test-id": "itemColor", class: "item-color-indicator", style: { backgroundColor: item.color }, "aria-hidden": "true" }), index.h("span", { "test-id": "itemName", class: "item-name" }, item.name), index.h("span", { id: `item-${item.id}`, "test-id": "itemValue", class: "item-value" }, this.formatValue(item.value)))))))));
110
110
  }
111
111
  static get watchers() { return {
112
112
  "hoveredItemId": ["watchHoveredItemId"],
@@ -66,7 +66,7 @@ const Q2Message = class {
66
66
  const addDivForAriaLive = !isFirefox && this.presentToggle;
67
67
  const { description } = this;
68
68
  const messageLabel = index$1.loc(`tecton.element.message.type.${this.type ? this.type : 'info'}`);
69
- return (index.h("div", { key: 'ccca9e80908f73482c73f865743e5f7cd6438d99', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && index.h("div", { key: 'a9937495e83a7e0852034c36639d8c60ea3c30ac', class: "sr" }), index.h("div", { key: 'e650f7ef7c2544e44f63ce7a23f33f04145a7e83', class: "sr message-label" }, messageLabel), index.h("div", { key: 'daa66069373ac3030fb33dc3c88c0621c91bb6a4', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, index.h("slot", { key: '464a52a941be194c1267beee2c1b307ece17f964' }))));
69
+ return (index.h("div", { key: 'f4161e85adba8c023d8ad135c955a312e145ad9a', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && index.h("div", { key: '75a17b9f1d17e1c051e7ed986d1382f83da6747b', class: "sr" }), index.h("div", { key: '4d1761c6d6391d2f6ed982add6effc441f7284f3', class: "sr message-label" }, messageLabel), index.h("div", { key: '035a1040c019d8aa6eb6899e275469ab9edfc69d', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, index.h("slot", { key: '59187a716f498e899c6c5bf6c81aca27dbfb32c2' }))));
70
70
  }
71
71
  get hostElement() { return index.getElement(this); }
72
72
  };
@@ -161,7 +161,7 @@ const Q2Modal = class {
161
161
  render() {
162
162
  const interiorClasses = `interior`;
163
163
  const renderStatus = `${this.renderStatus || ''}`;
164
- return (index.h("dialog", { key: '73f146b4e163c9395837b932588870487645b6ce', ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, index.h("div", { key: '4219e99c0186ffe1a7e0d3a9e81334adb02a4979', class: interiorClasses }, this.title && (index.h("header", { key: '77d134b2d00f7e4221b25917ab46714446c19b22' }, this.title && index.h("h2", { key: '0f43942c22bd5b9ca7784bcd4c637c6fc3fb1203', class: "title" }, this.title), !!this.closable && (index.h("q2-btn", { key: '6dcf3f2a05cf76a78cf8e2fddd4566d88ddb7421', class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.modal.close", "hide-label": true }, index.h("q2-icon", { key: '8cdf1b3e2b4990547381f04527e0ca3116802949', type: "close" }))))), index.h("div", { key: 'e1bcef9f5eca9e2f4504abbbd4d90ba690e4a6d2', class: "content", ref: el => (this.contentElement = el) }, this.icon && (index.h("div", { key: '0bd5d3ca0d3f13c3879b752202697841fffabf94', class: "icon" }, index.h("q2-icon", { key: 'f236ba5a6f0b14fa865ace8f69813634fa65494c', type: this.icon, style: this.iconStyle() }))), this.imageSrc && (index.h("div", { key: '9c2978ebff4bdc67930fe2a5232b5fb92822e3c9', class: "image" }, index.h("img", { key: '6c5ac47ad9f780e6496b3c8464f003a7f76cbb58', src: this.imageSrc }))), index$1.hasSlotContent(this.hostElement, 'content') && index.h("slot", { key: 'cd4bb02b38c02115a5c8601cc0c4371cbe01611d', name: "content" }), this.description && index.h("p", { key: 'e94d10a5b24629b9a8c965b28a5b439a83e1324b', class: "description" }, this.description), this.customMarkup && (index.h("p", { key: 'cfc781b852faeba9d089355a92809873f0efdda0', class: "customMarkup", innerHTML: sanitizeHtmlString.sanitizeHTMLString(this.customMarkup) }))), index.h("footer", { key: '57c18d04f08e1e00bf3e869d84e8e2f9d8901ae5' }, index.h("q2-action-group", { key: '9f27a49f45568166416acf2a9df83d3d0da58cb2', "full-width": true }, index.h("slot", { key: '64a30e7f6ebaf5f5b99264235d5510835826f566', name: "action" }))))));
164
+ return (index.h("dialog", { key: '14c7d74be95682be1c6523d495a2b35bcc247e4a', ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, index.h("div", { key: '64d3d8d9e01f4e8fee2ae452714e4eedd2570e68', class: interiorClasses }, this.title && (index.h("header", { key: 'd36f931c9f7ae0f14817abb9a6dedee6257a5664' }, this.title && index.h("h2", { key: '39097ca1ee788258b9e349b8bc374b190ecaa8a5', class: "title" }, this.title), !!this.closable && (index.h("q2-btn", { key: 'd1c9a7bd159e4c7fdfa557efca9204593f27803d', class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.modal.close", "hide-label": true }, index.h("q2-icon", { key: '6225815f507315357b545a3177727f9f3438bccf', type: "close" }))))), index.h("div", { key: '4988151b63997614a382f7241f60af147b120e88', class: "content", ref: el => (this.contentElement = el) }, this.icon && (index.h("div", { key: 'a54460f79a828bed7630108dd6f04ca1929dfbfb', class: "icon" }, index.h("q2-icon", { key: '3bd18a8787e40183f1d71ddd48e6ca207062588b', type: this.icon, style: this.iconStyle() }))), this.imageSrc && (index.h("div", { key: '074f8bda9529d16d06630b4107a51e478a07d156', class: "image" }, index.h("img", { key: '608a63353a935f44dfe3c2b809f4f28b89c38b31', src: this.imageSrc }))), index$1.hasSlotContent(this.hostElement, 'content') && index.h("slot", { key: '4f23c254881c6840e05ac24b0ff712fd6e1f90df', name: "content" }), this.description && index.h("p", { key: 'af66d8b53f300ff96b68d59a4e47bf5fe5a535ea', class: "description" }, this.description), this.customMarkup && (index.h("p", { key: 'bae1c644d7e41fd6389cf40689afe3c62dada367', class: "customMarkup", innerHTML: sanitizeHtmlString.sanitizeHTMLString(this.customMarkup) }))), index.h("footer", { key: 'f5b4756a03b61a192074100ca8d0e2162a95ba58' }, index.h("q2-action-group", { key: '3586e0321e11e3a97ee2d640d55d71fc502ee50f', "full-width": true }, index.h("slot", { key: '3a66978962bfdafe16dc1948d3fd31f8088c0100', name: "action" }))))));
165
165
  }
166
166
  get hostElement() { return index.getElement(this); }
167
167
  };
@@ -145,10 +145,10 @@ const Q2MonthPicker = class {
145
145
  // #endregion
146
146
  // #region Render Methods
147
147
  render() {
148
- return (index.h("div", { key: '9208eb9402c7bd1d9a9d52db3153d4b027e2d676', class: "month-container", onKeyDown: this.onMonthKeydown }, index.h("div", { key: 'e6a68034e723e758d9c9824d1a88aeefa73d4ef5', class: "navigation" }, index.h("q2-btn", { key: '552ca23bfaedc6a787ca78b6db0c027f13b94713', class: "year-btn", onClick: () => this.viewChange.emit({
148
+ return (index.h("div", { key: 'b7429b5ed21f7cda666f140a9a93ee643176979c', class: "month-container", onKeyDown: this.onMonthKeydown }, index.h("div", { key: '802900b16d0efa602df89edb22e174329736dca4', class: "navigation" }, index.h("q2-btn", { key: '0a318088ab2eb826620c056246599f5b7803c51e', class: "year-btn", onClick: () => this.viewChange.emit({
149
149
  view: 'year',
150
150
  selectedYear: this.year,
151
- }) }, index.h("span", { key: '758eeb0b67194fb19c191965684ec1f96663fb0e', class: "year" }, this.year), index.h("q2-icon", { key: 'c510bb62e965091cf52213ca7ea6b14fd5f00746', class: "year-icon off", type: "chevron-down" })), index.h("div", { key: 'b523d3a4d99316266e494b1375ba0f7630e5a2b5', class: "month-controller" }, index.h("div", { key: '22ad01820573025add8690107ad17a173fee2551', class: "cal-year-prev-next" }, index.h("q2-btn", { key: '9305d7ea801adc18e2fa613f395c2ad3bcaf16b8', label: index$1.loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, index.h("q2-icon", { key: '01e0409616245ff1f468a3945bf570697a745f7c', type: "arrow-left" })), index.h("q2-btn", { key: 'c89e7e4c668ab6c69caa767746e9eccbc127e321', label: index$1.loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, index.h("q2-icon", { key: 'd15cd07ed6ecc9d0ca4f6b2c1c66e7804195a912', type: "arrow-right" }))))), index.h("div", { key: 'bc5f547b283296e8caff1d10ab0babd269ff5d80', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index$1) => (index.h("div", { class: "month" }, index.h("span", { role: "button", class: "month-button", "data-index": index$1, "aria-label": month.label, tabindex: index$1 === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (index.h("div", { key: '1ad90d319a3589309eec05791fe289c5a8813df9', class: "today-label" }, index$1.loc('tecton.element.calendar.today'), ": ", this.today))));
151
+ }) }, index.h("span", { key: '02018f884cb7b48fb581597fc7d5a2a323497668', class: "year" }, this.year), index.h("q2-icon", { key: '9ab23a381d4fedb5aca2ecee19eb975d76ff4465', class: "year-icon off", type: "chevron-down" })), index.h("div", { key: '79dd4cd0864d051a4252c21ebbd697e0e75b0ec3', class: "month-controller" }, index.h("div", { key: 'd94ad2ebfc317206bfff5b16861c52507a168e09', class: "cal-year-prev-next" }, index.h("q2-btn", { key: '4d8b12fde9825bd5dca90012d42e73453f2cb777', label: index$1.loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, index.h("q2-icon", { key: '428b2feb8854e145bdbc88bdd2c6a2c25a3a50ce', type: "arrow-left" })), index.h("q2-btn", { key: '2f7ef439402c9788ae002a199813387a370e0ed3', label: index$1.loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, index.h("q2-icon", { key: '5931c20eac7a2268c6b945b336f44e143e9fe484', type: "arrow-right" }))))), index.h("div", { key: '9e18ae0e86a741201eb2a8c6ff04b9007899cbae', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index$1) => (index.h("div", { class: "month" }, index.h("span", { role: "button", class: "month-button", "data-index": index$1, "aria-label": month.label, tabindex: index$1 === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (index.h("div", { key: '8dfee8bcf4ee9b4137c9c8644be7f38f5794bf4d', class: "today-label" }, index$1.loc('tecton.element.calendar.today'), ": ", this.today))));
152
152
  }
153
153
  get hostElement() { return index.getElement(this); }
154
154
  };
@@ -53,7 +53,7 @@ const Q2Optgroup = class {
53
53
  // #endregion
54
54
  // #region Render Methods
55
55
  render() {
56
- return (index.h("div", { key: '72e78e35e909a826dbff58572ccf2eb922992ad8', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, index.h("div", { key: '3c25d95961cf0b41f1633782647a708043033bea', class: "q2-optgroup-header", id: this.headerId }, (this.label && index$1.loc(this.label)) || ''), index.h("div", { key: '126e87b4daeb27564289a5c183f2fa155f8b086f', class: "q2-optgroup-options" }, index.h("slot", { key: '21e7c0f8f8992915b029343ce917ebb20f0579b5' }))));
56
+ return (index.h("div", { key: '6b13767a72d67ef3493dcf8d0a4d61fef6255590', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, index.h("div", { key: 'bb613f288978e7ea2e26dbd541bfd1d436df4325', class: "q2-optgroup-header", id: this.headerId }, (this.label && index$1.loc(this.label)) || ''), index.h("div", { key: '523029610ca35f25407ee95e8cb58d5c619c03b8', class: "q2-optgroup-options" }, index.h("slot", { key: 'd278b4bbd2ffe6de40f2259ae3164798ab9c2523' }))));
57
57
  }
58
58
  get hostElement() { return index.getElement(this); }
59
59
  static get watchers() { return {