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
@@ -45,7 +45,7 @@ export class Q2Search {
45
45
  /**
46
46
  * Hides the field's `<label>` element from view.
47
47
  * @warning
48
- * Only use when a visible label is impractical.
48
+ * Hides the label visually. `label` text is still required for screenreader compliance.
49
49
  */
50
50
  this.hideLabel = false;
51
51
  /**
@@ -771,7 +771,7 @@ export class Q2Search {
771
771
  return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: (_a = this.innerInputContainer) !== null && _a !== void 0 ? _a : undefined, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, align: useBlock ? undefined : this.popoverAlignment, block: useBlock }, h("div", { class: "popover-content", "data-loading": this.loading ? 'true' : 'false', "aria-busy": this.loading ? 'true' : null }, h("div", { class: "popover-top-container", hidden: !this.hasPopoverTop && !(this.multiple && this.showSelectedToggle), tabindex: "-1" }, h("slot", { name: "popover-top" }), !this.loading && this.renderMultiSelectHeader()), h("q2-option-list", { ref: el => (this.optionList = el), type: "listbox", id: this.optionListId, label: loc(this.listLabel), multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, showSelected: this.showSelected, customSearch: true, hidden: this.loading, onChange: (e) => e.stopPropagation(), onTctChange: this.onOptionListChange }, h("slot", null)), showEmpty && this.renderEmpty(), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" })), this.loading && (h("div", { class: "loading-overlay", "aria-hidden": "true" }, h("q2-loading", { type: "spinner" }))))));
772
772
  }
773
773
  render() {
774
- return (h(Fragment, { key: '78ce7b735d59271600debb18ab2f0f5cf315e465' }, h("div", { key: 'd3e9a713581842cc62969a0df9556733edf6e378', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("click-elsewhere", { key: '6912af1d8f31af8de7c7ffb28786756819c57afc', class: this.wrapperClasses, role: "presentation", onChange: this.onClickElsewhere }, h("q2-input", { key: '95a5397765aab6d3279b3d81cc31215f235aefc2', ref: el => (this.inputField = el), class: "q2-search-input", label: (this.label && loc(this.label)) || '', value: this.searchText, iconLeft: "search", clearable: this.clearable && !this.loading && !!this.searchText, disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder ? loc(this.placeholder) : undefined, hideLabel: this.hideLabel, errors: (Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map(e => loc(e))) ||
774
+ return (h(Fragment, { key: '4b3787554c37521bc3467345cdd1d733cffba3a5' }, h("div", { key: '696caa142cffecf1e0d62afafd826dce37f75512', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("click-elsewhere", { key: 'f8b493ec8f7da09fad48f9fa30f0e9be7fbaedf4', class: this.wrapperClasses, role: "presentation", onChange: this.onClickElsewhere }, h("q2-input", { key: '44e0ad4b7825ac319dd4277ccb93d4dd66acef12', ref: el => (this.inputField = el), class: "q2-search-input", label: (this.label && loc(this.label)) || '', value: this.searchText, iconLeft: "search", clearable: this.clearable && !this.loading && !!this.searchText, disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder ? loc(this.placeholder) : undefined, hideLabel: this.hideLabel, errors: (Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map(e => loc(e))) ||
775
775
  (this.invalid && ['tecton.element.search.invalid']) ||
776
776
  [], ariaExpanded: this.isInputOnlyMode ? undefined : `${this.open}`, ariaControls: this.isInputOnlyMode ? undefined : this.optionListId, ariaHaspopup: this.isInputOnlyMode ? undefined : 'listbox', hideMessages: true, _role: this.isInputOnlyMode ? undefined : 'combobox', onTctInput: this.inputInputHandler, onInput: (e) => e.stopImmediatePropagation(), onChange: (e) => e.stopPropagation(), onTctChange: (e) => e.stopPropagation(), badgeValue: this.badgeValue }, this.renderCustomDisplay()), this.renderOptionsDropdown())));
777
777
  }
@@ -882,7 +882,7 @@ export class Q2Search {
882
882
  "docs": {
883
883
  "tags": [{
884
884
  "name": "warning",
885
- "text": "Only use when a visible label is impractical."
885
+ "text": "Hides the label visually. `label` text is still required for screenreader compliance."
886
886
  }],
887
887
  "text": "Hides the field's `<label>` element from view."
888
888
  },
@@ -923,6 +923,9 @@ export class Q2Search {
923
923
  "optional": false,
924
924
  "docs": {
925
925
  "tags": [{
926
+ "name": "warning",
927
+ "text": "Required for screen reader compliance even when `hideLabel` is `true`."
928
+ }, {
926
929
  "name": "localizable",
927
930
  "text": undefined
928
931
  }],
@@ -186,9 +186,9 @@ export class Q2Section {
186
186
  wrapperClasses.push('is-transitioning');
187
187
  }
188
188
  const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
189
- return (h("section", { key: '1614590b2058a69ebaee5a59455ec5c8bfa30bde', class: "wrapper" }, h("header", { key: 'e52e3037b59ac3443e812299114850dd6ed8810b', class: hasHeader ? 'has-header' : '' }, h("div", { key: '2066c8ff48cb4c6445068207533b3b6b808e9dd7', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: 'a159d8b6bc29e10711b603aef2ce6c1419f4b7ae', class: "title" }, loc(this.label)), h("div", { key: '829f24123711551a6e3792cb66a2759386d6bec8', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '22c2518c55bf5f6160917beea8ab2c523bf76169', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '950c09ccfad31453393a52cd21321338d53ac03b', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: 'a962ea4f0f5c0ba761d3c3eafd31a16f0338c8da', type: "chevron-up" })))), h("div", { key: '45a1762386b7bf88fcaa50c18c1ac059b93d2e59', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
189
+ return (h("section", { key: '5adb22a7e6cf098fa3cf2325c945c6aa1c20b2d5', class: "wrapper" }, h("header", { key: 'c04df6d07756c27374e4be85ad88848a0c1ac897', class: hasHeader ? 'has-header' : '' }, h("div", { key: '8cd09e8bf367a7510b91106b8ebd4f419faff861', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '195e1523e68c83e294bd92d617b8c4d44e679494', class: "title" }, loc(this.label)), h("div", { key: 'e493986ee113d44bf74b11116003939f3db24bd7', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '44f2dc2ca76acfd800a1435608a75bf6e3258d37', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'b2602555b9282c8149780f65d2fbaa65febc1f50', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: '62728524b58cf5cf7aa2531df1218d3bf0b40b0a', type: "chevron-up" })))), h("div", { key: '13ef854a01937880007fb4021b1528c1b83fe937', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
190
190
  height: this.contentHeight,
191
- } }, h("div", { key: '80508c39608fa4bf3d6f1911ff592f04e5115014', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'c88062ea0a59b62143e22c8492a8d06826a27a83', ref: (el) => (this.contentSlot = el) })))));
191
+ } }, h("div", { key: '866d8b0301a9c5979f5b3bd31086d25f73373709', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '36c97155aa106dc1587537066e031c7d6c032295', ref: (el) => (this.contentSlot = el) })))));
192
192
  }
193
193
  static get is() { return "q2-section"; }
194
194
  static get encapsulation() { return "shadow"; }
@@ -410,8 +410,12 @@ export class Q2Select {
410
410
  this.inputKeydownHandler(event);
411
411
  }
412
412
  popoverStateChanged({ detail: { open } }) {
413
- if (this.open !== open)
414
- this.open = open;
413
+ if (this.open === open)
414
+ return;
415
+ this.open = open;
416
+ if (open)
417
+ return;
418
+ this.focusInput();
415
419
  }
416
420
  handleTctClick() {
417
421
  const { name, version } = getBrowserInfo();
@@ -846,7 +850,7 @@ export class Q2Select {
846
850
  ]), checked: showSelected, "test-id": "selectedOptionsButton", onClick: this.showSelectedOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "selected" }, loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount]))))));
847
851
  }
848
852
  render() {
849
- return (h("click-elsewhere", { key: '5c9a6d681aedcebfbadd6b1249f7bcd96c27809c', class: this.wrapperClasses, role: "presentation", onChange: this.clickedElsewhere }, this.renderSelectField()));
853
+ return (h("click-elsewhere", { key: 'c5ee7401b7dc4350fb01992e9a8a76e6700cb63c', class: this.wrapperClasses, role: "presentation", onChange: this.clickedElsewhere }, this.renderSelectField()));
850
854
  }
851
855
  static get is() { return "q2-select"; }
852
856
  static get encapsulation() { return "shadow"; }
@@ -956,9 +960,9 @@ export class Q2Select {
956
960
  "docs": {
957
961
  "tags": [{
958
962
  "name": "warning",
959
- "text": "Only use when a visible label is impractical."
963
+ "text": "Hides the label visually. `label` text is still required for screenreader compliance."
960
964
  }],
961
- "text": "Hide's the field's `<label>` element from view."
965
+ "text": "Hides the field's `<label>` element from view."
962
966
  },
963
967
  "getter": false,
964
968
  "setter": false,
@@ -1019,6 +1023,9 @@ export class Q2Select {
1019
1023
  "optional": false,
1020
1024
  "docs": {
1021
1025
  "tags": [{
1026
+ "name": "warning",
1027
+ "text": "Required for screen reader compliance even when `hideLabel` is `true`."
1028
+ }, {
1022
1029
  "name": "localizable",
1023
1030
  "text": undefined
1024
1031
  }],
@@ -295,7 +295,7 @@ export class Q2Stepper {
295
295
  const containerClasses = ['step-container'];
296
296
  if (scrollEnabled)
297
297
  containerClasses.push('has-scroll');
298
- return (h(Fragment, { key: 'cd7a09546e4b74cf98f5e27dbcf0efce71e02781' }, h("div", { key: 'aaa383584217da20fdd01174f4b136dfef0128b7', class: containerClasses.join(' ') }, scrollEnabled && (h(Fragment, { key: '6f7f38d768b274409606132cc62d36d48812f50c' }, h("div", { key: '98e26550803496a0edd0e7415b4ec9e16b501722', class: "gradient-left", hidden: !showScrollLeft }), h("div", { key: '58102ecd26dd3f6b36d530f36ecc109b287b4faa', class: "gradient-right", hidden: !showScrollRight }), h("q2-btn", { key: 'a475ba4a846ea5cf93a5ca46422a5473e0d266bd', class: "btn-left", hideLabel: true, hidden: !this.showScrollLeft, label: loc('tecton.element.stepper.scrollLeft'), onTctClick: () => this.onScrollBtnClick('left') }, h("q2-icon", { key: 'b040f724a926e5c07a81438e3586e0eb7a3c063b', type: "chevron-left" })), h("q2-btn", { key: '119dbcd49ce282cbccd58be097f8833e22df4fb4', class: "btn-right", hideLabel: true, hidden: !this.showScrollRight, label: loc('tecton.element.stepper.scrollRight'), onTctClick: () => this.onScrollBtnClick('right') }, h("q2-icon", { key: 'c656a9493134eb6a4ea0a008ee94829fc708ecfe', type: "chevron-right" })))), h("ul", { key: '09e1472989c7c2e6c40504072bca2790865e013a', onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, stepCount > 0 && [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))), h("div", { key: '0b25c172d585892aa9e286dac6080ce2bbb80e1a', role: "list" }, h("slot", { key: '507375368c8e89a94f8af0a44bf4951fd14d7466', onSlotchange: () => this.onSlotChange() }))));
298
+ return (h(Fragment, { key: '423f7d50f787abf21c14730ae9cd50cd3638b17b' }, h("div", { key: '2ffacd2f9792075956748eb6960975d9aeda28ad', class: containerClasses.join(' ') }, scrollEnabled && (h(Fragment, { key: 'da90a671295ce6702c3bc6f1ab71f671cda2c9c8' }, h("div", { key: '319c4a75dfafd7b03d3f7f13156f24bd1ca7b0c3', class: "gradient-left", hidden: !showScrollLeft }), h("div", { key: '80a08dc979685d94f6cfe20d66787d06e7d46014', class: "gradient-right", hidden: !showScrollRight }), h("q2-btn", { key: '43a71cb3212ddbe37c6e7d7051850efd49ced456', class: "btn-left", hideLabel: true, hidden: !this.showScrollLeft, label: loc('tecton.element.stepper.scrollLeft'), onTctClick: () => this.onScrollBtnClick('left') }, h("q2-icon", { key: '19ee5abc690bba84016fb8c692a74b5c233aa426', type: "chevron-left" })), h("q2-btn", { key: 'f26bc502269a5d60308aba041a6d9a75efcf2573', class: "btn-right", hideLabel: true, hidden: !this.showScrollRight, label: loc('tecton.element.stepper.scrollRight'), onTctClick: () => this.onScrollBtnClick('right') }, h("q2-icon", { key: '7f35a54468433010427213e18d213b1c227413a6', type: "chevron-right" })))), h("ul", { key: '0bc4eed617263c7e4a6138c3a884f6a1b8bc2ca6', onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, stepCount > 0 && [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))), h("div", { key: '87945c612fcaa70164faa50d78bb63c9b290e3f2', role: "list" }, h("slot", { key: '4b55529f41b4731dc1424c8be4fcd941ff2c2f33', onSlotchange: () => this.onSlotChange() }))));
299
299
  }
300
300
  static get is() { return "q2-stepper"; }
301
301
  static get encapsulation() { return "shadow"; }
@@ -73,7 +73,7 @@ export class Q2StepperPane {
73
73
  // #region Render Methods
74
74
  render() {
75
75
  const { label, isActive } = this;
76
- return (h(Host, { key: '7acf643f717380c37eb25334534afbca81ac8ab6', role: "listitem" }, h(Fragment, { key: '0241a9ad68973eea81c961070d6171dab3241f79' }, h("div", { key: '6678cb4a7e65a3a4341ff552682c1011c588108b', role: "group", "aria-labelledby": "pane-label", tabindex: "0", hidden: !isActive && !(this.isChildActive && this.showWithChildren) }, h("slot", { key: '0f8d339f894bdaa55bd5bdf94b1220da7a083dde' })), h("div", { key: '51e3934ad791e45486360ab8c6509b68e3a15d9d', hidden: true }, h("span", { key: '96fe08c826d87f86559fe2dbb586914b4065eb40', id: "pane-label" }, h("slot", { key: 'b4cab1594ae047f032fbaa67f75167e31cc4cdf7', name: "label", onSlotchange: () => this.contentChange.emit() }, label && loc(label))), h("slot", { key: '473cf6b9bc3ef5995d11e46502db1321d59baa5e', name: "description", onSlotchange: () => this.contentChange.emit() })), h("slot", { key: '76cb24680ed1ec8a49956f888accf3fd07da7fa0', name: "children" }))));
76
+ return (h(Host, { key: '3929b6bdb716394892be2bcdd933864e43f0204e', role: "listitem" }, h(Fragment, { key: 'd913741a6b71aebef92be14fd7ee541a3d5568da' }, h("div", { key: '038d29ac861f70ad15350da7733b39eece30e538', role: "group", "aria-labelledby": "pane-label", tabindex: "0", hidden: !isActive && !(this.isChildActive && this.showWithChildren) }, h("slot", { key: '56f4c0d9edfe134886d46367f2c801348267b53d' })), h("div", { key: '88bf8a9e1a6124c39d9ac4ee8906f61ac026966a', hidden: true }, h("span", { key: 'db485a5e84ab67fe714f0861fcd05c4b0bd7722f', id: "pane-label" }, h("slot", { key: '940a9a3a8543fd4c64425db2b7ea7b9cf079c947', name: "label", onSlotchange: () => this.contentChange.emit() }, label && loc(label))), h("slot", { key: '74a78697ed1aa85fca66743023d303c7abea0116', name: "description", onSlotchange: () => this.contentChange.emit() })), h("slot", { key: '4fb660b547a2da7dca37de9106b20b93b72aaf83', name: "children" }))));
77
77
  }
78
78
  static get is() { return "q2-stepper-pane"; }
79
79
  static get encapsulation() { return "shadow"; }
@@ -325,7 +325,7 @@ export class Q2StepperVertical {
325
325
  return (h("li", { role: "presentation" }, h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby": labelledBy, "aria-describedBy": descriptionId, "aria-label": btnLabel, "aria-selected": `${isCurrentStep}`, "aria-expanded": !!pane.children.length ? `${isExpanded}` : null, id: id, "aria-disabled": isLocked ? 'true' : null, role: "tab", tabIndex: isCurrentStep ? 0 : -1, onKeyDown: ev => !isLocked && this.onStepKeyDown(ev, id), onClick: ev => !isPaneDisabled && !isLocked && this.onStepClick(ev, id) }, label && (h(Fragment, null, h("span", { class: "sr-only", id: positionId }, positionLabel), h("span", { class: "sr-only", id: statusId }, statusLabel))), statusIcon ? (h("div", { class: "step-icon" }, h("q2-icon", { "aria-hidden": "true", type: statusIcon }))) : (h("div", { class: "step-bubble" }, stepNumber)), label && (h("div", null, h("div", { class: "step-label", id: labelId, innerHTML: sanitizeHTMLString(stepLabel) }), description && (h("div", { class: "step-description", id: descriptionId, innerHTML: sanitizeHTMLString(description) }))))), this.renderSpacer(pane, isExpanded, isLastStep)));
326
326
  }
327
327
  render() {
328
- return (h(Fragment, { key: '9d40414e7b510493b0236568c4d6231eeacdbd80' }, h("ul", { key: 'b3a444833439d59be874a2bf04833f8df0ff107f', role: "tablist" }, this.structuredPanes.map((pane, index) => this.renderStepBtn(pane, index))), h("div", { key: '34f3841d0eb0c5fe96670ac3d5e87244682ace74', role: "list" }, h("slot", { key: 'e224e413162cb28eab4ec0e8b51367ed3b83fa0b' }))));
328
+ return (h(Fragment, { key: 'd2e82613e91ef3acf210781f807807b0fba8e7fc' }, h("ul", { key: '1ad1e36d0fca4b0c1cf793de43d9ea9ccb76974f', role: "tablist" }, this.structuredPanes.map((pane, index) => this.renderStepBtn(pane, index))), h("div", { key: 'ee710c6cb41011be7a8223ec817563cfeaeb6b71', role: "list" }, h("slot", { key: '0d1f6f53b73f72f163fc219de8db9736f669720d' }))));
329
329
  }
330
330
  static get is() { return "q2-stepper-vertical"; }
331
331
  static get encapsulation() { return "shadow"; }
@@ -84,7 +84,7 @@ export class Q2Surface {
84
84
  // #endregion
85
85
  // #region Render Methods
86
86
  render() {
87
- return (h(Host, { key: '8dd96991bc74e2157dc256f21eb4953eaeffdd46' }, h("div", { key: 'a5b315fd3e6dd999cd704b3fd2c9de5ffb139033', class: "container", role: this.clickable ? 'button' : undefined, tabIndex: this.clickable ? 0 : undefined }, h("slot", { key: '4897bfe06a95bf14eddf2bb964bf4a27ed96798a' }))));
87
+ return (h(Host, { key: 'fba508447ca646c22aa4a14872d78e02294a2fa1' }, h("div", { key: '46ac755e4c071b2345be0ba4272f283ac2758a82', class: "container", role: this.clickable ? 'button' : undefined, tabIndex: this.clickable ? 0 : undefined }, h("slot", { key: '699fdd1427248cdff8ecf1b3b1ca1d4a892dd763' }))));
88
88
  }
89
89
  static get is() { return "q2-surface"; }
90
90
  static get encapsulation() { return "shadow"; }
@@ -105,8 +105,8 @@ const VARIANTS = [
105
105
  html: `<q2-surface border="default" inset="normal" radius="2">
106
106
  <p>Body copy above the action group.</p>
107
107
  <q2-action-group>
108
- <q2-btn intent="workflow-primary">Confirm</q2-btn>
109
- <q2-btn intent="workflow-secondary">Cancel</q2-btn>
108
+ <q2-btn intent="primary">Confirm</q2-btn>
109
+ <q2-btn intent="secondary">Cancel</q2-btn>
110
110
  </q2-action-group>
111
111
  </q2-surface>`,
112
112
  states: ['resting'],
@@ -335,7 +335,7 @@ export class Q2TabContainer {
335
335
  }
336
336
  render() {
337
337
  const isVertical = this.computedOrientation === 'vertical';
338
- return (h(Fragment, { key: '684e234955e0d7f9b929a1e80e323ba62db4d066' }, h("div", { key: '92ea060ada2cc956817f4eb9cb97d0f110c5032a', class: "tab-container" }, this.scrollEnabled && (h(Fragment, { key: 'b43a4ff0510de5adfefde8f5184ab5f3f1d95563' }, h("div", { key: '3daed974f567574741534b4c39c6fa0ddb1c7f58', class: "gradient-left", hidden: !this.showScrollBack }), h("div", { key: '36266d6970a75fff03e538c12951a530220b2756', class: "gradient-right", hidden: !this.showScrollForward }), h("q2-btn", { key: '7c5b35fee0bbd981520f55fe99fc53143be7376c', class: "btn-left", hidden: !this.showScrollBack, onTctClick: () => this.onScrollBtnClick('back') }, h("q2-icon", { key: '0759d5d77d603074acc21bd9a29e4db50f0474a2', type: isVertical ? 'chevron-up' : 'chevron-left', label: isVertical ? 'scroll up' : 'scroll left' })), h("q2-btn", { key: '419c43832886d9aae9b63eba545ffb8122f862b6', class: "btn-right", hidden: !this.showScrollForward, onTctClick: () => this.onScrollBtnClick('forward') }, h("q2-icon", { key: '4148a86411c5859b0253da31439ff90ad78490b3', type: isVertical ? 'chevron-down' : 'chevron-right', label: isVertical ? 'scroll down' : 'scroll right' })))), h("ul", { key: 'fdd72d9ba1d932497b5d7cd9e14d926fe1e92f72', onScroll: this.checkScrollState, ref: el => (this.listElement = el), class: this.noPrint ? 'no-print' : null, role: "tablist", "aria-orientation": this.computedOrientation }, this.tabs.map((tab, index) => this.renderTab(tab, index)))), h("div", { key: 'e9d90030fcc43f17a43aa2e4a306e3489b4c4110', class: "tab-content" }, h("slot", { key: '130ddf5f14ec801e09471b9cf4ab080e4bf5fc27', onSlotchange: () => this.onSlotChange() }))));
338
+ return (h(Fragment, { key: '37c84e750a2494ea2b4302fd99e0cebc443d58ce' }, h("div", { key: '249effad5ab4e880c2c203ac0e4024557c310679', class: "tab-container" }, this.scrollEnabled && (h(Fragment, { key: '10a7d53d5bde829e5897722cd924d40ce90a0b82' }, h("div", { key: 'b2acc786c41a9d1a8d3e951fdc36ecea3a304664', class: "gradient-left", hidden: !this.showScrollBack }), h("div", { key: 'fa70173c7d845f88417c6b6b6d54884ead80f34f', class: "gradient-right", hidden: !this.showScrollForward }), h("q2-btn", { key: 'd953c160ff42503dce5bb7c60d8234bdd9196d73', class: "btn-left", hidden: !this.showScrollBack, onTctClick: () => this.onScrollBtnClick('back') }, h("q2-icon", { key: '3980ef873b5d7ae6c50eb868455839344dda9701', type: isVertical ? 'chevron-up' : 'chevron-left', label: isVertical ? 'scroll up' : 'scroll left' })), h("q2-btn", { key: 'a3b1f46355ab1de2f73ac7529b734b684194093f', class: "btn-right", hidden: !this.showScrollForward, onTctClick: () => this.onScrollBtnClick('forward') }, h("q2-icon", { key: 'a2ec50ff7e0cce3716ba890c626fa56e62ecddbb', type: isVertical ? 'chevron-down' : 'chevron-right', label: isVertical ? 'scroll down' : 'scroll right' })))), h("ul", { key: 'e42bbb379d396a25b3af96985504a8f4bae1bba0', onScroll: this.checkScrollState, ref: el => (this.listElement = el), class: this.noPrint ? 'no-print' : null, role: "tablist", "aria-orientation": this.computedOrientation }, this.tabs.map((tab, index) => this.renderTab(tab, index)))), h("div", { key: '7d1f6ac5262cccb0b7087b3d93f33e46390814af', class: "tab-content" }, h("slot", { key: 'fa341fadca5ba04fe21ef7186cc0e15b5c7357db', onSlotchange: () => this.onSlotChange() }))));
339
339
  }
340
340
  static get is() { return "q2-tab-container"; }
341
341
  static get encapsulation() { return "shadow"; }
@@ -19,7 +19,7 @@ export class Q2TabPane {
19
19
  // #endregion
20
20
  // #region Render Methods
21
21
  render() {
22
- return (h("div", { key: '2ff20db182ab3bf252df52bbcb7be2b39893d17c', 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}` }, h("slot", { key: '871922c3065609934e6a6a8c62000c84551a612a' })));
22
+ return (h("div", { key: '1a957a6a6fb4dee7e420d46ad5f576b5b25008c4', 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}` }, h("slot", { key: '9c9dc847674f0a829feb822808f7e3dac9ac3263' })));
23
23
  }
24
24
  static get is() { return "q2-tab-pane"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -132,11 +132,14 @@ export class Q2Tag {
132
132
  this.dropdownBtn.focus();
133
133
  }
134
134
  popoverStateHandler({ detail: { open } }) {
135
- if (this.open !== open)
136
- this.open = open;
135
+ var _a;
136
+ if (this.open === open)
137
+ return;
138
+ this.open = open;
137
139
  if (open)
138
140
  return;
139
141
  this.optionList.setActiveElement(null);
142
+ (_a = this.dropdownBtn) === null || _a === void 0 ? void 0 : _a.focus();
140
143
  }
141
144
  // #endregion
142
145
  // #region Public Methods API
@@ -194,7 +197,7 @@ export class Q2Tag {
194
197
  if (this.optionCount)
195
198
  wrapperClassNames.push('has-options');
196
199
  const shouldShowOptions = this.optionCount > 0;
197
- return (h(Host, { key: 'da6dc23ff4f250b18242a49db02eccc16210b043' }, h("click-elsewhere", { key: 'ee1da442ffd5aa53e55ae95f95b3ac51e2f5c71e', onChange: this.onClickElsewhere }, shouldShowOptions ? (h(Fragment, null, h("button", { class: "tag-wrapper", ref: el => (this.dropdownBtn = el), "test-id": "btn-control", type: "button", role: "combobox", onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, "aria-controls": "option-list", "aria-expanded": open ? 'true' : 'false', "aria-describedby": "option-description", "aria-label": loc(this.label) }, h("div", { class: wrapperClassNames.join(' ') }, loc(this.label)), h("q2-icon", { type: "options" })), this.renderHiddenElement())) : (h("div", { class: "tag-wrapper", onClick: e => e.stopPropagation() }, h("div", { class: wrapperClassNames.join(' ') }, h("slot", { name: "decorator" }), loc(this.label)))), shouldShowOptions && (h("q2-popover", { key: '578989b60b19f6f5e01c1cbc49a83e87fc74c5a9', ref: el => (this.popoverElement = el), controlElement: this.dropdownBtn, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: 'd21abcd1fe11241e14b4f411d9559c12c139c18a', id: "option-list", ref: el => (this.optionList = el), onChange: this.handleChange, type: "menu", align: "right", label: loc('tecton.element.optionList.label', [this.optionListLabel]), "no-select": true }, h("slot", { key: 'd46ec7dad47e40cec883205d6fb2424abcdd1038' })))))));
200
+ return (h(Host, { key: 'a46abe562647fe64e55427bcc8284bbfc5f01e3f' }, h("click-elsewhere", { key: '667e76295c30be78462ee67128a8fb2c38c01285', onChange: this.onClickElsewhere }, shouldShowOptions ? (h(Fragment, null, h("button", { class: "tag-wrapper", ref: el => (this.dropdownBtn = el), "test-id": "btn-control", type: "button", role: "combobox", onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, "aria-controls": "option-list", "aria-expanded": open ? 'true' : 'false', "aria-describedby": "option-description", "aria-label": loc(this.label) }, h("div", { class: wrapperClassNames.join(' ') }, loc(this.label)), h("q2-icon", { type: "options" })), this.renderHiddenElement())) : (h("div", { class: "tag-wrapper", onClick: e => e.stopPropagation() }, h("div", { class: wrapperClassNames.join(' ') }, h("slot", { name: "decorator" }), loc(this.label)))), shouldShowOptions && (h("q2-popover", { key: '805e64b738fc5a0b1a73968636a8843af33834ef', ref: el => (this.popoverElement = el), controlElement: this.dropdownBtn, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: '1d037878cfcf4785439edb9a5693d4dba700e947', id: "option-list", ref: el => (this.optionList = el), onChange: this.handleChange, type: "menu", align: "right", label: loc('tecton.element.optionList.label', [this.optionListLabel]), "no-select": true }, h("slot", { key: '1039cd355f5b1a7ec7cab1eca80479042060fef4' })))))));
198
201
  }
199
202
  static get is() { return "q2-tag"; }
200
203
  static get encapsulation() { return "shadow"; }
@@ -277,7 +277,7 @@ export class Q2Textarea {
277
277
  ]))));
278
278
  }
279
279
  render() {
280
- return (h("div", { key: '9b3eb74c84edd99af52a0ec71ba8b2fd8adbd1f2', class: this.wrapperClasses }, renderLabel(this), h("div", { key: 'a00772502ea6c1fde5af5bf4c12f0606a629252a', class: "content-container", ref: el => (this.contentContainer = el) }, this.renderInput(), this.maxlength ? this.renderMaxLength() : '', renderMessages(this))));
280
+ return (h("div", { key: '21a303feabd0c8fc09d9cc7f0de8b9b50081a56a', class: this.wrapperClasses }, renderLabel(this), h("div", { key: '58b5be24312fe523d09efe176b1ecf42b884166a', class: "content-container", ref: el => (this.contentContainer = el) }, this.renderInput(), this.maxlength ? this.renderMaxLength() : '', renderMessages(this))));
281
281
  }
282
282
  static get is() { return "q2-textarea"; }
283
283
  static get encapsulation() { return "shadow"; }
@@ -364,9 +364,9 @@ export class Q2Textarea {
364
364
  "docs": {
365
365
  "tags": [{
366
366
  "name": "warning",
367
- "text": "Only use when a visible label is impractical."
367
+ "text": "Hides the label visually. `label` text is still required for screenreader compliance."
368
368
  }],
369
- "text": "Hide's the field's `<label>` element from view."
369
+ "text": "Hides the field's `<label>` element from view."
370
370
  },
371
371
  "getter": false,
372
372
  "setter": false,
@@ -427,6 +427,9 @@ export class Q2Textarea {
427
427
  "optional": false,
428
428
  "docs": {
429
429
  "tags": [{
430
+ "name": "warning",
431
+ "text": "Required for screen reader compliance even when `hideLabel` is `true`."
432
+ }, {
430
433
  "name": "localizable",
431
434
  "text": undefined
432
435
  }],
@@ -1,7 +1,7 @@
1
1
  import { expect } from "@playwright/test";
2
2
  import { test } from "@stencil/playwright";
3
3
  import { setupPage, THEMES, FONT_SCALE_PX, FONT_SCALE_SUFFIX } from "../../../utils/test/vr-helpers";
4
- const TRIGGER = `<q2-btn intent="workflow-primary"><span>Trigger</span></q2-btn>`;
4
+ const TRIGGER = `<q2-btn intent="primary"><span>Trigger</span></q2-btn>`;
5
5
  // Pad the wrapper so the tooltip has room to render in any direction without clipping.
6
6
  const wrap = (inner) => `<div style="padding: 80px; display: inline-block;">${inner}</div>`;
7
7
  // Use `immediate` so hover doesn't have to wait through the 1s delay before the
@@ -51,9 +51,9 @@ export class TectonTabPane {
51
51
  // #endregion
52
52
  // #region Render Methods
53
53
  render() {
54
- return (h("div", { key: '6c0524ab1981900cc7a37803fd9426c6397049c4', 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}` }, this.selected && this.provided !== undefined && !this.provided && (h("div", { key: '10cc2712e1ccefa6a9bb3b657830636da4d81980' }, h("slot", { key: 'cde7112d4035c6f118e9c50b0fe5d9d91c70ee7d', name: "loading-wrapper" }), h("iframe", { key: '851972991feb3b8f6c7f569e92ff2e624d94e221', hidden: true, name: this.moduleId, scrolling: "no", src: this.showForm && this.authPayload.length ? '' : this.url || '', "data-module-id": this.moduleId, style: this.minHeight ? { minHeight: this.minHeight } : null, onLoad: this.onIFrameLoad, title: this.iframeTitle, allow: "geolocation; camera" }), this._showForm && this.authPayload ? (h("form", { hidden: true, method: "post", action: this.url, target: this.moduleId, encType: "multipart/form-data" }, this.authPayload.map(element => {
54
+ return (h("div", { key: '313fa13779cd8ecb5439b1a96cb7aaf17f6c871b', 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}` }, this.selected && this.provided !== undefined && !this.provided && (h("div", { key: '5207414b205d1e9a25fb1455ca21ff7cc913a5fd' }, h("slot", { key: 'd883e909e38981f315bc1cab9ef57957a616c0d5', name: "loading-wrapper" }), h("iframe", { key: '2f0233d04d3c5be619cb54bfe637252a7ef42d77', hidden: true, name: this.moduleId, scrolling: "no", src: this.showForm && this.authPayload.length ? '' : this.url || '', "data-module-id": this.moduleId, style: this.minHeight ? { minHeight: this.minHeight } : null, onLoad: this.onIFrameLoad, title: this.iframeTitle, allow: "geolocation; camera" }), this._showForm && this.authPayload ? (h("form", { hidden: true, method: "post", action: this.url, target: this.moduleId, encType: "multipart/form-data" }, this.authPayload.map(element => {
55
55
  return (h("input", { type: "hidden", value: element.value, name: element.key }));
56
- }))) : (''))), h("div", { key: '741c6f2c89dc15493f165428929f589425aa4d75', class: "slot-wrapper", hidden: this.selected && this.provided !== undefined && !this.provided }, h("slot", { key: '17100ec2dc0ea2d1e27628d36e9e6e1139f293a9' }))));
56
+ }))) : (''))), h("div", { key: 'ae5ee8d5a5a7d1b798f4111b33120d301b86a16b', class: "slot-wrapper", hidden: this.selected && this.provided !== undefined && !this.provided }, h("slot", { key: 'cb1057d2b6cb467a25da1577610bfcc5b6300047' }))));
57
57
  }
58
58
  static get is() { return "tecton-tab-pane"; }
59
59
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,76 @@
1
+ import { loc } from "./index";
2
+ /** Localized feedback shared by chart keyboard controls. */
3
+ export function chartPointDescription(name, value, index, count) {
4
+ return loc('tecton.element.chart.pointDescription', [loc(name) || '', value, `${index + 1}`, `${count}`]);
5
+ }
6
+ /** Coordinates keyboard exploration with ECharts emphasis without changing chart data. */
7
+ export function createChartKeyboardNavigation(options) {
8
+ let index = null;
9
+ let focused = false;
10
+ const clear = () => {
11
+ var _a;
12
+ if (index !== null) {
13
+ (_a = options.getChart()) === null || _a === void 0 ? void 0 : _a.dispatchAction({ type: 'downplay', seriesIndex: 0, dataIndex: index });
14
+ }
15
+ index = null;
16
+ options.onChange(null);
17
+ };
18
+ const select = (next) => {
19
+ var _a;
20
+ if (!options.getData()[next] || next === index)
21
+ return;
22
+ clear();
23
+ index = next;
24
+ (_a = options.getChart()) === null || _a === void 0 ? void 0 : _a.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index });
25
+ options.onChange(index);
26
+ };
27
+ const order = () => { var _a, _b; return (_b = (_a = options.getOrder) === null || _a === void 0 ? void 0 : _a.call(options)) !== null && _b !== void 0 ? _b : options.getData().map((_, i) => i); };
28
+ return {
29
+ onFocus: () => {
30
+ focused = true;
31
+ select(order()[0]);
32
+ },
33
+ onBlur: () => {
34
+ focused = false;
35
+ clear();
36
+ },
37
+ onKeyDown: (event) => {
38
+ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
39
+ return;
40
+ const indices = order();
41
+ if (!indices.length)
42
+ return;
43
+ const position = index === null ? -1 : indices.indexOf(index);
44
+ let next;
45
+ switch (event.key) {
46
+ case 'ArrowRight':
47
+ case 'ArrowDown':
48
+ next = Math.min(position + 1, indices.length - 1);
49
+ break;
50
+ case 'ArrowLeft':
51
+ case 'ArrowUp':
52
+ next = Math.max(position - 1, 0);
53
+ break;
54
+ case 'Home':
55
+ next = 0;
56
+ break;
57
+ case 'End':
58
+ next = indices.length - 1;
59
+ break;
60
+ case 'Escape':
61
+ event.preventDefault();
62
+ clear();
63
+ return;
64
+ default:
65
+ return;
66
+ }
67
+ event.preventDefault();
68
+ select(indices[next]);
69
+ },
70
+ refresh: () => {
71
+ clear();
72
+ if (focused)
73
+ select(order()[0]);
74
+ },
75
+ };
76
+ }
@@ -0,0 +1,239 @@
1
+ import { addDays, format as formatDate, formatISO, isAfter, isBefore, isSameDay, isValid as isValidDate, } from "date-fns";
2
+ import { loc } from "../index";
3
+ const defaultDisplayFormat = 'MM/DD/YYYY';
4
+ const supportedDisplayFormats = [
5
+ defaultDisplayFormat,
6
+ 'DD/MM/YYYY',
7
+ 'MM-DD-YYYY',
8
+ 'DD-MM-YYYY',
9
+ 'YYYY-MM-DD',
10
+ ];
11
+ const defaultDatePickerStringKeys = {
12
+ 'Choose a date': 'tecton.element.datePicker.calendarLabel',
13
+ 'Dates are shown in your local time zone.': 'tecton.element.datePicker.disclaimer.localTimeZone',
14
+ };
15
+ const isoDatePattern = /^\d{4}-\d{2}-\d{2}$/;
16
+ const isoLikeDatePattern = /^(\d{4})-(\d{1,2})-(\d{1,2})(?:T.*)?$/;
17
+ const slashDatePattern = /^(\d{1,2})\/(\d{1,2})\/(\d{2}|\d{4})$/;
18
+ /** Determines a year for a month and day when typeable input omits the year. */
19
+ export function buildInputDate(input, assume) {
20
+ const [month, day, year] = input.split('/');
21
+ if (!month)
22
+ return;
23
+ if (!day)
24
+ return new Date(new Date().getFullYear(), Number(month) - 1, 1);
25
+ if (Number(day) <= 0)
26
+ return;
27
+ const selectedYear = (year === null || year === void 0 ? void 0 : year.length) === 4 ? Number(year) : Number(assumeYear(month, day, assume));
28
+ const date = new Date(selectedYear, Number(month) - 1, Number(day));
29
+ return isValidDate(date) ? date : undefined;
30
+ }
31
+ /** Formats a valid date as an ISO calendar date. */
32
+ export function formatDateISO(value) {
33
+ if (!isValidDate(value))
34
+ return;
35
+ return formatISO(value, { representation: 'date' });
36
+ }
37
+ /** Formats a date for an accessible day label. */
38
+ export function formatDateFull(value) {
39
+ if (!isValidDate(value))
40
+ return;
41
+ return new Intl.DateTimeFormat('en-US', {
42
+ month: 'long',
43
+ day: 'numeric',
44
+ year: 'numeric',
45
+ weekday: 'long',
46
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
47
+ }).format(value);
48
+ }
49
+ /** Returns localized abbreviated day names beginning with Sunday. */
50
+ export function getDays() {
51
+ return [
52
+ loc('tecton.element.calendar.days.short.Sunday'),
53
+ loc('tecton.element.calendar.days.short.Monday'),
54
+ loc('tecton.element.calendar.days.short.Tuesday'),
55
+ loc('tecton.element.calendar.days.short.Wednesday'),
56
+ loc('tecton.element.calendar.days.short.Thursday'),
57
+ loc('tecton.element.calendar.days.short.Friday'),
58
+ loc('tecton.element.calendar.days.short.Saturday'),
59
+ ];
60
+ }
61
+ /** Returns localized full day names beginning with Sunday. */
62
+ export function getDaysOfWeek() {
63
+ return [
64
+ loc('tecton.element.calendar.days.Sunday'),
65
+ loc('tecton.element.calendar.days.Monday'),
66
+ loc('tecton.element.calendar.days.Tuesday'),
67
+ loc('tecton.element.calendar.days.Wednesday'),
68
+ loc('tecton.element.calendar.days.Thursday'),
69
+ loc('tecton.element.calendar.days.Friday'),
70
+ loc('tecton.element.calendar.days.Saturday'),
71
+ ];
72
+ }
73
+ /** Parses the date picker's public ISO-only value contract. */
74
+ export function parseDatePickerValue(value) {
75
+ if (!value || !isoDatePattern.test(value))
76
+ return;
77
+ const [year, month, day] = value.split('-').map(Number);
78
+ return dateFromParts(year, month, day);
79
+ }
80
+ /** Normalizes a legacy string or Moment-like value for the date picker's ISO-only calendar. */
81
+ export function normalizeDatePickerValue(value) {
82
+ if (!value)
83
+ return;
84
+ let date;
85
+ if (value instanceof Date) {
86
+ date = value;
87
+ }
88
+ else if (isMomentLike(value)) {
89
+ try {
90
+ date = value.toDate();
91
+ }
92
+ catch (_a) {
93
+ return;
94
+ }
95
+ }
96
+ else {
97
+ const input = value.trim();
98
+ if (!input)
99
+ return;
100
+ date = parseDatePickerValue(input);
101
+ if (!date) {
102
+ const isoLikeParts = input.match(isoLikeDatePattern);
103
+ const slashParts = input.match(slashDatePattern);
104
+ if (isoLikeParts) {
105
+ date = dateFromParts(Number(isoLikeParts[1]), Number(isoLikeParts[2]), Number(isoLikeParts[3]));
106
+ }
107
+ else if (slashParts) {
108
+ const parsedYear = Number(slashParts[3]);
109
+ const year = parsedYear < 100 ? (parsedYear >= 69 ? 1900 : 2000) + parsedYear : parsedYear;
110
+ date = dateFromParts(year, Number(slashParts[1]), Number(slashParts[2]));
111
+ }
112
+ else {
113
+ const parsedDate = new Date(input);
114
+ date = isValidDate(parsedDate)
115
+ ? dateFromParts(parsedDate.getFullYear(), parsedDate.getMonth() + 1, parsedDate.getDate())
116
+ : undefined;
117
+ }
118
+ }
119
+ }
120
+ return formatDateISO(date);
121
+ }
122
+ /** Returns the month and year used to initialize the date picker grid. */
123
+ export function setupMonthYear(value = new Date()) {
124
+ return {
125
+ monthIndex: value.getMonth(),
126
+ selectedYear: value.getFullYear(),
127
+ };
128
+ }
129
+ /** Returns the enabled day indexes represented by a calendar checksum. */
130
+ export function getValidDaysOfWeek(checksum = 127) {
131
+ const validDays = [];
132
+ for (let day = 0; day < 7; day++) {
133
+ if (checksum & (1 << day))
134
+ validDays.push(day);
135
+ }
136
+ return checksum > 0 ? validDays : [];
137
+ }
138
+ /** Determines whether a date satisfies the configured bounds and cutoff. */
139
+ export function baseValidation(dateValidators, now, newDate) {
140
+ const isNewDateBeforeStartDate = isAfter(dateValidators === null || dateValidators === void 0 ? void 0 : dateValidators.startDate, newDate);
141
+ const isNewDateAfterEndDate = isBefore(dateValidators === null || dateValidators === void 0 ? void 0 : dateValidators.endDate, newDate);
142
+ const isNowAfterCutoffTime = isSameDay(now, newDate) && isAfter(now, dateValidators === null || dateValidators === void 0 ? void 0 : dateValidators.cutOffTime);
143
+ return !(isNewDateBeforeStartDate || isNowAfterCutoffTime || isNewDateAfterEndDate);
144
+ }
145
+ /** Determines whether a date's weekday is enabled. */
146
+ export function validateAgainstChecksum(validDaysOfWeek, date) {
147
+ return validDaysOfWeek.includes(date.getDay());
148
+ }
149
+ /** Determines whether a date is absent from a blacklist. */
150
+ export function validateAgainstBlacklist(invalidDates, date) {
151
+ return !validateAgainstWhitelist(invalidDates, date);
152
+ }
153
+ /** Determines whether a date is present in a whitelist. */
154
+ export function validateAgainstWhitelist(validDates, date) {
155
+ return validDates.some(validDate => isSameDay(validDate, date));
156
+ }
157
+ function assumeYear(month, day, assume) {
158
+ const monthDay = `${month.padStart(2, '0')}/${day.padStart(2, '0')}`;
159
+ const now = new Date();
160
+ const currentMonthDay = `${now.getMonth() + 1}`.padStart(2, '0') + `/${now.getDate()}`.padStart(2, '0');
161
+ let year = now.getFullYear();
162
+ if (assume === 'future' && currentMonthDay > monthDay)
163
+ year++;
164
+ if (assume === 'past' && currentMonthDay < monthDay)
165
+ year--;
166
+ return `${year}`;
167
+ }
168
+ function parseDatePickerValues(values) {
169
+ return (values || []).map(parseDatePickerValue).filter((date) => !!date);
170
+ }
171
+ function dateFromParts(year, month, day) {
172
+ const date = new Date(0);
173
+ date.setFullYear(year, month - 1, day);
174
+ date.setHours(0, 0, 0, 0);
175
+ if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day)
176
+ return;
177
+ return date;
178
+ }
179
+ function isMomentLike(value) {
180
+ return typeof value !== 'string' && typeof (value === null || value === void 0 ? void 0 : value.toDate) === 'function';
181
+ }
182
+ /** Formats a date using one of the date picker's supported numeric display formats. */
183
+ export function formatDisplayDate(date, displayFormat) {
184
+ const separator = displayFormat.includes('-') ? '-' : '/';
185
+ const month = `${date.getMonth() + 1}`.padStart(2, '0');
186
+ const day = `${date.getDate()}`.padStart(2, '0');
187
+ const year = `${date.getFullYear()}`;
188
+ const dateParts = displayFormat.startsWith('YYYY')
189
+ ? [year, month, day]
190
+ : displayFormat.startsWith('DD')
191
+ ? [day, month, year]
192
+ : [month, day, year];
193
+ return dateParts.join(separator);
194
+ }
195
+ /** Formats a date using the legacy Moment-style tokens accepted by q2-calendar. */
196
+ export function formatLegacyDisplayDate(date, displayFormat) {
197
+ const dateFnsFormat = displayFormat
198
+ .replace(/[d]/g, 'E')
199
+ .replace(/[D]/g, 'd')
200
+ .replace(/[Y]/g, 'y')
201
+ .replace(/[l]/g, 'P')
202
+ .replace(/[W]/g, 'I');
203
+ return formatDate(date, dateFnsFormat);
204
+ }
205
+ /** Determines whether a date satisfies every configured selection constraint. */
206
+ export function isDateSelectable(date, constraints) {
207
+ const cutoffTime = new Date(constraints.cutoffTime || '');
208
+ const withinBounds = baseValidation({
209
+ startDate: parseDatePickerValue(constraints.startDate),
210
+ endDate: parseDatePickerValue(constraints.endDate),
211
+ cutOffTime: isValidDate(cutoffTime) ? cutoffTime : undefined,
212
+ }, new Date(), date);
213
+ const validDates = parseDatePickerValues(constraints.validDates);
214
+ const matchesAllowedDates = (validDates === null || validDates === void 0 ? void 0 : validDates.length)
215
+ ? validateAgainstWhitelist(validDates, date)
216
+ : validateAgainstChecksum(getValidDaysOfWeek(constraints.daysOfWeekChecksum), date);
217
+ return (withinBounds &&
218
+ matchesAllowedDates &&
219
+ validateAgainstBlacklist(parseDatePickerValues(constraints.invalidDates), date));
220
+ }
221
+ /** Determines whether every date in an inclusive range is selectable. */
222
+ export function isRangeSelectable(start, end, constraints) {
223
+ for (let date = start; date.getTime() <= end.getTime(); date = addDays(date, 1)) {
224
+ if (!isDateSelectable(date, constraints))
225
+ return false;
226
+ }
227
+ return true;
228
+ }
229
+ /** Resolves a date-picker localization key or mapped default string. */
230
+ export function localizeDatePickerString(value, substitutions = {}) {
231
+ if (!value)
232
+ return '';
233
+ return loc(defaultDatePickerStringKeys[value] || value, substitutions);
234
+ }
235
+ /** Returns a supported display format, falling back to the date-picker default. */
236
+ export function normalizeDisplayFormat(displayFormat) {
237
+ const normalizedFormat = displayFormat === null || displayFormat === void 0 ? void 0 : displayFormat.toUpperCase();
238
+ return supportedDisplayFormats.includes(normalizedFormat) ? normalizedFormat : defaultDisplayFormat;
239
+ }
@@ -336,7 +336,7 @@ export const resizeIframe = () => {
336
336
  // Handling color attribute (deprecated)
337
337
  export const handleColor = (target) => {
338
338
  if (!target.intent && ['primary', 'secondary'].includes(target.color)) {
339
- target.intent = `workflow-${target.color}`;
339
+ target.intent = target.color;
340
340
  target.color = undefined;
341
341
  }
342
342
  };