q2-tecton-elements 1.69.1 → 1.70.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 (273) hide show
  1. package/dist/bundle-report.json +2246 -355
  2. package/dist/cjs/click-elsewhere_3.cjs.entry.js +2 -2
  3. package/dist/cjs/{index-D2LFCsNP.js → index-SpDCZABA.js} +2 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/q2-action-group_2.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  7. package/dist/cjs/q2-badge_2.cjs.entry.js +11 -4
  8. package/dist/cjs/q2-btn_2.cjs.entry.js +6 -2
  9. package/dist/cjs/q2-calendar.cjs.entry.js +5 -3
  10. package/dist/cjs/q2-card-image.cjs.entry.js +8 -6
  11. package/dist/cjs/q2-card.cjs.entry.js +2 -2
  12. package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  16. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-checkbox_2.cjs.entry.js +4 -3
  19. package/dist/cjs/q2-context.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-data-table.cjs.entry.js +6 -3
  22. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  23. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-dropdown.cjs.entry.js +3 -3
  25. package/dist/cjs/q2-editable-field.cjs.entry.js +12 -4
  26. package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  29. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-link_2.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-loc.cjs.entry.js +20 -2
  32. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-meter.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-modal.cjs.entry.js +3 -3
  35. package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-otp.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-search.cjs.entry.js +101 -12
  45. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-select.cjs.entry.js +36 -6
  47. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  48. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +24 -18
  49. package/dist/cjs/q2-stepper.cjs.entry.js +5 -4
  50. package/dist/cjs/q2-surface.cjs.entry.js +95 -0
  51. package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
  52. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  53. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  54. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  55. package/dist/cjs/q2-toast.cjs.entry.js +1 -1
  56. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  57. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  58. package/dist/collection/collection-manifest.json +1 -0
  59. package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +1 -1
  60. package/dist/collection/components/q2-btn/q2-btn.css +32 -17
  61. package/dist/collection/components/q2-btn/q2-btn.js +6 -1
  62. package/dist/collection/components/q2-calendar/q2-calendar.js +24 -2
  63. package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +4 -0
  64. package/dist/collection/components/q2-card/q2-card.css +2 -2
  65. package/dist/collection/components/q2-card-image/q2-card-image.css +3 -0
  66. package/dist/collection/components/q2-card-image/q2-card-image.js +25 -23
  67. package/dist/collection/components/q2-chart-area/q2-chart-area.css +4 -0
  68. package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +4 -0
  69. package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +1 -1
  70. package/dist/collection/components/q2-checkbox/q2-checkbox.js +2 -1
  71. package/dist/collection/components/q2-currency/q2-currency.css +1 -1
  72. package/dist/collection/components/q2-data-table/q2-data-table.js +5 -2
  73. package/dist/collection/components/q2-detail/q2-detail.css +12 -12
  74. package/dist/collection/components/q2-dropdown/q2-dropdown.js +2 -2
  75. package/dist/collection/components/q2-editable-field/q2-editable-field.js +11 -3
  76. package/dist/collection/components/q2-input/q2-input.css +11 -1
  77. package/dist/collection/components/q2-input/q2-input.js +29 -2
  78. package/dist/collection/components/q2-input/test/q2-input-test.vr.js +8 -0
  79. package/dist/collection/components/q2-item/q2-item.css +10 -5
  80. package/dist/collection/components/q2-item/test/q2-item-test.vr.js +132 -0
  81. package/dist/collection/components/q2-legend/q2-legend.css +2 -2
  82. package/dist/collection/components/q2-list/q2-list.css +1 -1
  83. package/dist/collection/components/q2-loc/q2-loc.js +42 -1
  84. package/dist/collection/components/q2-message/q2-message.css +4 -0
  85. package/dist/collection/components/q2-meter/q2-meter.css +3 -3
  86. package/dist/collection/components/q2-modal/q2-modal.css +1 -1
  87. package/dist/collection/components/q2-modal/q2-modal.js +2 -2
  88. package/dist/collection/components/q2-otp/q2-otp.css +33 -0
  89. package/dist/collection/components/q2-otp/test/q2-otp-test.vr.js +83 -0
  90. package/dist/collection/components/q2-popover/q2-popover.css +2 -1
  91. package/dist/collection/components/q2-radio/q2-radio.css +2 -0
  92. package/dist/collection/components/q2-search/q2-search.css +30 -0
  93. package/dist/collection/components/q2-search/q2-search.js +99 -10
  94. package/dist/collection/components/q2-search/test/q2-search-test.vr.js +145 -0
  95. package/dist/collection/components/q2-section/q2-section.css +1 -1
  96. package/dist/collection/components/q2-select/q2-select.css +4 -2
  97. package/dist/collection/components/q2-select/q2-select.js +54 -4
  98. package/dist/collection/components/q2-select/test/q2-select-test.vr.js +5 -0
  99. package/dist/collection/components/q2-stepper/q2-stepper.css +2 -2
  100. package/dist/collection/components/q2-stepper/q2-stepper.js +3 -2
  101. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.css +2 -2
  102. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +22 -16
  103. package/dist/collection/components/q2-surface/q2-surface.css +348 -0
  104. package/dist/collection/components/q2-surface/q2-surface.js +381 -0
  105. package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +108 -0
  106. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  107. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  108. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  109. package/dist/collection/components/q2-toast/q2-toast.js +3 -1
  110. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  111. package/dist/collection/utils/index.js +2 -2
  112. package/dist/components/index.js +12 -10
  113. package/dist/components/index2.js +3 -3
  114. package/dist/components/q2-action-sheet.js +1 -1
  115. package/dist/components/q2-btn2.js +5 -1
  116. package/dist/components/q2-calendar.js +294 -290
  117. package/dist/components/q2-card-image.js +9 -6
  118. package/dist/components/q2-card.js +14 -14
  119. package/dist/components/q2-chart-donut.js +1 -1
  120. package/dist/components/q2-checkbox2.js +12 -12
  121. package/dist/components/q2-currency.js +1 -1
  122. package/dist/components/q2-data-table.js +4 -4
  123. package/dist/components/q2-detail.js +1 -1
  124. package/dist/components/q2-dropdown.js +8 -8
  125. package/dist/components/q2-editable-field.js +15 -5
  126. package/dist/components/q2-input2.js +46 -26
  127. package/dist/components/q2-item2.js +1 -1
  128. package/dist/components/q2-legend2.js +51 -51
  129. package/dist/components/q2-list2.js +1 -1
  130. package/dist/components/q2-loc.js +23 -8
  131. package/dist/components/q2-meter.js +10 -10
  132. package/dist/components/q2-modal.js +54 -54
  133. package/dist/components/q2-popover2.js +1 -1
  134. package/dist/components/q2-search.js +106 -51
  135. package/dist/components/q2-section.js +1 -1
  136. package/dist/components/q2-select2.js +25 -9
  137. package/dist/components/q2-stepper-vertical.js +72 -63
  138. package/dist/components/q2-stepper.js +73 -71
  139. package/dist/components/q2-surface.d.ts +11 -0
  140. package/dist/components/q2-surface.js +109 -0
  141. package/dist/components/q2-tab-container.js +12 -12
  142. package/dist/components/q2-tab-pane.js +6 -6
  143. package/dist/components/q2-tag2.js +5 -5
  144. package/dist/components/tecton-tab-pane.js +10 -10
  145. package/dist/esm/click-elsewhere_3.entry.js +2 -2
  146. package/dist/esm/{index-Bx4m6N0g.js → index-Cps4jSQM.js} +2 -2
  147. package/dist/esm/loader.js +1 -1
  148. package/dist/esm/q2-action-group_2.entry.js +1 -1
  149. package/dist/esm/q2-action-sheet.entry.js +2 -2
  150. package/dist/esm/q2-badge_2.entry.js +11 -4
  151. package/dist/esm/q2-btn_2.entry.js +6 -2
  152. package/dist/esm/q2-calendar.entry.js +5 -3
  153. package/dist/esm/q2-card-image.entry.js +8 -6
  154. package/dist/esm/q2-card.entry.js +2 -2
  155. package/dist/esm/q2-carousel-pane.entry.js +1 -1
  156. package/dist/esm/q2-carousel.entry.js +1 -1
  157. package/dist/esm/q2-chart-area.entry.js +1 -1
  158. package/dist/esm/q2-chart-bar.entry.js +1 -1
  159. package/dist/esm/q2-chart-donut.entry.js +2 -2
  160. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  161. package/dist/esm/q2-checkbox_2.entry.js +4 -3
  162. package/dist/esm/q2-context.entry.js +1 -1
  163. package/dist/esm/q2-currency.entry.js +1 -1
  164. package/dist/esm/q2-data-table.entry.js +6 -3
  165. package/dist/esm/q2-detail.entry.js +2 -2
  166. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  167. package/dist/esm/q2-dropdown.entry.js +3 -3
  168. package/dist/esm/q2-editable-field.entry.js +12 -4
  169. package/dist/esm/q2-file-picker.entry.js +1 -1
  170. package/dist/esm/q2-icon.entry.js +1 -1
  171. package/dist/esm/q2-item.entry.js +2 -2
  172. package/dist/esm/q2-legend.entry.js +1 -1
  173. package/dist/esm/q2-link_2.entry.js +2 -2
  174. package/dist/esm/q2-loc.entry.js +20 -2
  175. package/dist/esm/q2-message.entry.js +1 -1
  176. package/dist/esm/q2-meter.entry.js +2 -2
  177. package/dist/esm/q2-modal.entry.js +3 -3
  178. package/dist/esm/q2-month-picker.entry.js +1 -1
  179. package/dist/esm/q2-optgroup.entry.js +1 -1
  180. package/dist/esm/q2-option.entry.js +1 -1
  181. package/dist/esm/q2-otp.entry.js +1 -1
  182. package/dist/esm/q2-pagination.entry.js +1 -1
  183. package/dist/esm/q2-pill.entry.js +1 -1
  184. package/dist/esm/q2-radio-group.entry.js +1 -1
  185. package/dist/esm/q2-radio.entry.js +1 -1
  186. package/dist/esm/q2-relative-time.entry.js +1 -1
  187. package/dist/esm/q2-search.entry.js +101 -12
  188. package/dist/esm/q2-section.entry.js +2 -2
  189. package/dist/esm/q2-select.entry.js +36 -6
  190. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  191. package/dist/esm/q2-stepper-vertical.entry.js +24 -18
  192. package/dist/esm/q2-stepper.entry.js +5 -4
  193. package/dist/esm/q2-surface.entry.js +93 -0
  194. package/dist/esm/q2-tab-container.entry.js +2 -2
  195. package/dist/esm/q2-tab-pane.entry.js +1 -1
  196. package/dist/esm/q2-tecton-elements.js +1 -1
  197. package/dist/esm/q2-textarea.entry.js +1 -1
  198. package/dist/esm/q2-toast.entry.js +1 -1
  199. package/dist/esm/q2-tooltip.entry.js +1 -1
  200. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  201. package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +2 -2
  202. package/dist/q2-tecton-elements/{index-Bx4m6N0g.js → index-Cps4jSQM.js} +3 -3
  203. package/dist/q2-tecton-elements/q2-action-group_2.entry.js +1 -1
  204. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +2 -2
  205. package/dist/q2-tecton-elements/q2-badge_2.entry.js +51 -32
  206. package/dist/q2-tecton-elements/q2-btn_2.entry.js +6 -2
  207. package/dist/q2-tecton-elements/q2-calendar.entry.js +7 -4
  208. package/dist/q2-tecton-elements/q2-card-image.entry.js +65 -62
  209. package/dist/q2-tecton-elements/q2-card.entry.js +2 -2
  210. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +1 -1
  211. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  212. package/dist/q2-tecton-elements/q2-chart-area.entry.js +54 -54
  213. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +3 -3
  214. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +7 -7
  215. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
  216. package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +18 -18
  217. package/dist/q2-tecton-elements/q2-context.entry.js +1 -1
  218. package/dist/q2-tecton-elements/q2-currency.entry.js +1 -1
  219. package/dist/q2-tecton-elements/q2-data-table.entry.js +50 -50
  220. package/dist/q2-tecton-elements/q2-detail.entry.js +2 -2
  221. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  222. package/dist/q2-tecton-elements/q2-dropdown.entry.js +16 -16
  223. package/dist/q2-tecton-elements/q2-editable-field.entry.js +15 -8
  224. package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
  225. package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
  226. package/dist/q2-tecton-elements/q2-item.entry.js +2 -2
  227. package/dist/q2-tecton-elements/q2-legend.entry.js +1 -1
  228. package/dist/q2-tecton-elements/q2-link_2.entry.js +2 -2
  229. package/dist/q2-tecton-elements/q2-loc.entry.js +20 -6
  230. package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
  231. package/dist/q2-tecton-elements/q2-meter.entry.js +2 -2
  232. package/dist/q2-tecton-elements/q2-modal.entry.js +55 -55
  233. package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
  234. package/dist/q2-tecton-elements/q2-optgroup.entry.js +1 -1
  235. package/dist/q2-tecton-elements/q2-option.entry.js +7 -7
  236. package/dist/q2-tecton-elements/q2-otp.entry.js +1 -1
  237. package/dist/q2-tecton-elements/q2-pagination.entry.js +1 -1
  238. package/dist/q2-tecton-elements/q2-pill.entry.js +1 -1
  239. package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
  240. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  241. package/dist/q2-tecton-elements/q2-relative-time.entry.js +1 -1
  242. package/dist/q2-tecton-elements/q2-search.entry.js +108 -53
  243. package/dist/q2-tecton-elements/q2-section.entry.js +2 -2
  244. package/dist/q2-tecton-elements/q2-select.entry.js +25 -10
  245. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  246. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +75 -66
  247. package/dist/q2-tecton-elements/q2-stepper.entry.js +47 -45
  248. package/dist/q2-tecton-elements/q2-surface.entry.js +89 -0
  249. package/dist/q2-tecton-elements/q2-tab-container.entry.js +13 -13
  250. package/dist/q2-tecton-elements/q2-tab-pane.entry.js +2 -2
  251. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  252. package/dist/q2-tecton-elements/q2-textarea.entry.js +1 -1
  253. package/dist/q2-tecton-elements/q2-toast.entry.js +5 -5
  254. package/dist/q2-tecton-elements/q2-tooltip.entry.js +8 -8
  255. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
  256. package/dist/types/components/q2-calendar/q2-calendar.d.ts +2 -0
  257. package/dist/types/components/q2-card-image/q2-card-image.d.ts +5 -5
  258. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +1 -0
  259. package/dist/types/components/q2-input/q2-input.d.ts +3 -0
  260. package/dist/types/components/q2-item/test/q2-item-test.vr.d.ts +1 -0
  261. package/dist/types/components/q2-loc/q2-loc.d.ts +6 -0
  262. package/dist/types/components/q2-modal/q2-modal.d.ts +1 -1
  263. package/dist/types/components/q2-otp/test/q2-otp-test.vr.d.ts +1 -0
  264. package/dist/types/components/q2-search/q2-search.d.ts +7 -0
  265. package/dist/types/components/q2-search/test/q2-search-test.vr.d.ts +1 -0
  266. package/dist/types/components/q2-select/q2-select.d.ts +4 -0
  267. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +2 -1
  268. package/dist/types/components/q2-surface/q2-surface.d.ts +54 -0
  269. package/dist/types/components/q2-surface/test/q2-surface-test.vr.d.ts +1 -0
  270. package/dist/types/components/q2-toast/q2-toast.d.ts +3 -1
  271. package/dist/types/components.d.ts +259 -13
  272. package/dist/types/utils/index.d.ts +3 -1
  273. package/package.json +4 -3
