q2-tecton-elements 1.51.0 → 1.52.0

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 (613) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +16 -5
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-9aa4a776.js → index-07285783.js} +86 -2
  4. package/dist/cjs/index-07285783.js.map +1 -0
  5. package/dist/cjs/{index-14c3693c.js → index-e7e68b1e.js} +40 -5
  6. package/dist/cjs/index-e7e68b1e.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
  9. package/dist/cjs/q2-action-sheet.cjs.entry.js +3 -3
  10. package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
  11. package/dist/cjs/q2-badge_7.cjs.entry.js +49 -44
  12. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  13. package/dist/cjs/q2-calendar.cjs.entry.js +17 -20
  14. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  15. package/dist/cjs/q2-card.cjs.entry.js +4 -2
  16. package/dist/cjs/q2-card.cjs.entry.js.map +1 -1
  17. package/dist/cjs/q2-carousel-pane.cjs.entry.js +4 -4
  18. package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
  19. package/dist/cjs/q2-chart-area.cjs.entry.js +16 -3
  20. package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
  21. package/dist/cjs/q2-chart-bar.cjs.entry.js +3 -3
  22. package/dist/cjs/q2-chart-donut.cjs.entry.js +19 -3
  23. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  24. package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -5
  25. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  27. package/dist/cjs/q2-currency.cjs.entry.js +14 -2
  28. package/dist/cjs/q2-currency.cjs.entry.js.map +1 -1
  29. package/dist/cjs/q2-data-table.cjs.entry.js +3 -3
  30. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  31. package/dist/cjs/q2-detail.cjs.entry.js +3 -3
  32. package/dist/cjs/q2-dropdown-item.cjs.entry.js +12 -14
  33. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-dropdown.cjs.entry.js +7 -5
  35. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-editable-field.cjs.entry.js +3 -3
  37. package/dist/cjs/q2-example.cjs.entry.js +145 -0
  38. package/dist/cjs/q2-example.cjs.entry.js.map +1 -0
  39. package/dist/cjs/q2-formatted-text.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-item.cjs.entry.js +3 -3
  41. package/dist/cjs/q2-legend.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-link.cjs.entry.js +4 -4
  43. package/dist/cjs/q2-link.cjs.entry.js.map +1 -1
  44. package/dist/cjs/q2-list.cjs.entry.js +6 -7
  45. package/dist/cjs/q2-list.cjs.entry.js.map +1 -1
  46. package/dist/cjs/q2-loading-element.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-loc.cjs.entry.js +52 -3
  48. package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
  49. package/dist/cjs/q2-message.cjs.entry.js +3 -3
  50. package/dist/cjs/q2-month-picker.cjs.entry.js +4 -4
  51. package/dist/cjs/q2-optgroup.cjs.entry.js +5 -4
  52. package/dist/cjs/q2-optgroup.cjs.entry.js.map +1 -1
  53. package/dist/cjs/q2-option-list.cjs.entry.js +2 -2
  54. package/dist/cjs/q2-option.cjs.entry.js +50 -33
  55. package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-pagination.cjs.entry.js +11 -7
  57. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  58. package/dist/cjs/q2-pill.cjs.entry.js +19 -18
  59. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  60. package/dist/cjs/q2-radio-group.cjs.entry.js +5 -5
  61. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  62. package/dist/cjs/q2-radio.cjs.entry.js +3 -3
  63. package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
  64. package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
  65. package/dist/cjs/q2-section.cjs.entry.js +8 -6
  66. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  67. package/dist/cjs/q2-select.cjs.entry.js +6 -5
  68. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  69. package/dist/cjs/q2-stepper-pane.cjs.entry.js +5 -4
  70. package/dist/cjs/q2-stepper-pane.cjs.entry.js.map +1 -1
  71. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +16 -4
  72. package/dist/cjs/q2-stepper-vertical.cjs.entry.js.map +1 -1
  73. package/dist/cjs/q2-stepper.cjs.entry.js +6 -4
  74. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  75. package/dist/cjs/q2-tag.cjs.entry.js +6 -4
  76. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  77. package/dist/cjs/q2-tecton-elements.cjs.js +2 -2
  78. package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
  79. package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
  80. package/dist/cjs/{shapes-be198cc0.js → shapes-5d45fc11.js} +2 -2
  81. package/dist/cjs/{shapes-be198cc0.js.map → shapes-5d45fc11.js.map} +1 -1
  82. package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -3
  83. package/dist/collection/collection-manifest.json +1 -0
  84. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  85. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  86. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  87. package/dist/collection/components/q2-calendar/q2-calendar.js +16 -18
  88. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  89. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  90. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +27 -0
  91. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  92. package/dist/collection/components/q2-card/q2-card.js +2 -0
  93. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  94. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  95. package/dist/collection/components/q2-chart-area/q2-chart-area.js +42 -1
  96. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  97. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +15 -0
  98. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  99. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  100. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +41 -1
  101. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  102. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +11 -0
  103. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  104. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +30 -23
  105. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +4 -3
  106. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  107. package/dist/collection/components/q2-currency/q2-currency.js +37 -1
  108. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  109. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +34 -23
  110. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  111. package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
  112. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  113. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +6 -4
  114. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  115. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  116. package/dist/collection/components/q2-dropdown/q2-dropdown.css +5 -0
  117. package/dist/collection/components/q2-dropdown/q2-dropdown.js +10 -4
  118. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  119. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +59 -14
  120. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  121. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +29 -11
  122. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +9 -11
  123. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  124. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +108 -74
  125. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  126. package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
  127. package/dist/collection/components/q2-example/q2-example.css +66 -0
  128. package/dist/collection/components/q2-example/q2-example.js +312 -0
  129. package/dist/collection/components/q2-example/q2-example.js.map +1 -0
  130. package/dist/collection/components/q2-example/test/q2-example.e2e.js +27 -0
  131. package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -0
  132. package/dist/collection/components/q2-example/test/q2-example.spec.js +126 -0
  133. package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -0
  134. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  135. package/dist/collection/components/q2-input/formatting/alpha.spec.js +10 -0
  136. package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -0
  137. package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js +7 -0
  138. package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -0
  139. package/dist/collection/components/q2-input/formatting/currency.spec.js +20 -0
  140. package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -0
  141. package/dist/collection/components/q2-input/formatting/date.js +1 -1
  142. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  143. package/dist/collection/components/q2-input/formatting/date.spec.js +17 -0
  144. package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -0
  145. package/dist/collection/components/q2-input/formatting/numeric.spec.js +32 -0
  146. package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -0
  147. package/dist/collection/components/q2-input/formatting/phone.spec.js +16 -0
  148. package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -0
  149. package/dist/collection/components/q2-input/formatting/postal.js +1 -1
  150. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  151. package/dist/collection/components/q2-input/formatting/postal.spec.js +28 -0
  152. package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -0
  153. package/dist/collection/components/q2-input/formatting/ssn.spec.js +7 -0
  154. package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -0
  155. package/dist/collection/components/q2-input/formatting/tin.spec.js +7 -0
  156. package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -0
  157. package/dist/collection/components/q2-input/q2-input.js +58 -44
  158. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  159. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +259 -2106
  160. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  161. package/dist/collection/components/q2-input/test/q2-input-test.spec.js +4035 -0
  162. package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -0
  163. package/dist/collection/components/q2-item/q2-item.js +1 -1
  164. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  165. package/dist/collection/components/q2-link/q2-link.css +17 -20
  166. package/dist/collection/components/q2-link/q2-link.js +2 -2
  167. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  168. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +6 -6
  169. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  170. package/dist/collection/components/q2-list/q2-list.js +4 -5
  171. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  172. package/dist/collection/components/q2-loc/q2-loc.js +66 -4
  173. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  174. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +19 -30
  175. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  176. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +164 -0
  177. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -0
  178. package/dist/collection/components/q2-message/q2-message.js +1 -1
  179. package/dist/collection/components/q2-optgroup/q2-optgroup.js +3 -2
  180. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  181. package/dist/collection/components/q2-option/q2-option.css +1 -1
  182. package/dist/collection/components/q2-option/q2-option.js +57 -34
  183. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  184. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +110 -106
  185. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  186. package/dist/collection/components/q2-option/test/q2-option-test.spec.js +532 -0
  187. package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -0
  188. package/dist/collection/components/q2-pagination/q2-pagination.js +9 -5
  189. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  190. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +18 -1
  191. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  192. package/dist/collection/components/q2-pill/q2-pill.js +18 -17
  193. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  194. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +128 -57
  195. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  196. package/dist/collection/components/q2-popover/q2-popover.js +17 -4
  197. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  198. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  199. package/dist/collection/components/q2-radio-group/q2-radio-group.css +19 -9
  200. package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
  201. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  202. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  203. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  204. package/dist/collection/components/q2-section/q2-section.js +6 -4
  205. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  206. package/dist/collection/components/q2-select/q2-select.js +5 -3
  207. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  208. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +123 -62
  209. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  210. package/dist/collection/components/q2-stepper/q2-stepper.js +4 -2
  211. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  212. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -2
  213. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  214. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +46 -2
  215. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  216. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +26 -0
  217. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  218. package/dist/collection/components/q2-tab-container/q2-tab-container.js +4 -3
  219. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  220. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  221. package/dist/collection/components/q2-tag/q2-tag.js +5 -2
  222. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  223. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +55 -4
  224. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  225. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  226. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  227. package/dist/collection/utils/helpers.js +63 -41
  228. package/dist/collection/utils/helpers.js.map +1 -1
  229. package/dist/collection/utils/index.js +83 -0
  230. package/dist/collection/utils/index.js.map +1 -1
  231. package/dist/components/index.js +2 -0
  232. package/dist/components/index.js.map +1 -1
  233. package/dist/components/index2.js +84 -1
  234. package/dist/components/index2.js.map +1 -1
  235. package/dist/components/q2-action-group.js +1 -1
  236. package/dist/components/q2-action-sheet.js +1 -1
  237. package/dist/components/q2-avatar2.js +1 -1
  238. package/dist/components/q2-calendar.js +16 -18
  239. package/dist/components/q2-calendar.js.map +1 -1
  240. package/dist/components/q2-card.js +2 -0
  241. package/dist/components/q2-card.js.map +1 -1
  242. package/dist/components/q2-carousel-pane.js +2 -2
  243. package/dist/components/q2-chart-area.js +16 -2
  244. package/dist/components/q2-chart-area.js.map +1 -1
  245. package/dist/components/q2-chart-bar.js +1 -1
  246. package/dist/components/q2-chart-donut.js +19 -2
  247. package/dist/components/q2-chart-donut.js.map +1 -1
  248. package/dist/components/q2-checkbox-group.js +5 -4
  249. package/dist/components/q2-checkbox-group.js.map +1 -1
  250. package/dist/components/q2-currency.js +15 -2
  251. package/dist/components/q2-currency.js.map +1 -1
  252. package/dist/components/q2-data-table.js +1 -1
  253. package/dist/components/q2-data-table.js.map +1 -1
  254. package/dist/components/q2-detail.js +1 -1
  255. package/dist/components/q2-dropdown-item2.js +12 -26
  256. package/dist/components/q2-dropdown-item2.js.map +1 -1
  257. package/dist/components/q2-dropdown.js +6 -3
  258. package/dist/components/q2-dropdown.js.map +1 -1
  259. package/dist/components/q2-editable-field.js +1 -1
  260. package/dist/components/q2-example.d.ts +11 -0
  261. package/dist/components/q2-example.js +170 -0
  262. package/dist/components/q2-example.js.map +1 -0
  263. package/dist/components/q2-formatted-text.js +1 -1
  264. package/dist/components/q2-input2.js +41 -37
  265. package/dist/components/q2-input2.js.map +1 -1
  266. package/dist/components/q2-item.js +1 -1
  267. package/dist/components/q2-legend2.js +1 -1
  268. package/dist/components/q2-link.js +3 -3
  269. package/dist/components/q2-link.js.map +1 -1
  270. package/dist/components/q2-list.js +4 -5
  271. package/dist/components/q2-list.js.map +1 -1
  272. package/dist/components/q2-loc.js +55 -2
  273. package/dist/components/q2-loc.js.map +1 -1
  274. package/dist/components/q2-message2.js +1 -1
  275. package/dist/components/q2-month-picker.js +2 -2
  276. package/dist/components/q2-optgroup2.js +3 -2
  277. package/dist/components/q2-optgroup2.js.map +1 -1
  278. package/dist/components/q2-option-list2.js +1 -1
  279. package/dist/components/q2-option2.js +52 -33
  280. package/dist/components/q2-option2.js.map +1 -1
  281. package/dist/components/q2-pagination.js +9 -5
  282. package/dist/components/q2-pagination.js.map +1 -1
  283. package/dist/components/q2-pill.js +18 -17
  284. package/dist/components/q2-pill.js.map +1 -1
  285. package/dist/components/q2-popover2.js +16 -4
  286. package/dist/components/q2-popover2.js.map +1 -1
  287. package/dist/components/q2-radio-group.js +3 -3
  288. package/dist/components/q2-radio-group.js.map +1 -1
  289. package/dist/components/q2-radio.js +1 -1
  290. package/dist/components/q2-relative-time.js +1 -1
  291. package/dist/components/q2-resize-observer2.js +1 -1
  292. package/dist/components/q2-section.js +6 -4
  293. package/dist/components/q2-section.js.map +1 -1
  294. package/dist/components/q2-select2.js +6 -4
  295. package/dist/components/q2-select2.js.map +1 -1
  296. package/dist/components/q2-stepper-pane.js +3 -2
  297. package/dist/components/q2-stepper-pane.js.map +1 -1
  298. package/dist/components/q2-stepper-vertical.js +16 -3
  299. package/dist/components/q2-stepper-vertical.js.map +1 -1
  300. package/dist/components/q2-stepper.js +4 -2
  301. package/dist/components/q2-stepper.js.map +1 -1
  302. package/dist/components/q2-tab-container.js +4 -3
  303. package/dist/components/q2-tab-container.js.map +1 -1
  304. package/dist/components/q2-tab-pane.js +1 -1
  305. package/dist/components/q2-tag.js +5 -2
  306. package/dist/components/q2-tag.js.map +1 -1
  307. package/dist/components/q2-textarea.js +1 -1
  308. package/dist/components/tecton-tab-pane.js +2 -2
  309. package/dist/esm/click-elsewhere_2.entry.js +16 -5
  310. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  311. package/dist/esm/{index-1e1ce94e.js → index-7a5365e2.js} +40 -5
  312. package/dist/esm/index-7a5365e2.js.map +1 -0
  313. package/dist/esm/{index-844fc010.js → index-d18e2a20.js} +86 -3
  314. package/dist/esm/index-d18e2a20.js.map +1 -0
  315. package/dist/esm/loader.js +3 -3
  316. package/dist/esm/q2-action-group.entry.js +2 -2
  317. package/dist/esm/q2-action-sheet.entry.js +3 -3
  318. package/dist/esm/q2-avatar.entry.js +2 -2
  319. package/dist/esm/q2-badge_7.entry.js +49 -44
  320. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  321. package/dist/esm/q2-calendar.entry.js +17 -20
  322. package/dist/esm/q2-calendar.entry.js.map +1 -1
  323. package/dist/esm/q2-card.entry.js +4 -2
  324. package/dist/esm/q2-card.entry.js.map +1 -1
  325. package/dist/esm/q2-carousel-pane.entry.js +4 -4
  326. package/dist/esm/q2-carousel.entry.js +2 -2
  327. package/dist/esm/q2-chart-area.entry.js +16 -3
  328. package/dist/esm/q2-chart-area.entry.js.map +1 -1
  329. package/dist/esm/q2-chart-bar.entry.js +3 -3
  330. package/dist/esm/q2-chart-donut.entry.js +19 -3
  331. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  332. package/dist/esm/q2-checkbox-group.entry.js +6 -5
  333. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  334. package/dist/esm/q2-checkbox.entry.js +2 -2
  335. package/dist/esm/q2-currency.entry.js +14 -2
  336. package/dist/esm/q2-currency.entry.js.map +1 -1
  337. package/dist/esm/q2-data-table.entry.js +3 -3
  338. package/dist/esm/q2-data-table.entry.js.map +1 -1
  339. package/dist/esm/q2-detail.entry.js +3 -3
  340. package/dist/esm/q2-dropdown-item.entry.js +12 -14
  341. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  342. package/dist/esm/q2-dropdown.entry.js +7 -5
  343. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  344. package/dist/esm/q2-editable-field.entry.js +3 -3
  345. package/dist/esm/q2-example.entry.js +141 -0
  346. package/dist/esm/q2-example.entry.js.map +1 -0
  347. package/dist/esm/q2-formatted-text.entry.js +2 -2
  348. package/dist/esm/q2-item.entry.js +3 -3
  349. package/dist/esm/q2-legend.entry.js +2 -2
  350. package/dist/esm/q2-link.entry.js +4 -4
  351. package/dist/esm/q2-link.entry.js.map +1 -1
  352. package/dist/esm/q2-list.entry.js +6 -7
  353. package/dist/esm/q2-list.entry.js.map +1 -1
  354. package/dist/esm/q2-loading-element.entry.js +2 -2
  355. package/dist/esm/q2-loc.entry.js +52 -3
  356. package/dist/esm/q2-loc.entry.js.map +1 -1
  357. package/dist/esm/q2-message.entry.js +3 -3
  358. package/dist/esm/q2-month-picker.entry.js +4 -4
  359. package/dist/esm/q2-optgroup.entry.js +5 -4
  360. package/dist/esm/q2-optgroup.entry.js.map +1 -1
  361. package/dist/esm/q2-option-list.entry.js +2 -2
  362. package/dist/esm/q2-option.entry.js +50 -33
  363. package/dist/esm/q2-option.entry.js.map +1 -1
  364. package/dist/esm/q2-pagination.entry.js +11 -7
  365. package/dist/esm/q2-pagination.entry.js.map +1 -1
  366. package/dist/esm/q2-pill.entry.js +19 -18
  367. package/dist/esm/q2-pill.entry.js.map +1 -1
  368. package/dist/esm/q2-radio-group.entry.js +5 -5
  369. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  370. package/dist/esm/q2-radio.entry.js +3 -3
  371. package/dist/esm/q2-relative-time.entry.js +3 -3
  372. package/dist/esm/q2-resize-observer.entry.js +2 -2
  373. package/dist/esm/q2-section.entry.js +8 -6
  374. package/dist/esm/q2-section.entry.js.map +1 -1
  375. package/dist/esm/q2-select.entry.js +6 -5
  376. package/dist/esm/q2-select.entry.js.map +1 -1
  377. package/dist/esm/q2-stepper-pane.entry.js +5 -4
  378. package/dist/esm/q2-stepper-pane.entry.js.map +1 -1
  379. package/dist/esm/q2-stepper-vertical.entry.js +16 -4
  380. package/dist/esm/q2-stepper-vertical.entry.js.map +1 -1
  381. package/dist/esm/q2-stepper.entry.js +6 -4
  382. package/dist/esm/q2-stepper.entry.js.map +1 -1
  383. package/dist/esm/q2-tag.entry.js +6 -4
  384. package/dist/esm/q2-tag.entry.js.map +1 -1
  385. package/dist/esm/q2-tecton-elements.js +3 -3
  386. package/dist/esm/q2-textarea.entry.js +3 -3
  387. package/dist/esm/q2-tooltip.entry.js +2 -2
  388. package/dist/esm/{shapes-36183b2a.js → shapes-c7e1a3fa.js} +2 -2
  389. package/dist/esm/{shapes-36183b2a.js.map → shapes-c7e1a3fa.js.map} +1 -1
  390. package/dist/esm/tecton-tab-pane.entry.js +3 -3
  391. package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js +77 -0
  392. package/dist/q2-tecton-elements/{p-b7554a79.js.map → action-sheet-e64cb6f7.js.map} +1 -1
  393. package/dist/q2-tecton-elements/app-globals-0f993ce5.js +4 -0
  394. package/dist/q2-tecton-elements/{p-e1255160.js.map → app-globals-0f993ce5.js.map} +1 -1
  395. package/dist/q2-tecton-elements/charting-1abfb877.js +34872 -0
  396. package/dist/q2-tecton-elements/{p-2941aafa.js.map → charting-1abfb877.js.map} +1 -1
  397. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +410 -0
  398. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -0
  399. package/dist/q2-tecton-elements/dataSample-7b62e101.js +2602 -0
  400. package/dist/q2-tecton-elements/{p-ad80aef0.js.map → dataSample-7b62e101.js.map} +1 -1
  401. package/dist/q2-tecton-elements/index-3184c760.js +18168 -0
  402. package/dist/q2-tecton-elements/{p-f1e887f5.js.map → index-3184c760.js.map} +1 -1
  403. package/dist/q2-tecton-elements/index-7a5365e2.js +1792 -0
  404. package/dist/q2-tecton-elements/index-7a5365e2.js.map +1 -0
  405. package/dist/q2-tecton-elements/index-d18e2a20.js +323 -0
  406. package/dist/q2-tecton-elements/index-d18e2a20.js.map +1 -0
  407. package/dist/q2-tecton-elements/q2-action-group.entry.js +56 -0
  408. package/dist/q2-tecton-elements/{p-5637c486.entry.js.map → q2-action-group.entry.js.map} +1 -1
  409. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1480 -0
  410. package/dist/q2-tecton-elements/{p-188eb162.entry.js.map → q2-action-sheet.entry.js.map} +1 -1
  411. package/dist/q2-tecton-elements/q2-avatar.entry.js +101 -0
  412. package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js.map → q2-avatar.entry.js.map} +1 -1
  413. package/dist/q2-tecton-elements/q2-badge_7.entry.js +5449 -0
  414. package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -0
  415. package/dist/q2-tecton-elements/q2-calendar.entry.js +1313 -0
  416. package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -0
  417. package/dist/q2-tecton-elements/q2-card.entry.js +170 -0
  418. package/dist/q2-tecton-elements/q2-card.entry.js.map +1 -0
  419. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +130 -0
  420. package/dist/q2-tecton-elements/{p-7aef0c08.entry.js.map → q2-carousel-pane.entry.js.map} +1 -1
  421. package/dist/q2-tecton-elements/q2-carousel.entry.js +4613 -0
  422. package/dist/q2-tecton-elements/{p-e216ef3f.entry.js.map → q2-carousel.entry.js.map} +1 -1
  423. package/dist/q2-tecton-elements/q2-chart-area.entry.js +4330 -0
  424. package/dist/q2-tecton-elements/q2-chart-area.entry.js.map +1 -0
  425. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1479 -0
  426. package/dist/q2-tecton-elements/{p-7906f49e.entry.js.map → q2-chart-bar.entry.js.map} +1 -1
  427. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +4537 -0
  428. package/dist/q2-tecton-elements/q2-chart-donut.entry.js.map +1 -0
  429. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +166 -0
  430. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -0
  431. package/dist/q2-tecton-elements/q2-checkbox.entry.js +223 -0
  432. package/dist/q2-tecton-elements/{p-b7de110e.entry.js.map → q2-checkbox.entry.js.map} +1 -1
  433. package/dist/q2-tecton-elements/q2-currency.entry.js +153 -0
  434. package/dist/q2-tecton-elements/q2-currency.entry.js.map +1 -0
  435. package/dist/q2-tecton-elements/q2-data-table.entry.js +622 -0
  436. package/dist/q2-tecton-elements/{p-7903cd15.entry.js.map → q2-data-table.entry.js.map} +1 -1
  437. package/dist/q2-tecton-elements/q2-detail.entry.js +128 -0
  438. package/dist/q2-tecton-elements/{p-f5f23659.entry.js.map → q2-detail.entry.js.map} +1 -1
  439. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +146 -0
  440. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -0
  441. package/dist/q2-tecton-elements/q2-dropdown.entry.js +432 -0
  442. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -0
  443. package/dist/q2-tecton-elements/q2-editable-field.entry.js +296 -0
  444. package/dist/q2-tecton-elements/{p-896c7008.entry.js.map → q2-editable-field.entry.js.map} +1 -1
  445. package/dist/q2-tecton-elements/q2-example.entry.js +152 -0
  446. package/dist/q2-tecton-elements/q2-example.entry.js.map +1 -0
  447. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +73 -0
  448. package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js.map → q2-formatted-text.entry.js.map} +1 -1
  449. package/dist/q2-tecton-elements/q2-item.entry.js +158 -0
  450. package/dist/q2-tecton-elements/{p-7c9a0122.entry.js.map → q2-item.entry.js.map} +1 -1
  451. package/dist/q2-tecton-elements/q2-legend.entry.js +146 -0
  452. package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js.map → q2-legend.entry.js.map} +1 -1
  453. package/dist/q2-tecton-elements/q2-link.entry.js +83 -0
  454. package/dist/q2-tecton-elements/q2-link.entry.js.map +1 -0
  455. package/dist/q2-tecton-elements/q2-list.entry.js +100 -0
  456. package/dist/q2-tecton-elements/q2-list.entry.js.map +1 -0
  457. package/dist/q2-tecton-elements/q2-loading-element.entry.js +36 -0
  458. package/dist/q2-tecton-elements/{p-a068c84c.entry.js.map → q2-loading-element.entry.js.map} +1 -1
  459. package/dist/q2-tecton-elements/q2-loc.entry.js +82 -0
  460. package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -0
  461. package/dist/q2-tecton-elements/q2-message.entry.js +99 -0
  462. package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js.map → q2-message.entry.js.map} +1 -1
  463. package/dist/q2-tecton-elements/q2-month-picker.entry.js +198 -0
  464. package/dist/q2-tecton-elements/{p-8d07cf91.entry.js.map → q2-month-picker.entry.js.map} +1 -1
  465. package/dist/q2-tecton-elements/q2-optgroup.entry.js +88 -0
  466. package/dist/q2-tecton-elements/q2-optgroup.entry.js.map +1 -0
  467. package/dist/q2-tecton-elements/q2-option-list.entry.js +585 -0
  468. package/dist/q2-tecton-elements/{p-a5d0e252.entry.js.map → q2-option-list.entry.js.map} +1 -1
  469. package/dist/q2-tecton-elements/q2-option.entry.js +110 -0
  470. package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -0
  471. package/dist/q2-tecton-elements/q2-pagination.entry.js +377 -0
  472. package/dist/q2-tecton-elements/q2-pagination.entry.js.map +1 -0
  473. package/dist/q2-tecton-elements/q2-pill.entry.js +434 -0
  474. package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -0
  475. package/dist/q2-tecton-elements/q2-radio-group.entry.js +227 -0
  476. package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -0
  477. package/dist/q2-tecton-elements/q2-radio.entry.js +144 -0
  478. package/dist/q2-tecton-elements/{p-c235ab3f.entry.js.map → q2-radio.entry.js.map} +1 -1
  479. package/dist/q2-tecton-elements/q2-relative-time.entry.js +162 -0
  480. package/dist/q2-tecton-elements/{p-95a7c042.entry.js.map → q2-relative-time.entry.js.map} +1 -1
  481. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +100 -0
  482. package/dist/q2-tecton-elements/{p-e2c800ef.entry.js.map → q2-resize-observer.entry.js.map} +1 -1
  483. package/dist/q2-tecton-elements/q2-section.entry.js +256 -0
  484. package/dist/q2-tecton-elements/q2-section.entry.js.map +1 -0
  485. package/dist/q2-tecton-elements/q2-select.entry.js +684 -0
  486. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -0
  487. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +124 -0
  488. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js.map +1 -0
  489. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +356 -0
  490. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js.map +1 -0
  491. package/dist/q2-tecton-elements/q2-stepper.entry.js +332 -0
  492. package/dist/q2-tecton-elements/q2-stepper.entry.js.map +1 -0
  493. package/dist/q2-tecton-elements/q2-tag.entry.js +213 -0
  494. package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -0
  495. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +21 -1
  496. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  497. package/dist/q2-tecton-elements/q2-textarea.entry.js +364 -0
  498. package/dist/q2-tecton-elements/{p-f135b265.entry.js.map → q2-textarea.entry.js.map} +1 -1
  499. package/dist/q2-tecton-elements/q2-tooltip.entry.js +105 -0
  500. package/dist/q2-tecton-elements/{p-c5667d5d.entry.js.map → q2-tooltip.entry.js.map} +1 -1
  501. package/dist/q2-tecton-elements/sectorHelper-183cedd0.js +949 -0
  502. package/dist/q2-tecton-elements/{p-eea5aa01.js.map → sectorHelper-183cedd0.js.map} +1 -1
  503. package/dist/q2-tecton-elements/shapes-c7e1a3fa.js +132 -0
  504. package/dist/q2-tecton-elements/{p-50b425de.js.map → shapes-c7e1a3fa.js.map} +1 -1
  505. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +134 -0
  506. package/dist/q2-tecton-elements/{p-96b1406c.entry.js.map → tecton-tab-pane.entry.js.map} +1 -1
  507. package/dist/types/components/q2-calendar/q2-calendar.d.ts +4 -5
  508. package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +6 -0
  509. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +6 -0
  510. package/dist/types/components/q2-currency/q2-currency.d.ts +7 -0
  511. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +1 -1
  512. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +2 -2
  513. package/dist/types/components/q2-example/q2-example.d.ts +119 -0
  514. package/dist/types/components/q2-input/formatting/date.d.ts +22 -0
  515. package/dist/types/components/q2-input/formatting/postal.d.ts +197 -0
  516. package/dist/types/components/q2-input/q2-input.d.ts +15 -12
  517. package/dist/types/components/q2-loc/q2-loc.d.ts +15 -1
  518. package/dist/types/components/q2-option/q2-option.d.ts +11 -3
  519. package/dist/types/components/q2-pill/q2-pill.d.ts +3 -3
  520. package/dist/types/components/q2-popover/q2-popover.d.ts +1 -0
  521. package/dist/types/components/q2-select/q2-select.d.ts +1 -1
  522. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +6 -0
  523. package/dist/types/components/q2-tag/q2-tag.d.ts +1 -1
  524. package/dist/types/components.d.ts +104 -14
  525. package/dist/types/utils/helpers.d.ts +13 -0
  526. package/dist/types/utils/index.d.ts +11 -0
  527. package/package.json +7 -7
  528. package/dist/cjs/index-14c3693c.js.map +0 -1
  529. package/dist/cjs/index-9aa4a776.js.map +0 -1
  530. package/dist/esm/index-1e1ce94e.js.map +0 -1
  531. package/dist/esm/index-844fc010.js.map +0 -1
  532. package/dist/q2-tecton-elements/p-06701928.entry.js +0 -2
  533. package/dist/q2-tecton-elements/p-06701928.entry.js.map +0 -1
  534. package/dist/q2-tecton-elements/p-07d1c3ae.entry.js +0 -2
  535. package/dist/q2-tecton-elements/p-15ac45d6.js +0 -2
  536. package/dist/q2-tecton-elements/p-15ac45d6.js.map +0 -1
  537. package/dist/q2-tecton-elements/p-16910682.entry.js +0 -2
  538. package/dist/q2-tecton-elements/p-16910682.entry.js.map +0 -1
  539. package/dist/q2-tecton-elements/p-188eb162.entry.js +0 -3
  540. package/dist/q2-tecton-elements/p-1c760a89.entry.js +0 -2
  541. package/dist/q2-tecton-elements/p-1c760a89.entry.js.map +0 -1
  542. package/dist/q2-tecton-elements/p-1c88d057.entry.js +0 -2
  543. package/dist/q2-tecton-elements/p-1c88d057.entry.js.map +0 -1
  544. package/dist/q2-tecton-elements/p-20a3d6ed.entry.js +0 -2
  545. package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +0 -1
  546. package/dist/q2-tecton-elements/p-2733583e.entry.js +0 -2
  547. package/dist/q2-tecton-elements/p-2733583e.entry.js.map +0 -1
  548. package/dist/q2-tecton-elements/p-2941aafa.js +0 -39
  549. package/dist/q2-tecton-elements/p-3e428290.entry.js +0 -2
  550. package/dist/q2-tecton-elements/p-3e428290.entry.js.map +0 -1
  551. package/dist/q2-tecton-elements/p-4774e5b3.entry.js +0 -2
  552. package/dist/q2-tecton-elements/p-4774e5b3.entry.js.map +0 -1
  553. package/dist/q2-tecton-elements/p-490ef8e5.entry.js +0 -2
  554. package/dist/q2-tecton-elements/p-490ef8e5.entry.js.map +0 -1
  555. package/dist/q2-tecton-elements/p-4e10550d.entry.js +0 -2
  556. package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +0 -1
  557. package/dist/q2-tecton-elements/p-50b425de.js +0 -2
  558. package/dist/q2-tecton-elements/p-50f7328f.entry.js +0 -2
  559. package/dist/q2-tecton-elements/p-50f7328f.entry.js.map +0 -1
  560. package/dist/q2-tecton-elements/p-5637c486.entry.js +0 -2
  561. package/dist/q2-tecton-elements/p-56df21b0.entry.js +0 -2
  562. package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +0 -1
  563. package/dist/q2-tecton-elements/p-5a834214.entry.js +0 -2
  564. package/dist/q2-tecton-elements/p-5a834214.entry.js.map +0 -1
  565. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +0 -2
  566. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +0 -1
  567. package/dist/q2-tecton-elements/p-72d948b4.entry.js +0 -2
  568. package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +0 -1
  569. package/dist/q2-tecton-elements/p-7903cd15.entry.js +0 -2
  570. package/dist/q2-tecton-elements/p-7906f49e.entry.js +0 -2
  571. package/dist/q2-tecton-elements/p-7aef0c08.entry.js +0 -2
  572. package/dist/q2-tecton-elements/p-7c9a0122.entry.js +0 -2
  573. package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +0 -2
  574. package/dist/q2-tecton-elements/p-81fbe718.entry.js +0 -2
  575. package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +0 -1
  576. package/dist/q2-tecton-elements/p-896c7008.entry.js +0 -2
  577. package/dist/q2-tecton-elements/p-8d07cf91.entry.js +0 -2
  578. package/dist/q2-tecton-elements/p-8d2b02e1.entry.js +0 -2
  579. package/dist/q2-tecton-elements/p-95a7c042.entry.js +0 -2
  580. package/dist/q2-tecton-elements/p-96b1406c.entry.js +0 -2
  581. package/dist/q2-tecton-elements/p-a068c84c.entry.js +0 -2
  582. package/dist/q2-tecton-elements/p-a47597dd.entry.js +0 -2
  583. package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +0 -1
  584. package/dist/q2-tecton-elements/p-a5d0e252.entry.js +0 -2
  585. package/dist/q2-tecton-elements/p-a5f18e27.js +0 -3
  586. package/dist/q2-tecton-elements/p-a5f18e27.js.map +0 -1
  587. package/dist/q2-tecton-elements/p-ac6aa392.entry.js +0 -2
  588. package/dist/q2-tecton-elements/p-ac6aa392.entry.js.map +0 -1
  589. package/dist/q2-tecton-elements/p-ad057d10.entry.js +0 -2
  590. package/dist/q2-tecton-elements/p-ad057d10.entry.js.map +0 -1
  591. package/dist/q2-tecton-elements/p-ad798287.entry.js +0 -2
  592. package/dist/q2-tecton-elements/p-ad798287.entry.js.map +0 -1
  593. package/dist/q2-tecton-elements/p-ad80aef0.js +0 -2
  594. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js +0 -2
  595. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +0 -1
  596. package/dist/q2-tecton-elements/p-b1784be3.entry.js +0 -2
  597. package/dist/q2-tecton-elements/p-b1784be3.entry.js.map +0 -1
  598. package/dist/q2-tecton-elements/p-b7554a79.js +0 -2
  599. package/dist/q2-tecton-elements/p-b7de110e.entry.js +0 -2
  600. package/dist/q2-tecton-elements/p-c235ab3f.entry.js +0 -2
  601. package/dist/q2-tecton-elements/p-c5667d5d.entry.js +0 -2
  602. package/dist/q2-tecton-elements/p-e1255160.js +0 -2
  603. package/dist/q2-tecton-elements/p-e216ef3f.entry.js +0 -2
  604. package/dist/q2-tecton-elements/p-e2c800ef.entry.js +0 -2
  605. package/dist/q2-tecton-elements/p-eea5aa01.js +0 -2
  606. package/dist/q2-tecton-elements/p-f135b265.entry.js +0 -2
  607. package/dist/q2-tecton-elements/p-f1e887f5.js +0 -2
  608. package/dist/q2-tecton-elements/p-f5f23659.entry.js +0 -2
  609. package/dist/q2-tecton-elements/p-f7867f21.entry.js +0 -2
  610. package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +0 -1
  611. package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +0 -2
  612. package/dist/q2-tecton-elements/p-fff01dc1.entry.js +0 -2
  613. package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +0 -1
