q2-tecton-elements 1.72.0 → 1.73.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/dist/bundle-report.json +39545 -34361
  2. package/dist/cjs/{charting-ClN1ldqv.js → charting-CdNTrVBe.js} +80 -0
  3. package/dist/cjs/click-elsewhere_3.cjs.entry.js +81 -14
  4. package/dist/cjs/{dataSample-BYR-wrOn.js → dataSample-B4blhlH4.js} +1 -1
  5. package/dist/cjs/date-picker-helpers-UYvPn98R.js +257 -0
  6. package/dist/cjs/{index-BY3aao8R.js → index-BqyWHpNu.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-action-sheet.cjs.entry.js +98 -18
  10. package/dist/cjs/q2-avatar.cjs.entry.js +34 -1
  11. package/dist/cjs/q2-badge_2.cjs.entry.js +3 -3
  12. package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
  13. package/dist/cjs/q2-calendar.cjs.entry.js +9 -4
  14. package/dist/cjs/q2-card-image.cjs.entry.js +3 -3
  15. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  16. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  17. package/dist/cjs/q2-carousel.cjs.entry.js +20 -6
  18. package/dist/cjs/q2-chart-area.cjs.entry.js +38 -7
  19. package/dist/cjs/q2-chart-bar.cjs.entry.js +39 -8
  20. package/dist/cjs/q2-chart-donut.cjs.entry.js +31 -13
  21. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-checkbox_2.cjs.entry.js +8 -5
  23. package/dist/cjs/q2-context.cjs.entry.js +4 -4
  24. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-data-table.cjs.entry.js +7 -7
  26. package/dist/cjs/q2-date-calendar.cjs.entry.js +452 -0
  27. package/dist/cjs/q2-date-picker_2.cjs.entry.js +968 -0
  28. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  29. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-dropdown.cjs.entry.js +3 -3
  31. package/dist/cjs/q2-editable-field.cjs.entry.js +20 -7
  32. package/dist/cjs/q2-example.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-file-picker.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-form.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-item.cjs.entry.js +20 -2
  38. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-link_2.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-message.cjs.entry.js +3 -3
  42. package/dist/cjs/q2-meter.cjs.entry.js +2 -2
  43. package/dist/cjs/q2-modal.cjs.entry.js +2 -2
  44. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  45. package/dist/cjs/q2-mutation-observer.cjs.entry.js +1 -1
  46. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  47. package/dist/cjs/q2-otp.cjs.entry.js +5 -5
  48. package/dist/cjs/q2-pagination.cjs.entry.js +12 -6
  49. package/dist/cjs/q2-pill.cjs.entry.js +8 -5
  50. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-radio.cjs.entry.js +2 -2
  52. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  53. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  54. package/dist/cjs/q2-search.cjs.entry.js +3 -3
  55. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  56. package/dist/cjs/q2-select.cjs.entry.js +8 -4
  57. package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
  58. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  59. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  60. package/dist/cjs/q2-surface.cjs.entry.js +1 -1
  61. package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
  62. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  63. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  64. package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
  65. package/dist/cjs/q2-toast.cjs.entry.js +1 -1
  66. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  67. package/dist/cjs/{sectorHelper-9TWL-3dw.js → sectorHelper-CxhDl5ql.js} +1 -1
  68. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  69. package/dist/collection/collection-manifest.json +2 -0
  70. package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +52 -0
  71. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +98 -18
  72. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.vr.js +124 -0
  73. package/dist/collection/components/q2-avatar/q2-avatar.js +34 -1
  74. package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js +79 -4
  75. package/dist/collection/components/q2-btn/q2-btn.css +84 -136
  76. package/dist/collection/components/q2-btn/q2-btn.js +10 -4
  77. package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js +99 -43
  78. package/dist/collection/components/q2-calendar/q2-calendar.js +16 -5
  79. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  80. package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +3 -13
  81. package/dist/collection/components/q2-card-image/q2-card-image.js +2 -2
  82. package/dist/collection/components/q2-carousel/q2-carousel.js +19 -5
  83. package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js +32 -0
  84. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  85. package/dist/collection/components/q2-chart-area/q2-chart-area.css +11 -0
  86. package/dist/collection/components/q2-chart-area/q2-chart-area.js +53 -7
  87. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.vr.js +14 -0
  88. package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +11 -0
  89. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +50 -4
  90. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.vr.js +14 -0
  91. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +30 -10
  92. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js +25 -0
  93. package/dist/collection/components/q2-checkbox/q2-checkbox.js +6 -3
  94. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +6 -3
  95. package/dist/collection/components/q2-context/q2-context.js +3 -3
  96. package/dist/collection/components/q2-context/test/q2-context-test.vr.js +3 -3
  97. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  98. package/dist/collection/components/q2-data-table/q2-data-table.css +3 -0
  99. package/dist/collection/components/q2-data-table/q2-data-table.js +5 -5
  100. package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js +47 -0
  101. package/dist/collection/components/q2-date-calendar/q2-date-calendar.css +393 -0
  102. package/dist/collection/components/q2-date-calendar/q2-date-calendar.js +1022 -0
  103. package/dist/collection/components/q2-date-calendar/test/q2-date-calendar-test.vr.js +111 -0
  104. package/dist/collection/components/q2-date-picker/q2-date-picker.css +138 -0
  105. package/dist/collection/components/q2-date-picker/q2-date-picker.js +2010 -0
  106. package/dist/collection/components/q2-date-picker/test/q2-date-picker-test.vr.js +179 -0
  107. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  108. package/dist/collection/components/q2-dropdown/q2-dropdown.js +5 -5
  109. package/dist/collection/components/q2-editable-field/q2-editable-field.js +27 -8
  110. package/dist/collection/components/q2-example/q2-example.js +1 -1
  111. package/dist/collection/components/q2-file-picker/q2-file-picker.js +1 -1
  112. package/dist/collection/components/q2-form/q2-form.js +1 -1
  113. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  114. package/dist/collection/components/q2-input/formatting/phone-number-formats.js +1 -1
  115. package/dist/collection/components/q2-input/q2-input.js +6 -3
  116. package/dist/collection/components/q2-item/q2-item.js +19 -1
  117. package/dist/collection/components/q2-item/test/q2-item-test.vr.js +2 -2
  118. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  119. package/dist/collection/components/q2-list/q2-list.js +1 -1
  120. package/dist/collection/components/q2-message/q2-message.css +1 -1
  121. package/dist/collection/components/q2-message/q2-message.js +1 -1
  122. package/dist/collection/components/q2-message/test/q2-message-test.vr.js +11 -2
  123. package/dist/collection/components/q2-meter/q2-meter.js +1 -1
  124. package/dist/collection/components/q2-modal/q2-modal.js +1 -1
  125. package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js +7 -7
  126. package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js +1 -1
  127. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  128. package/dist/collection/components/q2-option-list/q2-option-list.js +36 -4
  129. package/dist/collection/components/q2-otp/q2-otp.js +4 -4
  130. package/dist/collection/components/q2-pagination/q2-pagination.css +17 -0
  131. package/dist/collection/components/q2-pagination/q2-pagination.js +10 -4
  132. package/dist/collection/components/q2-pagination/test/q2-pagination-test.vr.js +39 -0
  133. package/dist/collection/components/q2-pill/q2-pill.css +14 -10
  134. package/dist/collection/components/q2-pill/q2-pill.js +6 -3
  135. package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js +25 -0
  136. package/dist/collection/components/q2-popover/q2-popover.css +1 -0
  137. package/dist/collection/components/q2-popover/q2-popover.js +43 -8
  138. package/dist/collection/components/q2-radio/q2-radio.js +5 -2
  139. package/dist/collection/components/q2-radio-group/q2-radio-group.js +6 -3
  140. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  141. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  142. package/dist/collection/components/q2-search/q2-search.js +6 -3
  143. package/dist/collection/components/q2-section/q2-section.js +2 -2
  144. package/dist/collection/components/q2-select/q2-select.js +12 -5
  145. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  146. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
  147. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  148. package/dist/collection/components/q2-surface/q2-surface.js +1 -1
  149. package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +2 -2
  150. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  151. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  152. package/dist/collection/components/q2-tag/q2-tag.js +6 -3
  153. package/dist/collection/components/q2-textarea/q2-textarea.js +6 -3
  154. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js +1 -1
  155. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  156. package/dist/collection/utils/chart-keyboard.js +76 -0
  157. package/dist/collection/utils/date-picker/date-picker-helpers.js +239 -0
  158. package/dist/collection/utils/date-picker/date-picker-types.js +1 -0
  159. package/dist/collection/utils/index.js +1 -1
  160. package/dist/components/charting.js +1603 -1532
  161. package/dist/components/dataSample.js +7 -7
  162. package/dist/components/index.js +57 -53
  163. package/dist/components/index2.js +2 -2
  164. package/dist/components/q2-action-sheet.js +224 -103
  165. package/dist/components/q2-avatar2.js +41 -27
  166. package/dist/components/q2-btn2.js +2 -2
  167. package/dist/components/q2-calendar.js +6 -3
  168. package/dist/components/q2-card-image.js +2 -2
  169. package/dist/components/q2-carousel-pane2.js +3 -3
  170. package/dist/components/q2-carousel.js +37 -24
  171. package/dist/components/q2-chart-area.js +415 -369
  172. package/dist/components/q2-chart-bar.js +193 -148
  173. package/dist/components/q2-chart-donut.js +185 -158
  174. package/dist/components/q2-checkbox-group.js +6 -6
  175. package/dist/components/q2-checkbox2.js +11 -11
  176. package/dist/components/q2-context.js +20 -20
  177. package/dist/components/q2-currency.js +9 -9
  178. package/dist/components/q2-data-table.js +111 -111
  179. package/dist/components/q2-date-calendar.d.ts +11 -0
  180. package/dist/components/q2-date-calendar.js +5 -0
  181. package/dist/components/q2-date-calendar2.js +678 -0
  182. package/dist/components/q2-date-picker.d.ts +11 -0
  183. package/dist/components/q2-date-picker.js +5 -0
  184. package/dist/components/q2-date-picker2.js +875 -0
  185. package/dist/components/q2-detail.js +3 -3
  186. package/dist/components/q2-dropdown.js +17 -17
  187. package/dist/components/q2-editable-field.js +16 -5
  188. package/dist/components/q2-example.js +11 -11
  189. package/dist/components/q2-file-picker.js +1 -1
  190. package/dist/components/q2-form.js +6 -6
  191. package/dist/components/q2-formatted-text.js +2 -2
  192. package/dist/components/q2-input2.js +6 -6
  193. package/dist/components/q2-item2.js +32 -22
  194. package/dist/components/q2-legend2.js +7 -7
  195. package/dist/components/q2-list2.js +6 -6
  196. package/dist/components/q2-message2.js +10 -10
  197. package/dist/components/q2-meter.js +7 -7
  198. package/dist/components/q2-modal.js +22 -22
  199. package/dist/components/q2-month-picker.js +17 -17
  200. package/dist/components/q2-mutation-observer.js +1 -1
  201. package/dist/components/q2-optgroup2.js +7 -7
  202. package/dist/components/q2-option-list2.js +55 -34
  203. package/dist/components/q2-otp.js +8 -8
  204. package/dist/components/q2-pagination.js +70 -68
  205. package/dist/components/q2-pill.js +51 -46
  206. package/dist/components/q2-popover2.js +70 -49
  207. package/dist/components/q2-radio-group.js +7 -7
  208. package/dist/components/q2-radio.js +6 -6
  209. package/dist/components/q2-relative-time.js +1 -1
  210. package/dist/components/q2-resize-observer2.js +1 -1
  211. package/dist/components/q2-search.js +5 -5
  212. package/dist/components/q2-section.js +17 -17
  213. package/dist/components/q2-select2.js +2 -2
  214. package/dist/components/q2-stepper-pane.js +29 -29
  215. package/dist/components/q2-stepper-vertical.js +4 -4
  216. package/dist/components/q2-stepper.js +57 -57
  217. package/dist/components/q2-surface.js +3 -3
  218. package/dist/components/q2-tab-container.js +21 -21
  219. package/dist/components/q2-tab-pane.js +6 -6
  220. package/dist/components/q2-tag2.js +8 -6
  221. package/dist/components/q2-textarea.js +3 -3
  222. package/dist/components/sectorHelper.js +78 -78
  223. package/dist/components/tecton-tab-pane.js +10 -10
  224. package/dist/esm/{charting-DOZct-UB.js → charting-DFXJklqs.js} +79 -1
  225. package/dist/esm/click-elsewhere_3.entry.js +81 -14
  226. package/dist/esm/{dataSample-Dm1zpQNi.js → dataSample-CP_VKNqt.js} +1 -1
  227. package/dist/esm/date-picker-helpers-D8QnN_AS.js +242 -0
  228. package/dist/esm/{index-DJw6Feh0.js → index-CP8pXJ-l.js} +1 -1
  229. package/dist/esm/loader.js +1 -1
  230. package/dist/esm/q2-action-group.entry.js +1 -1
  231. package/dist/esm/q2-action-sheet.entry.js +99 -19
  232. package/dist/esm/q2-avatar.entry.js +34 -1
  233. package/dist/esm/q2-badge_2.entry.js +3 -3
  234. package/dist/esm/q2-btn_2.entry.js +2 -2
  235. package/dist/esm/q2-calendar.entry.js +9 -4
  236. package/dist/esm/q2-card-image.entry.js +3 -3
  237. package/dist/esm/q2-card.entry.js +1 -1
  238. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  239. package/dist/esm/q2-carousel.entry.js +20 -6
  240. package/dist/esm/q2-chart-area.entry.js +38 -7
  241. package/dist/esm/q2-chart-bar.entry.js +39 -8
  242. package/dist/esm/q2-chart-donut.entry.js +31 -13
  243. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  244. package/dist/esm/q2-checkbox_2.entry.js +8 -5
  245. package/dist/esm/q2-context.entry.js +4 -4
  246. package/dist/esm/q2-currency.entry.js +1 -1
  247. package/dist/esm/q2-data-table.entry.js +7 -7
  248. package/dist/esm/q2-date-calendar.entry.js +450 -0
  249. package/dist/esm/q2-date-picker_2.entry.js +965 -0
  250. package/dist/esm/q2-detail.entry.js +2 -2
  251. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  252. package/dist/esm/q2-dropdown.entry.js +3 -3
  253. package/dist/esm/q2-editable-field.entry.js +20 -7
  254. package/dist/esm/q2-example.entry.js +1 -1
  255. package/dist/esm/q2-file-picker.entry.js +2 -2
  256. package/dist/esm/q2-form.entry.js +1 -1
  257. package/dist/esm/q2-formatted-text.entry.js +1 -1
  258. package/dist/esm/q2-icon.entry.js +1 -1
  259. package/dist/esm/q2-item.entry.js +20 -2
  260. package/dist/esm/q2-legend.entry.js +1 -1
  261. package/dist/esm/q2-link_2.entry.js +2 -2
  262. package/dist/esm/q2-loc.entry.js +1 -1
  263. package/dist/esm/q2-message.entry.js +3 -3
  264. package/dist/esm/q2-meter.entry.js +2 -2
  265. package/dist/esm/q2-modal.entry.js +2 -2
  266. package/dist/esm/q2-month-picker.entry.js +3 -3
  267. package/dist/esm/q2-mutation-observer.entry.js +1 -1
  268. package/dist/esm/q2-option.entry.js +1 -1
  269. package/dist/esm/q2-otp.entry.js +5 -5
  270. package/dist/esm/q2-pagination.entry.js +12 -6
  271. package/dist/esm/q2-pill.entry.js +8 -5
  272. package/dist/esm/q2-radio-group.entry.js +2 -2
  273. package/dist/esm/q2-radio.entry.js +2 -2
  274. package/dist/esm/q2-relative-time.entry.js +2 -2
  275. package/dist/esm/q2-resize-observer.entry.js +1 -1
  276. package/dist/esm/q2-search.entry.js +3 -3
  277. package/dist/esm/q2-section.entry.js +3 -3
  278. package/dist/esm/q2-select.entry.js +8 -4
  279. package/dist/esm/q2-stepper-pane.entry.js +2 -2
  280. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  281. package/dist/esm/q2-stepper.entry.js +2 -2
  282. package/dist/esm/q2-surface.entry.js +1 -1
  283. package/dist/esm/q2-tab-container.entry.js +2 -2
  284. package/dist/esm/q2-tab-pane.entry.js +1 -1
  285. package/dist/esm/q2-tecton-elements.js +1 -1
  286. package/dist/esm/q2-textarea.entry.js +2 -2
  287. package/dist/esm/q2-toast.entry.js +1 -1
  288. package/dist/esm/q2-tooltip.entry.js +1 -1
  289. package/dist/esm/{sectorHelper--RMGWGAy.js → sectorHelper-DBtkWtpl.js} +1 -1
  290. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  291. package/dist/q2-tecton-elements/{charting-DOZct-UB.js → charting-DFXJklqs.js} +1625 -1554
  292. package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +85 -43
  293. package/dist/q2-tecton-elements/{dataSample-Dm1zpQNi.js → dataSample-CP_VKNqt.js} +33 -33
  294. package/dist/q2-tecton-elements/date-picker-helpers-D8QnN_AS.js +153 -0
  295. package/dist/q2-tecton-elements/{index-DJw6Feh0.js → index-CP8pXJ-l.js} +1 -1
  296. package/dist/q2-tecton-elements/q2-action-group.entry.js +1 -1
  297. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +169 -84
  298. package/dist/q2-tecton-elements/q2-avatar.entry.js +24 -10
  299. package/dist/q2-tecton-elements/q2-badge_2.entry.js +6 -6
  300. package/dist/q2-tecton-elements/q2-btn_2.entry.js +23 -23
  301. package/dist/q2-tecton-elements/q2-calendar.entry.js +7 -4
  302. package/dist/q2-tecton-elements/q2-card-image.entry.js +3 -3
  303. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  304. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +4 -4
  305. package/dist/q2-tecton-elements/q2-carousel.entry.js +24 -11
  306. package/dist/q2-tecton-elements/q2-chart-area.entry.js +187 -141
  307. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +377 -333
  308. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +184 -158
  309. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +7 -7
  310. package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +20 -18
  311. package/dist/q2-tecton-elements/q2-context.entry.js +21 -21
  312. package/dist/q2-tecton-elements/q2-currency.entry.js +9 -9
  313. package/dist/q2-tecton-elements/q2-data-table.entry.js +7 -7
  314. package/dist/q2-tecton-elements/q2-date-calendar.entry.js +438 -0
  315. package/dist/q2-tecton-elements/q2-date-picker_2.entry.js +792 -0
  316. package/dist/q2-tecton-elements/q2-detail.entry.js +4 -4
  317. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  318. package/dist/q2-tecton-elements/q2-dropdown.entry.js +16 -16
  319. package/dist/q2-tecton-elements/q2-editable-field.entry.js +17 -6
  320. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  321. package/dist/q2-tecton-elements/q2-file-picker.entry.js +2 -2
  322. package/dist/q2-tecton-elements/q2-form.entry.js +2 -2
  323. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  324. package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
  325. package/dist/q2-tecton-elements/q2-item.entry.js +26 -16
  326. package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
  327. package/dist/q2-tecton-elements/q2-link_2.entry.js +7 -7
  328. package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
  329. package/dist/q2-tecton-elements/q2-message.entry.js +29 -29
  330. package/dist/q2-tecton-elements/q2-meter.entry.js +8 -8
  331. package/dist/q2-tecton-elements/q2-modal.entry.js +18 -18
  332. package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
  333. package/dist/q2-tecton-elements/q2-mutation-observer.entry.js +1 -1
  334. package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
  335. package/dist/q2-tecton-elements/q2-otp.entry.js +9 -9
  336. package/dist/q2-tecton-elements/q2-pagination.entry.js +51 -49
  337. package/dist/q2-tecton-elements/q2-pill.entry.js +22 -17
  338. package/dist/q2-tecton-elements/q2-radio-group.entry.js +8 -8
  339. package/dist/q2-tecton-elements/q2-radio.entry.js +7 -7
  340. package/dist/q2-tecton-elements/q2-relative-time.entry.js +6 -6
  341. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +13 -13
  342. package/dist/q2-tecton-elements/q2-search.entry.js +31 -31
  343. package/dist/q2-tecton-elements/q2-section.entry.js +20 -20
  344. package/dist/q2-tecton-elements/q2-select.entry.js +3 -3
  345. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +10 -10
  346. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +9 -9
  347. package/dist/q2-tecton-elements/q2-stepper.entry.js +45 -45
  348. package/dist/q2-tecton-elements/q2-surface.entry.js +15 -15
  349. package/dist/q2-tecton-elements/q2-tab-container.entry.js +20 -20
  350. package/dist/q2-tecton-elements/q2-tab-pane.entry.js +9 -9
  351. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  352. package/dist/q2-tecton-elements/q2-textarea.entry.js +3 -3
  353. package/dist/q2-tecton-elements/q2-toast.entry.js +1 -1
  354. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  355. package/dist/q2-tecton-elements/{sectorHelper--RMGWGAy.js → sectorHelper-DBtkWtpl.js} +56 -56
  356. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
  357. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +21 -1
  358. package/dist/types/components/q2-action-sheet/test/q2-action-sheet-test.vr.d.ts +1 -0
  359. package/dist/types/components/q2-avatar/q2-avatar.d.ts +5 -0
  360. package/dist/types/components/q2-btn/q2-btn.d.ts +7 -3
  361. package/dist/types/components/q2-calendar/q2-calendar.d.ts +10 -2
  362. package/dist/types/components/q2-carousel/q2-carousel.d.ts +5 -0
  363. package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +11 -2
  364. package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +9 -0
  365. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +1 -0
  366. package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +4 -3
  367. package/dist/types/components/q2-checkbox-group/q2-checkbox-group.d.ts +4 -2
  368. package/dist/types/components/q2-date-calendar/q2-date-calendar.d.ts +122 -0
  369. package/dist/types/components/q2-date-calendar/test/q2-date-calendar-test.vr.d.ts +1 -0
  370. package/dist/types/components/q2-date-picker/q2-date-picker.d.ts +304 -0
  371. package/dist/types/components/q2-date-picker/test/q2-date-picker-test.vr.d.ts +1 -0
  372. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +3 -3
  373. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +14 -1
  374. package/dist/types/components/q2-input/q2-input.d.ts +4 -2
  375. package/dist/types/components/q2-item/q2-item.d.ts +3 -0
  376. package/dist/types/components/q2-option-list/q2-option-list.d.ts +1 -0
  377. package/dist/types/components/q2-popover/q2-popover.d.ts +4 -0
  378. package/dist/types/components/q2-radio/q2-radio.d.ts +3 -2
  379. package/dist/types/components/q2-radio-group/q2-radio-group.d.ts +4 -2
  380. package/dist/types/components/q2-search/q2-search.d.ts +3 -1
  381. package/dist/types/components/q2-select/q2-select.d.ts +4 -2
  382. package/dist/types/components/q2-textarea/q2-textarea.d.ts +4 -2
  383. package/dist/types/components.d.ts +858 -49
  384. package/dist/types/global.d.ts +1 -0
  385. package/dist/types/index.d.ts +1 -0
  386. package/dist/types/utils/chart-keyboard.d.ts +16 -0
  387. package/dist/types/utils/date-picker/date-picker-helpers.d.ts +47 -0
  388. package/dist/types/utils/date-picker/date-picker-types.d.ts +42 -0
  389. package/package.json +3 -3
  390. package/dist/cjs/q2-optgroup.cjs.entry.js +0 -70
  391. package/dist/esm/q2-optgroup.entry.js +0 -68
  392. package/dist/q2-tecton-elements/q2-optgroup.entry.js +0 -88
@@ -0,0 +1,968 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-DUaTw_1N.js');
4
+ var index$2 = require('./index-CgG3VNXc.js');
5
+ var index$1 = require('./index-BqyWHpNu.js');
6
+ var actionSheet = require('./action-sheet-DUBlF_x3.js');
7
+ var mirrorEmit = require('./mirror-emit-kjeNv83f.js');
8
+ var datePickerHelpers = require('./date-picker-helpers-UYvPn98R.js');
9
+ var component = require('./component-iASoq6gx.js');
10
+
11
+ const q2DatePickerCss = () => `*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}@container style(--t-prefers-motion: "reduced"){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")){@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}}:host{--comp-date-picker-width:var(--tct-date-picker-width, var(--tct-date-calendar-width, 360px));box-sizing:border-box;display:block}:host[hidden]{display:none}click-elsewhere,.date-picker-input{display:block;width:100%}q2-date-calendar{--comp-date-calendar-width:var(--comp-date-picker-width);display:block;width:var(--comp-date-picker-width)}q2-date-calendar.is-action-sheet{--comp-date-calendar-width:100%;width:100%}q2-popover{--tct-popover-width:var(--comp-date-picker-width);--tct-popover-border-radius:var(--tct-date-picker-border-radius, var(--tct-date-calendar-border-radius, var(--app-border-radius-1, 4px)))}@media (max-width: 768px){:host{--comp-date-picker-width:min( 100%, calc( 100vw - var(--tct-date-picker-mobile-gutter, var(--tct-date-calendar-mobile-gutter, 24px)) - var(--tct-date-picker-mobile-gutter, var(--tct-date-calendar-mobile-gutter, 24px)) ), var(--tct-date-picker-mobile-max-width, var(--tct-date-calendar-mobile-max-width, 420px)) )}}`;
12
+
13
+ const Q2DatePicker = class {
14
+ constructor(hostRef) {
15
+ index.registerInstance(this, hostRef);
16
+ this.change = index.createEvent(this, "change", 7);
17
+ this.error = index.createEvent(this, "error", 7);
18
+ this.success = index.createEvent(this, "success", 7);
19
+ this.tctCancel = index.createEvent(this, "tctCancel", 7);
20
+ this.tctChange = index.createEvent(this, "tctChange", 7);
21
+ this.tctClose = index.createEvent(this, "tctClose", 7);
22
+ this.tctError = index.createEvent(this, "tctError", 7);
23
+ this.tctSuccess = index.createEvent(this, "tctSuccess", 7);
24
+ var _a;
25
+ this.committingValue = false;
26
+ this.normalizedDateLists = new WeakMap();
27
+ // #endregion
28
+ // #region State Properties
29
+ this.activePopoverDirection = 'down';
30
+ this.typeableValue = '';
31
+ // #endregion
32
+ // #region Public Property API
33
+ /**
34
+ * Renders the calendar panel inline with behavior specific to being hosted by `q2-action-sheet`.
35
+ * @private
36
+ */
37
+ this._actionSheet = false;
38
+ /**
39
+ * Determines the year for a committed month/day typeable date with no year.
40
+ * `future` selects the next year for dates before today, while `past` selects the prior year for dates after today.
41
+ * Only applies to `single-typeable` mode with a month-first or day-first display format.
42
+ */
43
+ this.assume = 'current';
44
+ /** Displays a button in the input field allowing the user to clear the selected date or range. */
45
+ this.clearable = false;
46
+ /** Delay in milliseconds before the popover closes after selection. Explicitly undefined or non-positive values close immediately. */
47
+ this.closeDelay = 400;
48
+ /** Indicates the date picker cannot be focused or interacted with. */
49
+ this.disabled = false;
50
+ /**
51
+ * Hides the input field's visible label while retaining its accessible name.
52
+ * @warning
53
+ * Hides the label visually. `label` text is still required for screenreader compliance.
54
+ */
55
+ this.hideLabel = false;
56
+ /**
57
+ * Instructs the component to use the action sheet workflow for displaying its calendar.
58
+ *
59
+ * For more information, see [Action Sheets](https://tecton.q2developer.com/guides/action-sheets/).
60
+ */
61
+ this.hoist = ((_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.useActionSheets) ? true : undefined;
62
+ /** Shows the input field's error visual state. */
63
+ this.invalid = false;
64
+ /** Formats selected dates using the provided locale. Accepts multiple locales in an array as sequential fallbacks. */
65
+ this.locale = document.documentElement.lang || 'en-US';
66
+ /**
67
+ * Selects calendar or typeable behavior for a single date or date range.
68
+ * Enabling the legacy `typeable` prop uses `single-typeable` when `mode` is left at its default; an explicit mode takes precedence.
69
+ */
70
+ this.mode = 'single';
71
+ /** Controls whether the date picker popover is open or closed. */
72
+ this.open = false;
73
+ /** Appends "(optional)" to the input label and marks the field as not required. */
74
+ this.optional = false;
75
+ /** Aligns the calendar popover to the left or right side of the input field. */
76
+ this.popoverAlignment = 'left';
77
+ /** @deprecated Retained for compatibility with `q2-date-picker`. */
78
+ this.popoverMinHeight = 355;
79
+ /**
80
+ * Uses absolute positioning for the popover when set to `legacy`.
81
+ *
82
+ * This compatibility option supports layouts where transformed ancestors interfere with fixed positioning.
83
+ */
84
+ this.popoverMode = null;
85
+ /**
86
+ * The field's content is not editable, but the field remains focusable.
87
+ *
88
+ * Appends "(read only)" to the field label.
89
+ */
90
+ this.readonly = false;
91
+ /** Enables the legacy single-date typeable input behavior. */
92
+ this.typeable = false;
93
+ /** Shows the input field's success visual state when no errors are active. */
94
+ this.valid = false;
95
+ this.onCalendarCancel = (event) => {
96
+ event.stopPropagation();
97
+ this.calendarError = '';
98
+ if (this._actionSheet) {
99
+ this.tctCancel.emit();
100
+ return;
101
+ }
102
+ this.closeCalendar();
103
+ };
104
+ this.onCalendarCommit = (event) => {
105
+ event.stopPropagation();
106
+ if (this.disabled || this.readonly)
107
+ return;
108
+ if (!event.detail)
109
+ return;
110
+ this.calendarError = '';
111
+ const { value, rangeStart, rangeEnd } = event.detail;
112
+ if (this.isRangeMode) {
113
+ if (!rangeStart || !rangeEnd)
114
+ return;
115
+ this.rangeStart = rangeStart;
116
+ this.rangeEnd = rangeEnd;
117
+ mirrorEmit.mirrorEmit(this, ['change', 'tctChange'], { rangeStart, rangeEnd });
118
+ this.closeCalendar(true, true);
119
+ return;
120
+ }
121
+ if (!value)
122
+ return;
123
+ this.commitSingleValue(value);
124
+ this.closeAfterSelection();
125
+ };
126
+ this.onCalendarDismiss = (event) => {
127
+ event.stopPropagation();
128
+ this.calendarError = '';
129
+ if (this._actionSheet) {
130
+ this.tctCancel.emit();
131
+ return;
132
+ }
133
+ this.closeCalendar();
134
+ };
135
+ this.onCalendarError = (event) => {
136
+ event.stopPropagation();
137
+ this.calendarError = event.detail;
138
+ if (this._actionSheet) {
139
+ this.tctClose.emit({ error: event.detail });
140
+ return;
141
+ }
142
+ this.closeCalendar(true, true);
143
+ };
144
+ this.onCalendarToggleClick = (event) => {
145
+ event.stopPropagation();
146
+ this.toggleCalendar();
147
+ };
148
+ this.onClear = () => {
149
+ this.calendarError = '';
150
+ this.typeableError = '';
151
+ this.typeableValue = '';
152
+ if (this.isRangeMode) {
153
+ this.rangeStart = undefined;
154
+ this.rangeEnd = undefined;
155
+ mirrorEmit.mirrorEmit(this, ['change', 'tctChange'], { rangeStart: null, rangeEnd: null });
156
+ return;
157
+ }
158
+ this.value = undefined;
159
+ mirrorEmit.mirrorEmit(this, ['change', 'tctChange'], { value: null });
160
+ };
161
+ this.onClickElsewhere = (event) => {
162
+ if (event.target.localName !== 'click-elsewhere')
163
+ return;
164
+ event.stopPropagation();
165
+ this.closeCalendar(false);
166
+ };
167
+ this.onInputClick = () => {
168
+ if (this.acceptsTypeableInput)
169
+ return;
170
+ this.toggleCalendar();
171
+ };
172
+ this.onInputKeydown = (event) => {
173
+ if (this.disabled || this.readonly)
174
+ return;
175
+ if (this.acceptsTypeableInput) {
176
+ if (event.metaKey || event.ctrlKey || event.altKey || event.key.length !== 1)
177
+ return;
178
+ if (!this.typeableAllowedCharacters.test(event.key))
179
+ event.preventDefault();
180
+ return;
181
+ }
182
+ if (actionSheet.shouldShowActionSheet({ hoist: this.hoist }, event)) {
183
+ event.preventDefault();
184
+ this.showActionSheet();
185
+ return;
186
+ }
187
+ if (event.key === 'Escape' && this.open) {
188
+ event.preventDefault();
189
+ this.closeCalendar();
190
+ return;
191
+ }
192
+ if (!['Enter', ' ', 'ArrowDown'].includes(event.key) || this.open)
193
+ return;
194
+ event.preventDefault();
195
+ this.setActivePopoverDirection();
196
+ this.open = true;
197
+ requestAnimationFrame(() => this.focusRenderedDate());
198
+ };
199
+ this.onTypeableChange = (event) => {
200
+ event.stopImmediatePropagation();
201
+ if (this.disabled || this.readonly)
202
+ return;
203
+ if (this.isSingleTypeable) {
204
+ const date = this.parseTypeableDate(this.typeableValue);
205
+ if (!date || !this.isDateValid(date)) {
206
+ this.setTypeableError(this.dateFormatValidationError);
207
+ return;
208
+ }
209
+ this.setTypeableError('');
210
+ const value = datePickerHelpers.formatDateISO(date);
211
+ this.commitSingleValue(value);
212
+ return;
213
+ }
214
+ const [startValue, endValue] = this.typeableValue.split(' - ');
215
+ const start = this.parseTypeableDate(startValue);
216
+ const end = this.parseTypeableDate(endValue);
217
+ if (!start || !end) {
218
+ this.setTypeableError(this.rangeFormatValidationError);
219
+ return;
220
+ }
221
+ const rangeError = this.typeableRangeError(start, end);
222
+ if (rangeError) {
223
+ this.setTypeableError(rangeError);
224
+ return;
225
+ }
226
+ this.setTypeableError('');
227
+ const rangeStart = datePickerHelpers.formatDateISO(start);
228
+ const rangeEnd = datePickerHelpers.formatDateISO(end);
229
+ this.rangeStart = rangeStart;
230
+ this.rangeEnd = rangeEnd;
231
+ mirrorEmit.mirrorEmit(this, ['change', 'tctChange'], { rangeStart, rangeEnd });
232
+ };
233
+ this.onTypeableInput = (event) => {
234
+ var _a;
235
+ event.stopImmediatePropagation();
236
+ if (this.disabled || this.readonly)
237
+ return;
238
+ const maxDigits = this.isRangeTypeable ? 16 : 8;
239
+ const digits = String(((_a = event.detail) === null || _a === void 0 ? void 0 : _a.value) || '')
240
+ .replace(/\D/g, '')
241
+ .slice(0, maxDigits);
242
+ this.typeableValue =
243
+ this.isRangeTypeable && digits.length > 8
244
+ ? `${this.formatTypeableDate(digits.slice(0, 8))} - ${this.formatTypeableDate(digits.slice(8))}`
245
+ : this.formatTypeableDate(digits);
246
+ this.validateTypeableValue();
247
+ };
248
+ }
249
+ // #endregion
250
+ // #region Component Lifecycle Events
251
+ connectedCallback() {
252
+ const normalizedValue = this.normalizedValue;
253
+ if (normalizedValue && this.value !== normalizedValue)
254
+ this.value = normalizedValue;
255
+ this.activePopoverDirection = this.effectivePopoverDirection || 'down';
256
+ this.typeableValue = this.formattedTypeableValue;
257
+ this.validateCurrentValue();
258
+ }
259
+ disconnectedCallback() {
260
+ clearTimeout(this.closeTimeout);
261
+ }
262
+ componentWillLoad() {
263
+ if (this.popDirection)
264
+ index$1.handleDeprecationWarning(this, 'popDirection', 'prop');
265
+ }
266
+ componentDidLoad() {
267
+ index$1.overrideFocus(this.hostElement);
268
+ }
269
+ componentDidRender() {
270
+ if (this.open && this.activePopoverDirection === 'up')
271
+ this.scrollUpCalendarToBottom();
272
+ }
273
+ // #endregion
274
+ // #region Listeners
275
+ beforeInputHandler(event) {
276
+ if (this.acceptsTypeableInput && event.data && !this.typeableAllowedCharacters.test(event.data)) {
277
+ event.preventDefault();
278
+ }
279
+ }
280
+ delegateFocus(event) {
281
+ var _a;
282
+ if (!index$1.isEventFromElement(event, this.hostElement))
283
+ return;
284
+ (_a = this.controlElement) === null || _a === void 0 ? void 0 : _a.focus();
285
+ }
286
+ popoverStateHandler({ detail: { open } }) {
287
+ if (this.open !== open)
288
+ this.open = open;
289
+ }
290
+ // #endregion
291
+ // #region Public Methods API
292
+ /** Closes the calendar popover if it is open. */
293
+ async closePopover() {
294
+ this.closeCalendar();
295
+ }
296
+ /** Moves the visible month to the provided date and focuses that day. */
297
+ async focusDate(date) {
298
+ var _a;
299
+ if (!index$2.dateFnsExports.isValid(date))
300
+ return;
301
+ await index$1.waitForNextPaint();
302
+ await ((_a = this.calendarElement) === null || _a === void 0 ? void 0 : _a.focusDate(date));
303
+ }
304
+ /** Opens the calendar popover if it is closed. */
305
+ async openPopover() {
306
+ var _a;
307
+ if (this.open || this.disabled || this.readonly || this._actionSheet)
308
+ return;
309
+ this.setActivePopoverDirection();
310
+ this.open = true;
311
+ await index$1.waitForNextPaint();
312
+ const toggleElement = this.acceptsTypeableInput
313
+ ? (_a = this.controlElement) === null || _a === void 0 ? void 0 : _a.querySelector('[test-id="datePickerCalendarToggle"]')
314
+ : this.controlElement;
315
+ toggleElement === null || toggleElement === void 0 ? void 0 : toggleElement.focus();
316
+ toggleElement === null || toggleElement === void 0 ? void 0 : toggleElement.dispatchEvent(new FocusEvent('focus'));
317
+ }
318
+ /** Clears selected values, uncommitted typeable input, and error state without changing configuration props. */
319
+ async reset() {
320
+ clearTimeout(this.closeTimeout);
321
+ this.value = undefined;
322
+ this.rangeStart = undefined;
323
+ this.rangeEnd = undefined;
324
+ this.errors = undefined;
325
+ this.invalid = false;
326
+ this.calendarError = '';
327
+ this.typeableError = '';
328
+ this.typeableValue = '';
329
+ }
330
+ /** Opens the calendar and selects the provided date when it is valid. */
331
+ async setValue(value) {
332
+ var _a;
333
+ const date = datePickerHelpers.parseDatePickerValue(datePickerHelpers.normalizeDatePickerValue(value));
334
+ if (this.disabled || this.readonly || this.isRangeTypeable || !index$2.dateFnsExports.isValid(date) || !this.isDateValid(date)) {
335
+ return;
336
+ }
337
+ if (!this._actionSheet) {
338
+ this.setActivePopoverDirection();
339
+ this.open = true;
340
+ await index$1.waitForNextPaint();
341
+ }
342
+ await ((_a = this.calendarElement) === null || _a === void 0 ? void 0 : _a.setValue(date));
343
+ }
344
+ /**
345
+ * Focuses the single typeable input and stages a valid date without committing it.
346
+ *
347
+ * @warning
348
+ * Only applicable when the effective mode is `single-typeable`.
349
+ */
350
+ async typeValue(value) {
351
+ var _a;
352
+ if (!this.isSingleTypeable)
353
+ return;
354
+ const date = datePickerHelpers.parseDatePickerValue(datePickerHelpers.normalizeDatePickerValue(value));
355
+ if (!index$2.dateFnsExports.isValid(date))
356
+ return;
357
+ await ((_a = this.controlElement) === null || _a === void 0 ? void 0 : _a.setValue(this.formatDateWithModifier(date)));
358
+ }
359
+ // #endregion
360
+ // #region Watchers
361
+ constraintsChanged() {
362
+ if (this.committingValue)
363
+ return;
364
+ if (this.acceptsTypeableInput)
365
+ this.revalidateTypeableValue();
366
+ if (!this.typeableError)
367
+ this.validateCurrentValue();
368
+ }
369
+ disabledChanged(disabled) {
370
+ if (disabled)
371
+ this.closeCalendar(false);
372
+ }
373
+ displayFormatChanged() {
374
+ this.calendarError = '';
375
+ this.typeableError = '';
376
+ this.typeableValue = this.formattedTypeableValue;
377
+ }
378
+ modeChanged() {
379
+ this.open = false;
380
+ this.calendarError = '';
381
+ this.typeableError = '';
382
+ this.typeableValue = this.formattedTypeableValue;
383
+ }
384
+ openChanged(open) {
385
+ if (!open)
386
+ return;
387
+ this.setActivePopoverDirection();
388
+ if (this.isRangeMode && this.activePopoverDirection === 'down')
389
+ this.scrollDownCalendarToTop();
390
+ }
391
+ popDirectionChanged() {
392
+ if (this.popDirection)
393
+ index$1.handleDeprecationWarning(this, 'popDirection', 'prop');
394
+ this.setActivePopoverDirection();
395
+ }
396
+ popoverDirectionChanged() {
397
+ this.setActivePopoverDirection();
398
+ }
399
+ rangeEndChanged() {
400
+ if (!this.isRangeMode)
401
+ return;
402
+ this.calendarError = '';
403
+ if (this.isRangeTypeable)
404
+ this.syncTypeableValue();
405
+ }
406
+ rangeStartChanged() {
407
+ if (!this.isRangeMode)
408
+ return;
409
+ this.calendarError = '';
410
+ if (this.isRangeTypeable)
411
+ this.syncTypeableValue();
412
+ }
413
+ readonlyChanged(readonly) {
414
+ if (readonly)
415
+ this.closeCalendar(false);
416
+ }
417
+ valueChanged(value) {
418
+ const normalizedValue = datePickerHelpers.normalizeDatePickerValue(value);
419
+ if (normalizedValue && value !== normalizedValue) {
420
+ this.value = normalizedValue;
421
+ return;
422
+ }
423
+ if (this.isRangeMode || this.committingValue)
424
+ return;
425
+ this.calendarError = '';
426
+ if (this.isSingleTypeable)
427
+ this.syncTypeableValue();
428
+ this.validateCurrentValue();
429
+ }
430
+ // #endregion
431
+ // #region Local Methods
432
+ get acceptsTypeableInput() {
433
+ return this.isRangeTypeable || this.isSingleTypeable;
434
+ }
435
+ get actionSheetData() {
436
+ return {
437
+ appearance: 'date-picker',
438
+ title: this.localizeForLocale(this.calendarLabel || 'Choose a date'),
439
+ datePickerProps: {
440
+ calendarLabel: this.calendarLabel,
441
+ closeDelay: this.closeDelay,
442
+ cutoffTime: this.cutoffTime,
443
+ daysOfWeekChecksum: this.daysOfWeekChecksum,
444
+ disclaimer: this.disclaimer,
445
+ endDate: datePickerHelpers.normalizeDatePickerValue(this.endDate),
446
+ displayFormat: this.normalizedDisplayFormat,
447
+ invalidDates: this.normalizedInvalidDates,
448
+ locale: this.locale,
449
+ mode: this.isRangeMode ? 'range' : 'single',
450
+ rangeEnd: datePickerHelpers.normalizeDatePickerValue(this.rangeEnd),
451
+ rangeStart: datePickerHelpers.normalizeDatePickerValue(this.rangeStart),
452
+ startDate: datePickerHelpers.normalizeDatePickerValue(this.startDate),
453
+ validDates: this.normalizedValidDates,
454
+ value: this.normalizedValue,
455
+ },
456
+ };
457
+ }
458
+ get automaticPopoverDirection() {
459
+ var _a, _b;
460
+ const { top = 0, bottom = 0 } = ((_b = (_a = this.controlElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect) === null || _b === void 0 ? void 0 : _b.call(_a)) || {};
461
+ return top > window.innerHeight - bottom ? 'up' : 'down';
462
+ }
463
+ get canClear() {
464
+ return this.clearable && (this.isRangeMode ? !!this.rangeStart || !!this.rangeEnd : !!this.normalizedValue);
465
+ }
466
+ get computedErrors() {
467
+ const errors = [...(this.errors || [])];
468
+ const internalError = this.typeableError || this.calendarError;
469
+ if (internalError)
470
+ errors.push(internalError);
471
+ if (!errors.length && this.invalid)
472
+ errors.push('tecton.element.calendar.invalid');
473
+ return errors.length ? [errors[0]] : undefined;
474
+ }
475
+ get computedPlaceholder() {
476
+ if (this.disabled && this.disabledMsg)
477
+ return this.localizeForLocale(this.disabledMsg);
478
+ return this.localizeForLocale(this.placeholder);
479
+ }
480
+ get dateFormatValidationError() {
481
+ return this.localizeForLocale('tecton.element.datePicker.validation.dateFormat', {
482
+ format: this.normalizedDisplayFormat,
483
+ });
484
+ }
485
+ get effectiveMode() {
486
+ if (this.mode !== 'single')
487
+ return this.mode;
488
+ return this.typeable ? 'single-typeable' : 'single';
489
+ }
490
+ get effectivePopoverDirection() {
491
+ return this.popoverDirection || this.popDirection;
492
+ }
493
+ get formattedTypeableValue() {
494
+ if (!this.selectedDate)
495
+ return '';
496
+ if (!this.isRangeTypeable)
497
+ return this.formatDateWithModifier(this.selectedDate);
498
+ if (!this.rangeEndDate)
499
+ return '';
500
+ return `${this.formatDateWithModifier(this.selectedDate)} - ${this.formatDateWithModifier(this.rangeEndDate)}`;
501
+ }
502
+ get formattedValue() {
503
+ if (!this.selectedDate)
504
+ return '';
505
+ const formatDate = (date) => this.displayFormat ? datePickerHelpers.formatLegacyDisplayDate(date, this.displayFormat) : this.formatLongDate(date);
506
+ if (this.effectiveMode !== 'range' || !this.rangeEndDate)
507
+ return formatDate(this.selectedDate);
508
+ return `${formatDate(this.selectedDate)} – ${formatDate(this.rangeEndDate)}`;
509
+ }
510
+ get isRangeMode() {
511
+ return this.effectiveMode === 'range' || this.isRangeTypeable;
512
+ }
513
+ get isRangeTypeable() {
514
+ return this.effectiveMode === 'range-typeable';
515
+ }
516
+ get isSingleTypeable() {
517
+ return this.effectiveMode === 'single-typeable';
518
+ }
519
+ get normalizedDisplayFormat() {
520
+ return datePickerHelpers.normalizeDisplayFormat(this.displayFormat);
521
+ }
522
+ get normalizedInvalidDates() {
523
+ return this.normalizeDateList(this.invalidDates);
524
+ }
525
+ get normalizedValidDates() {
526
+ return this.normalizeDateList(this.validDates);
527
+ }
528
+ get normalizedValue() {
529
+ return datePickerHelpers.normalizeDatePickerValue(this.value);
530
+ }
531
+ get rangeEndDate() {
532
+ const date = datePickerHelpers.parseDatePickerValue(datePickerHelpers.normalizeDatePickerValue(this.rangeEnd));
533
+ return index$2.dateFnsExports.isValid(date) ? date : undefined;
534
+ }
535
+ get rangeFormatValidationError() {
536
+ return this.localizeForLocale('tecton.element.datePicker.validation.rangeFormat', {
537
+ format: this.rangeTypeableFormat,
538
+ });
539
+ }
540
+ get rangeOrderValidationError() {
541
+ return this.localizeForLocale('tecton.element.datePicker.validation.rangeOrder');
542
+ }
543
+ get rangeTypeableFormat() {
544
+ return `${this.normalizedDisplayFormat} - ${this.normalizedDisplayFormat}`;
545
+ }
546
+ get rangeValidationError() {
547
+ return this.localizeForLocale('tecton.element.datePicker.validation.rangeUnavailable');
548
+ }
549
+ get selectedDate() {
550
+ const date = datePickerHelpers.parseDatePickerValue(this.isRangeMode ? datePickerHelpers.normalizeDatePickerValue(this.rangeStart) : this.normalizedValue);
551
+ return index$2.dateFnsExports.isValid(date) ? date : undefined;
552
+ }
553
+ get typeableAllowedCharacters() {
554
+ const formatSeparators = this.normalizedDisplayFormat.replace(/[MDY]/g, '');
555
+ const rangeSeparator = this.isRangeTypeable ? ' -' : '';
556
+ const escapedSeparators = `${formatSeparators}${rangeSeparator}`.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
557
+ return new RegExp(`^[0-9${escapedSeparators}]+$`);
558
+ }
559
+ closeAfterSelection() {
560
+ clearTimeout(this.closeTimeout);
561
+ const closeDelay = Number(this.closeDelay);
562
+ if (!closeDelay || closeDelay <= 0) {
563
+ this.closeCalendar(true, true);
564
+ return;
565
+ }
566
+ this.closeTimeout = setTimeout(() => this.closeCalendar(true, true), closeDelay);
567
+ }
568
+ closeCalendar(returnFocus = true, emitClose = false) {
569
+ var _a;
570
+ if (!this.open)
571
+ return;
572
+ this.open = false;
573
+ if (emitClose)
574
+ this.tctClose.emit();
575
+ if (returnFocus)
576
+ (_a = this.controlElement) === null || _a === void 0 ? void 0 : _a.focus();
577
+ }
578
+ commitSingleValue(value) {
579
+ if (this.committingValue)
580
+ return;
581
+ // Watchers and consumer change handlers may update constraints during either event alias.
582
+ this.committingValue = true;
583
+ try {
584
+ this.value = value;
585
+ mirrorEmit.mirrorEmit(this, ['change', 'tctChange'], { value });
586
+ }
587
+ finally {
588
+ this.committingValue = false;
589
+ }
590
+ if (this.isSingleTypeable)
591
+ this.syncTypeableValue();
592
+ if (!this.typeableError)
593
+ this.validateCurrentValue();
594
+ }
595
+ emitValidationError(message) {
596
+ if (this.isRangeMode)
597
+ return;
598
+ mirrorEmit.mirrorEmit(this, ['error', 'tctError'], {
599
+ errors: [{ message, errorCode: 'generalInvalid' }],
600
+ });
601
+ }
602
+ emitValidationSuccess(value) {
603
+ if (this.isRangeMode)
604
+ return;
605
+ mirrorEmit.mirrorEmit(this, ['success', 'tctSuccess'], { value });
606
+ }
607
+ focusRenderedDate(value) {
608
+ var _a;
609
+ (_a = this.calendarElement) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new CustomEvent('tctCalendarFocus', {
610
+ detail: { value },
611
+ }));
612
+ }
613
+ formatDateWithModifier(date) {
614
+ return datePickerHelpers.formatDisplayDate(date, this.normalizedDisplayFormat);
615
+ }
616
+ formatLongDate(date) {
617
+ return new Intl.DateTimeFormat(this.locale, {
618
+ year: 'numeric',
619
+ month: 'long',
620
+ day: 'numeric',
621
+ }).format(date);
622
+ }
623
+ formatTypeableDate(value) {
624
+ const separator = this.normalizedDisplayFormat.includes('-') ? '-' : '/';
625
+ const dateParts = this.normalizedDisplayFormat.startsWith('YYYY')
626
+ ? [value.slice(0, 4), value.slice(4, 6), value.slice(6, 8)]
627
+ : [value.slice(0, 2), value.slice(2, 4), value.slice(4, 8)];
628
+ return dateParts.filter(Boolean).join(separator);
629
+ }
630
+ isDateValid(date) {
631
+ return datePickerHelpers.isDateSelectable(date, {
632
+ cutoffTime: this.cutoffTime,
633
+ daysOfWeekChecksum: this.daysOfWeekChecksum,
634
+ endDate: datePickerHelpers.normalizeDatePickerValue(this.endDate),
635
+ invalidDates: this.normalizedInvalidDates,
636
+ startDate: datePickerHelpers.normalizeDatePickerValue(this.startDate),
637
+ validDates: this.normalizedValidDates,
638
+ });
639
+ }
640
+ isRangeValid(start, end) {
641
+ return datePickerHelpers.isRangeSelectable(start, end, {
642
+ cutoffTime: this.cutoffTime,
643
+ daysOfWeekChecksum: this.daysOfWeekChecksum,
644
+ endDate: datePickerHelpers.normalizeDatePickerValue(this.endDate),
645
+ invalidDates: this.normalizedInvalidDates,
646
+ startDate: datePickerHelpers.normalizeDatePickerValue(this.startDate),
647
+ validDates: this.normalizedValidDates,
648
+ });
649
+ }
650
+ isTypeableDatePrefixInvalid(digits) {
651
+ const isYearFirst = this.normalizedDisplayFormat.startsWith('YYYY');
652
+ const isDayFirst = this.normalizedDisplayFormat.startsWith('DD');
653
+ const firstPart = isYearFirst ? digits.slice(0, 4) : digits.slice(0, 2);
654
+ const secondPart = isYearFirst ? digits.slice(4, 6) : digits.slice(2, 4);
655
+ const monthPart = isYearFirst || isDayFirst ? secondPart : firstPart;
656
+ const dayPart = isYearFirst ? digits.slice(6, 8) : isDayFirst ? firstPart : secondPart;
657
+ const isSegmentInvalid = (segment, maximum) => {
658
+ if (!segment)
659
+ return false;
660
+ if (segment.length === 1)
661
+ return Number(segment) > Math.floor(maximum / 10);
662
+ const value = Number(segment);
663
+ return value < 1 || value > maximum;
664
+ };
665
+ if (isSegmentInvalid(monthPart, 12) || isSegmentInvalid(dayPart, 31))
666
+ return true;
667
+ if (monthPart.length < 2 || dayPart.length < 2)
668
+ return false;
669
+ return Number(dayPart) > new Date(2000, Number(monthPart), 0).getDate();
670
+ }
671
+ localizeForLocale(value, substitutions = {}) {
672
+ return datePickerHelpers.localizeDatePickerString(value, substitutions);
673
+ }
674
+ normalizeDateList(values) {
675
+ if (!values)
676
+ return;
677
+ // Stable references prevent child constraint watchers from clearing errors on unrelated renders.
678
+ if (!this.normalizedDateLists.has(values)) {
679
+ this.normalizedDateLists.set(values, values.map(value => datePickerHelpers.normalizeDatePickerValue(value)).filter((value) => !!value));
680
+ }
681
+ return this.normalizedDateLists.get(values);
682
+ }
683
+ parseTypeableDate(value) {
684
+ var _a;
685
+ const separator = this.normalizedDisplayFormat.includes('-') ? '-' : '/';
686
+ const escapedSeparator = separator === '-' ? '\\-' : '/';
687
+ const isYearFirst = this.normalizedDisplayFormat.startsWith('YYYY');
688
+ const pattern = isYearFirst
689
+ ? `^\\d{4}${escapedSeparator}\\d{2}${escapedSeparator}\\d{2}$`
690
+ : `^\\d{2}${escapedSeparator}\\d{2}(?:${escapedSeparator}\\d{4})?$`;
691
+ if (!new RegExp(pattern).test(value || ''))
692
+ return;
693
+ const dateParts = value.split(separator);
694
+ const [yearPart, monthPart, dayPart] = isYearFirst
695
+ ? dateParts
696
+ : this.normalizedDisplayFormat.startsWith('DD')
697
+ ? [dateParts[2], dateParts[1], dateParts[0]]
698
+ : [dateParts[2], dateParts[0], dateParts[1]];
699
+ const month = Number(monthPart);
700
+ const day = Number(dayPart);
701
+ const year = yearPart ? Number(yearPart) : (_a = datePickerHelpers.buildInputDate(`${month}/${day}`, this.assume)) === null || _a === void 0 ? void 0 : _a.getFullYear();
702
+ if (!year)
703
+ return;
704
+ const date = new Date(year, month - 1, day);
705
+ if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day)
706
+ return;
707
+ return date;
708
+ }
709
+ /**
710
+ * Recomputes the typeable error from the current `typeableValue`, applying the same range checks the commit path
711
+ * uses so a stale error cannot outlive the text that produced it.
712
+ */
713
+ revalidateTypeableValue() {
714
+ this.validateTypeableValue();
715
+ if (this.typeableError || !this.isRangeTypeable)
716
+ return;
717
+ const [startValue, endValue] = this.typeableValue.split(' - ');
718
+ const start = this.parseTypeableDate(startValue);
719
+ const end = this.parseTypeableDate(endValue);
720
+ if (!start || !end)
721
+ return;
722
+ this.typeableError = this.typeableRangeError(start, end);
723
+ }
724
+ async scrollDownCalendarToTop() {
725
+ var _a;
726
+ if (!this.open || !this.isRangeMode || this.activePopoverDirection !== 'down')
727
+ return;
728
+ await index$1.waitForNextPaint();
729
+ await index$1.waitForNextPaint();
730
+ if (!this.open || !this.isRangeMode || this.activePopoverDirection !== 'down')
731
+ return;
732
+ await ((_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.scrollContainerTo({ top: 0 }));
733
+ }
734
+ async scrollUpCalendarToBottom() {
735
+ var _a;
736
+ if (!this.open || this.activePopoverDirection !== 'up')
737
+ return;
738
+ await index$1.waitForNextPaint();
739
+ await index$1.waitForNextPaint();
740
+ if (!this.open || this.activePopoverDirection !== 'up')
741
+ return;
742
+ await ((_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.scrollContainerTo({ top: Number.MAX_SAFE_INTEGER }));
743
+ }
744
+ setActivePopoverDirection() {
745
+ this.activePopoverDirection = this.effectivePopoverDirection || this.automaticPopoverDirection;
746
+ }
747
+ setTypeableError(error) {
748
+ if (this.typeableError === error)
749
+ return;
750
+ this.typeableError = error;
751
+ if (error)
752
+ this.emitValidationError(error);
753
+ }
754
+ async showActionSheet() {
755
+ var _a, _b;
756
+ const result = (await ((_a = window.TectonElements) === null || _a === void 0 ? void 0 : _a.showActionSheet(this.actionSheetData)));
757
+ (_b = this.controlElement) === null || _b === void 0 ? void 0 : _b.focus();
758
+ if (result === null || result === void 0 ? void 0 : result.error) {
759
+ this.calendarError = result.error;
760
+ this.tctClose.emit({ error: result.error });
761
+ return;
762
+ }
763
+ if (!result || result.type === 'cancel')
764
+ return;
765
+ if (this.isRangeMode) {
766
+ const { rangeStart, rangeEnd } = result;
767
+ if (!rangeStart || !rangeEnd)
768
+ return;
769
+ this.rangeStart = rangeStart;
770
+ this.rangeEnd = rangeEnd;
771
+ mirrorEmit.mirrorEmit(this, ['change', 'tctChange'], { rangeStart, rangeEnd });
772
+ this.tctClose.emit();
773
+ return;
774
+ }
775
+ if (!result.value)
776
+ return;
777
+ this.commitSingleValue(result.value);
778
+ this.tctClose.emit();
779
+ }
780
+ syncTypeableValue() {
781
+ this.typeableValue = this.formattedTypeableValue;
782
+ this.revalidateTypeableValue();
783
+ }
784
+ toggleCalendar() {
785
+ if (this.disabled || this.readonly)
786
+ return;
787
+ if (actionSheet.shouldShowActionSheet({ hoist: this.hoist })) {
788
+ this.showActionSheet();
789
+ return;
790
+ }
791
+ if (!this.open)
792
+ this.setActivePopoverDirection();
793
+ this.open = !this.open;
794
+ }
795
+ typeableRangeError(start, end) {
796
+ if (start.getTime() > end.getTime())
797
+ return this.rangeOrderValidationError;
798
+ if (!this.isRangeValid(start, end))
799
+ return this.rangeValidationError;
800
+ return '';
801
+ }
802
+ validateCurrentValue(value = this.value) {
803
+ if (!value || this.isRangeMode)
804
+ return;
805
+ const normalizedValue = datePickerHelpers.normalizeDatePickerValue(value);
806
+ const date = datePickerHelpers.parseDatePickerValue(normalizedValue);
807
+ if (!normalizedValue || !index$2.dateFnsExports.isValid(date) || !this.isDateValid(date)) {
808
+ this.emitValidationError(`Value passed is invalid: The date ${value} is not valid`);
809
+ return;
810
+ }
811
+ this.emitValidationSuccess(normalizedValue);
812
+ }
813
+ validateTypeableValue() {
814
+ const digits = this.typeableValue.replace(/\D/g, '');
815
+ if (!digits) {
816
+ this.setTypeableError('');
817
+ return;
818
+ }
819
+ const dateParts = this.isRangeTypeable ? [digits.slice(0, 8), digits.slice(8)] : [digits];
820
+ const containsInvalidDate = dateParts.some(part => {
821
+ if (this.isTypeableDatePrefixInvalid(part))
822
+ return true;
823
+ if (part.length !== 8)
824
+ return false;
825
+ const date = this.parseTypeableDate(this.formatTypeableDate(part));
826
+ return !date || !this.isDateValid(date);
827
+ });
828
+ this.setTypeableError(containsInvalidDate
829
+ ? this.isRangeTypeable
830
+ ? this.rangeFormatValidationError
831
+ : this.dateFormatValidationError
832
+ : '');
833
+ }
834
+ // #endregion
835
+ // #region Render Methods
836
+ renderCalendar() {
837
+ return (index.h("q2-date-calendar", { ref: element => (this.calendarElement = element), class: this._actionSheet ? 'is-action-sheet' : undefined, accessibleLabel: this.calendarLabel || 'Choose a date', actionSheet: this._actionSheet, calendarLabel: this.calendarLabel, cutoffTime: this.cutoffTime, daysOfWeekChecksum: this.daysOfWeekChecksum, direction: this.activePopoverDirection, disabled: this.disabled, disclaimer: this.disclaimer, displayFormat: this.normalizedDisplayFormat, endDate: datePickerHelpers.normalizeDatePickerValue(this.endDate), invalidDates: this.normalizedInvalidDates, locale: this.locale, mode: this.effectiveMode, open: this.open, rangeEnd: datePickerHelpers.normalizeDatePickerValue(this.rangeEnd), rangeStart: datePickerHelpers.normalizeDatePickerValue(this.rangeStart), readonly: this.readonly, startDate: datePickerHelpers.normalizeDatePickerValue(this.startDate), validDates: this.normalizedValidDates, value: this.normalizedValue, onTctCalendarCancel: this.onCalendarCancel, onTctCalendarCommit: this.onCalendarCommit, onTctCalendarDismiss: this.onCalendarDismiss, onTctCalendarError: this.onCalendarError }));
838
+ }
839
+ render() {
840
+ if (this._actionSheet)
841
+ return this.renderCalendar();
842
+ return (index.h("click-elsewhere", { class: this.open ? 'dropdown-open' : undefined, onChange: this.onClickElsewhere }, index.h("q2-input", { ref: element => (this.controlElement = element), class: "date-picker-input", clearable: this.canClear, disabled: this.disabled, errors: this.computedErrors, hideLabel: this.hideLabel, hints: this.hints, readonly: this.readonly, optional: this.optional, valid: this.valid, value: this.acceptsTypeableInput ? this.typeableValue : this.formattedValue, label: index$1.loc(this.label), placeholder: this.computedPlaceholder, "icon-right": this.acceptsTypeableInput ? undefined : 'calendar', autocomplete: "off", maxlength: this.isRangeTypeable ? 23 : this.isSingleTypeable ? 10 : undefined, "aria-haspopup": "dialog", "aria-expanded": `${this.open}`, "aria-controls": "date-picker-popover", onClick: this.acceptsTypeableInput ? undefined : this.onInputClick, onChange: event => event.stopImmediatePropagation(), onTctChange: this.acceptsTypeableInput ? this.onTypeableChange : event => event.stopImmediatePropagation(), onInput: event => event.stopImmediatePropagation(), onTctInput: this.acceptsTypeableInput ? this.onTypeableInput : event => event.stopImmediatePropagation(), onTctClear: this.onClear, onKeyDown: this.onInputKeydown, "test-id": "datePickerToggle", _preventEntry: !this.acceptsTypeableInput }, index$1.hasSlotContent(this.hostElement, 'label') && (index.h("slot", { name: "label", slot: "label" })), this.acceptsTypeableInput && (index.h("q2-btn", { slot: "input-right", "hide-label": true, disabled: this.disabled || this.readonly, label: "tecton.element.calendar.toggleAriaLabel", onClick: this.onCalendarToggleClick, "test-id": "datePickerCalendarToggle" }, index.h("q2-icon", { type: "calendar" })))), index.h("q2-popover", { ref: element => (this.popoverElement = element), id: "date-picker-popover", controlElement: this.controlElement, open: this.open, direction: this.effectivePopoverDirection, align: this.popoverAlignment, minHeight: this.popoverMinHeight, mode: this.popoverMode || undefined }, this.renderCalendar())));
843
+ }
844
+ get hostElement() { return index.getElement(this); }
845
+ static get watchers() { return {
846
+ "cutoffTime": [{
847
+ "constraintsChanged": 0
848
+ }],
849
+ "assume": [{
850
+ "constraintsChanged": 0
851
+ }],
852
+ "daysOfWeekChecksum": [{
853
+ "constraintsChanged": 0
854
+ }],
855
+ "endDate": [{
856
+ "constraintsChanged": 0
857
+ }],
858
+ "invalidDates": [{
859
+ "constraintsChanged": 0
860
+ }],
861
+ "startDate": [{
862
+ "constraintsChanged": 0
863
+ }],
864
+ "validDates": [{
865
+ "constraintsChanged": 0
866
+ }],
867
+ "disabled": [{
868
+ "disabledChanged": 0
869
+ }],
870
+ "displayFormat": [{
871
+ "displayFormatChanged": 0
872
+ }],
873
+ "mode": [{
874
+ "modeChanged": 0
875
+ }],
876
+ "typeable": [{
877
+ "modeChanged": 0
878
+ }],
879
+ "open": [{
880
+ "openChanged": 0
881
+ }],
882
+ "popDirection": [{
883
+ "popDirectionChanged": 0
884
+ }],
885
+ "popoverDirection": [{
886
+ "popoverDirectionChanged": 0
887
+ }],
888
+ "rangeEnd": [{
889
+ "rangeEndChanged": 0
890
+ }],
891
+ "rangeStart": [{
892
+ "rangeStartChanged": 0
893
+ }],
894
+ "readonly": [{
895
+ "readonlyChanged": 0
896
+ }],
897
+ "value": [{
898
+ "valueChanged": 0
899
+ }]
900
+ }; }
901
+ };
902
+ Q2DatePicker.style = q2DatePickerCss();
903
+
904
+ const q2OptgroupCss = () => `*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}@container style(--t-prefers-motion: "reduced"){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")){@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}}:host{display:block}.q2-optgroup-header{--comp-header-padding:var(--tct-scale-1, var(--app-scale-1x, 5px)) var(--tct-scale-2, var(--app-scale-2x, 10px));background:var(--tct-optgroup-header-background, var(--tct-optgroup-header-bg, var(--t-optgroup-header-bg, var(--t-base, #FFFFFF))));color:var(--tct-optgroup-header-color, inherit);font-size:var(--tct-optgroup-header-font-size, var(--const-px-14, 14px));font-weight:var(--tct-optgroup-header-font-weight, 600);letter-spacing:var(--tct-optgroup-header-letter-spacing, inherit);position:var(--tct-optgroup-header-position, sticky);padding:var(--tct-optgroup-header-padding, var(--t-optgroup-header-padding, var(--comp-header-padding)));text-transform:var(--tct-optgroup-header-text-transform, var(--t-optgroup-header-text-transform, none));top:calc(var(--comp-popover-top-container-height, 0px) + var(--tct-optgroup-top, var(--t-optgroup-top, 0px)));z-index:5}`;
905
+
906
+ const Q2Optgroup = class {
907
+ constructor(hostRef) {
908
+ index.registerInstance(this, hostRef);
909
+ // #region Own Properties
910
+ this.guid = index$1.createGuid();
911
+ // #endregion
912
+ // #region State Properties
913
+ this.hidden = false;
914
+ // #endregion
915
+ // #region Public Property API
916
+ /** Determines whether all nested options are disabled. */
917
+ this.disabled = false;
918
+ this.setHidden = () => {
919
+ this.hidden = this.options.every(opt => opt.hidden || opt._multiSelectHidden);
920
+ };
921
+ }
922
+ // #endregion
923
+ // #region Component Lifecycle Events
924
+ disconnectedCallback() {
925
+ var _a;
926
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
927
+ this.mutationObserver = null;
928
+ }
929
+ componentWillLoad() {
930
+ component.hasValidAncestor(this.hostElement, 'q2-option-list, q2-select, q2-dropdown, q2-pill');
931
+ const observer = new MutationObserver(this.setHidden);
932
+ observer.observe(this.hostElement, { childList: true, attributes: true, subtree: true });
933
+ this.mutationObserver = observer;
934
+ // set initially
935
+ this.setHidden();
936
+ this.disabledWatcher(this.disabled);
937
+ }
938
+ // #endregion
939
+ // #region Watchers
940
+ disabledWatcher(disabled) {
941
+ this.options.forEach(opt => {
942
+ opt.disabledGroup = !!disabled;
943
+ });
944
+ }
945
+ // #endregion
946
+ // #region Local Methods
947
+ get headerId() {
948
+ return `q2-optgroup-header-${this.guid}`;
949
+ }
950
+ get options() {
951
+ return Array.from(this.hostElement.querySelectorAll('q2-option'));
952
+ }
953
+ // #endregion
954
+ // #region Render Methods
955
+ render() {
956
+ return (index.h("div", { key: '829ae5ebec150734128c98343ddb8112de0ee21e', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, index.h("div", { key: '6683155f922a2d15349f885aabac0bf9ee6a4575', class: "q2-optgroup-header", id: this.headerId }, (this.label && index$1.loc(this.label)) || ''), index.h("div", { key: 'b974da306256b13283183fa03e4dc8bcc8be3f44', class: "q2-optgroup-options" }, index.h("slot", { key: '2f0035aad12309be2c5c4ea3125077cc704e65e4' }))));
957
+ }
958
+ get hostElement() { return index.getElement(this); }
959
+ static get watchers() { return {
960
+ "disabled": [{
961
+ "disabledWatcher": 0
962
+ }]
963
+ }; }
964
+ };
965
+ Q2Optgroup.style = q2OptgroupCss();
966
+
967
+ exports.q2_date_picker = Q2DatePicker;
968
+ exports.q2_optgroup = Q2Optgroup;