@@ -1,4 +1,4 @@
1
- import { proxyCustomElement as t, HTMLElement as e, createEvent as a, h as i, transformTag as r } from "@stencil/core/internal/client";
1
+ import { proxyCustomElement as e, HTMLElement as t, createEvent as a, h as i, transformTag as r } from "@stencil/core/internal/client";
2
2
 
3
3
  import { d as n } from "./index3.js";
4
4
 
@@ -22,19 +22,19 @@ import { d as D } from "./q2-message2.js";
22
22
 
23
23
  import { d as w } from "./q2-popover2.js";
24
24
 
25
- function formatDateISO(t) {
26
- const e = new Date(t);
27
- if (n.isValid(e)) return n.formatISO(e, {
25
+ function formatDateISO(e) {
26
+ const t = new Date(e);
27
+ if (n.isValid(t)) return n.formatISO(t, {
28
28
  representation: "date"
29
29
  });
30
30
  }
31
31
 
32
32
  let k, x, T;
33
33
 
34
- function formatDateShort(t) {
35
- const e = new Date(t);
36
- if (!n.isValid(e)) return;
37
- const a = e.toISOString();
34
+ function formatDateShort(e) {
35
+ const t = new Date(e);
36
+ if (!n.isValid(t)) return;
37
+ const a = t.toISOString();
38
38
  return k || (k = new Intl.DateTimeFormat("en-US", {
39
39
  month: "2-digit",
40
40
  day: "2-digit",
@@ -43,97 +43,97 @@ function formatDateShort(t) {
43
43
  })), k.format(new Date(a));
44
44
  }
45
45
 
46
- function formatDateLong(t) {
47
- const e = new Date(t);
48
- if (n.isValid(e)) return x || (x = new Intl.DateTimeFormat("en-US", {
46
+ function formatDateLong(e) {
47
+ const t = new Date(e);
48
+ if (n.isValid(t)) return x || (x = new Intl.DateTimeFormat("en-US", {
49
49
  month: "short",
50
50
  day: "numeric",
51
51
  year: "numeric"
52
- })), x.format(e);
52
+ })), x.format(t);
53
53
  }
54
54
 
55
- function stringToDate(t) {
56
- const e = "string" == typeof t;
57
- if (!e && t && n.isValid(new Date(t || void 0))) t = formatDateISO(t); else if (!t || !n.isValid(new Date(t))) return;
55
+ function stringToDate(e) {
56
+ const t = "string" == typeof e;
57
+ if (!t && e && n.isValid(new Date(e || void 0))) e = formatDateISO(e); else if (!e || !n.isValid(new Date(e))) return;
58
58
  let a;
59
- const i = t.split(/[\/\-]/).map((t => t.padStart(2, "0"))), r = e && t.length >= 24 && "T" === t[10], s = 3 === i.length, o = i.length < 3;
60
- if (r) t = t.split("T")[0], a = new Date(t); else if (s) {
59
+ const i = e.split(/[\/\-]/).map((e => e.padStart(2, "0"))), r = t && e.length >= 24 && "T" === e[10], s = 3 === i.length, o = i.length < 3;
60
+ if (r) e = e.split("T")[0], a = new Date(e); else if (s) {
61
61
  // Reorder mm/dd/yyyy dates for ISO formatting
62
62
  // [mm, dd, yyyy] -> [yyyy, mm, dd]
63
- t.includes("/") && 4 === i[2].length && i.unshift(i.pop()), a = new Date(Date.UTC(parseInt(i[0]), parseInt(i[1]) - 1, parseInt(i[2])));
63
+ e.includes("/") && 4 === i[2].length && i.unshift(i.pop()), a = new Date(Date.UTC(parseInt(i[0]), parseInt(i[1]) - 1, parseInt(i[2])));
64
64
  } else if (o) {
65
- const t = new Date;
66
- let e, r, n;
65
+ const e = new Date;
66
+ let t, r, n;
67
67
  switch (i.length) {
68
68
  case 1:
69
- e = t.getFullYear(), r = i[0], n = "01";
69
+ t = e.getFullYear(), r = i[0], n = "01";
70
70
  break;
71
71
 
72
72
  case 2:
73
- e = t.getFullYear(), r = i[0], n = i[1];
73
+ t = e.getFullYear(), r = i[0], n = i[1];
74
74
  }
75
- a = new Date(`${e}-${r}-${n}`);
75
+ a = new Date(`${t}-${r}-${n}`);
76
76
  }
77
77
  if (n.isValid(a))
78
78
  // result = setHours(result, 0);
79
79
  return a = removeTimezoneOffset(a), n.isValid(a) ? a : void 0;
80
80
  }
81
81
 
82
- function removeTimezoneOffset(t) {
83
- const e = t.getTimezoneOffset();
82
+ function removeTimezoneOffset(e) {
83
+ const t = e.getTimezoneOffset();
84
84
  // Minutes compensation for some timezones like India, Central Australia and etc use GMT+5:30, GMT+9:30
85
- return n.setMinutes(t, e + Math.abs(e % 60));
85
+ return n.setMinutes(e, t + Math.abs(t % 60));
86
86
  }
87
87
 
88
- function stringArrayToDate(t) {
89
- return Array.isArray(t) && 0 !== t.length ? t.map((t => stringToDate(t))) : [];
88
+ function stringArrayToDate(e) {
89
+ return Array.isArray(e) && 0 !== e.length ? e.map((e => stringToDate(e))) : [];
90
90
  }
91
91
 
92
- function setupMonthYear(t = new Date) {
92
+ function setupMonthYear(e = new Date) {
93
93
  return {
94
- monthIndex: t.getMonth(),
95
- selectedYear: t.getFullYear()
94
+ monthIndex: e.getMonth(),
95
+ selectedYear: e.getFullYear()
96
96
  };
97
97
  }
98
98
 
99
- function validateInput(t = "", e = [], a = [], // white list
99
+ function validateInput(e = "", t = [], a = [], // white list
100
100
  i = [], // black list
101
101
  r, o, l = "mm/dd/yyyy", d) {
102
102
  let c = !1, h = !1, u = "info", p = `${s("tecton.element.calendar.hint.format")}: ${l}`;
103
- if (!t) return {
103
+ if (!e) return {
104
104
  isValid: c,
105
105
  inputDate: new Date(""),
106
106
  isAvailable: h,
107
107
  messageType: u,
108
108
  message: p
109
109
  };
110
- const v = function(t, e) {
110
+ const v = function(e, t) {
111
111
  const a = new Date;
112
112
  // eslint-disable-next-line prefer-const
113
- let [i, r, n] = t.split("/");
113
+ let [i, r, n] = e.split("/");
114
114
  "0" === i && (i = "01");
115
115
  "0" === r && (r = "01");
116
- if (10 === t.length) return new Date(t);
116
+ if (10 === e.length) return new Date(e);
117
117
  if (i && r && Number(r) > 0) {
118
- const t = Number(r) < 10 ? "0" + Number(r) : r, a = !n || n.length < 4 ? function(t, e, a) {
119
- const i = `${t}/${e}`, r = new Date, n = r.getMonth() < 9 ? "0" + (r.getMonth() + 1) : "" + (r.getMonth() + 1), s = r.getDate() < 10 ? "0" + r.getDate() : "" + r.getDate(), o = `${n}/${s}/${r.getFullYear()}`;
118
+ const e = Number(r) < 10 ? "0" + Number(r) : r, a = !n || n.length < 4 ? function(e, t, a) {
119
+ const i = `${e}/${t}`, r = new Date, n = r.getMonth() < 9 ? "0" + (r.getMonth() + 1) : "" + (r.getMonth() + 1), s = r.getDate() < 10 ? "0" + r.getDate() : "" + r.getDate(), o = `${n}/${s}/${r.getFullYear()}`;
120
120
  let l = r.getFullYear();
121
121
  "future" === a && o.slice(0, 5) > i ? l = r.getFullYear() + 1 : "past" === a && o.slice(0, 5) < i && (l = r.getFullYear() - 1);
122
122
  return l.toString();
123
- }(i, r, e) : n;
124
- return new Date(`${i}/${t}/${a}`);
123
+ }(i, r, t) : n;
124
+ return new Date(`${i}/${e}/${a}`);
125
125
  }
126
126
  if (i) return new Date(`${i}/01/${a.getFullYear()}`);
127
- }(t, d), m = v.getMonth() + 1, f = v.getDate(), b = v.getFullYear(), g = [ m, f, b ];
127
+ }(e, d), m = v.getMonth() + 1, f = v.getDate(), b = v.getFullYear(), g = [ m, f, b ];
128
128
  if (n.isValid(v)) {
129
129
  const n = getMonths()[v.getMonth()];
130
- 10 === t.length && (c = !0, u = null, p = null), h = e.includes(v.getDay());
130
+ 10 === e.length && (c = !0, u = null, p = null), h = t.includes(v.getDay());
131
131
  const d = formatDateISO(v);
132
132
  if (h) {
133
- const t = a.length && !a.includes(d), e = i.length && i.includes(d);
134
- (t || e || r && r > d || o && o < d) && (h = !1);
133
+ const e = a.length && !a.includes(d), t = i.length && i.includes(d);
134
+ (e || t || r && r > d || o && o < d) && (h = !1);
135
135
  }
136
- if (t.length >= 5 && !h) {
136
+ if (e.length >= 5 && !h) {
137
137
  c = !1, u = "error";
138
138
  p = !n || !f || !b ? `${s("tecton.element.calendar.hint.invalidDate")}: ${l}` : s("tecton.element.calendar.hint.notAvailableDate", [ formatDateLong(v) ]);
139
139
  } else c = !0;
@@ -152,51 +152,51 @@ function getMonths() {
152
152
  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") ];
153
153
  }
154
154
 
155
- function getValidDaysOfWeek(t = 127) {
155
+ function getValidDaysOfWeek(e = 127) {
156
156
  /* tslint:disable:no-bitwise */
157
- const e = 2 & t, a = 4 & t, i = 8 & t, r = 16 & t, n = 32 & t, s = 64 & t, o = [];
158
- return t <= 0 || (1 & t && o.push(0), e && o.push(1), a && o.push(2), i && o.push(3),
157
+ const t = 2 & e, a = 4 & e, i = 8 & e, r = 16 & e, n = 32 & e, s = 64 & e, o = [];
158
+ return e <= 0 || (1 & e && o.push(0), t && o.push(1), a && o.push(2), i && o.push(3),
159
159
  r && o.push(4), n && o.push(5), s && o.push(6)), o;
160
160
  }
161
161
 
162
- function validateAgainstChecksum(t, e) {
163
- return t.includes(e.getDay());
162
+ function validateAgainstChecksum(e, t) {
163
+ return e.includes(t.getDay());
164
164
  }
165
165
 
166
- function validateAgainstBlacklist(t, e) {
167
- return !validateAgainstWhitelist(t, e);
166
+ function validateAgainstBlacklist(e, t) {
167
+ return !validateAgainstWhitelist(e, t);
168
168
  }
169
169
 
170
- function validateAgainstWhitelist(t, e) {
171
- return t.some((t => n.isSameDay(t, e)));
170
+ function validateAgainstWhitelist(e, t) {
171
+ return e.some((e => n.isSameDay(e, t)));
172
172
  }
173
173
 
174
- function buildDates(t, e, a, i, r, s, o) {
174
+ function buildDates(e, t, a, i, r, s, o) {
175
175
  const l = [ baseValidation.bind(null, s, new Date) ];
176
- return (null == e ? void 0 : e.length) ? l.push(validateAgainstWhitelist.bind(null, e)) : l.push(validateAgainstChecksum.bind(null, t)),
177
- l.push(validateAgainstBlacklist.bind(null, a)), function({monthIndex: t, selectedYear: e}, a, i, r, s) {
178
- const o = !n.isValid(new Date(s)), l = function(t, e) {
179
- const a = n.getDaysInMonth(new Date(e, t));
180
- return [ ...Array(a).keys() ].reduce(((a, i) => (a.push(new Date(e, t, i + 1)),
176
+ return (null == t ? void 0 : t.length) ? l.push(validateAgainstWhitelist.bind(null, t)) : l.push(validateAgainstChecksum.bind(null, e)),
177
+ l.push(validateAgainstBlacklist.bind(null, a)), function({monthIndex: e, selectedYear: t}, a, i, r, s) {
178
+ const o = !n.isValid(new Date(s)), l = function(e, t) {
179
+ const a = n.getDaysInMonth(new Date(t, e));
180
+ return [ ...Array(a).keys() ].reduce(((a, i) => (a.push(new Date(t, e, i + 1)),
181
181
  a)), []);
182
- }(t, e).map(((t, e) => {
183
- const s = r.some((e => !e(t))), l = function(t, e, a) {
182
+ }(e, t).map(((e, t) => {
183
+ const s = r.some((t => !t(e))), l = function(e, t, a) {
184
184
  a || (a = new Date);
185
- const i = a && n.isSameDay(a, t), r = n.isSameDay(t, new Date), s = n.isSameDay(t, null == e ? void 0 : e.startDate), o = n.isSameDay(t, null == e ? void 0 : e.endDate);
185
+ const i = a && n.isSameDay(a, e), r = n.isSameDay(e, new Date), s = n.isSameDay(e, null == t ? void 0 : t.startDate), o = n.isSameDay(e, null == t ? void 0 : t.endDate);
186
186
  return {
187
187
  isSelected: i,
188
188
  isToday: r,
189
189
  isStartDate: s,
190
190
  isEndDate: o
191
191
  };
192
- }(t, i, a), d = function({isInvalid: t, isSelected: e, isEndDate: a, isStartDate: i, isToday: r, isIncompleteDate: n}) {
192
+ }(e, i, a), d = function({isInvalid: e, isSelected: t, isEndDate: a, isStartDate: i, isToday: r, isIncompleteDate: n}) {
193
193
  const s = [];
194
- t || s.push("is-valid");
195
- e && s.push("is-selected");
194
+ e || s.push("is-valid");
195
+ t && s.push("is-selected");
196
196
  a && s.push("is-end-date");
197
197
  i && s.push("is-start-date");
198
198
  r && s.push("is-today");
199
- e && t && !n && s.push("is-unavailable");
199
+ t && e && !n && s.push("is-unavailable");
200
200
  return s.join(" ");
201
201
  }({
202
202
  ...l,
@@ -206,25 +206,25 @@ function buildDates(t, e, a, i, r, s, o) {
206
206
  return {
207
207
  ...l,
208
208
  isValid: !s,
209
- date: t,
210
- integer: e + 1,
209
+ date: e,
210
+ integer: t + 1,
211
211
  isEmpty: !1,
212
212
  isActivity: !1,
213
213
  classList: d
214
214
  };
215
- })), d = function(t) {
216
- return addEmptyDates(0, t);
217
- }(function(t, e) {
218
- return new Date(e, t, 1, 1, 1, 1, 1).getDay();
219
- }(t, e)), c = function(t) {
220
- return 0 === t ? [] : addEmptyDates(t, 7);
215
+ })), d = function(e) {
216
+ return addEmptyDates(0, e);
217
+ }(function(e, t) {
218
+ return new Date(t, e, 1, 1, 1, 1, 1).getDay();
219
+ }(e, t)), c = function(e) {
220
+ return 0 === e ? [] : addEmptyDates(e, 7);
221
221
  }((d.length + l.length) % 7);
222
222
  return [ ...d, ...l, ...c ];
223
223
  }(i, r, s, l, o);
224
224
  }
225
225
 
226
- function baseValidation(t, e, a) {
227
- const i = n.isAfter(null == t ? void 0 : t.startDate, a), r = n.isBefore(null == t ? void 0 : t.endDate, a), s = n.isSameDay(e, a) && n.isAfter(e, null == t ? void 0 : t.cutOffTime);
226
+ function baseValidation(e, t, a) {
227
+ const i = n.isAfter(null == e ? void 0 : e.startDate, a), r = n.isBefore(null == e ? void 0 : e.endDate, a), s = n.isSameDay(t, a) && n.isAfter(t, null == e ? void 0 : e.cutOffTime);
228
228
  return !(i || s || r);
229
229
  }
230
230
 
@@ -241,15 +241,15 @@ const I = {
241
241
  classList: ""
242
242
  };
243
243
 
244
- function addEmptyDates(t, e) {
245
- return 7 === t && (t = 0), [ ...Array(e - t).keys() ].map((() => ({
244
+ function addEmptyDates(e, t) {
245
+ return 7 === e && (e = 0), [ ...Array(t - e).keys() ].map((() => ({
246
246
  ...I
247
247
  })));
248
248
  }
249
249
 
250
- const O = t(class extends e {
251
- constructor(t) {
252
- super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.change = a(this, "change", 7),
250
+ const O = e(class extends t {
251
+ constructor(e) {
252
+ super(), !1 !== e && this.__registerHost(), this.__attachShadow(), this.change = a(this, "change", 7),
253
253
  this.error = a(this, "error", 7), this.success = a(this, "success", 7), this.tctChange = a(this, "tctChange", 7),
254
254
  this.tctError = a(this, "tctError", 7), this.tctSuccess = a(this, "tctSuccess", 7),
255
255
  this.dayAbbrStrings = [ 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") ],
@@ -275,76 +275,78 @@ const O = t(class extends e {
275
275
  * when nested inside of elements with transform properties. This will be removed once the popover API is available
276
276
  * for use.
277
277
  */
278
- this.popoverMode = null, this.closeCalendar = () => {
278
+ this.popoverMode = null,
279
+ /** Show success styles when the calendar is in a valid state. The error state takes precedence when both are set. */
280
+ this.valid = !1, this.closeCalendar = () => {
279
281
  this.open && (this.open = !1, this.focusInput());
280
- }, this.goToMonthYear = (t, e) => {
281
- t < 0 ? (t = 11, e--) : t > 11 && (t = 0, e++), this.selectedMonthYear = {
282
- monthIndex: t,
283
- selectedYear: e
282
+ }, this.goToMonthYear = (e, t) => {
283
+ e < 0 ? (e = 11, t--) : e > 11 && (e = 0, t++), this.selectedMonthYear = {
284
+ monthIndex: e,
285
+ selectedYear: t
284
286
  }, this.dateList = this.buildDateList(this.selectedMonthYear), this.scheduledAfterRender.push((() => this.checkActiveCellForBlankness()));
285
- }, this.onClickElsewhere = t => {
286
- "click-elsewhere" === t.target.localName && (t.stopPropagation(), this.closeCalendar());
287
- }, this.onDateKeydown = t => {
288
- const {monthIndex: e, selectedYear: a} = this.selectedMonthYear, i = parseInt(t.target.dataset.day), r = this.generateDateFromDay(i);
289
- switch (t.key) {
287
+ }, this.onClickElsewhere = e => {
288
+ "click-elsewhere" === e.target.localName && (e.stopPropagation(), this.closeCalendar());
289
+ }, this.onDateKeydown = e => {
290
+ const {monthIndex: t, selectedYear: a} = this.selectedMonthYear, i = parseInt(e.target.dataset.day), r = this.generateDateFromDay(i);
291
+ switch (e.key) {
290
292
  case "ArrowUp":
291
- t.preventDefault(), this.activateDay(n.addDays(r, -7));
293
+ e.preventDefault(), this.activateDay(n.addDays(r, -7));
292
294
  break;
293
295
 
294
296
  case "ArrowDown":
295
- t.preventDefault(), this.activateDay(n.addDays(r, 7));
297
+ e.preventDefault(), this.activateDay(n.addDays(r, 7));
296
298
  break;
297
299
 
298
300
  case "ArrowRight":
299
- t.preventDefault(), this.activateDay(n.addDays(r, 1));
301
+ e.preventDefault(), this.activateDay(n.addDays(r, 1));
300
302
  break;
301
303
 
302
304
  case "ArrowLeft":
303
- t.preventDefault(), this.activateDay(n.addDays(r, -1));
305
+ e.preventDefault(), this.activateDay(n.addDays(r, -1));
304
306
  break;
305
307
 
306
308
  case "PageUp":
307
- t.preventDefault(), t.shiftKey ? this.goToMonthYear(e, a - 1) : this.goToMonthYear(e - 1, a);
309
+ e.preventDefault(), e.shiftKey ? this.goToMonthYear(t, a - 1) : this.goToMonthYear(t - 1, a);
308
310
  break;
309
311
 
310
312
  case "PageDown":
311
- t.preventDefault(), t.shiftKey ? this.goToMonthYear(e, a + 1) : this.goToMonthYear(e + 1, a);
313
+ e.preventDefault(), e.shiftKey ? this.goToMonthYear(t, a + 1) : this.goToMonthYear(t + 1, a);
312
314
  break;
313
315
 
314
316
  case "Home":
315
- t.preventDefault(), this.activateDay(n.addDays(r, -r.getDay()));
317
+ e.preventDefault(), this.activateDay(n.addDays(r, -r.getDay()));
316
318
  break;
317
319
 
318
320
  case "End":
319
- t.preventDefault(), this.activateDay(n.addDays(r, 6 - r.getDay()));
321
+ e.preventDefault(), this.activateDay(n.addDays(r, 6 - r.getDay()));
320
322
  break;
321
323
 
322
324
  case "Escape":
323
- t.preventDefault(), this.closeCalendar(), this.focusInput();
325
+ e.preventDefault(), this.closeCalendar(), this.focusInput();
324
326
  break;
325
327
 
326
328
  case "Enter":
327
329
  case " ":
328
- if (t.preventDefault(), !this.dateList.find((({date: t}) => n.isSameDay(t, r))).isValid) return;
330
+ if (e.preventDefault(), !this.dateList.find((({date: e}) => n.isSameDay(e, r))).isValid) return;
329
331
  this.selectDate(r), this.closeCalendar(), this.focusInput();
330
332
  }
331
- }, this.onDateSelection = t => {
332
- const e = t.target.closest("td:not([aria-hidden])");
333
- if (!e) return;
334
- const a = removeTimezoneOffset(new Date(e.dataset.date));
333
+ }, this.onDateSelection = e => {
334
+ const t = e.target.closest("td:not([aria-hidden])");
335
+ if (!t) return;
336
+ const a = removeTimezoneOffset(new Date(t.dataset.date));
335
337
  this.selectDate(a), this.closeCalendar();
336
- }, this.onHeaderControlKeydown = t => {
337
- var e;
338
- const a = this.generateDateFromDay(1), i = null === (e = this.calendarBody) || void 0 === e ? void 0 : e.querySelector('[aria-selected="true"]');
339
- "Tab" !== t.key || i || (t.preventDefault(), this.activateDay(a));
338
+ }, this.onHeaderControlKeydown = e => {
339
+ var t;
340
+ const a = this.generateDateFromDay(1), i = null === (t = this.calendarBody) || void 0 === t ? void 0 : t.querySelector('[aria-selected="true"]');
341
+ "Tab" !== e.key || i || (e.preventDefault(), this.activateDay(a));
340
342
  }, this.onInputBlur = () => {
341
343
  if (!this.isTypeable) return;
342
- const t = getValidDaysOfWeek(this.daysOfWeekChecksum), {typedValue: e} = this, {isValid: a, inputDate: i, isAvailable: r} = validateInput(this.typedValue, t, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
343
- e || "Invalid Date" !== (null == i ? void 0 : i.toString()) ? a || e && e.length > 4 && // at least mm/dd provided
344
+ const e = getValidDaysOfWeek(this.daysOfWeekChecksum), {typedValue: t} = this, {isValid: a, inputDate: i, isAvailable: r} = validateInput(this.typedValue, e, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
345
+ t || "Invalid Date" !== (null == i ? void 0 : i.toString()) ? a || t && t.length > 4 && // at least mm/dd provided
344
346
  i && n.isValid(i) && r ? this.setCompleteInput(i) : this.value && (this.valueOnBlur = this.value,
345
347
  this.value = null, p(this, [ "change", "tctChange" ], {
346
348
  value: null
347
- }), this.typedValue = e) :
349
+ }), this.typedValue = t) :
348
350
  // initial/clear state
349
351
  this.setHints({
350
352
  isValid: !0,
@@ -353,72 +355,72 @@ const O = t(class extends e {
353
355
  });
354
356
  }, this.onInputClick = () => {
355
357
  this.disabled || this.toggleCalendar();
356
- }, this.onInputFocus = t => {
357
- if (this.isTypeable && t.target === this.controlElement) {
358
+ }, this.onInputFocus = e => {
359
+ if (this.isTypeable && e.target === this.controlElement) {
358
360
  if (this.valueOnBlur && !this.value) {
359
- const t = this.typedValue;
360
- this.value = this.valueOnBlur, this.typedValue = t, this.valueOnBlur = null;
361
+ const e = this.typedValue;
362
+ this.value = this.valueOnBlur, this.typedValue = e, this.valueOnBlur = null;
361
363
  }
362
364
  this.closeCalendar();
363
365
  }
364
- }, this.onInputInput = ({detail: {value: t}}) => {
365
- this.typedValue = t;
366
- }, this.onInputKeydown = t => {
367
- const {dateValue: e} = this;
368
- if (!this.disabled) switch (t.key) {
366
+ }, this.onInputInput = ({detail: {value: e}}) => {
367
+ this.typedValue = e;
368
+ }, this.onInputKeydown = e => {
369
+ const {dateValue: t} = this;
370
+ if (!this.disabled) switch (e.key) {
369
371
  case "ArrowDown":
370
- t.preventDefault(), this.openCalendar(), this.activateDay(e || new Date);
372
+ e.preventDefault(), this.openCalendar(), this.activateDay(t || new Date);
371
373
  break;
372
374
 
373
375
  case "Enter":
374
376
  case " ":
375
377
  if (this.typeable) break;
376
- t.preventDefault(), this.open ? this.closeCalendar() : (this.openCalendar(), this.activateDay(e || new Date));
378
+ e.preventDefault(), this.open ? this.closeCalendar() : (this.openCalendar(), this.activateDay(t || new Date));
377
379
  }
378
- }, this.onInputKeyup = t => {
380
+ }, this.onInputKeyup = e => {
379
381
  if (this.disabled) return;
380
- if ("Escape" === t.key) this.onInputBlur(), this.closeCalendar();
382
+ if ("Escape" === e.key) this.onInputBlur(), this.closeCalendar();
381
383
  if (!this.isTypeable) return;
382
384
  // handle missing zero in month and date
383
- this.typedValue = function(t) {
384
- if (!t) return "";
385
- if (t.match(/^[1-9]\/$/)) return `0${t}/`;
386
- if (t.match(/^[0-9]{2}\/[1-9]{1}\/$/)) {
387
- const e = t.split("/");
388
- return `${e[0]}/0${e[1]}/`;
385
+ this.typedValue = function(e) {
386
+ if (!e) return "";
387
+ if (e.match(/^[1-9]\/$/)) return `0${e}/`;
388
+ if (e.match(/^[0-9]{2}\/[1-9]{1}\/$/)) {
389
+ const t = e.split("/");
390
+ return `${t[0]}/0${t[1]}/`;
389
391
  }
390
- return t;
392
+ return e;
391
393
  }(this.typedValue);
392
- const {typedValue: e} = this, a = getValidDaysOfWeek(this.daysOfWeekChecksum), {isValid: i, message: r, messageType: s, inputDate: o, isAvailable: l, calendarPosition: d} = validateInput(e, a, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
394
+ const {typedValue: t} = this, a = getValidDaysOfWeek(this.daysOfWeekChecksum), {isValid: i, message: r, messageType: s, inputDate: o, isAvailable: l, calendarPosition: d} = validateInput(t, a, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
393
395
  if (d) {
394
- const [t, e, a] = d, i = new Date(a, t - 1, e);
396
+ const [e, t, a] = d, i = new Date(a, e - 1, t);
395
397
  n.isValid(i) && (this.selectedMonthYear = setupMonthYear(i), this.dateList = this.buildDateList(this.selectedMonthYear),
396
398
  this.validateDate());
397
399
  }
398
- "Enter" === t.key ? (i || e && e.length > 4 && // at least mm/dd provided
400
+ "Enter" === e.key ? (i || t && t.length > 4 && // at least mm/dd provided
399
401
  o && n.isValid(o) && l ? this.setCompleteInput(o) : this.value && (this.value = null,
400
402
  p(this, [ "change", "tctChange" ], {
401
403
  value: null
402
- }), this.typedValue = e), this.keyboardSelection ? (this.keyboardSelection = !1,
404
+ }), this.typedValue = t), this.keyboardSelection ? (this.keyboardSelection = !1,
403
405
  this.closeCalendar()) : this.toggleCalendar()) : this.setHints({
404
406
  isValid: i,
405
407
  message: r,
406
408
  messageType: s
407
409
  });
408
- }, this.onPopupKeyup = t => {
409
- "Escape" !== t.key && "Esc" !== t.key || (this.onInputBlur(), this.closeCalendar());
410
+ }, this.onPopupKeyup = e => {
411
+ "Escape" !== e.key && "Esc" !== e.key || (this.onInputBlur(), this.closeCalendar());
410
412
  }, this.onRefocus = () => {
411
- var t;
412
- null === (t = this.btnPrevMonth) || void 0 === t || t.dispatchEvent(new FocusEvent("focus"));
413
+ var e;
414
+ null === (e = this.btnPrevMonth) || void 0 === e || e.dispatchEvent(new FocusEvent("focus"));
413
415
  }, this.openCalendar = () => {
414
416
  this.readonly || this.open || (this.selectedMonthYear = setupMonthYear(this.dateValue),
415
417
  this.dateList = this.buildDateList(this.selectedMonthYear), this.open = !0);
416
- }, this.selectDate = t => {
417
- const {isValid: e} = this.dateList.find((({date: e}) => n.isSameDay(e, t)));
418
- e && (p(this, [ "change", "tctChange" ], {
419
- value: formatDateISO(t)
420
- }), this.typedValue = formatDateShort(t), this.invalid = !1, p(this, [ "success", "tctSuccess" ], {
421
- value: formatDateISO(t)
418
+ }, this.selectDate = e => {
419
+ const {isValid: t} = this.dateList.find((({date: t}) => n.isSameDay(t, e)));
420
+ t && (p(this, [ "change", "tctChange" ], {
421
+ value: formatDateISO(e)
422
+ }), this.typedValue = formatDateShort(e), this.invalid = !1, p(this, [ "success", "tctSuccess" ], {
423
+ value: formatDateISO(e)
422
424
  }));
423
425
  }, this.toggleCalendar = () => {
424
426
  this.readonly || (this.open ? this.closeCalendar() : this.openCalendar());
@@ -428,9 +430,9 @@ const O = t(class extends e {
428
430
  // #region Component Lifecycle Events
429
431
  connectedCallback() {
430
432
  this.selectedMonthYear = setupMonthYear(this.dateValue), this.dateList = this.buildDateList(this.selectedMonthYear),
431
- this.value && this.isTypeable && !this.typedValue && (this.typedValue = function(t) {
432
- const e = (t || "").split("-");
433
- return 3 !== e.length ? "" : `${e[1]}/${e[2]}/${e[0]}`;
433
+ this.value && this.isTypeable && !this.typedValue && (this.typedValue = function(e) {
434
+ const t = (e || "").split("-");
435
+ return 3 !== t.length ? "" : `${t[1]}/${t[2]}/${t[0]}`;
434
436
  }(this.value)), this.validateDate();
435
437
  }
436
438
  componentWillLoad() {
@@ -441,30 +443,30 @@ const O = t(class extends e {
441
443
  }
442
444
  componentDidRender() {
443
445
  setTimeout((() => {
444
- this.scheduledAfterRender.forEach((t => t())), this.scheduledAfterRender = [];
446
+ this.scheduledAfterRender.forEach((e => e())), this.scheduledAfterRender = [];
445
447
  }), 25);
446
448
  }
447
449
  // #endregion
448
450
  // #region Listeners
449
- defaultChangeHandler(t) {
450
- t.target === this.hostElement && !this.hostElement.onchange && t.detail && null !== t.detail.value && (this.value = t.detail.value);
451
+ defaultChangeHandler(e) {
452
+ e.target === this.hostElement && !this.hostElement.onchange && e.detail && null !== e.detail.value && (this.value = e.detail.value);
451
453
  }
452
454
  handleClear() {
453
455
  p(this, [ "change", "tctChange" ], {
454
456
  value: null
455
457
  }), this.value = null, this.typedValue = "";
456
458
  }
457
- defaultErrorHandler(t) {
458
- t.target !== this.hostElement || this.hostElement.onerror || ("error" === this.hintMessageType && this.hintMessage ? this.internalError = this.hintMessage : this.internalError = s("tecton.element.calendar.hint.invalidDate"));
459
+ defaultErrorHandler(e) {
460
+ e.target !== this.hostElement || this.hostElement.onerror || ("error" === this.hintMessageType && this.hintMessage ? this.internalError = this.hintMessage : this.internalError = s("tecton.element.calendar.hint.invalidDate"));
459
461
  }
460
- delegateFocus(t) {
461
- c(t, this.hostElement) && this.controlElement.shadowRoot.querySelector(".input-field").focus();
462
+ delegateFocus(e) {
463
+ c(e, this.hostElement) && this.controlElement.shadowRoot.querySelector(".input-field").focus();
462
464
  }
463
- popoverStateHandler({detail: {open: t}}) {
464
- this.open !== t && (this.open = t);
465
+ popoverStateHandler({detail: {open: e}}) {
466
+ this.open !== e && (this.open = e);
465
467
  }
466
- defaultSuccessHandler(t) {
467
- t.target === this.hostElement && ("function" == typeof this.onsuccess ? this.onsuccess(t) : (this.internalError = "",
468
+ defaultSuccessHandler(e) {
469
+ e.target === this.hostElement && ("function" == typeof this.onsuccess ? this.onsuccess(e) : (this.internalError = "",
468
470
  "error" === this.hintMessageType && this.hintMessage && (this.hintMessage = null,
469
471
  this.hintMessageType = null, this.invalid = !1)));
470
472
  }
@@ -493,13 +495,13 @@ const O = t(class extends e {
493
495
  * will not select the date.
494
496
  *
495
497
  * @testOnly
496
- */ async setValue(t) {
497
- var e;
498
- const a = "string" == typeof t ? stringToDate(t) : t;
498
+ */ async setValue(e) {
499
+ var t;
500
+ const a = "string" == typeof e ? stringToDate(e) : e;
499
501
  if (!n.isValid(a)) return;
500
502
  await this.openPopover(), await h(), this.goToMonthYear(a.getMonth(), a.getFullYear()),
501
503
  await h();
502
- const i = null === (e = this.calendarTable) || void 0 === e ? void 0 : e.querySelector(`td[data-date="${formatDateISO(a)}"]`);
504
+ const i = null === (t = this.calendarTable) || void 0 === t ? void 0 : t.querySelector(`td[data-date="${formatDateISO(a)}"]`);
503
505
  null == i || i.click();
504
506
  }
505
507
  /**
@@ -512,10 +514,10 @@ const O = t(class extends e {
512
514
  * Only applicable when the input is typeable.
513
515
  *
514
516
  * @testOnly
515
- */ async typeValue(t) {
517
+ */ async typeValue(e) {
516
518
  if (!this.typeable) return;
517
- const e = "string" == typeof t ? stringToDate(t) : t, a = formatDateShort(e);
518
- if (!n.isValid(e)) return;
519
+ const t = "string" == typeof e ? stringToDate(e) : e, a = formatDateShort(t);
520
+ if (!n.isValid(t)) return;
519
521
  const {innerInputField: i, controlElement: r} = this;
520
522
  i.focus(), i.dispatchEvent(new FocusEvent("focus")), i.value = a, i.dispatchEvent(new InputEvent("input")),
521
523
  r.dispatchEvent(new KeyboardEvent("keyup"));
@@ -549,15 +551,15 @@ const O = t(class extends e {
549
551
  validDatesObserver() {
550
552
  this.dateList = this.buildDateList(this.selectedMonthYear), this.validateDate();
551
553
  }
552
- valueObserver(t) {
554
+ valueObserver(e) {
553
555
  // resetting by empty string
554
- if ("" === t) return this.value = void 0, void this.setHints({
556
+ if ("" === e) return this.value = void 0, void this.setHints({
555
557
  isValid: !0,
556
558
  message: this.defaultHintMessage,
557
559
  messageType: "info"
558
560
  });
559
- const e = t && "string" != typeof t && "toDate" in t ? t.toDate() : stringToDate(t), a = formatDateShort(e);
560
- this.isTypeable ? this.typedValue = a : (this.selectedMonthYear = setupMonthYear(e),
561
+ const t = e && "string" != typeof e && "toDate" in e ? e.toDate() : stringToDate(e), a = formatDateShort(t);
562
+ this.isTypeable ? this.typedValue = a : (this.selectedMonthYear = setupMonthYear(t),
561
563
  this.dateList = this.buildDateList(this.selectedMonthYear), this.validateDate(),
562
564
  this.controlElement ? this.controlElement.value = a : this.scheduledAfterRender.push((() => {
563
565
  this.controlElement && (this.controlElement.value = a);
@@ -582,61 +584,61 @@ const O = t(class extends e {
582
584
  return this.disabled && this.disabledMsg ? s(this.disabledMsg) : this.buttonLabel && (this.disabled || this.placeholder) ? s(this.buttonLabel) : this.placeholder && s(this.placeholder) || "";
583
585
  }
584
586
  get currentWeeks() {
585
- return this.dateList.reduce(((t, e, a) => {
587
+ return this.dateList.reduce(((e, t, a) => {
586
588
  const i = Math.floor(a / 7);
587
- return t[i] || (t[i] = []), t[i].push(e), t;
589
+ return e[i] || (e[i] = []), e[i].push(t), e;
588
590
  }), []);
589
591
  }
590
592
  get dateValidators() {
591
- const t = new Date(this.cutoffTime || "");
593
+ const e = new Date(this.cutoffTime || "");
592
594
  // should fallback to InvalidDate
593
595
  return {
594
596
  startDate: stringToDate(this.startDate),
595
597
  endDate: stringToDate(this.endDate),
596
- cutOffTime: n.isValid(t) ? t : void 0
598
+ cutOffTime: n.isValid(e) ? e : void 0
597
599
  };
598
600
  }
599
601
  get dateValue() {
600
602
  if (this.isTypeable) return stringToDate(this.typedValue);
601
603
  {
602
- let {value: t} = this;
603
- if (t && "string" != typeof t && "toDate" in t) return t.toDate();
604
+ let {value: e} = this;
605
+ if (e && "string" != typeof e && "toDate" in e) return e.toDate();
604
606
  // stringified moment value assigned in html template e.g.) handlebar
605
- return "string" == typeof t && 6 === t.split(" ").length && /GMT-\d{4}/g.test(t) && (t = formatDateISO(t)),
606
- stringToDate(t);
607
+ return "string" == typeof e && 6 === e.split(" ").length && /GMT-\d{4}/g.test(e) && (e = formatDateISO(e)),
608
+ stringToDate(e);
607
609
  }
608
610
  }
609
611
  get defaultHintMessage() {
610
612
  return this.typeable ? s("tecton.element.calendar.hint.format") + ": " + this.defaultFormatString : s("tecton.element.calendar.hint.select");
611
613
  }
612
614
  get errorList() {
613
- const {errors: t, internalError: e, invalid: a} = this;
615
+ const {errors: e, internalError: t, invalid: a} = this;
614
616
  let i = [];
615
- if (e && (i = [ e ]), Array.isArray(t) && t.length) i = t.filter((t => !!t)).map((t => s(t))).concat(i); else if (!e && a) return [ "tecton.element.calendar.invalid" ];
617
+ if (t && (i = [ t ]), Array.isArray(e) && e.length) i = e.filter((e => !!e)).map((e => s(e))).concat(i); else if (!t && a) return [ "tecton.element.calendar.invalid" ];
616
618
  return i;
617
619
  }
618
620
  get formattedValue() {
619
- const {typedValue: t, dateValue: e, displayFormat: a, isTypeable: i} = this;
620
- return i ? t : void 0 === e ? "" : a ? n.format(e, function(t) {
621
- return t.replace(/[d]/g, "E").replace(/[D]/g, "d").replace(/[Y]/g, "y").replace(/[l]/g, "P").replace(/[W]/g, "I");
621
+ const {typedValue: e, dateValue: t, displayFormat: a, isTypeable: i} = this;
622
+ return i ? e : void 0 === t ? "" : a ? n.format(t, function(e) {
623
+ return e.replace(/[d]/g, "E").replace(/[D]/g, "d").replace(/[Y]/g, "y").replace(/[l]/g, "P").replace(/[W]/g, "I");
622
624
  }(a)) : new Intl.DateTimeFormat("en-US", {
623
625
  year: "numeric",
624
626
  month: "2-digit",
625
627
  day: "2-digit",
626
628
  timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
627
- }).format(e);
629
+ }).format(t);
628
630
  }
629
631
  get hintList() {
630
- const {hints: t, hintMessageType: e, hintMessage: a} = this;
631
- return Array.isArray(t) && t.length ? t.filter((t => !!t)).map((t => s(t))) : "info" === e && a ? [ a ] : [];
632
+ const {hints: e, hintMessageType: t, hintMessage: a} = this;
633
+ return Array.isArray(e) && e.length ? e.filter((e => !!e)).map((e => s(e))) : "info" === t && a ? [ a ] : [];
632
634
  }
633
635
  get innerInputContainer() {
634
- var t, e;
635
- return null === (e = null === (t = this.controlElement) || void 0 === t ? void 0 : t.shadowRoot) || void 0 === e ? void 0 : e.querySelector(".input-container");
636
+ var e, t;
637
+ return null === (t = null === (e = this.controlElement) || void 0 === e ? void 0 : e.shadowRoot) || void 0 === t ? void 0 : t.querySelector(".input-container");
636
638
  }
637
639
  get innerInputField() {
638
- var t, e;
639
- return null === (e = null === (t = this.controlElement) || void 0 === t ? void 0 : t.shadowRoot) || void 0 === e ? void 0 : e.querySelector(".input-field");
640
+ var e, t;
641
+ return null === (t = null === (e = this.controlElement) || void 0 === e ? void 0 : e.shadowRoot) || void 0 === t ? void 0 : t.querySelector(".input-field");
640
642
  }
641
643
  get inputId() {
642
644
  return "calendar-guid-" + this.guid;
@@ -645,78 +647,78 @@ const O = t(class extends e {
645
647
  return this.typeable;
646
648
  }
647
649
  get selectedDate() {
648
- var t;
649
- const e = null === (t = this.calendarBody) || void 0 === t ? void 0 : t.querySelector('[aria-selected="true"]');
650
- return e ? removeTimezoneOffset(new Date(e.dataset.date)) : null;
650
+ var e;
651
+ const t = null === (e = this.calendarBody) || void 0 === e ? void 0 : e.querySelector('[aria-selected="true"]');
652
+ return t ? removeTimezoneOffset(new Date(t.dataset.date)) : null;
651
653
  }
652
654
  _togglePopover() {
653
- const t = this.typeable ? this.btnCalendarToggle : this.innerInputField;
654
- null == t || t.click(), null == t || t.focus(), t.dispatchEvent(new FocusEvent("focus"));
655
+ const e = this.typeable ? this.btnCalendarToggle : this.innerInputField;
656
+ null == e || e.click(), null == e || e.focus(), e.dispatchEvent(new FocusEvent("focus"));
655
657
  }
656
- activateDay(t) {
657
- this.goToMonthYear(t.getMonth(), t.getFullYear()), this.scheduledAfterRender.push((() => this.focusDay(t)));
658
+ activateDay(e) {
659
+ this.goToMonthYear(e.getMonth(), e.getFullYear()), this.scheduledAfterRender.push((() => this.focusDay(e)));
658
660
  }
659
- buildDateList(t) {
660
- const e = stringArrayToDate(this.invalidDates);
661
- return buildDates(getValidDaysOfWeek(this.daysOfWeekChecksum), stringArrayToDate(this.validDates), e, t, this.dateValue, this.dateValidators, this.typedValue);
661
+ buildDateList(e) {
662
+ const t = stringArrayToDate(this.invalidDates);
663
+ return buildDates(getValidDaysOfWeek(this.daysOfWeekChecksum), stringArrayToDate(this.validDates), t, e, this.dateValue, this.dateValidators, this.typedValue);
662
664
  }
663
665
  checkActiveCellForBlankness() {
664
- const t = this.hostElement.shadowRoot.activeElement;
665
- if (!t || "TD" !== t.tagName || !t.hasAttribute("aria-hidden")) return;
666
- const {calendarBody: e} = this, a = Array.from(e.querySelectorAll("td")), i = Array.from(a).indexOf(t) < 15 ? 1 : a.filter((t => !t.hasAttribute("aria-hidden"))).length;
666
+ const e = this.hostElement.shadowRoot.activeElement;
667
+ if (!e || "TD" !== e.tagName || !e.hasAttribute("aria-hidden")) return;
668
+ const {calendarBody: t} = this, a = Array.from(t.querySelectorAll("td")), i = Array.from(a).indexOf(e) < 15 ? 1 : a.filter((e => !e.hasAttribute("aria-hidden"))).length;
667
669
  this.focusDay(this.generateDateFromDay(i));
668
670
  }
669
- async focusDay(t) {
670
- var e;
671
- t && (await h(), null === (e = this.calendarBody.querySelector(`td[data-day="${t.getDate()}"]`)) || void 0 === e || e.focus());
671
+ async focusDay(e) {
672
+ var t;
673
+ e && (await h(), null === (t = this.calendarBody.querySelector(`td[data-day="${e.getDate()}"]`)) || void 0 === t || t.focus());
672
674
  }
673
675
  focusInput() {
674
- var t;
675
- null === (t = this.controlElement) || void 0 === t || t.focus();
676
+ var e;
677
+ null === (e = this.controlElement) || void 0 === e || e.focus();
676
678
  }
677
- generateDateFromDay(t) {
678
- const {monthIndex: e, selectedYear: a} = this.selectedMonthYear;
679
- return new Date(a, e, t);
679
+ generateDateFromDay(e) {
680
+ const {monthIndex: t, selectedYear: a} = this.selectedMonthYear;
681
+ return new Date(a, t, e);
680
682
  }
681
- setCompleteInput(t) {
682
- const e = formatDateShort(t);
683
+ setCompleteInput(e) {
684
+ const t = formatDateShort(e);
683
685
  p(this, [ "change", "tctChange" ], {
684
- value: formatDateISO(t)
685
- }), this.typedValue = e, this.internalError = null, this.setHints({
686
+ value: formatDateISO(e)
687
+ }), this.typedValue = t, this.internalError = null, this.setHints({
686
688
  isValid: !0,
687
689
  message: null,
688
690
  messageType: null
689
691
  });
690
692
  }
691
693
  setCustomLabel() {
692
- var t;
693
- const e = this.hostElement.querySelector('[slot="label"]');
694
- e && (null === (t = this.controlElement) || void 0 === t || t.appendChild(e.cloneNode(!0)),
695
- this.hostElement.removeChild(e));
694
+ var e;
695
+ const t = this.hostElement.querySelector('[slot="label"]');
696
+ t && (null === (e = this.controlElement) || void 0 === e || e.appendChild(t.cloneNode(!0)),
697
+ this.hostElement.removeChild(t));
696
698
  }
697
- setHints({isValid: t, message: e, messageType: a}) {
699
+ setHints({isValid: e, message: t, messageType: a}) {
698
700
  var i;
699
- if (e === this.hintMessage) return null === (i = this.hintMessageElement) || void 0 === i ? void 0 : i.present();
700
- this.invalid = !t, this.hintMessage = e, this.hintMessageType = a, "error" === a && e && (this.internalError = e,
701
+ if (t === this.hintMessage) return null === (i = this.hintMessageElement) || void 0 === i ? void 0 : i.present();
702
+ this.invalid = !e, this.hintMessage = t, this.hintMessageType = a, "error" === a && t && (this.internalError = t,
701
703
  p(this, [ "error", "tctError" ], {
702
704
  errors: [ {
703
- message: e,
705
+ message: t,
704
706
  errorCode: "generalInvalid"
705
707
  } ]
706
708
  }));
707
709
  }
708
710
  validateDate() {
709
- var t, e, a;
711
+ var e, t, a;
710
712
  try {
711
713
  if (this.value) {
712
- const {dateValue: i} = this, r = null !== (t = null == i ? void 0 : i.getMonth()) && void 0 !== t ? t : void 0, n = null !== (e = null == i ? void 0 : i.getFullYear()) && void 0 !== e ? e : void 0, {monthIndex: s, selectedYear: o} = this.selectedMonthYear;
714
+ const {dateValue: i} = this, r = null !== (e = null == i ? void 0 : i.getMonth()) && void 0 !== e ? e : void 0, n = null !== (t = null == i ? void 0 : i.getFullYear()) && void 0 !== t ? t : void 0, {monthIndex: s, selectedYear: o} = this.selectedMonthYear;
713
715
  let l = [];
714
716
  l = i ? r === s && n === o ? this.dateList : this.buildDateList({
715
717
  monthIndex: r,
716
718
  selectedYear: n
717
719
  }) : [];
718
720
  const d = null !== (a = null == i ? void 0 : i.getDate()) && void 0 !== a ? a : void 0;
719
- !d || !l.find((({integer: t}) => t === d)).isValid ? p(this, [ "error", "tctError" ], {
721
+ !d || !l.find((({integer: e}) => e === d)).isValid ? p(this, [ "error", "tctError" ], {
720
722
  errors: [ {
721
723
  message: `Value passed is invalid: The date ${this.value} is not valid`,
722
724
  errorCode: "generalInvalid"
@@ -725,7 +727,7 @@ const O = t(class extends e {
725
727
  value: formatDateISO(i)
726
728
  });
727
729
  }
728
- } catch (t) {
730
+ } catch (e) {
729
731
  console.warn("Invalid moment value ", this.dateValue);
730
732
  }
731
733
  }
@@ -735,50 +737,50 @@ const O = t(class extends e {
735
737
  return i("table", {
736
738
  role: "grid",
737
739
  "aria-labelledby": "table-label",
738
- ref: t => this.calendarTable = t
739
- }, i("thead", null, i("tr", null, [ ...[ , , , , , , , ].keys() ].map((t => i("th", {
740
+ ref: e => this.calendarTable = e
741
+ }, i("thead", null, i("tr", null, [ ...[ , , , , , , , ].keys() ].map((e => i("th", {
740
742
  scope: "col",
741
- "aria-label": this.dayStrings[t]
742
- }, this.dayAbbrStrings[t]))))), i("tbody", {
743
+ "aria-label": this.dayStrings[e]
744
+ }, this.dayAbbrStrings[e]))))), i("tbody", {
743
745
  onClick: this.onDateSelection,
744
746
  onKeyDown: this.onDateKeydown,
745
- ref: t => this.calendarBody = t,
747
+ ref: e => this.calendarBody = e,
746
748
  "test-id": "calendarTableBody"
747
- }, this.currentWeeks.map((t => i("tr", null, t.map((t => {
748
- var e;
749
+ }, this.currentWeeks.map((e => i("tr", null, e.map((e => {
750
+ var t;
749
751
  let a = "";
750
- return t.isToday && (a = s("tecton.element.calendar.today") + ", "), a += function(t) {
751
- if (!t) return;
752
- const e = new Date(t);
753
- return n.isValid(e) ? (T || (T = new Intl.DateTimeFormat("en-US", {
752
+ return e.isToday && (a = s("tecton.element.calendar.today") + ", "), a += function(e) {
753
+ if (!e) return;
754
+ const t = new Date(e);
755
+ return n.isValid(t) ? (T || (T = new Intl.DateTimeFormat("en-US", {
754
756
  month: "long",
755
757
  day: "numeric",
756
758
  year: "numeric",
757
759
  weekday: "long",
758
760
  timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
759
- })), T.format(e)) : void 0;
760
- }(t.date), t.isSelected && (a += ` (${s("tecton.element.calendar.selected")})`),
761
+ })), T.format(t)) : void 0;
762
+ }(e.date), e.isSelected && (a += ` (${s("tecton.element.calendar.selected")})`),
761
763
  i("td", {
762
- class: t.classList,
763
- "aria-hidden": t.isEmpty ? "true" : void 0,
764
- tabindex: t.isSelected ? 0 : -1,
765
- role: t.isSelected ? "gridcell" : void 0,
766
- "aria-selected": "" + t.isSelected,
767
- "aria-disabled": t.isValid ? void 0 : "true",
768
- "data-day": t.integer || void 0,
769
- "data-date": t.date ? formatDateISO(t.date) : void 0
770
- }, (null == t ? void 0 : t.isToday) && i("div", {
764
+ class: e.classList,
765
+ "aria-hidden": e.isEmpty ? "true" : void 0,
766
+ tabindex: e.isSelected ? 0 : -1,
767
+ role: e.isSelected ? "gridcell" : void 0,
768
+ "aria-selected": "" + e.isSelected,
769
+ "aria-disabled": e.isValid ? void 0 : "true",
770
+ "data-day": e.integer || void 0,
771
+ "data-date": e.date ? formatDateISO(e.date) : void 0
772
+ }, (null == e ? void 0 : e.isToday) && i("div", {
771
773
  class: "today-decorator",
772
774
  "aria-hidden": "true"
773
775
  }, s("tecton.element.calendar.today")), i("div", {
774
776
  class: "day-integer",
775
777
  "aria-label": a,
776
778
  role: "text"
777
- }, null !== (e = null == t ? void 0 : t.integer) && void 0 !== e ? e : ""));
779
+ }, null !== (t = null == e ? void 0 : e.integer) && void 0 !== t ? t : ""));
778
780
  })))))));
779
781
  }
780
782
  renderCalendarPopover() {
781
- const {monthIndex: t, selectedYear: e} = this.selectedMonthYear;
783
+ const {monthIndex: e, selectedYear: t} = this.selectedMonthYear;
782
784
  return i("div", {
783
785
  class: "calendar-field-popup",
784
786
  onKeyUp: this.onPopupKeyup
@@ -789,30 +791,30 @@ const O = t(class extends e {
789
791
  }, i("q2-btn", {
790
792
  label: s("tecton.element.calendar.previousMonth"),
791
793
  "hide-label": !0,
792
- ref: t => this.btnPrevMonth = t,
794
+ ref: e => this.btnPrevMonth = e,
793
795
  class: "cal-nav-btn prev-month",
794
796
  "test-id": "previousMonthButton",
795
- onTctClick: () => this.goToMonthYear(t - 1, e)
797
+ onTctClick: () => this.goToMonthYear(e - 1, t)
796
798
  }, i("q2-icon", {
797
799
  type: "chevron-left"
798
800
  })), i("span", {
799
801
  class: "cal-month-text"
800
- }, this.monthStrings[t]), i("q2-btn", {
802
+ }, this.monthStrings[e]), i("q2-btn", {
801
803
  label: s("tecton.element.calendar.nextMonth"),
802
804
  "hide-label": !0,
803
805
  class: "cal-nav-btn next-month",
804
- ref: t => this.btnNextMonth = t,
806
+ ref: e => this.btnNextMonth = e,
805
807
  "test-id": "nextMonthButton",
806
- onTctClick: () => this.goToMonthYear(t + 1, e)
808
+ onTctClick: () => this.goToMonthYear(e + 1, t)
807
809
  }, i("q2-icon", {
808
810
  type: "chevron-right"
809
811
  })), i("q2-btn", {
810
812
  label: s("tecton.element.calendar.previousYear"),
811
813
  "hide-label": !0,
812
814
  class: "cal-nav-btn prev-year",
813
- ref: t => this.btnPrevYear = t,
815
+ ref: e => this.btnPrevYear = e,
814
816
  "test-id": "previousYearButton",
815
- onTctClick: () => this.goToMonthYear(t, e - 1)
817
+ onTctClick: () => this.goToMonthYear(e, t - 1)
816
818
  }, i("q2-icon", {
817
819
  type: "chevron-left"
818
820
  })), i("span", {
@@ -821,9 +823,9 @@ const O = t(class extends e {
821
823
  label: s("tecton.element.calendar.nextYear"),
822
824
  "hide-label": !0,
823
825
  class: "cal-nav-btn next-year",
824
- ref: t => this.btnNextYear = t,
826
+ ref: e => this.btnNextYear = e,
825
827
  "test-id": "nextYearButton",
826
- onTctClick: () => this.goToMonthYear(t, e + 1),
828
+ onTctClick: () => this.goToMonthYear(e, t + 1),
827
829
  onKeyDown: this.onHeaderControlKeydown
828
830
  }, i("q2-icon", {
829
831
  type: "chevron-right"
@@ -831,7 +833,7 @@ const O = t(class extends e {
831
833
  class: "sr",
832
834
  "aria-live": "polite",
833
835
  id: "table-label"
834
- }, `${this.monthStrings[t]} ${e}`), this.renderCalendarDays(), this.disclaimer && i("div", {
836
+ }, `${this.monthStrings[e]} ${t}`), this.renderCalendarDays(), this.disclaimer && i("div", {
835
837
  class: "calendar-disclaimer"
836
838
  }, s(this.disclaimer)), i("div", {
837
839
  tabindex: "0",
@@ -842,14 +844,14 @@ const O = t(class extends e {
842
844
  renderHintField() {
843
845
  if (this.hintMessage) return i("q2-message", {
844
846
  class: "calendar-hint sr",
845
- ref: t => this.hintMessageElement = t,
847
+ ref: e => this.hintMessageElement = e,
846
848
  type: this.hintMessageType
847
849
  }, this.hintMessage);
848
850
  }
849
851
  renderInputField() {
850
- const {isTypeable: t} = this;
852
+ const {isTypeable: e} = this;
851
853
  return i("q2-input", {
852
- ref: t => this.controlElement = t,
854
+ ref: e => this.controlElement = e,
853
855
  class: "calendar-input-field",
854
856
  value: this.formattedValue,
855
857
  label: s(this.label),
@@ -859,28 +861,29 @@ const O = t(class extends e {
859
861
  clearable: this.canClear,
860
862
  placeholder: this.computedPlaceholder,
861
863
  optional: !!this.optional,
864
+ valid: this.valid,
862
865
  "aria-expanded": "" + !!this.open,
863
866
  "aria-controls": "calendar-popover",
864
867
  hints: this.hintList,
865
868
  errors: this.errorList,
866
- onClick: t ? void 0 : this.onInputClick,
867
- onChange: t => t.stopImmediatePropagation(),
868
- onTctChange: t => t.stopImmediatePropagation(),
869
- onInput: t => t.stopImmediatePropagation(),
869
+ onClick: e ? void 0 : this.onInputClick,
870
+ onChange: e => e.stopImmediatePropagation(),
871
+ onTctChange: e => e.stopImmediatePropagation(),
872
+ onInput: e => e.stopImmediatePropagation(),
870
873
  onTctInput: this.onInputInput,
871
874
  onKeyDown: this.onInputKeydown,
872
875
  onKeyUp: this.onInputKeyup,
873
876
  onBlur: this.onInputBlur,
874
877
  onFocus: this.onInputFocus,
875
- "icon-right": t ? void 0 : "calendar",
876
- "format-modifier": t ? this.formatModifier : this.displayFormat || this.formatModifier,
878
+ "icon-right": e ? void 0 : "calendar",
879
+ "format-modifier": e ? this.formatModifier : this.displayFormat || this.formatModifier,
877
880
  type: "date",
878
- "hide-messages": !t,
881
+ "hide-messages": !e,
879
882
  "test-id": "inputAndCalendarToggle",
880
883
  _role: "combobox",
881
- _preventEntry: !t
882
- }, t && i("q2-btn", {
883
- ref: t => this.btnCalendarToggle = t,
884
+ _preventEntry: !e
885
+ }, e && i("q2-btn", {
886
+ ref: e => this.btnCalendarToggle = e,
884
887
  slot: "input-right",
885
888
  onClick: this.onInputClick,
886
889
  "test-id": "calendarToggle",
@@ -892,12 +895,12 @@ const O = t(class extends e {
892
895
  }
893
896
  render() {
894
897
  return i("click-elsewhere", {
895
- key: "55a24cc7138b3477aced736ad4a8ad9cae84e3cc",
898
+ key: "b13259be3c0d64bff32654faf0c738a7a7450c4e",
896
899
  class: this.open ? "dropdown-open" : void 0,
897
900
  onChange: this.onClickElsewhere
898
901
  }, this.renderInputField(), i("q2-popover", {
899
- key: "15637835c0cc04486398dc86dd589f492f487488",
900
- ref: t => this.popoverElement = t,
902
+ key: "2e183cd962e7abc4186b93da7edd835e0db5504a",
903
+ ref: e => this.popoverElement = e,
901
904
  id: "calendar-popover",
902
905
  controlElement: this.innerInputContainer,
903
906
  open: this.open,
@@ -979,6 +982,7 @@ const O = t(class extends e {
979
982
  readonly: [ 516 ],
980
983
  startDate: [ 513, "start-date" ],
981
984
  typeable: [ 516 ],
985
+ valid: [ 516 ],
982
986
  validDates: [ 16 ],
983
987
  value: [ 1537 ],
984
988
  dateList: [ 32 ],
@@ -1025,42 +1029,42 @@ const O = t(class extends e {
1025
1029
 
1026
1030
  const C = O, defineCustomElement = function() {
1027
1031
  if ("undefined" == typeof customElements) return;
1028
- [ "q2-calendar", "click-elsewhere", "q2-badge", "q2-btn", "q2-icon", "q2-input", "q2-loading", "q2-message", "q2-popover" ].forEach((t => {
1029
- switch (t) {
1032
+ [ "q2-calendar", "click-elsewhere", "q2-badge", "q2-btn", "q2-icon", "q2-input", "q2-loading", "q2-message", "q2-popover" ].forEach((e => {
1033
+ switch (e) {
1030
1034
  case "q2-calendar":
1031
- customElements.get(r(t)) || customElements.define(r(t), O);
1035
+ customElements.get(r(e)) || customElements.define(r(e), O);
1032
1036
  break;
1033
1037
 
1034
1038
  case "click-elsewhere":
1035
- customElements.get(r(t)) || v();
1039
+ customElements.get(r(e)) || v();
1036
1040
  break;
1037
1041
 
1038
1042
  case "q2-badge":
1039
- customElements.get(r(t)) || m();
1043
+ customElements.get(r(e)) || m();
1040
1044
  break;
1041
1045
 
1042
1046
  case "q2-btn":
1043
- customElements.get(r(t)) || f();
1047
+ customElements.get(r(e)) || f();
1044
1048
  break;
1045
1049
 
1046
1050
  case "q2-icon":
1047
- customElements.get(r(t)) || b();
1051
+ customElements.get(r(e)) || b();
1048
1052
  break;
1049
1053
 
1050
1054
  case "q2-input":
1051
- customElements.get(r(t)) || g();
1055
+ customElements.get(r(e)) || g();
1052
1056
  break;
1053
1057
 
1054
1058
  case "q2-loading":
1055
- customElements.get(r(t)) || y();
1059
+ customElements.get(r(e)) || y();
1056
1060
  break;
1057
1061
 
1058
1062
  case "q2-message":
1059
- customElements.get(r(t)) || D();
1063
+ customElements.get(r(e)) || D();
1060
1064
  break;
1061
1065
 
1062
1066
  case "q2-popover":
1063
- customElements.get(r(t)) || w();
1067
+ customElements.get(r(e)) || w();
1064
1068
  }
1065
1069
  }));
1066
1070
  };