@@ -0,0 +1,1313 @@
1
+ import { r as e, c as t, h as a, g as i } from "./index-7a5365e2.js";
2
+
3
+ import { d as n } from "./index-3184c760.js";
4
+
5
+ import { l as s, a as r, o, i as d, w as l, j as c } from "./index-d18e2a20.js";
6
+
7
+ function formatDateISO(e) {
8
+ const t = new Date(e);
9
+ if (!n.isValid(t)) return;
10
+ return n.formatISO(t, {
11
+ representation: "date"
12
+ });
13
+ }
14
+
15
+ let h;
16
+
17
+ function formatDateShort(e) {
18
+ const t = new Date(e);
19
+ if (!n.isValid(t)) return;
20
+ const a = t.toISOString();
21
+ if (!h) {
22
+ h = new Intl.DateTimeFormat("en-US", {
23
+ month: "2-digit",
24
+ day: "2-digit",
25
+ year: "numeric",
26
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
27
+ });
28
+ }
29
+ return h.format(new Date(a));
30
+ }
31
+
32
+ let u;
33
+
34
+ function formatDateLong(e) {
35
+ const t = new Date(e);
36
+ if (!n.isValid(t)) return;
37
+ if (!u) {
38
+ u = new Intl.DateTimeFormat("en-US", {
39
+ month: "short",
40
+ day: "numeric",
41
+ year: "numeric"
42
+ });
43
+ }
44
+ return u.format(t);
45
+ }
46
+
47
+ let f;
48
+
49
+ function formatDateFull(e) {
50
+ if (!e) return;
51
+ const t = new Date(e);
52
+ if (!n.isValid(t)) return;
53
+ if (!f) {
54
+ f = new Intl.DateTimeFormat("en-US", {
55
+ month: "long",
56
+ day: "numeric",
57
+ year: "numeric",
58
+ weekday: "long",
59
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
60
+ });
61
+ }
62
+ return f.format(t);
63
+ }
64
+
65
+ function convertMomentFormat(e) {
66
+ return e.replace(/[d]/g, "E").replace(/[D]/g, "d").replace(/[Y]/g, "y").replace(/[l]/g, "P").replace(/[W]/g, "I");
67
+ }
68
+
69
+ function stringToDate(e) {
70
+ const t = typeof e === "string";
71
+ if (!t && e && n.isValid(new Date(e || undefined))) {
72
+ e = formatDateISO(e);
73
+ } else if (!e || !n.isValid(new Date(e))) {
74
+ return undefined;
75
+ }
76
+ let a;
77
+ const i = e.split(/[\/\-]/).map((e => e.padStart(2, "0")));
78
+ const s = t && e.length >= 24 && e[10] === "T";
79
+ const r = i.length === 3;
80
+ const o = i.length < 3;
81
+ if (s) {
82
+ e = e.split("T")[0];
83
+ a = new Date(e);
84
+ } else if (r) {
85
+ const t = e.includes("/") && i[2].length === 4;
86
+ // Reorder mm/dd/yyyy dates for ISO formatting
87
+ // [mm, dd, yyyy] -> [yyyy, mm, dd]
88
+ if (t) i.unshift(i.pop());
89
+ a = new Date(Date.UTC(parseInt(i[0]), parseInt(i[1]) - 1, parseInt(i[2])));
90
+ } else if (o) {
91
+ const e = new Date;
92
+ let t;
93
+ let n;
94
+ let s;
95
+ switch (i.length) {
96
+ case 1:
97
+ t = e.getFullYear();
98
+ n = i[0];
99
+ s = "01";
100
+ break;
101
+
102
+ case 2:
103
+ t = e.getFullYear();
104
+ n = i[0];
105
+ s = i[1];
106
+ break;
107
+ }
108
+ a = new Date(`${t}-${n}-${s}`);
109
+ }
110
+ if (!n.isValid(a)) return undefined;
111
+ // result = setHours(result, 0);
112
+ a = removeTimezoneOffset(a);
113
+ return n.isValid(a) ? a : undefined;
114
+ }
115
+
116
+ function removeTimezoneOffset(e) {
117
+ const t = e.getTimezoneOffset();
118
+ // Minutes compensation for some timezones like India, Central Australia and etc use GMT+5:30, GMT+9:30
119
+ return n.setMinutes(e, t + Math.abs(t % 60));
120
+ }
121
+
122
+ function stringArrayToDate(e) {
123
+ if (!Array.isArray(e) || e.length === 0) {
124
+ return [];
125
+ }
126
+ return e.map((e => stringToDate(e)));
127
+ }
128
+
129
+ function setupMonthYear(e = new Date) {
130
+ return {
131
+ monthIndex: e.getMonth(),
132
+ selectedYear: e.getFullYear()
133
+ };
134
+ }
135
+
136
+ function validateInput(e = "", t = [], a = [], // white list
137
+ i = [], // black list
138
+ r, o, d = "mm/dd/yyyy", l) {
139
+ let c = true;
140
+ let h = false;
141
+ let u = "info";
142
+ let f = `${s("tecton.element.calendar.hint.format")}: ${d}`;
143
+ if (!e) {
144
+ return {
145
+ isValid: c,
146
+ inputDate: new Date(""),
147
+ isAvailable: h,
148
+ messageType: u,
149
+ message: f
150
+ };
151
+ }
152
+ const v = buildInputDate(e, l);
153
+ const p = v.getMonth() + 1;
154
+ const m = v.getDate();
155
+ const y = v.getFullYear();
156
+ const b = [ p, m, y ];
157
+ if (n.isValid(v)) {
158
+ const n = getMonths()[v.getMonth()];
159
+ if (e.length === 10) {
160
+ c = true;
161
+ u = null;
162
+ f = null;
163
+ }
164
+ h = t.includes(v.getDay());
165
+ const l = formatDateISO(v);
166
+ if (h) {
167
+ const e = a.length && !a.includes(l);
168
+ const t = i.length && i.includes(l);
169
+ const n = r && r > l;
170
+ const s = o && o < l;
171
+ if (e || t || n || s) {
172
+ h = false;
173
+ }
174
+ }
175
+ if (e.length >= 5 && !h) {
176
+ c = false;
177
+ u = "error";
178
+ const e = !n || !m || !y;
179
+ f = e ? `${s("tecton.element.calendar.hint.invalidDate")}: ${d}` : s("tecton.element.calendar.hint.notAvailableDate", [ formatDateLong(v) ]);
180
+ }
181
+ } else {
182
+ c = false;
183
+ u = "error";
184
+ f = `${s("tecton.element.calendar.hint.invalidDate")}: ${d}`;
185
+ }
186
+ return {
187
+ isValid: c,
188
+ messageType: u,
189
+ message: f,
190
+ inputDate: v,
191
+ isAvailable: h,
192
+ calendarPosition: b
193
+ };
194
+ }
195
+
196
+ function buildInputDate(e, t) {
197
+ const a = new Date;
198
+ // eslint-disable-next-line prefer-const
199
+ let [i, n, s] = e.split("/");
200
+ if (i === "0") i = "01";
201
+ if (n === "0") n = "01";
202
+ if (e.length === 10) {
203
+ return new Date(e);
204
+ } else if (i && n && Number(n) > 0) {
205
+ const e = Number(n) < 10 ? `0${Number(n)}` : n;
206
+ const a = !s || s.length < 4 ? assumeYear(i, n, t) : s;
207
+ return new Date(`${i}/${e}/${a}`);
208
+ } else if (i) {
209
+ return new Date(`${i}/01/${a.getFullYear()}`);
210
+ }
211
+ }
212
+
213
+ function assumeYear(e, t, a) {
214
+ const i = `${e}/${t}`;
215
+ const n = new Date;
216
+ const s = n.getMonth() < 9 ? `0${n.getMonth() + 1}` : `${n.getMonth() + 1}`;
217
+ const r = n.getDate() < 10 ? `0${n.getDate()}` : `${n.getDate()}`;
218
+ const o = `${s}/${r}/${n.getFullYear()}`;
219
+ let d = n.getFullYear();
220
+ if (a === "future" && o.slice(0, 5) > i) {
221
+ d = n.getFullYear() + 1;
222
+ } else if (a === "past" && o.slice(0, 5) < i) {
223
+ d = n.getFullYear() - 1;
224
+ }
225
+ return d.toString();
226
+ }
227
+
228
+ function handleMissingZeros(e) {
229
+ if (!e) {
230
+ return "";
231
+ }
232
+ if (e.match(/^[1-9]\/$/)) {
233
+ return `0${e}/`;
234
+ } else if (e.match(/^[0-9]{2}\/[1-9]{1}\/$/)) {
235
+ const t = e.split("/");
236
+ return `${t[0]}/0${t[1]}/`;
237
+ }
238
+ return e;
239
+ }
240
+
241
+ function reorderDateString(e) {
242
+ const t = (e || "").split("-");
243
+ if (t.length !== 3) return "";
244
+ return `${t[1]}/${t[2]}/${t[0]}`;
245
+ }
246
+
247
+ function firstDayOfWeekInMonth(e, t) {
248
+ return new Date(t, e, 1, 1, 1, 1, 1).getDay();
249
+ }
250
+
251
+ function getDays() {
252
+ return [ s("tecton.element.calendar.days.short.Sunday"), s("tecton.element.calendar.days.short.Monday"), s("tecton.element.calendar.days.short.Tuesday"), s("tecton.element.calendar.days.short.Wednesday"), s("tecton.element.calendar.days.short.Thursday"), s("tecton.element.calendar.days.short.Friday"), s("tecton.element.calendar.days.short.Saturday") ];
253
+ }
254
+
255
+ function getDaysOfWeek() {
256
+ return [ s("tecton.element.calendar.days.Sunday"), s("tecton.element.calendar.days.Monday"), s("tecton.element.calendar.days.Tuesday"), s("tecton.element.calendar.days.Wednesday"), s("tecton.element.calendar.days.Thursday"), s("tecton.element.calendar.days.Friday"), s("tecton.element.calendar.days.Saturday") ];
257
+ }
258
+
259
+ function getMonths() {
260
+ return [ s("tecton.element.calendar.months.January"), s("tecton.element.calendar.months.February"), s("tecton.element.calendar.months.March"), s("tecton.element.calendar.months.April"), s("tecton.element.calendar.months.May"), s("tecton.element.calendar.months.June"), s("tecton.element.calendar.months.July"), s("tecton.element.calendar.months.August"), s("tecton.element.calendar.months.September"), s("tecton.element.calendar.months.October"), s("tecton.element.calendar.months.November"), s("tecton.element.calendar.months.December") ];
261
+ }
262
+
263
+ function generateDatesFromMonthYear(e, t) {
264
+ const a = n.getDaysInMonth(new Date(t, e));
265
+ return [ ...Array(a).keys() ].reduce(((a, i) => {
266
+ a.push(new Date(t, e, i + 1));
267
+ return a;
268
+ }), []);
269
+ }
270
+
271
+ function getValidDaysOfWeek(e = 127) {
272
+ /* tslint:disable:no-bitwise */
273
+ const t = e & 1;
274
+ const a = e & 2;
275
+ const i = e & 4;
276
+ const n = e & 8;
277
+ const s = e & 16;
278
+ const r = e & 32;
279
+ const o = e & 64;
280
+ /* tslint:enable:no-bitwise */ const d = [];
281
+ if (e <= 0) return d;
282
+ if (t) d.push(0);
283
+ if (a) d.push(1);
284
+ if (i) d.push(2);
285
+ if (n) d.push(3);
286
+ if (s) d.push(4);
287
+ if (r) d.push(5);
288
+ if (o) d.push(6);
289
+ return d;
290
+ }
291
+
292
+ function validateAgainstChecksum(e, t) {
293
+ return e.includes(t.getDay());
294
+ }
295
+
296
+ function validateAgainstBlacklist(e, t) {
297
+ return !validateAgainstWhitelist(e, t);
298
+ }
299
+
300
+ function validateAgainstWhitelist(e, t) {
301
+ return e.some((e => n.isSameDay(e, t)));
302
+ }
303
+
304
+ function buildDates(e, t, a, i, n, s, r) {
305
+ const o = [ baseValidation.bind(null, s, new Date) ];
306
+ if (t === null || t === void 0 ? void 0 : t.length) {
307
+ o.push(validateAgainstWhitelist.bind(null, t));
308
+ } else {
309
+ o.push(validateAgainstChecksum.bind(null, e));
310
+ }
311
+ o.push(validateAgainstBlacklist.bind(null, a));
312
+ return generateDateList(i, n, s, o, r);
313
+ }
314
+
315
+ function generateDateList({monthIndex: e, selectedYear: t}, a, i, s, r) {
316
+ const o = !n.isValid(new Date(r));
317
+ const d = generateDatesFromMonthYear(e, t).map(((e, t) => {
318
+ const n = s.some((t => !t(e)));
319
+ const r = getDayState(e, i, a);
320
+ const d = generateClassesForCalDay(Object.assign(Object.assign({}, r), {
321
+ isInvalid: n,
322
+ isIncompleteDate: o
323
+ }));
324
+ return Object.assign(Object.assign({}, r), {
325
+ isValid: !n,
326
+ date: e,
327
+ integer: t + 1,
328
+ isEmpty: false,
329
+ isActivity: false,
330
+ classList: d
331
+ });
332
+ }));
333
+ const l = addEmptiesMonthStart(firstDayOfWeekInMonth(e, t));
334
+ const c = addEmptiesMonthEnd((l.length + d.length) % 7);
335
+ return [ ...l, ...d, ...c ];
336
+ }
337
+
338
+ function baseValidation(e, t, a) {
339
+ const i = n.isAfter(e === null || e === void 0 ? void 0 : e.startDate, a);
340
+ const s = n.isBefore(e === null || e === void 0 ? void 0 : e.endDate, a);
341
+ const r = n.isSameDay(t, a) && n.isAfter(t, e === null || e === void 0 ? void 0 : e.cutOffTime);
342
+ return !(i || r || s);
343
+ }
344
+
345
+ function getDayState(e, t, a) {
346
+ if (!a) a = new Date;
347
+ const i = a && n.isSameDay(a, e);
348
+ const s = n.isSameDay(e, new Date);
349
+ const r = n.isSameDay(e, t === null || t === void 0 ? void 0 : t.startDate);
350
+ const o = n.isSameDay(e, t === null || t === void 0 ? void 0 : t.endDate);
351
+ return {
352
+ isSelected: i,
353
+ isToday: s,
354
+ isStartDate: r,
355
+ isEndDate: o
356
+ };
357
+ }
358
+
359
+ function generateClassesForCalDay({isInvalid: e, isSelected: t, isEndDate: a, isStartDate: i, isToday: n, isIncompleteDate: s}) {
360
+ const r = [];
361
+ if (!e) r.push("is-valid");
362
+ if (t) r.push("is-selected");
363
+ if (a) r.push("is-end-date");
364
+ if (i) r.push("is-start-date");
365
+ if (n) r.push("is-today");
366
+ if (t && e && !s) r.push("is-unavailable");
367
+ return r.join(" ");
368
+ }
369
+
370
+ function addEmptiesMonthStart(e) {
371
+ return addEmptyDates(0, e);
372
+ }
373
+
374
+ function addEmptiesMonthEnd(e) {
375
+ if (e === 0) return [];
376
+ return addEmptyDates(e, 7);
377
+ }
378
+
379
+ const v = {
380
+ date: null,
381
+ integer: null,
382
+ isActivity: false,
383
+ isEmpty: true,
384
+ isValid: false,
385
+ isToday: false,
386
+ isSelected: false,
387
+ isStartDate: false,
388
+ isEndDate: false,
389
+ classList: ""
390
+ };
391
+
392
+ function addEmptyDates(e, t) {
393
+ if (e === 7) e = 0;
394
+ return [ ...Array(t - e).keys() ].map((() => Object.assign({}, v)));
395
+ }
396
+
397
+ const p = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}:host[hidden]{display:none}click-elsewhere{position:relative;display:block}q2-input{margin:0;cursor:pointer}q2-popover{--comp-min-tappable-size:44px;--comp-table-border-spacing:2px;--comp-min-tappable-size-and-spacing:calc(var(--comp-min-tappable-size) + var(--comp-table-border-spacing));--comp-popover-padding:var(--tct-calendar-popover-padding, var(--t-calendar-popover-padding, var(--app-scale-1x, 5px)));--comp-min-table-width:calc(var(--comp-min-tappable-size-and-spacing) * 7);--comp-table-container-border-spacing:calc(var(--comp-table-border-spacing) * 2);--comp-popover-total-padding:calc(var(--comp-popover-padding) * 2);--tct-popover-min-width:calc(\n var(--comp-min-table-width) + var(--comp-table-container-border-spacing) + var(--comp-popover-total-padding)\n )}.calendar-field-popup{padding:var(--comp-popover-padding)}.calendar-label{--comp-label-padding:var(--tct-calendar-label-padding, var(--tct-calendar-label-vertical-padding, var(--t-calendar-label-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0);font-size:var(--tct-calendar-label-font-size, var(--t-calendar-label-font-size, 16px));flex:1 1;flex-basis:calc(100% - var(--tct-btn-icon-width, 44px));margin:0;padding:var(--comp-label-padding)}.cal-month-heading{padding:0 0 0.75rem;display:flex;justify-content:center;align-items:center;font-size:var(--tct-calendar-month-font-size, var(--t-calendar-month-font-size, 16px));font-weight:var(--tct-calendar-month-font-weight, var(--t-calendar-month-font-weight, 600));text-align:center}.cal-month-text{min-width:82px;display:inline-block}.cal-year-text{min-width:50px;display:inline-block}table{width:100%;margin-bottom:2px;text-align:center;border-spacing:var(--comp-table-border-spacing)}th{font-size:var(--tct-calendar-day-heading-font-size, var(--t-calendar-day-heading-font-size, inherit));font-weight:var(--tct-calendar-day-heading-font-weight, var(--t-calendar-day-heading-font-weight, 600));width:14.285714%}td{height:var(--comp-min-tappable-size);cursor:pointer;border:var(--tct-calendar-day-border, var(--t-calendar-day-border, 0));border-radius:var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))}td.is-unavailable{border:1px solid var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a))}td.is-valid:hover{border:var(--tct-calendar-day-hover-border, var(--t-calendar-day-hover-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-hover-border-radius, var(--t-calendar-day-hover-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background:var(--tct-calendar-day-hover-background, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--app-gray14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2)))))));color:var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))}td[aria-hidden],td[aria-disabled]{pointer-events:none;cursor:not-allowed}td[aria-disabled]{opacity:var(--tct-calendar-day-disabled-opacity, var(--t-calendar-day-disabled-opacity, var(--app-disabled-opacity, 0.4)))}td[aria-selected]{border:var(--tct-calendar-day-selected-border, var(--t-calendar-day-selected-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-selected-border-radius, var(--t-calendar-day-selected-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background:var(--tct-calendar-day-selected-background, var(--tct-calendar-day-selected-bg, var(--t-calendar-day-selected-bg, var(--tct-calendar-day-hover-background, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2))))))))));color:var(--tct-calendar-day-selected-font-color, var(--t-calendar-day-selected-font-color, var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))));box-shadow:0 0 0 2px var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))))}td[aria-selected]:focus{box-shadow:0 0 0 2px var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1)))), 0 0 0 4px var(--const-focus-color, #0066cc)}.today-decorator{text-transform:uppercase;font-weight:700;font-size:10px;height:12px}.calendar-disclaimer{font-size:var(--tct-calendar-disclaimer-font-size, var(--t-calendar-disclaimer-font-size, var(--tct-font-size-small, var(--app-font-size-small, 12px))));border-style:solid;border-width:var(--tct-calendar-disclaimer-border-width, var(--t-calendar-disclaimer-border-width, 1px 0 0 0));border-color:var(--tct-calendar-disclaimer-border-color, var(--t-calendar-disclaimer-border-color, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l3, var(--app-gray-l3, #e6e6e6))))));padding:var(--tct-calendar-disclaimer-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)));text-align:left}";
398
+
399
+ const m = p;
400
+
401
+ const y = class {
402
+ constructor(a) {
403
+ e(this, a);
404
+ this.change = t(this, "change", 7);
405
+ this.error = t(this, "error", 7);
406
+ this.success = t(this, "success", 7);
407
+ this.dayAbbrStrings = getDays();
408
+ this.dayStrings = getDaysOfWeek();
409
+ this.defaultFormatString = "mm/dd/yyyy";
410
+ this.formatModifier = "M/D/YYYY";
411
+ // To allow missing leading zero, 4/3/2021 => converts into 04/03/2021
412
+ this.internalError = "";
413
+ this.monthStrings = getMonths();
414
+ this.scheduledAfterRender = [];
415
+ this.closeCalendar = () => {
416
+ if (!this.open) return;
417
+ this.open = false;
418
+ this.focusInput();
419
+ };
420
+ this.goToMonthYear = (e, t) => {
421
+ if (e < 0) {
422
+ e = 11;
423
+ t--;
424
+ } else if (e > 11) {
425
+ e = 0;
426
+ t++;
427
+ }
428
+ this.selectedMonthYear = {
429
+ monthIndex: e,
430
+ selectedYear: t
431
+ };
432
+ this.dateList = this.buildDateList(this.selectedMonthYear);
433
+ this.scheduledAfterRender.push((() => this.checkActiveCellForBlankness()));
434
+ };
435
+ this.onClickElsewhere = e => {
436
+ const t = e.target;
437
+ if (t.localName === "click-elsewhere") {
438
+ e.stopPropagation();
439
+ this.closeCalendar();
440
+ }
441
+ };
442
+ this.onDateKeydown = e => {
443
+ const {monthIndex: t, selectedYear: a} = this.selectedMonthYear;
444
+ const i = parseInt(e.target.dataset.day);
445
+ const s = this.generateDateFromDay(i);
446
+ switch (e.key) {
447
+ case "ArrowUp":
448
+ e.preventDefault();
449
+ this.activateDay(n.addDays(s, -7));
450
+ break;
451
+
452
+ case "ArrowDown":
453
+ e.preventDefault();
454
+ this.activateDay(n.addDays(s, 7));
455
+ break;
456
+
457
+ case "ArrowRight":
458
+ e.preventDefault();
459
+ this.activateDay(n.addDays(s, 1));
460
+ break;
461
+
462
+ case "ArrowLeft":
463
+ e.preventDefault();
464
+ this.activateDay(n.addDays(s, -1));
465
+ break;
466
+
467
+ case "PageUp":
468
+ e.preventDefault();
469
+ if (e.shiftKey) this.goToMonthYear(t, a - 1); else this.goToMonthYear(t - 1, a);
470
+ break;
471
+
472
+ case "PageDown":
473
+ e.preventDefault();
474
+ if (e.shiftKey) this.goToMonthYear(t, a + 1); else this.goToMonthYear(t + 1, a);
475
+ break;
476
+
477
+ case "Home":
478
+ e.preventDefault();
479
+ this.activateDay(n.addDays(s, -s.getDay()));
480
+ break;
481
+
482
+ case "End":
483
+ e.preventDefault();
484
+ this.activateDay(n.addDays(s, 6 - s.getDay()));
485
+ break;
486
+
487
+ case "Escape":
488
+ e.preventDefault();
489
+ this.closeCalendar();
490
+ this.focusInput();
491
+ break;
492
+
493
+ case "Enter":
494
+ e.preventDefault();
495
+ if (!this.dateList.find((({date: e}) => n.isSameDay(e, s))).isValid) return;
496
+ this.selectDate(s);
497
+ this.closeCalendar();
498
+ this.focusInput();
499
+ break;
500
+
501
+ case " ":
502
+ e.preventDefault();
503
+ if (!this.dateList.find((({date: e}) => n.isSameDay(e, s))).isValid) return;
504
+ this.selectDate(s);
505
+ this.closeCalendar();
506
+ this.focusInput();
507
+ break;
508
+ }
509
+ };
510
+ this.onDateSelection = e => {
511
+ const t = e.target.closest("td:not([aria-hidden])");
512
+ if (!t) return;
513
+ const a = removeTimezoneOffset(new Date(t.dataset.date));
514
+ this.selectDate(a);
515
+ this.closeCalendar();
516
+ };
517
+ this.onHeaderControlKeydown = e => {
518
+ var t;
519
+ const a = this.generateDateFromDay(1);
520
+ const i = (t = this.calendarBody) === null || t === void 0 ? void 0 : t.querySelector('[aria-selected="true"]');
521
+ if (e.key === "Tab" && !i) {
522
+ e.preventDefault();
523
+ this.activateDay(a);
524
+ }
525
+ };
526
+ this.onInputBlur = () => {
527
+ if (!this.isTypeable) return;
528
+ const e = getValidDaysOfWeek(this.daysOfWeekChecksum);
529
+ const {typedValue: t} = this;
530
+ const {isValid: a, inputDate: i, isAvailable: s} = validateInput(this.typedValue, e, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
531
+ if (!t && (i === null || i === void 0 ? void 0 : i.toString()) === "Invalid Date") {
532
+ // initial/clear state
533
+ this.setHints({
534
+ isValid: true,
535
+ message: this.defaultHintMessage,
536
+ messageType: "info"
537
+ });
538
+ } else if (a || t && t.length > 4 && // at least mm/dd provided
539
+ i && n.isValid(i) && s) {
540
+ this.setCompleteInput(i);
541
+ } else if (this.value) {
542
+ this.valueOnBlur = this.value;
543
+ this.value = null;
544
+ this.change.emit({
545
+ value: null
546
+ });
547
+ this.typedValue = t;
548
+ }
549
+ };
550
+ this.onInputChange = e => {
551
+ e.stopPropagation();
552
+ };
553
+ this.onInputClick = () => {
554
+ if (this.disabled) return;
555
+ this.toggleCalendar();
556
+ };
557
+ this.onInputFocus = e => {
558
+ if (!this.isTypeable) return;
559
+ if (e.target === this.controlElement) {
560
+ if (this.valueOnBlur && !this.value) {
561
+ const e = this.typedValue;
562
+ this.value = this.valueOnBlur;
563
+ this.typedValue = e;
564
+ this.valueOnBlur = null;
565
+ }
566
+ this.closeCalendar();
567
+ }
568
+ };
569
+ this.onInputInput = ({detail: {value: e}}) => {
570
+ this.typedValue = e;
571
+ };
572
+ this.onInputKeydown = e => {
573
+ const {dateValue: t} = this;
574
+ switch (e.key) {
575
+ case "ArrowDown":
576
+ e.preventDefault();
577
+ this.openCalendar();
578
+ this.activateDay(t || new Date);
579
+ break;
580
+
581
+ case "Enter":
582
+ case " ":
583
+ if (this.typeable) break;
584
+ e.preventDefault();
585
+ if (this.open) {
586
+ this.closeCalendar();
587
+ } else {
588
+ this.openCalendar();
589
+ this.activateDay(t || new Date);
590
+ }
591
+ break;
592
+ }
593
+ };
594
+ this.onInputKeyup = e => {
595
+ if (this.disabled) {
596
+ return;
597
+ }
598
+ switch (e.key) {
599
+ case "Escape":
600
+ this.onInputBlur();
601
+ this.closeCalendar();
602
+ break;
603
+ }
604
+ if (!this.isTypeable) return;
605
+ // handle missing zero in month and date
606
+ this.typedValue = handleMissingZeros(this.typedValue);
607
+ const {typedValue: t} = this;
608
+ const a = getValidDaysOfWeek(this.daysOfWeekChecksum);
609
+ const {isValid: i, message: s, messageType: r, inputDate: o, isAvailable: d, calendarPosition: l} = validateInput(t, a, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
610
+ if (l) {
611
+ const [e, t, a] = l;
612
+ const i = new Date(a, e - 1, t);
613
+ if (n.isValid(i)) {
614
+ this.selectedMonthYear = setupMonthYear(i);
615
+ this.dateList = this.buildDateList(this.selectedMonthYear);
616
+ this.validateDate();
617
+ }
618
+ }
619
+ if (e.key === "Enter") {
620
+ if (i || t && t.length > 4 && // at least mm/dd provided
621
+ o && n.isValid(o) && d) {
622
+ this.setCompleteInput(o);
623
+ } else if (this.value) {
624
+ this.value = null;
625
+ this.change.emit({
626
+ value: null
627
+ });
628
+ this.typedValue = t;
629
+ }
630
+ if (this.keyboardSelection) {
631
+ this.keyboardSelection = false;
632
+ this.closeCalendar();
633
+ } else {
634
+ this.toggleCalendar();
635
+ }
636
+ } else {
637
+ this.setHints({
638
+ isValid: i,
639
+ message: s,
640
+ messageType: r
641
+ });
642
+ }
643
+ };
644
+ this.onPopupKeyup = e => {
645
+ if (e.key === "Escape" || e.key === "Esc") {
646
+ this.onInputBlur();
647
+ this.closeCalendar();
648
+ }
649
+ };
650
+ this.onRefocus = () => {
651
+ var e;
652
+ (e = this.btnPrevMonth) === null || e === void 0 ? void 0 : e.dispatchEvent(new FocusEvent("focus"));
653
+ };
654
+ this.openCalendar = () => {
655
+ if (this.readonly || this.open) return;
656
+ this.selectedMonthYear = setupMonthYear(this.dateValue);
657
+ this.dateList = this.buildDateList(this.selectedMonthYear);
658
+ this.open = true;
659
+ };
660
+ this.selectDate = e => {
661
+ const {isValid: t} = this.dateList.find((({date: t}) => n.isSameDay(t, e)));
662
+ if (!t) return;
663
+ this.change.emit({
664
+ value: formatDateISO(e)
665
+ });
666
+ this.typedValue = formatDateShort(e);
667
+ this.invalid = false;
668
+ this.success.emit({
669
+ value: formatDateISO(e)
670
+ });
671
+ };
672
+ this.toggleCalendar = () => {
673
+ if (this.readonly) return;
674
+ if (this.open) {
675
+ this.closeCalendar();
676
+ } else {
677
+ this.openCalendar();
678
+ }
679
+ };
680
+ this.controlElement = undefined;
681
+ this.dateList = undefined;
682
+ this.hintMessage = this.defaultHintMessage;
683
+ this.hintMessageType = "info";
684
+ this.keyboardSelection = false;
685
+ this.typedValue = "";
686
+ this.ariaLabel = undefined;
687
+ this.assume = "current";
688
+ this.buttonLabel = undefined;
689
+ this.calendarLabel = undefined;
690
+ this.clearable = undefined;
691
+ this.cutoffTime = undefined;
692
+ this.daysOfWeekChecksum = undefined;
693
+ this.disabled = undefined;
694
+ this.disabledMsg = undefined;
695
+ this.disclaimer = undefined;
696
+ this.displayFormat = undefined;
697
+ this.endDate = undefined;
698
+ this.errors = undefined;
699
+ this.hideLabel = undefined;
700
+ this.hints = undefined;
701
+ this.invalid = undefined;
702
+ this.invalidDates = undefined;
703
+ this.label = undefined;
704
+ this.onsuccess = undefined;
705
+ this.open = undefined;
706
+ this.optional = undefined;
707
+ this.placeholder = undefined;
708
+ this.popDirection = undefined;
709
+ this.popoverAlignment = undefined;
710
+ this.popoverDirection = undefined;
711
+ this.popoverMinHeight = 355;
712
+ this.popoverMode = null;
713
+ this.readonly = undefined;
714
+ this.startDate = undefined;
715
+ this.typeable = undefined;
716
+ this.validDates = undefined;
717
+ this.value = undefined;
718
+ }
719
+ // #endregion
720
+ // #region Component Lifecycle Events
721
+ connectedCallback() {
722
+ this.selectedMonthYear = setupMonthYear(this.dateValue);
723
+ this.dateList = this.buildDateList(this.selectedMonthYear);
724
+ if (this.value && this.isTypeable && !this.typedValue) {
725
+ this.typedValue = reorderDateString(this.value);
726
+ }
727
+ this.validateDate();
728
+ }
729
+ componentWillLoad() {
730
+ this.popDirectionHandler();
731
+ r(this);
732
+ }
733
+ componentDidLoad() {
734
+ o(this.hostElement);
735
+ }
736
+ componentDidRender() {
737
+ setTimeout((() => {
738
+ this.scheduledAfterRender.forEach((e => e()));
739
+ this.scheduledAfterRender = [];
740
+ }), 25);
741
+ }
742
+ // #endregion
743
+ // #region Listeners
744
+ defaultChangeHandler(e) {
745
+ if (e.target === this.hostElement && !this.hostElement.onchange && !!e.detail) {
746
+ this.value = e.detail.value;
747
+ }
748
+ }
749
+ handleClear() {
750
+ this.change.emit({
751
+ value: null
752
+ });
753
+ this.value = null;
754
+ this.typedValue = "";
755
+ }
756
+ defaultErrorHandler(e) {
757
+ if (e.target === this.hostElement && !this.hostElement.onerror) {
758
+ if (this.hintMessageType === "error" && this.hintMessage) {
759
+ this.internalError = this.hintMessage;
760
+ } else {
761
+ this.internalError = s("tecton.element.calendar.hint.invalidDate");
762
+ }
763
+ }
764
+ }
765
+ delegateFocus(e) {
766
+ if (!d(e, this.hostElement)) return;
767
+ this.controlElement.shadowRoot.querySelector(".input-field").focus();
768
+ }
769
+ popoverStateHandler({detail: {open: e}}) {
770
+ if (this.open !== e) this.open = e;
771
+ }
772
+ defaultSuccessHandler(e) {
773
+ if (e.target !== this.hostElement) {
774
+ return;
775
+ }
776
+ if (typeof this.onsuccess === "function") {
777
+ this.onsuccess(e);
778
+ } else {
779
+ this.internalError = "";
780
+ if (this.hintMessageType === "error" && this.hintMessage) {
781
+ this.hintMessage = null;
782
+ this.hintMessageType = null;
783
+ this.invalid = false;
784
+ }
785
+ }
786
+ }
787
+ // #endregion
788
+ // #region Public Methods API
789
+ /**
790
+ * Emulates clicking the `<input>` to hide the popover if it is visible.
791
+ *
792
+ * @testOnly
793
+ */
794
+ async closePopover() {
795
+ if (!this.open) return;
796
+ this._togglePopover();
797
+ }
798
+ /**
799
+ * Emulates clicking the `<input>` to display the popover if it is hidden.
800
+ *
801
+ * @testOnly
802
+ */ async openPopover() {
803
+ if (this.open) return;
804
+ this._togglePopover();
805
+ }
806
+ /**
807
+ * Emulates clicking the `<input>` to display the popover, moving to the correct month and year, and clicking the
808
+ * provided date.
809
+ *
810
+ * While a `string` value can be passed, we recommended passing a `Date` object. If the value is invalid, the method
811
+ * will not select the date.
812
+ *
813
+ * @testOnly
814
+ */ async setValue(e) {
815
+ var t;
816
+ const a = typeof e === "string" ? stringToDate(e) : e;
817
+ if (!n.isValid(a)) return;
818
+ await this.openPopover();
819
+ await l();
820
+ this.goToMonthYear(a.getMonth(), a.getFullYear());
821
+ await l();
822
+ const i = (t = this.calendarTable) === null || t === void 0 ? void 0 : t.querySelector(`td[data-date="${formatDateISO(a)}"]`);
823
+ i === null || i === void 0 ? void 0 : i.click();
824
+ }
825
+ /**
826
+ * Emulates focusing the `<input>`, entering the provided value, and emitting an `input` event.
827
+ *
828
+ * While a `string` value can be passed, we recommended passing a `Date` object. If the value is invalid, the method
829
+ * will not select the date.
830
+ *
831
+ * @warning
832
+ * Only applicable when the input is typeable.
833
+ *
834
+ * @testOnly
835
+ */ async typeValue(e) {
836
+ if (!this.typeable) return;
837
+ const t = typeof e === "string" ? stringToDate(e) : e;
838
+ const a = formatDateShort(t);
839
+ if (!n.isValid(t)) return;
840
+ const {innerInputField: i, controlElement: s} = this;
841
+ i.focus();
842
+ i.dispatchEvent(new FocusEvent("focus"));
843
+ i.value = a;
844
+ i.dispatchEvent(new InputEvent("input"));
845
+ s.dispatchEvent(new KeyboardEvent("keyup"));
846
+ }
847
+ // #endregion
848
+ // #region Watchers
849
+ ariaLabelObserver() {
850
+ r(this);
851
+ }
852
+ cutoffTimeObserver() {
853
+ this.dateList = this.buildDateList(this.selectedMonthYear);
854
+ this.validateDate();
855
+ }
856
+ daysOfWeekChecksumObserver() {
857
+ this.dateList = this.buildDateList(this.selectedMonthYear);
858
+ this.validateDate();
859
+ }
860
+ endDateObserver() {
861
+ this.dateList = this.buildDateList(this.selectedMonthYear);
862
+ this.validateDate();
863
+ }
864
+ invalidDatesObserver() {
865
+ this.dateList = this.buildDateList(this.selectedMonthYear);
866
+ this.validateDate();
867
+ }
868
+ popDirectionHandler() {
869
+ c(this, "popDirection", "popoverDirection");
870
+ }
871
+ startDateObserver() {
872
+ this.dateList = this.buildDateList(this.selectedMonthYear);
873
+ this.validateDate();
874
+ }
875
+ typeableChanged() {
876
+ this.valueObserver(this.value);
877
+ }
878
+ validDatesObserver() {
879
+ this.dateList = this.buildDateList(this.selectedMonthYear);
880
+ this.validateDate();
881
+ }
882
+ valueObserver(e) {
883
+ // resetting by empty string
884
+ if (e === "") {
885
+ this.value = undefined;
886
+ this.setHints({
887
+ isValid: true,
888
+ message: this.defaultHintMessage,
889
+ messageType: "info"
890
+ });
891
+ return;
892
+ }
893
+ const t = e && typeof e !== "string" && "toDate" in e;
894
+ const a = t ? e.toDate() : stringToDate(e);
895
+ const i = formatDateShort(a);
896
+ if (this.isTypeable) {
897
+ this.typedValue = i;
898
+ } else {
899
+ this.controlElement.value = i;
900
+ this.selectedMonthYear = setupMonthYear(a);
901
+ this.dateList = this.buildDateList(this.selectedMonthYear);
902
+ this.validateDate();
903
+ }
904
+ // reset hint when value is cleared
905
+ if (this.invalid) return;
906
+ if (i) {
907
+ this.setHints({
908
+ isValid: true,
909
+ message: null,
910
+ messageType: null
911
+ });
912
+ } else {
913
+ this.setHints({
914
+ isValid: true,
915
+ message: this.defaultHintMessage,
916
+ messageType: "info"
917
+ });
918
+ }
919
+ }
920
+ // #endregion
921
+ // #region Local Methods
922
+ get canClear() {
923
+ if (this.isTypeable) {
924
+ return this.clearable && !!this.typedValue;
925
+ } else {
926
+ return this.clearable && !!this.value;
927
+ }
928
+ }
929
+ get computedPlaceholder() {
930
+ if (this.disabled && this.disabledMsg) {
931
+ return s(this.disabledMsg);
932
+ }
933
+ if (this.buttonLabel && (this.disabled || this.placeholder)) {
934
+ return s(this.buttonLabel);
935
+ }
936
+ return this.placeholder && s(this.placeholder) || "";
937
+ }
938
+ get currentWeeks() {
939
+ const e = this.dateList.reduce(((e, t, a) => {
940
+ const i = Math.floor(a / 7);
941
+ if (!e[i]) {
942
+ e[i] = [];
943
+ }
944
+ e[i].push(t);
945
+ return e;
946
+ }), []);
947
+ return e;
948
+ }
949
+ get dateValidators() {
950
+ const e = new Date(this.cutoffTime || "");
951
+ // should fallback to InvalidDate
952
+ return {
953
+ startDate: stringToDate(this.startDate),
954
+ endDate: stringToDate(this.endDate),
955
+ cutOffTime: n.isValid(e) ? e : undefined
956
+ };
957
+ }
958
+ get dateValue() {
959
+ if (this.isTypeable) {
960
+ return stringToDate(this.typedValue);
961
+ } else {
962
+ let {value: e} = this;
963
+ const t = e && typeof e !== "string" && "toDate" in e;
964
+ if (t) return e.toDate();
965
+ // stringified moment value assigned in html template e.g.) handlebar
966
+ const a = typeof e === "string" && e.split(" ").length === 6 && /GMT-\d{4}/g.test(e);
967
+ if (a) {
968
+ e = formatDateISO(e);
969
+ }
970
+ return stringToDate(e);
971
+ }
972
+ }
973
+ get defaultHintMessage() {
974
+ return this.typeable ? s("tecton.element.calendar.hint.format") + ": " + this.defaultFormatString : s("tecton.element.calendar.hint.select");
975
+ }
976
+ get errorList() {
977
+ const {errors: e, internalError: t, invalid: a} = this;
978
+ let i = [];
979
+ if (t) {
980
+ i = [ t ];
981
+ }
982
+ if (Array.isArray(e) && e.length) {
983
+ i = e.filter((e => !!e)).map((e => s(e))).concat(i);
984
+ } else if (!t && a) {
985
+ return [ "tecton.element.calendar.invalid" ];
986
+ }
987
+ return i;
988
+ }
989
+ get formattedValue() {
990
+ const {typedValue: e, dateValue: t, displayFormat: a, isTypeable: i} = this;
991
+ if (i) return e;
992
+ if (t === undefined) return "";
993
+ if (a) return n.format(t, convertMomentFormat(a));
994
+ return new Intl.DateTimeFormat("en-US", {
995
+ year: "numeric",
996
+ month: "2-digit",
997
+ day: "2-digit",
998
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
999
+ }).format(t);
1000
+ }
1001
+ get hintList() {
1002
+ const {hints: e, hintMessageType: t, hintMessage: a} = this;
1003
+ if (Array.isArray(e) && e.length) return e.filter((e => !!e)).map((e => s(e)));
1004
+ if (t === "info" && a) return [ a ];
1005
+ return [];
1006
+ }
1007
+ get innerInputField() {
1008
+ var e, t;
1009
+ return (t = (e = this.controlElement) === null || e === void 0 ? void 0 : e.shadowRoot) === null || t === void 0 ? void 0 : t.querySelector(".input-field");
1010
+ }
1011
+ get isTypeable() {
1012
+ return this.typeable;
1013
+ }
1014
+ get selectedDate() {
1015
+ var e;
1016
+ const t = (e = this.calendarBody) === null || e === void 0 ? void 0 : e.querySelector('[aria-selected="true"]');
1017
+ return t ? removeTimezoneOffset(new Date(t.dataset.date)) : null;
1018
+ }
1019
+ _togglePopover() {
1020
+ const e = this.typeable ? this.btnCalendarToggle : this.innerInputField;
1021
+ e === null || e === void 0 ? void 0 : e.click();
1022
+ e === null || e === void 0 ? void 0 : e.focus();
1023
+ e.dispatchEvent(new FocusEvent("focus"));
1024
+ }
1025
+ activateDay(e) {
1026
+ this.goToMonthYear(e.getMonth(), e.getFullYear());
1027
+ this.scheduledAfterRender.push((() => this.focusDay(e)));
1028
+ }
1029
+ buildDateList(e) {
1030
+ const t = stringArrayToDate(this.invalidDates);
1031
+ const a = getValidDaysOfWeek(this.daysOfWeekChecksum);
1032
+ const i = stringArrayToDate(this.validDates);
1033
+ return buildDates(a, i, t, e, this.dateValue, this.dateValidators, this.typedValue);
1034
+ }
1035
+ calendarDays() {
1036
+ return a("table", {
1037
+ role: "grid",
1038
+ "aria-labelledby": "table-label",
1039
+ ref: e => this.calendarTable = e
1040
+ }, a("thead", null, a("tr", null, [ ...Array(7).keys() ].map((e => a("th", {
1041
+ scope: "col",
1042
+ "aria-label": this.dayStrings[e]
1043
+ }, this.dayAbbrStrings[e]))))), a("tbody", {
1044
+ onClick: this.onDateSelection,
1045
+ onKeyDown: this.onDateKeydown,
1046
+ ref: e => this.calendarBody = e,
1047
+ "test-id": "calendarTableBody"
1048
+ }, this.currentWeeks.map((e => a("tr", null, e.map((e => {
1049
+ var t;
1050
+ let i = "";
1051
+ if (e.isToday) i = `${s("tecton.element.calendar.today")}, `;
1052
+ i += formatDateFull(e.date);
1053
+ if (e.isSelected) i += ` (${s("tecton.element.calendar.selected")})`;
1054
+ return a("td", {
1055
+ class: e.classList,
1056
+ "aria-hidden": e.isEmpty ? "true" : undefined,
1057
+ tabindex: e.isSelected ? 0 : -1,
1058
+ role: e.isSelected ? "gridcell" : undefined,
1059
+ "aria-selected": e.isSelected ? "true" : undefined,
1060
+ "aria-disabled": e.isValid ? undefined : "true",
1061
+ "data-day": e.integer || undefined,
1062
+ "data-date": e.date ? formatDateISO(e.date) : undefined
1063
+ }, (e === null || e === void 0 ? void 0 : e.isToday) && a("div", {
1064
+ class: "today-decorator",
1065
+ "aria-hidden": "true"
1066
+ }, s("tecton.element.calendar.today")), a("div", {
1067
+ "aria-label": i
1068
+ }, (t = e === null || e === void 0 ? void 0 : e.integer) !== null && t !== void 0 ? t : ""));
1069
+ })))))));
1070
+ }
1071
+ checkActiveCellForBlankness() {
1072
+ const e = this.hostElement.shadowRoot.activeElement;
1073
+ if (!e || e.tagName !== "TD" || !e.hasAttribute("aria-hidden")) return;
1074
+ const {calendarBody: t} = this;
1075
+ const a = Array.from(t.querySelectorAll("td"));
1076
+ const i = Array.from(a).indexOf(e);
1077
+ const n = i < 15 ? 1 : a.filter((e => !e.hasAttribute("aria-hidden"))).length;
1078
+ this.focusDay(this.generateDateFromDay(n));
1079
+ }
1080
+ async focusDay(e) {
1081
+ var t;
1082
+ if (!e) return;
1083
+ await l();
1084
+ (t = this.calendarBody.querySelector(`td[data-day="${e.getDate()}"]`)) === null || t === void 0 ? void 0 : t.focus();
1085
+ }
1086
+ focusInput() {
1087
+ var e;
1088
+ (e = this.controlElement) === null || e === void 0 ? void 0 : e.focus();
1089
+ }
1090
+ generateDateFromDay(e) {
1091
+ const {monthIndex: t, selectedYear: a} = this.selectedMonthYear;
1092
+ return new Date(a, t, e);
1093
+ }
1094
+ setCompleteInput(e) {
1095
+ const t = formatDateShort(e);
1096
+ this.change.emit({
1097
+ value: formatDateISO(e)
1098
+ });
1099
+ this.typedValue = t;
1100
+ this.internalError = null;
1101
+ this.setHints({
1102
+ isValid: true,
1103
+ message: null,
1104
+ messageType: null
1105
+ });
1106
+ }
1107
+ setHints({isValid: e, message: t, messageType: a}) {
1108
+ var i;
1109
+ if (t === this.hintMessage) return (i = this.hintMessageElement) === null || i === void 0 ? void 0 : i.present();
1110
+ this.invalid = !e;
1111
+ this.hintMessage = t;
1112
+ this.hintMessageType = a;
1113
+ if (a === "error" && t) {
1114
+ this.internalError = t;
1115
+ this.error.emit({
1116
+ errors: [ {
1117
+ message: t,
1118
+ errorCode: "generalInvalid"
1119
+ } ]
1120
+ });
1121
+ }
1122
+ }
1123
+ validateDate() {
1124
+ var e, t, a;
1125
+ try {
1126
+ if (!!this.value) {
1127
+ const {dateValue: i} = this;
1128
+ const n = (e = i === null || i === void 0 ? void 0 : i.getMonth()) !== null && e !== void 0 ? e : undefined;
1129
+ const s = (t = i === null || i === void 0 ? void 0 : i.getFullYear()) !== null && t !== void 0 ? t : undefined;
1130
+ const {monthIndex: r, selectedYear: o} = this.selectedMonthYear;
1131
+ const d = n === r && s === o;
1132
+ let l = [];
1133
+ if (!i) {
1134
+ l = [];
1135
+ } else if (d) {
1136
+ l = this.dateList;
1137
+ } else {
1138
+ l = this.buildDateList({
1139
+ monthIndex: n,
1140
+ selectedYear: s
1141
+ });
1142
+ }
1143
+ const c = (a = i === null || i === void 0 ? void 0 : i.getDate()) !== null && a !== void 0 ? a : undefined;
1144
+ const h = c ? !l.find((({integer: e}) => e === c)).isValid : true;
1145
+ if (h) {
1146
+ this.error.emit({
1147
+ errors: [ {
1148
+ message: `Value passed is invalid: The date ${this.value} is not valid`,
1149
+ errorCode: "generalInvalid"
1150
+ } ]
1151
+ });
1152
+ } else {
1153
+ this.success.emit({
1154
+ value: formatDateISO(i)
1155
+ });
1156
+ }
1157
+ }
1158
+ } catch (e) {
1159
+ console.warn("Invalid moment value ", this.dateValue);
1160
+ }
1161
+ }
1162
+ // #endregion
1163
+ // #region Render Methods
1164
+ renderCalendarPopover() {
1165
+ const {monthIndex: e, selectedYear: t} = this.selectedMonthYear;
1166
+ return a("div", {
1167
+ class: "calendar-field-popup",
1168
+ onKeyUp: this.onPopupKeyup
1169
+ }, this.calendarLabel && a("p", {
1170
+ class: "calendar-label"
1171
+ }, s(this.calendarLabel)), a("div", {
1172
+ class: "cal-month-heading"
1173
+ }, a("q2-btn", {
1174
+ label: s("tecton.element.calendar.previousMonth"),
1175
+ "hide-label": true,
1176
+ ref: e => this.btnPrevMonth = e,
1177
+ class: "cal-nav-btn prev-month",
1178
+ "test-id": "previousMonthButton",
1179
+ onClick: () => this.goToMonthYear(e - 1, t)
1180
+ }, a("q2-icon", {
1181
+ type: "chevron-left"
1182
+ })), a("span", {
1183
+ class: "cal-month-text"
1184
+ }, this.monthStrings[e]), a("q2-btn", {
1185
+ label: s("tecton.element.calendar.nextMonth"),
1186
+ "hide-label": true,
1187
+ class: "cal-nav-btn next-month",
1188
+ ref: e => this.btnNextMonth = e,
1189
+ "test-id": "nextMonthButton",
1190
+ onClick: () => this.goToMonthYear(e + 1, t)
1191
+ }, a("q2-icon", {
1192
+ type: "chevron-right"
1193
+ })), a("q2-btn", {
1194
+ label: s("tecton.element.calendar.previousYear"),
1195
+ "hide-label": true,
1196
+ class: "cal-nav-btn prev-year",
1197
+ ref: e => this.btnPrevYear = e,
1198
+ "test-id": "previousYearButton",
1199
+ onClick: () => this.goToMonthYear(e, t - 1)
1200
+ }, a("q2-icon", {
1201
+ type: "chevron-left"
1202
+ })), a("span", {
1203
+ class: "cal-year-text"
1204
+ }, this.selectedMonthYear.selectedYear), a("q2-btn", {
1205
+ label: s("tecton.element.calendar.nextYear"),
1206
+ "hide-label": true,
1207
+ class: "cal-nav-btn next-year",
1208
+ ref: e => this.btnNextYear = e,
1209
+ "test-id": "nextYearButton",
1210
+ onClick: () => this.goToMonthYear(e, t + 1),
1211
+ onKeyDown: this.onHeaderControlKeydown
1212
+ }, a("q2-icon", {
1213
+ type: "chevron-right"
1214
+ }))), a("div", {
1215
+ class: "sr",
1216
+ "aria-live": "polite",
1217
+ id: "table-label"
1218
+ }, `${this.monthStrings[e]} ${t}`), this.calendarDays(), this.disclaimer && a("div", {
1219
+ class: "calendar-disclaimer"
1220
+ }, s(this.disclaimer)), a("q2-btn", {
1221
+ class: "sr refocus-popup",
1222
+ onFocus: this.onRefocus
1223
+ }));
1224
+ }
1225
+ renderHintField() {
1226
+ if (!this.hintMessage) return;
1227
+ return a("q2-message", {
1228
+ class: "calendar-hint sr",
1229
+ ref: e => this.hintMessageElement = e,
1230
+ type: this.hintMessageType
1231
+ }, this.hintMessage);
1232
+ }
1233
+ renderInputField() {
1234
+ const {isTypeable: e} = this;
1235
+ return a("q2-input", {
1236
+ ref: e => this.controlElement = e,
1237
+ class: "calendar-input-field",
1238
+ value: this.formattedValue,
1239
+ label: s(this.label),
1240
+ hideLabel: this.hideLabel,
1241
+ disabled: !!this.disabled,
1242
+ readonly: !!this.readonly,
1243
+ clearable: this.canClear,
1244
+ placeholder: this.computedPlaceholder,
1245
+ optional: !!this.optional,
1246
+ ariaExpanded: `${!!this.open}`,
1247
+ hints: this.hintList,
1248
+ errors: this.errorList,
1249
+ onClick: e ? undefined : this.onInputClick,
1250
+ onChange: this.onInputChange,
1251
+ onInput: this.onInputInput,
1252
+ onKeyDown: this.onInputKeydown,
1253
+ onKeyUp: this.onInputKeyup,
1254
+ onBlur: this.onInputBlur,
1255
+ onFocus: this.onInputFocus,
1256
+ "icon-right": e ? undefined : "calendar",
1257
+ "format-modifier": e ? this.formatModifier : this.displayFormat || this.formatModifier,
1258
+ type: "date",
1259
+ "hide-messages": !e,
1260
+ "test-id": "inputAndCalendarToggle",
1261
+ _role: "combobox",
1262
+ _preventEntry: !e
1263
+ }, e && a("q2-btn", {
1264
+ ref: e => this.btnCalendarToggle = e,
1265
+ slot: "input-right",
1266
+ onClick: this.onInputClick,
1267
+ "test-id": "calendarToggle",
1268
+ label: "tecton.element.calendar.toggleAriaLabel",
1269
+ "hide-label": true
1270
+ }, a("q2-icon", {
1271
+ type: "calendar"
1272
+ })));
1273
+ }
1274
+ render() {
1275
+ return a("click-elsewhere", {
1276
+ key: "9b9a4058ca1f6fd2e613804f19817f7a670a016f",
1277
+ class: this.open ? "dropdown-open" : undefined,
1278
+ onChange: this.onClickElsewhere
1279
+ }, this.renderInputField(), a("q2-popover", {
1280
+ key: "7f729ebe0684463c3d19e732973708347a900040",
1281
+ ref: e => this.popoverElement = e,
1282
+ controlElement: this.controlElement,
1283
+ open: this.open,
1284
+ direction: this.popoverDirection,
1285
+ minHeight: this.popoverMinHeight,
1286
+ align: this.popoverAlignment,
1287
+ mode: this.popoverMode || undefined,
1288
+ block: true
1289
+ }, this.renderHintField(), this.renderCalendarPopover()));
1290
+ }
1291
+ get hostElement() {
1292
+ return i(this);
1293
+ }
1294
+ static get watchers() {
1295
+ return {
1296
+ ariaLabel: [ "ariaLabelObserver" ],
1297
+ cutoffTime: [ "cutoffTimeObserver" ],
1298
+ daysOfWeekChecksum: [ "daysOfWeekChecksumObserver" ],
1299
+ endDate: [ "endDateObserver" ],
1300
+ invalidDates: [ "invalidDatesObserver" ],
1301
+ popDirection: [ "popDirectionHandler" ],
1302
+ startDate: [ "startDateObserver" ],
1303
+ typeable: [ "typeableChanged" ],
1304
+ validDates: [ "validDatesObserver" ],
1305
+ value: [ "valueObserver" ]
1306
+ };
1307
+ }
1308
+ };
1309
+
1310
+ y.style = m;
1311
+
1312
+ export { y as q2_calendar };
1313
+ //# sourceMappingURL=q2-calendar.entry.js.map