@ukic/canary-web-components 3.0.0-canary.26 → 3.0.0-canary.28

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 (458) hide show
  1. package/dist/cjs/common-helpers-944cb54d.js +21 -0
  2. package/dist/cjs/common-helpers-944cb54d.js.map +1 -0
  3. package/dist/cjs/core.cjs.js +1 -1
  4. package/dist/cjs/{helpers-b55826ba.js → helpers-046745ee.js} +3 -1
  5. package/dist/cjs/helpers-046745ee.js.map +1 -0
  6. package/dist/cjs/helpers-da852478.js.map +1 -1
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-action-chip.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-alert.cjs.entry.js +4 -4
  11. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-badge.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  15. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-checkbox-group.cjs.entry.js +12 -5
  19. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-checkbox_3.cjs.entry.js +35 -23
  21. package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-chip.cjs.entry.js +6 -5
  23. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-data-table.cjs.entry.js +13 -13
  26. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-date-input.cjs.entry.js +9 -5
  28. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-date-picker.cjs.entry.js +15 -10
  30. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-dialog.cjs.entry.js +36 -11
  32. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +7 -6
  40. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-menu.cjs.entry.js +29 -10
  45. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -2
  49. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-page-header.cjs.entry.js +2 -2
  52. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-pagination_4.cjs.entry.js +23 -16
  54. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-radio-group.cjs.entry.js +14 -7
  57. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-radio-option.cjs.entry.js +2 -2
  59. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
  63. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-step.cjs.entry.js +67 -54
  65. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-stepper.cjs.entry.js +21 -3
  67. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  72. package/dist/cjs/ic-time-input.cjs.entry.js +13 -9
  73. package/dist/cjs/ic-time-input.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  75. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +1 -1
  76. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  77. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  78. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-tree-view.cjs.entry.js +6 -4
  80. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  82. package/dist/cjs/loader.cjs.js +1 -1
  83. package/dist/cjs/purify-039f565a.js +1365 -0
  84. package/dist/cjs/purify-039f565a.js.map +1 -0
  85. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
  86. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js.map +1 -1
  87. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -1
  88. package/dist/collection/components/ic-data-table/ic-data-table.js +12 -13
  89. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  90. package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -1
  91. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  92. package/dist/collection/components/ic-data-table/story-data.js +52 -21
  93. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  94. package/dist/collection/components/ic-data-table/test/a11y/ic-data-table.test.a11y.js.map +1 -1
  95. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -1
  96. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js.map +1 -1
  97. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -1
  98. package/dist/collection/components/ic-date-input/ic-date-input.css +6 -0
  99. package/dist/collection/components/ic-date-input/ic-date-input.js +34 -4
  100. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  101. package/dist/collection/components/ic-date-input/ic-date-input.stories.js +81 -0
  102. package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -1
  103. package/dist/collection/components/ic-date-input/story-data.js.map +1 -1
  104. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -1
  105. package/dist/collection/components/ic-date-picker/ic-date-picker.js +41 -10
  106. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  107. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -1
  108. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -1
  109. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -1
  110. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -1
  111. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
  112. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +1 -1
  113. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +43 -25
  114. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  115. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +1 -1
  116. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js.map +1 -1
  117. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -1
  118. package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js.map +1 -1
  119. package/dist/collection/components/ic-table-of-contents/ic-table-of-contents-item.js.map +1 -1
  120. package/dist/collection/components/ic-table-of-contents/ic-table-of-contents.js.map +1 -1
  121. package/dist/collection/components/ic-table-of-contents/ic-table-of-contents.stories.js.map +1 -1
  122. package/dist/collection/components/ic-table-of-contents/test/a11y/ic-table-of-contents.test.a11y.js.map +1 -1
  123. package/dist/collection/components/ic-time-input/ic-time-input.css +1 -1
  124. package/dist/collection/components/ic-time-input/ic-time-input.js +38 -8
  125. package/dist/collection/components/ic-time-input/ic-time-input.js.map +1 -1
  126. package/dist/collection/components/ic-time-input/ic-time-input.stories.js +82 -1
  127. package/dist/collection/components/ic-time-input/ic-time-input.stories.js.map +1 -1
  128. package/dist/collection/components/ic-time-input/test/helpers/ic-time-input.js.map +1 -1
  129. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  130. package/dist/collection/components/ic-tree-view/ic-tree-view.js +5 -4
  131. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  132. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -1
  133. package/dist/collection/components/ic-tree-view/ic-tree-view.types.js.map +1 -1
  134. package/dist/collection/index.js.map +1 -1
  135. package/dist/collection/utils/constants.js.map +1 -1
  136. package/dist/collection/utils/date-helpers.js.map +1 -1
  137. package/dist/collection/utils/helpers.js.map +1 -1
  138. package/dist/collection/utils/testa11y.helpers.js.map +1 -1
  139. package/dist/collection/utils/types.js.map +1 -1
  140. package/dist/components/common-helpers.js +19 -0
  141. package/dist/components/common-helpers.js.map +1 -0
  142. package/dist/components/helpers.js +2 -1
  143. package/dist/components/helpers.js.map +1 -1
  144. package/dist/components/helpers2.js.map +1 -1
  145. package/dist/components/ic-alert.js +3 -3
  146. package/dist/components/ic-alert.js.map +1 -1
  147. package/dist/components/ic-checkbox-group.js +12 -4
  148. package/dist/components/ic-checkbox-group.js.map +1 -1
  149. package/dist/components/ic-chip.js +5 -4
  150. package/dist/components/ic-chip.js.map +1 -1
  151. package/dist/components/ic-data-table.js +12 -13
  152. package/dist/components/ic-data-table.js.map +1 -1
  153. package/dist/components/ic-date-input2.js +10 -5
  154. package/dist/components/ic-date-input2.js.map +1 -1
  155. package/dist/components/ic-date-picker.js +16 -10
  156. package/dist/components/ic-date-picker.js.map +1 -1
  157. package/dist/components/ic-dialog.js +35 -10
  158. package/dist/components/ic-dialog.js.map +1 -1
  159. package/dist/components/ic-footer.js +1 -1
  160. package/dist/components/ic-horizontal-scroll2.js +1 -1
  161. package/dist/components/ic-input-validation2.js +6 -5
  162. package/dist/components/ic-input-validation2.js.map +1 -1
  163. package/dist/components/ic-menu2.js +29 -10
  164. package/dist/components/ic-menu2.js.map +1 -1
  165. package/dist/components/ic-navigation-button.js +1 -1
  166. package/dist/components/ic-navigation-group.js +1 -1
  167. package/dist/components/ic-navigation-item.js +2 -2
  168. package/dist/components/ic-navigation-item.js.map +1 -1
  169. package/dist/components/ic-navigation-menu2.js +1 -1
  170. package/dist/components/ic-page-header.js +1 -1
  171. package/dist/components/ic-page-header.js.map +1 -1
  172. package/dist/components/ic-pagination-bar2.js +34 -22
  173. package/dist/components/ic-pagination-bar2.js.map +1 -1
  174. package/dist/components/ic-pagination-item2.js +1 -1
  175. package/dist/components/ic-radio-group.js +14 -6
  176. package/dist/components/ic-radio-group.js.map +1 -1
  177. package/dist/components/ic-radio-option.js +1 -1
  178. package/dist/components/ic-radio-option.js.map +1 -1
  179. package/dist/components/ic-search-bar.js +1 -1
  180. package/dist/components/ic-select2.js +17 -9
  181. package/dist/components/ic-select2.js.map +1 -1
  182. package/dist/components/ic-side-navigation.js +1 -1
  183. package/dist/components/ic-status-tag.js +1 -1
  184. package/dist/components/ic-status-tag.js.map +1 -1
  185. package/dist/components/ic-step.js +67 -53
  186. package/dist/components/ic-step.js.map +1 -1
  187. package/dist/components/ic-stepper.js +21 -2
  188. package/dist/components/ic-stepper.js.map +1 -1
  189. package/dist/components/ic-text-field2.js +9 -9
  190. package/dist/components/ic-text-field2.js.map +1 -1
  191. package/dist/components/ic-theme.js +1 -1
  192. package/dist/components/ic-time-input.js +14 -9
  193. package/dist/components/ic-time-input.js.map +1 -1
  194. package/dist/components/ic-toast.js +1 -1
  195. package/dist/components/ic-toggle-button.js +1 -1
  196. package/dist/components/ic-top-navigation.js +2 -2
  197. package/dist/components/ic-top-navigation.js.map +1 -1
  198. package/dist/components/ic-tree-view.js +5 -4
  199. package/dist/components/ic-tree-view.js.map +1 -1
  200. package/dist/components/purify.js +1363 -0
  201. package/dist/components/purify.js.map +1 -0
  202. package/dist/core/core.css +6 -6
  203. package/dist/core/core.esm.js +1 -1
  204. package/dist/core/core.esm.js.map +1 -1
  205. package/dist/core/{p-20f248be.entry.js → p-05e0cadf.entry.js} +2 -2
  206. package/dist/core/{p-b8cb867c.entry.js → p-07365d6f.entry.js} +2 -2
  207. package/dist/core/{p-a7bc9a19.entry.js → p-0b0cc10d.entry.js} +2 -2
  208. package/dist/core/p-0f22f41e.js.map +1 -1
  209. package/dist/core/p-1131db25.entry.js +2 -0
  210. package/dist/core/p-1131db25.entry.js.map +1 -0
  211. package/dist/core/{p-9f5a1473.entry.js → p-154bb0fb.entry.js} +2 -2
  212. package/dist/core/p-154bb0fb.entry.js.map +1 -0
  213. package/dist/core/{p-3414247d.entry.js → p-18b793e0.entry.js} +2 -2
  214. package/dist/core/p-1d89fcda.entry.js +2 -0
  215. package/dist/core/p-1d89fcda.entry.js.map +1 -0
  216. package/dist/core/{p-fc125ca6.entry.js → p-266d5e13.entry.js} +2 -2
  217. package/dist/core/p-2bba11f8.entry.js +2 -0
  218. package/dist/core/{p-c08ea34d.entry.js.map → p-2bba11f8.entry.js.map} +1 -1
  219. package/dist/core/{p-570ff466.entry.js → p-2f0ab1d0.entry.js} +2 -2
  220. package/dist/core/p-349d91dc.js +3 -0
  221. package/dist/core/p-349d91dc.js.map +1 -0
  222. package/dist/core/p-479e5fa2.entry.js +2 -0
  223. package/dist/core/p-479e5fa2.entry.js.map +1 -0
  224. package/dist/core/p-4c5af5f7.entry.js +2 -0
  225. package/dist/core/p-4c5af5f7.entry.js.map +1 -0
  226. package/dist/core/p-542ac498.js +2 -0
  227. package/dist/core/p-542ac498.js.map +1 -0
  228. package/dist/core/{p-4fa1a80f.entry.js → p-54da2d5f.entry.js} +2 -2
  229. package/dist/core/{p-6a884eef.entry.js → p-553531bf.entry.js} +2 -2
  230. package/dist/core/p-5bc54721.entry.js +2 -0
  231. package/dist/core/p-5bc54721.entry.js.map +1 -0
  232. package/dist/core/p-62ad6ce5.entry.js +2 -0
  233. package/dist/core/p-62ad6ce5.entry.js.map +1 -0
  234. package/dist/core/{p-8bb49790.entry.js → p-656b92d7.entry.js} +2 -2
  235. package/dist/core/{p-b12c4643.entry.js → p-66f45822.entry.js} +2 -2
  236. package/dist/core/p-66f45822.entry.js.map +1 -0
  237. package/dist/core/{p-a0c361ec.entry.js → p-6addd986.entry.js} +2 -2
  238. package/dist/core/{p-c7a97221.entry.js → p-6d4418e4.entry.js} +2 -2
  239. package/dist/core/{p-9c491db1.entry.js → p-6e5fc63c.entry.js} +2 -2
  240. package/dist/core/{p-d6a1b39c.entry.js → p-70447473.entry.js} +2 -2
  241. package/dist/core/p-74439163.entry.js +2 -0
  242. package/dist/core/p-74439163.entry.js.map +1 -0
  243. package/dist/core/p-760a57e7.entry.js +2 -0
  244. package/dist/core/p-760a57e7.entry.js.map +1 -0
  245. package/dist/core/p-76ab72ef.entry.js +2 -0
  246. package/dist/core/p-76ab72ef.entry.js.map +1 -0
  247. package/dist/core/{p-17423822.entry.js → p-77c4d1d2.entry.js} +2 -2
  248. package/dist/core/{p-4479c7e7.entry.js → p-796b9ac5.entry.js} +2 -2
  249. package/dist/core/{p-09c0961a.entry.js → p-7986db4a.entry.js} +2 -2
  250. package/dist/core/p-8b0abe0f.entry.js +2 -0
  251. package/dist/core/p-8b0abe0f.entry.js.map +1 -0
  252. package/dist/core/{p-f4b08cdb.entry.js → p-8b4a7a78.entry.js} +2 -2
  253. package/dist/core/p-8b8df1da.entry.js +2 -0
  254. package/dist/core/p-8b8df1da.entry.js.map +1 -0
  255. package/dist/core/{p-b95d99c7.entry.js → p-8c841dc8.entry.js} +2 -2
  256. package/dist/core/{p-55934942.entry.js → p-94e5ed81.entry.js} +2 -2
  257. package/dist/core/{p-b5dd226f.entry.js → p-9af5008c.entry.js} +2 -2
  258. package/dist/core/{p-7821c7dc.entry.js → p-9b68bee6.entry.js} +2 -2
  259. package/dist/core/p-9fa329f2.entry.js +2 -0
  260. package/dist/core/p-9fa329f2.entry.js.map +1 -0
  261. package/dist/core/{p-98286c35.entry.js → p-a4184f39.entry.js} +2 -2
  262. package/dist/core/p-a4184f39.entry.js.map +1 -0
  263. package/dist/core/p-a422b778.js +2 -0
  264. package/dist/core/p-a422b778.js.map +1 -0
  265. package/dist/core/{p-30a2abe9.entry.js → p-a7a572d9.entry.js} +2 -2
  266. package/dist/core/{p-3bb4ea35.entry.js → p-a86756fa.entry.js} +2 -2
  267. package/dist/core/p-b7a726fb.entry.js +2 -0
  268. package/dist/core/p-b7a726fb.entry.js.map +1 -0
  269. package/dist/core/{p-d3eb3356.entry.js → p-ba26a1f0.entry.js} +2 -2
  270. package/dist/core/{p-d3b9c04b.entry.js → p-bad17ba7.entry.js} +2 -2
  271. package/dist/core/p-bc58e37e.entry.js +2 -0
  272. package/dist/core/p-bc58e37e.entry.js.map +1 -0
  273. package/dist/core/{p-9ad64b6f.entry.js → p-bf08d34c.entry.js} +2 -2
  274. package/dist/core/{p-b2c49dfd.entry.js → p-bf5558ac.entry.js} +2 -2
  275. package/dist/core/{p-d143aa70.entry.js → p-c1ae14ad.entry.js} +2 -2
  276. package/dist/core/{p-a8d934fe.entry.js → p-c5d03c65.entry.js} +2 -2
  277. package/dist/core/{p-a8d934fe.entry.js.map → p-c5d03c65.entry.js.map} +1 -1
  278. package/dist/core/p-d4a1e90d.entry.js +2 -0
  279. package/dist/core/p-d4a1e90d.entry.js.map +1 -0
  280. package/dist/core/{p-92f199b0.entry.js → p-d77981a5.entry.js} +2 -2
  281. package/dist/core/{p-f5cc4e94.entry.js → p-e8cea1d5.entry.js} +2 -2
  282. package/dist/core/{p-5534bb37.entry.js → p-f591abc2.entry.js} +2 -2
  283. package/dist/core/p-f6209622.entry.js +2 -0
  284. package/dist/core/p-f6209622.entry.js.map +1 -0
  285. package/dist/core/{p-e435052b.entry.js → p-fba9f5b6.entry.js} +2 -2
  286. package/dist/core/{p-0fffe635.entry.js → p-ff4a873e.entry.js} +2 -2
  287. package/dist/esm/common-helpers-86c07ff1.js +19 -0
  288. package/dist/esm/common-helpers-86c07ff1.js.map +1 -0
  289. package/dist/esm/core.js +1 -1
  290. package/dist/esm/{helpers-fee7d348.js → helpers-1dbd527e.js} +3 -2
  291. package/dist/esm/helpers-1dbd527e.js.map +1 -0
  292. package/dist/esm/helpers-89cb996d.js.map +1 -1
  293. package/dist/esm/ic-accordion-group.entry.js +1 -1
  294. package/dist/esm/ic-accordion.entry.js +1 -1
  295. package/dist/esm/ic-action-chip.entry.js +1 -1
  296. package/dist/esm/ic-alert.entry.js +4 -4
  297. package/dist/esm/ic-alert.entry.js.map +1 -1
  298. package/dist/esm/ic-back-to-top.entry.js +1 -1
  299. package/dist/esm/ic-badge.entry.js +1 -1
  300. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  301. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  302. package/dist/esm/ic-button_3.entry.js +1 -1
  303. package/dist/esm/ic-card-vertical.entry.js +1 -1
  304. package/dist/esm/ic-checkbox-group.entry.js +12 -5
  305. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  306. package/dist/esm/ic-checkbox_3.entry.js +35 -23
  307. package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
  308. package/dist/esm/ic-chip.entry.js +6 -5
  309. package/dist/esm/ic-chip.entry.js.map +1 -1
  310. package/dist/esm/ic-data-row.entry.js +1 -1
  311. package/dist/esm/ic-data-table.entry.js +13 -13
  312. package/dist/esm/ic-data-table.entry.js.map +1 -1
  313. package/dist/esm/ic-date-input.entry.js +9 -5
  314. package/dist/esm/ic-date-input.entry.js.map +1 -1
  315. package/dist/esm/ic-date-picker.entry.js +15 -10
  316. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  317. package/dist/esm/ic-dialog.entry.js +36 -11
  318. package/dist/esm/ic-dialog.entry.js.map +1 -1
  319. package/dist/esm/ic-divider.entry.js +1 -1
  320. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  321. package/dist/esm/ic-footer-link.entry.js +1 -1
  322. package/dist/esm/ic-footer.entry.js +1 -1
  323. package/dist/esm/ic-hero.entry.js +1 -1
  324. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  325. package/dist/esm/ic-input-component-container_4.entry.js +7 -6
  326. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
  327. package/dist/esm/ic-link.entry.js +1 -1
  328. package/dist/esm/ic-menu-group.entry.js +1 -1
  329. package/dist/esm/ic-menu-item.entry.js +1 -1
  330. package/dist/esm/ic-menu.entry.js +29 -10
  331. package/dist/esm/ic-menu.entry.js.map +1 -1
  332. package/dist/esm/ic-navigation-button.entry.js +1 -1
  333. package/dist/esm/ic-navigation-group.entry.js +1 -1
  334. package/dist/esm/ic-navigation-item.entry.js +2 -2
  335. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  336. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  337. package/dist/esm/ic-page-header.entry.js +2 -2
  338. package/dist/esm/ic-page-header.entry.js.map +1 -1
  339. package/dist/esm/ic-pagination_4.entry.js +23 -16
  340. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  341. package/dist/esm/ic-popover-menu.entry.js +1 -1
  342. package/dist/esm/ic-radio-group.entry.js +14 -7
  343. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  344. package/dist/esm/ic-radio-option.entry.js +2 -2
  345. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  346. package/dist/esm/ic-search-bar.entry.js +1 -1
  347. package/dist/esm/ic-side-navigation.entry.js +1 -1
  348. package/dist/esm/ic-status-tag.entry.js +2 -2
  349. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  350. package/dist/esm/ic-step.entry.js +67 -54
  351. package/dist/esm/ic-step.entry.js.map +1 -1
  352. package/dist/esm/ic-stepper.entry.js +21 -3
  353. package/dist/esm/ic-stepper.entry.js.map +1 -1
  354. package/dist/esm/ic-switch.entry.js +1 -1
  355. package/dist/esm/ic-tab-group.entry.js +1 -1
  356. package/dist/esm/ic-tab.entry.js +1 -1
  357. package/dist/esm/ic-theme.entry.js +1 -1
  358. package/dist/esm/ic-time-input.entry.js +13 -9
  359. package/dist/esm/ic-time-input.entry.js.map +1 -1
  360. package/dist/esm/ic-toast.entry.js +1 -1
  361. package/dist/esm/ic-toggle-button-group.entry.js +1 -1
  362. package/dist/esm/ic-toggle-button.entry.js +1 -1
  363. package/dist/esm/ic-top-navigation.entry.js +2 -2
  364. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  365. package/dist/esm/ic-tree-view.entry.js +6 -4
  366. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  367. package/dist/esm/ic-typography.entry.js +1 -1
  368. package/dist/esm/loader.js +1 -1
  369. package/dist/esm/purify-6eaa9893.js +1363 -0
  370. package/dist/esm/purify-6eaa9893.js.map +1 -0
  371. package/dist/types/components/ic-data-table/story-data.d.ts +0 -9
  372. package/dist/types/components/ic-date-input/ic-date-input.d.ts +5 -1
  373. package/dist/types/components/ic-date-input/ic-date-input.stories.d.ts +15 -9
  374. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +5 -1
  375. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +3 -4
  376. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
  377. package/dist/types/components/ic-time-input/ic-time-input.d.ts +5 -1
  378. package/dist/types/components/ic-time-input/ic-time-input.stories.d.ts +14 -8
  379. package/dist/types/components.d.ts +30 -6
  380. package/dist/types/home/runner/work/ic-ui-kit/ic-ui-kit/packages/canary-web-components/.stencil/web-components/src/utils/common-helpers.d.ts +2 -0
  381. package/dist/types/home/runner/work/ic-ui-kit/ic-ui-kit/packages/canary-web-components/.stencil/web-components/src/utils/constants.d.ts +44 -0
  382. package/dist/types/utils/types.d.ts +6 -2
  383. package/hydrate/index.js +1683 -180
  384. package/hydrate/index.mjs +1683 -180
  385. package/package.json +3 -3
  386. package/dist/cjs/helpers-b55826ba.js.map +0 -1
  387. package/dist/core/p-25d21dbd.entry.js +0 -2
  388. package/dist/core/p-25d21dbd.entry.js.map +0 -1
  389. package/dist/core/p-318c6a4c.entry.js +0 -2
  390. package/dist/core/p-318c6a4c.entry.js.map +0 -1
  391. package/dist/core/p-3bee8f39.entry.js +0 -2
  392. package/dist/core/p-3bee8f39.entry.js.map +0 -1
  393. package/dist/core/p-4eb74281.entry.js +0 -2
  394. package/dist/core/p-4eb74281.entry.js.map +0 -1
  395. package/dist/core/p-514c4401.entry.js +0 -2
  396. package/dist/core/p-514c4401.entry.js.map +0 -1
  397. package/dist/core/p-587d704d.entry.js +0 -2
  398. package/dist/core/p-587d704d.entry.js.map +0 -1
  399. package/dist/core/p-816aae93.entry.js +0 -2
  400. package/dist/core/p-816aae93.entry.js.map +0 -1
  401. package/dist/core/p-9810080e.entry.js +0 -2
  402. package/dist/core/p-9810080e.entry.js.map +0 -1
  403. package/dist/core/p-98286c35.entry.js.map +0 -1
  404. package/dist/core/p-9c8070a1.entry.js +0 -2
  405. package/dist/core/p-9c8070a1.entry.js.map +0 -1
  406. package/dist/core/p-9f5a1473.entry.js.map +0 -1
  407. package/dist/core/p-aaa6d8e1.entry.js +0 -2
  408. package/dist/core/p-aaa6d8e1.entry.js.map +0 -1
  409. package/dist/core/p-b0462734.entry.js +0 -2
  410. package/dist/core/p-b0462734.entry.js.map +0 -1
  411. package/dist/core/p-b12c4643.entry.js.map +0 -1
  412. package/dist/core/p-c039a175.entry.js +0 -2
  413. package/dist/core/p-c039a175.entry.js.map +0 -1
  414. package/dist/core/p-c08ea34d.entry.js +0 -2
  415. package/dist/core/p-c95be271.entry.js +0 -2
  416. package/dist/core/p-c95be271.entry.js.map +0 -1
  417. package/dist/core/p-cd3f12ad.entry.js +0 -2
  418. package/dist/core/p-cd3f12ad.entry.js.map +0 -1
  419. package/dist/core/p-d7c44cce.entry.js +0 -2
  420. package/dist/core/p-d7c44cce.entry.js.map +0 -1
  421. package/dist/core/p-ee95905f.js +0 -2
  422. package/dist/core/p-ee95905f.js.map +0 -1
  423. package/dist/core/p-f6772530.entry.js +0 -2
  424. package/dist/core/p-f6772530.entry.js.map +0 -1
  425. package/dist/esm/helpers-fee7d348.js.map +0 -1
  426. /package/dist/core/{p-20f248be.entry.js.map → p-05e0cadf.entry.js.map} +0 -0
  427. /package/dist/core/{p-b8cb867c.entry.js.map → p-07365d6f.entry.js.map} +0 -0
  428. /package/dist/core/{p-a7bc9a19.entry.js.map → p-0b0cc10d.entry.js.map} +0 -0
  429. /package/dist/core/{p-3414247d.entry.js.map → p-18b793e0.entry.js.map} +0 -0
  430. /package/dist/core/{p-fc125ca6.entry.js.map → p-266d5e13.entry.js.map} +0 -0
  431. /package/dist/core/{p-570ff466.entry.js.map → p-2f0ab1d0.entry.js.map} +0 -0
  432. /package/dist/core/{p-4fa1a80f.entry.js.map → p-54da2d5f.entry.js.map} +0 -0
  433. /package/dist/core/{p-6a884eef.entry.js.map → p-553531bf.entry.js.map} +0 -0
  434. /package/dist/core/{p-8bb49790.entry.js.map → p-656b92d7.entry.js.map} +0 -0
  435. /package/dist/core/{p-a0c361ec.entry.js.map → p-6addd986.entry.js.map} +0 -0
  436. /package/dist/core/{p-c7a97221.entry.js.map → p-6d4418e4.entry.js.map} +0 -0
  437. /package/dist/core/{p-9c491db1.entry.js.map → p-6e5fc63c.entry.js.map} +0 -0
  438. /package/dist/core/{p-d6a1b39c.entry.js.map → p-70447473.entry.js.map} +0 -0
  439. /package/dist/core/{p-17423822.entry.js.map → p-77c4d1d2.entry.js.map} +0 -0
  440. /package/dist/core/{p-4479c7e7.entry.js.map → p-796b9ac5.entry.js.map} +0 -0
  441. /package/dist/core/{p-09c0961a.entry.js.map → p-7986db4a.entry.js.map} +0 -0
  442. /package/dist/core/{p-f4b08cdb.entry.js.map → p-8b4a7a78.entry.js.map} +0 -0
  443. /package/dist/core/{p-b95d99c7.entry.js.map → p-8c841dc8.entry.js.map} +0 -0
  444. /package/dist/core/{p-55934942.entry.js.map → p-94e5ed81.entry.js.map} +0 -0
  445. /package/dist/core/{p-b5dd226f.entry.js.map → p-9af5008c.entry.js.map} +0 -0
  446. /package/dist/core/{p-7821c7dc.entry.js.map → p-9b68bee6.entry.js.map} +0 -0
  447. /package/dist/core/{p-30a2abe9.entry.js.map → p-a7a572d9.entry.js.map} +0 -0
  448. /package/dist/core/{p-3bb4ea35.entry.js.map → p-a86756fa.entry.js.map} +0 -0
  449. /package/dist/core/{p-d3eb3356.entry.js.map → p-ba26a1f0.entry.js.map} +0 -0
  450. /package/dist/core/{p-d3b9c04b.entry.js.map → p-bad17ba7.entry.js.map} +0 -0
  451. /package/dist/core/{p-9ad64b6f.entry.js.map → p-bf08d34c.entry.js.map} +0 -0
  452. /package/dist/core/{p-b2c49dfd.entry.js.map → p-bf5558ac.entry.js.map} +0 -0
  453. /package/dist/core/{p-d143aa70.entry.js.map → p-c1ae14ad.entry.js.map} +0 -0
  454. /package/dist/core/{p-92f199b0.entry.js.map → p-d77981a5.entry.js.map} +0 -0
  455. /package/dist/core/{p-f5cc4e94.entry.js.map → p-e8cea1d5.entry.js.map} +0 -0
  456. /package/dist/core/{p-5534bb37.entry.js.map → p-f591abc2.entry.js.map} +0 -0
  457. /package/dist/core/{p-e435052b.entry.js.map → p-fba9f5b6.entry.js.map} +0 -0
  458. /package/dist/core/{p-0fffe635.entry.js.map → p-ff4a873e.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ic-date-input.stories.js","sourceRoot":"","sources":["../../../src/components/ic-date-input/ic-date-input.stories.js"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;sBAsBE;IACpB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;cAQN;IACZ,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;oBAKA;IAClB,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;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html } from \"lit-html\";\nimport readme from \"./readme.md\";\nimport { createDateInputForm } from \"./story-data\";\n\nexport default {\n title: \"Web Components/Date Input\",\n component: \"ic-date-input\",\n parameters: {\n componentAPI: {\n data: readme,\n },\n },\n};\n\n/**\n * Use the date input component to manually type in a date in different formats.\n *\n * The input `label` is the only required attribute for date input.\n *\n * Click the 'Component API' tab to view all the available attributes, events and slots for date input.\n *\n * To use the date input component, import `@ukic/canary-web-components` into your application.\n *\n * Each example below demonstrates the date input in three different date formats:\n * - DD/MM/YYYY (Default date format)\n * - MM/DD/YYYY\n * - YYYY/MM/DD\n *\n * Dates can be added by manually typing into the input or using the up and down arrow keys.\n *\n * To move between day, month and year using the keyboard, provide the required values based on the placeholders or use `/` or `-`.\n *\n * By default, the helper text displays the date format.\n */\nexport const Default = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInput = document.querySelector(\"ic-date-input\");\n {\n dateInput.addEventListener(\"icChange\", function (event) {\n console.log(\"icChange\", event.detail.value);\n });\n }\n </script>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n date-format=\"MM/DD/YYYY\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n date-format=\"YYYY/MM/DD\"\n ></ic-date-input>`,\n name: \"Default\",\n};\n\n/**\n * Retrieving the date input value via `icChange` returns the date as a Date object.\n *\n * The event returns the Date object once day, month and year have been entered.\n */\nexport const IcChangeEvent = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInput = document.querySelector(\"ic-date-input\");\n dateInput.addEventListener(\"icChange\", function (event) {\n console.log(event.detail.value, event.detail.utcValue);\n });\n </script>`,\n name: \"icChange event\",\n};\n\n/**\n * To set a value to the date input, pass the date value in the relevant date format.\n */\nexport const WithValue = {\n render: () => html`<ic-date-input\n id=\"date-input-default-date-with-value\"\n label=\"When would you like to collect your coffee?\"\n date-format=\"DD/MM/YYYY\"\n value=\"21/01/2001\"\n ></ic-date-input>`,\n name: \"With value\",\n};\n\n/**\n * The date input also accepts a number of different date formats within the value attribute:\n * - Date object\n * - [Zulu datetime](#zulu-datetime)\n * - [With hyphens (DD-MM-YYYY)](#with-hyphens)\n * - [Epoch time](#epoch-time)\n */\nexport const DateObject = {\n render: () => html`<ic-date-input\n id=\"date-input-default-date-date\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInputDate = document.querySelector(\n \"#date-input-default-date-date\"\n );\n dateInputDate.value = new Date(\"28 November 2021\");\n </script>`,\n name: \"Date object\",\n};\n\nexport const ZuluDatetime = {\n render: () => html`<div>\n <ic-date-input\n id=\"date-input-default-zulu-date\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n </div>\n <script>\n var dateInputDate = document.querySelector(\n \"#date-input-default-zulu-date\"\n );\n dateInputDate.value = new Date(\"1 May 1990\").toISOString();\n </script>`,\n name: \"Zulu datetime\",\n};\n\nexport const WithHyphens = {\n render: () => html`<ic-date-input\n id=\"date-input-default-date-string\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInputString = document.querySelector(\n \"#date-input-default-date-string\"\n );\n dateInputString.value = \"25-05-2005\";\n </script>`,\n name: \"With hyphens\",\n};\n\nexport const EpochTime = {\n render: () => html`<ic-date-input\n id=\"date-input-default-date-epoch\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInputString = document.querySelector(\n \"#date-input-default-date-epoch\"\n );\n dateInputString.value = Date.now();\n </script>`,\n name: \"Epoch time\",\n};\n\n/**\n * To set the date input as a required field, set the `required` attribute to `true`. This will add an asterisk at the end of the date input label.\n */\nexport const Required = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n required=\"true\"\n ></ic-date-input>`,\n name: \"Required\",\n};\n\n/**\n * To hide the label, set the `hide-label` attribute to `true`. The required `label` will still be read out by screen readers.\n */\nexport const HideLabel = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n hide-label=\"true\"\n ></ic-date-input>`,\n name: \"Hide label\",\n};\n\n/**\n * Set the `disabled` attribute to `true` to prevent interaction with the date input.\n */\nexport const Disabled = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n disabled=\"true\"\n ></ic-date-input>`,\n};\n\n/**\n * The date input is available in three different sizes:\n * - `small`\n * - `medium` (default)\n * - `large`\n */\nexport const Sizes = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n size=\"small\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n size=\"large\"\n ></ic-date-input>`,\n name: \"Sizes\",\n};\n\n/**\n * Use the helper text to add additional detail for the date input. Display custom content using the `helper-text` slot.\n */\nexport const CustomHelperText = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n helper-text=\"We will have your order ready for you on this date\"\n ></ic-date-input>\n <br />\n <ic-date-input label=\"When would you like to collect your coffee?\"\n ><ic-typography variant=\"caption\" slot=\"helper-text\">\n <span>\n For special requests,\n <ic-link href=\"#\">contact us</ic-link> before choosing a date\n </span>\n </ic-typography></ic-date-input\n >`,\n name: \"Custom helper text\",\n};\n\nexport const HideHelperText = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n helper-text=\"You cannot see me, but you can hear me\"\n hide-helper-text=\"true\"\n ></ic-date-input>`,\n name: \"Hide helper text\",\n};\n\n/**\n * Validation on date input is set via `validation-status` and `validation-text`.\n *\n * `validation-status` will set the style of the validation message. `validation-status` accepts:\n * - `error`\n * - `warning`\n * - `success`\n *\n * `validation-status` is required for the `validation-text` to appear.\n */\nexport const Validation = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n validation-status=\"error\"\n validation-text=\"There is a coffee shortage forecast for that day. Please choose a different date.\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n validation-status=\"warning\"\n validation-text=\"Please be aware that there may be a coffee shortage on that day.\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n validation-status=\"success\"\n validation-text=\"Your coffee will be available for you to collect on this day.\"\n ></ic-date-input>`,\n name: \"Custom validation\",\n};\n\n/**\n * Validation can be set on the date input if a date in the past has been set by setting the `disable-past` attribute to `true`.\n *\n * Enter a date in the past to view the validation message.\n */\nexport const DisablePastDates = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n disable-past=\"true\"\n ></ic-date-input>`,\n name: \"Disable past dates\",\n};\n\n/**\n * Validation can be set on the date input if a date in the future has been set by setting the `disable-future` attribute to `true`.\n *\n * Enter a date in the future to view the validation message.\n */\nexport const DisableFutureDates = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n disable-future=\"true\"\n ></ic-date-input>`,\n name: \"Disable future dates\",\n};\n\n/**\n * It is possible to set a min and max date range. If a date is set and it is before the min or after the max date, a validation error will appear.\n *\n * The min or max dates accept the following date formats:\n * - [Date string](#with-value) (with slashes i.e. DD/MM/YYYY)\n * - [Date string with hyphens](#with-hyphens) (i.e. DD-MM-YYYY)\n * - [Date object](#date-object)\n * - [Zulu time](#zulu-datetime)\n *\n * Enter a date after 2nd Jan 2023 and before 20th July to view the validation message.\n *\n * In this code snippet, the min and max have been set using two different date formats to demonstrate its flexibility.\n */\nexport const MinMax = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n min=\"02/01/2023\"\n max=\"20-07-2023\"\n ></ic-date-input>`,\n name: \"Min and max\",\n};\n\n/**\n * When the date input component is used within a form, the date value is returned as an ISO string.\n *\n * The value is console logged to the browser dev tools.\n */\nexport const Form = {\n render: () => createDateInputForm(),\n name: \"Form\",\n};\n\n/**\n * The date input can be cleared by setting the the value attribute to one of the following:\n * - empty string\n * - `null`\n * - `undefined`\n */\nexport const WithClearingValue = {\n render: () => html`<ic-date-input\n id=\"date-input-clear-value\"\n label=\"When would you like to collect your coffee?\"\n date-format=\"DD/MM/YYYY\"\n value=\"21/01/2001\"\n ></ic-date-input>\n <br />\n <ic-button id=\"update\">Update date</ic-button>\n <ic-button id=\"null-btn\">set null</ic-button>\n <ic-button id=\"empty-btn\">set empty string</ic-button>\n <ic-button id=\"undef-btn\">set undefined</ic-button>\n <script>\n var input = document.querySelector(\"#date-input-clear-value\");\n var btn = document.querySelector(\"#update\");\n btn.addEventListener(\"click\", () => {\n input.value = new Date(\"05 May 2005\");\n });\n var btn2 = document.querySelector(\"#null-btn\");\n btn2.addEventListener(\"click\", () => {\n input.value = null;\n });\n var btn3 = document.querySelector(\"#empty-btn\");\n btn3.addEventListener(\"click\", () => {\n input.value = \"\";\n });\n var btn4 = document.querySelector(\"#undef-btn\");\n btn4.addEventListener(\"click\", () => {\n input.value = undefined;\n });\n </script>`,\n name: \"With clearing value\",\n};\n\n/**\n * The `IcChange` event is emitted by the date input every time an input field is changed.\n */\nexport const IcChangeEmitDatePartChanges = {\n render: () => html`<ic-date-input\n emit-date-part-change=\"true\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInput = document.querySelector(\"ic-date-input\");\n {\n dateInput.addEventListener(\"icChange\", function (event) {\n console.log(\"icChange\", event.detail);\n });\n }\n </script>`,\n name: \"IcChange with emitDatePartChange\",\n};\n"]}
1
+ {"version":3,"file":"ic-date-input.stories.js","sourceRoot":"","sources":["../../../../../src/components/ic-date-input/ic-date-input.stories.js"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,2BAA2B;IAClC,SAAS,EA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AAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;oBAGA;IAClB,IAAI,EAAE,oBAAoB;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;oBAGA;IAClB,IAAI,EAAE,sBAAsB;CAC7B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;oBAIA;IAClB,IAAI,EAAE,aAAa;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,MAAM,EAAE,GAAG,EAAE,CAAC,mBAAmB,EAAE;IACnC,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6BN;IACZ,IAAI,EAAE,qBAAqB;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;cAWN;IACZ,IAAI,EAAE,kCAAkC;CACzC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { html } from \"lit-html\";\nimport readme from \"./readme.md\";\nimport { createDateInputForm } from \"./story-data\";\n\nexport default {\n title: \"Web Components/Date Input\",\n component: \"ic-date-input\",\n parameters: {\n componentAPI: {\n data: readme,\n },\n },\n};\n\n/**\n * Use the date input component to manually type in a date in different formats.\n *\n * The input `label` is the only required attribute for date input.\n *\n * Click the 'Component API' tab to view all the available attributes, events and slots for date input.\n *\n * To use the date input component, import `@ukic/canary-web-components` into your application.\n *\n * Each example below demonstrates the date input in three different date formats:\n * - DD/MM/YYYY (Default date format)\n * - MM/DD/YYYY\n * - YYYY/MM/DD\n *\n * Dates can be added by manually typing into the input or using the up and down arrow keys.\n *\n * To move between day, month and year using the keyboard, provide the required values based on the placeholders or use `/` or `-`.\n *\n * By default, the helper text displays the date format.\n */\nexport const Default = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInput = document.querySelector(\"ic-date-input\");\n {\n dateInput.addEventListener(\"icChange\", function (event) {\n console.log(\"icChange\", event.detail.value);\n });\n }\n </script>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n date-format=\"MM/DD/YYYY\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n date-format=\"YYYY/MM/DD\"\n ></ic-date-input>`,\n name: \"Default\",\n};\n\n/**\n * Retrieving the date input value via `icChange` returns the date as a Date object.\n *\n * The event returns the Date object once day, month and year have been entered.\n */\nexport const IcChangeEvent = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInput = document.querySelector(\"ic-date-input\");\n dateInput.addEventListener(\"icChange\", function (event) {\n console.log(event.detail.value, event.detail.utcValue);\n });\n </script>`,\n name: \"icChange event\",\n};\n\n/**\n * To set a value to the date input, pass the date value in the relevant date format.\n */\nexport const WithValue = {\n render: () => html`<ic-date-input\n id=\"date-input-default-date-with-value\"\n label=\"When would you like to collect your coffee?\"\n date-format=\"DD/MM/YYYY\"\n value=\"21/01/2001\"\n ></ic-date-input>`,\n name: \"With value\",\n};\n\n/**\n * The date input also accepts a number of different date formats within the value attribute:\n * - Date object\n * - [Zulu datetime](#zulu-datetime)\n * - [With hyphens (DD-MM-YYYY)](#with-hyphens)\n * - [Epoch time](#epoch-time)\n */\nexport const DateObject = {\n render: () => html`<ic-date-input\n id=\"date-input-default-date-date\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInputDate = document.querySelector(\n \"#date-input-default-date-date\"\n );\n dateInputDate.value = new Date(\"28 November 2021\");\n </script>`,\n name: \"Date object\",\n};\n\nexport const ZuluDatetime = {\n render: () => html`<div>\n <ic-date-input\n id=\"date-input-default-zulu-date\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n </div>\n <script>\n var dateInputDate = document.querySelector(\n \"#date-input-default-zulu-date\"\n );\n dateInputDate.value = new Date(\"1 May 1990\").toISOString();\n </script>`,\n name: \"Zulu datetime\",\n};\n\nexport const WithHyphens = {\n render: () => html`<ic-date-input\n id=\"date-input-default-date-string\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInputString = document.querySelector(\n \"#date-input-default-date-string\"\n );\n dateInputString.value = \"25-05-2005\";\n </script>`,\n name: \"With hyphens\",\n};\n\nexport const EpochTime = {\n render: () => html`<ic-date-input\n id=\"date-input-default-date-epoch\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInputString = document.querySelector(\n \"#date-input-default-date-epoch\"\n );\n dateInputString.value = Date.now();\n </script>`,\n name: \"Epoch time\",\n};\n\n/**\n * To set the date input as a required field, set the `required` attribute to `true`. This will add an asterisk at the end of the date input label.\n */\nexport const Required = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n required=\"true\"\n ></ic-date-input>`,\n name: \"Required\",\n};\n\n/**\n * To hide the label, set the `hide-label` attribute to `true`. The required `label` will still be read out by screen readers.\n */\nexport const HideLabel = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n hide-label=\"true\"\n ></ic-date-input>`,\n name: \"Hide label\",\n};\n\n/**\n * Set the `disabled` attribute to `true` to prevent interaction with the date input.\n */\nexport const Disabled = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n disabled=\"true\"\n ></ic-date-input>`,\n};\n\n/**\n * The date input is available in three different sizes:\n * - `small`\n * - `medium` (default)\n * - `large`\n */\nexport const Sizes = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n size=\"small\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n size=\"large\"\n ></ic-date-input>`,\n name: \"Sizes\",\n};\n\n/**\n * Use the helper text to add additional detail for the date input. Display custom content using the `helper-text` slot.\n */\nexport const CustomHelperText = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n helper-text=\"We will have your order ready for you on this date\"\n ></ic-date-input>\n <br />\n <ic-date-input label=\"When would you like to collect your coffee?\"\n ><ic-typography variant=\"caption\" slot=\"helper-text\">\n <span>\n For special requests,\n <ic-link href=\"#\">contact us</ic-link> before choosing a date\n </span>\n </ic-typography></ic-date-input\n >`,\n name: \"Custom helper text\",\n};\n\nexport const HideHelperText = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n helper-text=\"You cannot see me, but you can hear me\"\n hide-helper-text=\"true\"\n ></ic-date-input>`,\n name: \"Hide helper text\",\n};\n\n/**\n * Validation on date input is set via `validation-status` and `validation-text`.\n *\n * `validation-status` will set the style of the validation message. `validation-status` accepts:\n * - `error`\n * - `warning`\n * - `success`\n *\n * `validation-status` is required for the `validation-text` to appear.\n */\nexport const Validation = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n validation-status=\"error\"\n validation-text=\"There is a coffee shortage forecast for that day. Please choose a different date.\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n validation-status=\"warning\"\n validation-text=\"Please be aware that there may be a coffee shortage on that day.\"\n ></ic-date-input>\n <br />\n <br />\n <ic-date-input\n label=\"When would you like to collect your coffee?\"\n validation-status=\"success\"\n validation-text=\"Your coffee will be available for you to collect on this day.\"\n ></ic-date-input>`,\n name: \"Custom validation\",\n};\n\nexport const AriaLiveBehaviour = {\n render: (args) =>\n html`<ic-date-input\n id=\"field-1\"\n label=\"When would you like to collect your coffee?\"\n helper-text=\"Error already set on page load and aria-live overridden as 'assertive'\"\n validation-status=\"error\"\n validation-text=\"First error message\"\n validation-aria-live=\"assertive\"\n ></ic-date-input>\n <br />\n <ic-date-input\n id=\"field-2\"\n label=\"When would you like to collect your coffee?\"\n helper-text=\"Error set after page load and aria-live overridden as 'assertive'\"\n validation-aria-live=\"assertive\"\n ></ic-date-input>\n <br />\n <ic-button id=\"toggle-btn-1\">Toggle errors</ic-button>\n <script>\n let showErrors1 = false;\n const btn1 = document.getElementById(\"toggle-btn-1\");\n const field1 = document.getElementById(\"field-1\");\n const field2 = document.getElementById(\"field-2\");\n\n btn1.addEventListener(\"click\", () => {\n showErrors1 = !showErrors1;\n\n field1.setAttribute(\"validation-status\", showErrors1 ? \"\" : \"error\");\n field1.setAttribute(\n \"validation-text\",\n showErrors1 ? \"\" : \"First error message\"\n );\n\n field2.setAttribute(\"validation-status\", showErrors1 ? \"error\" : \"\");\n field2.setAttribute(\n \"validation-text\",\n showErrors1 ? \"Second error message\" : \"\"\n );\n });\n </script>\n <br />\n <br />\n <br />\n <br />\n <ic-date-input\n id=\"field-3\"\n label=\"When would you like to collect your coffee?\"\n helper-text=\"Default aria-live behaviour (i.e. 'polite')\"\n ></ic-date-input>\n <br />\n <ic-date-input\n id=\"field-4\"\n label=\"When would you like to collect your coffee?\"\n helper-text=\"Default aria-live behaviour (i.e. 'polite')\"\n ></ic-date-input>\n <br />\n <ic-button id=\"toggle-btn-2\">Toggle errors</ic-button>\n <script>\n let showErrors2 = false;\n const btn2 = document.getElementById(\"toggle-btn-2\");\n const field3 = document.getElementById(\"field-3\");\n const field4 = document.getElementById(\"field-4\");\n\n btn2.addEventListener(\"click\", () => {\n showErrors2 = !showErrors2;\n\n field3.setAttribute(\"validation-status\", showErrors2 ? \"error\" : \"\");\n field3.setAttribute(\n \"validation-text\",\n showErrors2 ? \"Third error message\" : \"\"\n );\n\n field4.setAttribute(\"validation-status\", showErrors2 ? \"error\" : \"\");\n field4.setAttribute(\n \"validation-text\",\n showErrors2 ? \"Fourth error message\" : \"\"\n );\n });\n </script>`,\n\n name: \"Aria-live behaviour\",\n};\n\n/**\n * Validation can be set on the date input if a date in the past has been set by setting the `disable-past` attribute to `true`.\n *\n * Enter a date in the past to view the validation message.\n */\nexport const DisablePastDates = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n disable-past=\"true\"\n ></ic-date-input>`,\n name: \"Disable past dates\",\n};\n\n/**\n * Validation can be set on the date input if a date in the future has been set by setting the `disable-future` attribute to `true`.\n *\n * Enter a date in the future to view the validation message.\n */\nexport const DisableFutureDates = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n disable-future=\"true\"\n ></ic-date-input>`,\n name: \"Disable future dates\",\n};\n\n/**\n * It is possible to set a min and max date range. If a date is set and it is before the min or after the max date, a validation error will appear.\n *\n * The min or max dates accept the following date formats:\n * - [Date string](#with-value) (with slashes i.e. DD/MM/YYYY)\n * - [Date string with hyphens](#with-hyphens) (i.e. DD-MM-YYYY)\n * - [Date object](#date-object)\n * - [Zulu time](#zulu-datetime)\n *\n * Enter a date after 2nd Jan 2023 and before 20th July to view the validation message.\n *\n * In this code snippet, the min and max have been set using two different date formats to demonstrate its flexibility.\n */\nexport const MinMax = {\n render: () => html`<ic-date-input\n label=\"When would you like to collect your coffee?\"\n min=\"02/01/2023\"\n max=\"20-07-2023\"\n ></ic-date-input>`,\n name: \"Min and max\",\n};\n\n/**\n * When the date input component is used within a form, the date value is returned as an ISO string.\n *\n * The value is console logged to the browser dev tools.\n */\nexport const Form = {\n render: () => createDateInputForm(),\n name: \"Form\",\n};\n\n/**\n * The date input can be cleared by setting the the value attribute to one of the following:\n * - empty string\n * - `null`\n * - `undefined`\n */\nexport const WithClearingValue = {\n render: () => html`<ic-date-input\n id=\"date-input-clear-value\"\n label=\"When would you like to collect your coffee?\"\n date-format=\"DD/MM/YYYY\"\n value=\"21/01/2001\"\n ></ic-date-input>\n <br />\n <ic-button id=\"update\">Update date</ic-button>\n <ic-button id=\"null-btn\">set null</ic-button>\n <ic-button id=\"empty-btn\">set empty string</ic-button>\n <ic-button id=\"undef-btn\">set undefined</ic-button>\n <script>\n var input = document.querySelector(\"#date-input-clear-value\");\n var btn = document.querySelector(\"#update\");\n btn.addEventListener(\"click\", () => {\n input.value = new Date(\"05 May 2005\");\n });\n var btn2 = document.querySelector(\"#null-btn\");\n btn2.addEventListener(\"click\", () => {\n input.value = null;\n });\n var btn3 = document.querySelector(\"#empty-btn\");\n btn3.addEventListener(\"click\", () => {\n input.value = \"\";\n });\n var btn4 = document.querySelector(\"#undef-btn\");\n btn4.addEventListener(\"click\", () => {\n input.value = undefined;\n });\n </script>`,\n name: \"With clearing value\",\n};\n\n/**\n * The `IcChange` event is emitted by the date input every time an input field is changed.\n */\nexport const IcChangeEmitDatePartChanges = {\n render: () => html`<ic-date-input\n emit-date-part-change=\"true\"\n label=\"When would you like to collect your coffee?\"\n ></ic-date-input>\n <script>\n var dateInput = document.querySelector(\"ic-date-input\");\n {\n dateInput.addEventListener(\"icChange\", function (event) {\n console.log(\"icChange\", event.detail);\n });\n }\n </script>`,\n name: \"IcChange with emitDatePartChange\",\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"story-data.js","sourceRoot":"","sources":["../../../src/components/ic-date-input/story-data.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAoB,EAAE;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAElD,WAAW,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IACnC,WAAW,CAAC,KAAK,CAAC,GAAG,GAAG,oBAAoB,CAAC;IAC7C,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,oBAAoB,CAAC;IAEnD,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IACjC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC;IACxB,QAAQ,CAAC,WAAW,GAAG,OAAO,CAAC;IAE/B,IAAI,CAAC,EAAE,GAAG,iBAAiB,CAAC;IAE5B,SAAS,CAAC,KAAK,GAAG,YAAY,CAAC;IAC/B,SAAS,CAAC,KAAK,GAAG,6CAA6C,CAAC;IAEhE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC5B,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAE9B,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACnC,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAElC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE;;QACrC,EAAE,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CACT,MACE,SAAS,CAAC,aAAa,CACrB,+BAA+B,CAElC,0CAAE,KAAK,CACT,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["export const createDateInputForm = (): HTMLFormElement => {\n const form = document.createElement(\"form\");\n const dateInput = document.createElement(\"ic-date-input\");\n const submitBtn = document.createElement(\"ic-button\");\n const resetBtn = document.createElement(\"ic-button\");\n const formActions = document.createElement(\"div\");\n\n formActions.style.display = \"flex\";\n formActions.style.gap = \"var(--ic-space-xs)\";\n formActions.style.marginTop = \"var(--ic-space-xs)\";\n\n submitBtn.type = \"submit\";\n submitBtn.textContent = \"Submit\";\n resetBtn.type = \"reset\";\n resetBtn.textContent = \"Reset\";\n\n form.id = \"date-input-form\";\n\n dateInput.value = \"13/03/1951\";\n dateInput.label = \"When would you like to collect your coffee?\";\n\n form.appendChild(dateInput);\n form.appendChild(formActions);\n\n formActions.appendChild(submitBtn);\n formActions.appendChild(resetBtn);\n\n form.addEventListener(\"submit\", (ev) => {\n ev.preventDefault();\n console.log(\n (\n dateInput.querySelector(\n 'input[name^=\"ic-date-input-\"]'\n ) as HTMLInputElement\n )?.value\n );\n });\n\n return form;\n};\n"]}
1
+ {"version":3,"file":"story-data.js","sourceRoot":"","sources":["../../../../../src/components/ic-date-input/story-data.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAoB,EAAE;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAElD,WAAW,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IACnC,WAAW,CAAC,KAAK,CAAC,GAAG,GAAG,oBAAoB,CAAC;IAC7C,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,oBAAoB,CAAC;IAEnD,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IACjC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC;IACxB,QAAQ,CAAC,WAAW,GAAG,OAAO,CAAC;IAE/B,IAAI,CAAC,EAAE,GAAG,iBAAiB,CAAC;IAE5B,SAAS,CAAC,KAAK,GAAG,YAAY,CAAC;IAC/B,SAAS,CAAC,KAAK,GAAG,6CAA6C,CAAC;IAEhE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC5B,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAE9B,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACnC,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAElC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE;;QACrC,EAAE,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CACT,MACE,SAAS,CAAC,aAAa,CACrB,+BAA+B,CAElC,0CAAE,KAAK,CACT,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["export const createDateInputForm = (): HTMLFormElement => {\n const form = document.createElement(\"form\");\n const dateInput = document.createElement(\"ic-date-input\");\n const submitBtn = document.createElement(\"ic-button\");\n const resetBtn = document.createElement(\"ic-button\");\n const formActions = document.createElement(\"div\");\n\n formActions.style.display = \"flex\";\n formActions.style.gap = \"var(--ic-space-xs)\";\n formActions.style.marginTop = \"var(--ic-space-xs)\";\n\n submitBtn.type = \"submit\";\n submitBtn.textContent = \"Submit\";\n resetBtn.type = \"reset\";\n resetBtn.textContent = \"Reset\";\n\n form.id = \"date-input-form\";\n\n dateInput.value = \"13/03/1951\";\n dateInput.label = \"When would you like to collect your coffee?\";\n\n form.appendChild(dateInput);\n form.appendChild(formActions);\n\n formActions.appendChild(submitBtn);\n formActions.appendChild(resetBtn);\n\n form.addEventListener(\"submit\", (ev) => {\n ev.preventDefault();\n console.log(\n (\n dateInput.querySelector(\n 'input[name^=\"ic-date-input-\"]'\n ) as HTMLInputElement\n )?.value\n );\n });\n\n return form;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file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,GACd,SAAS,CAAC,UAAW,CAAC,aAAa,CAAmB,cAAc,CAAE,CAAC;IACzE,MAAM,SAAS,GACb,SAAS,CAAC,UAAW,CAAC,aAAa,CAAmB,aAAa,CAAE,CAAC;IAExE,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAE7B,IAAI,QAAQ;QAAE,QAAQ,CAAC,MAAM,GAAG,UAAU,CAAC;IAC3C,IAAI,UAAU;QAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC;IAC/C,IAAI,SAAS;QAAE,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC;IAE7C,OAAO;QACL,IAAI;QACJ,SAAS;QACT,iBAAiB;QACjB,QAAQ;QACR,UAAU;QACV,SAAS;KACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from \"@stencil/core/testing\";\nimport { DateInput } from \"../../ic-date-input\";\nimport { h } from \"@stencil/core\";\nimport { IcInputLabel } from \"@ukic/web-components/dist/components/ic-input-label\";\n\ninterface EventType {\n inputType: string;\n target: HTMLInputElement;\n data: string;\n}\n\ninterface KeyboardEvent {\n key: string;\n preventDefault: () => void;\n}\n\ninterface DateInputType {\n page: SpecPage;\n component: HTMLIcDateInputElement;\n componentInstance: any;\n dayInput: HTMLInputElement;\n monthInput: HTMLInputElement;\n yearInput: HTMLInputElement;\n}\n\nexport const createDateInput = (format = \"DD/MM/YYYY\"): Promise<SpecPage> =>\n newSpecPage({\n components: [DateInput, IcInputLabel],\n template: () => (\n <ic-date-input label=\"Test label\" date-format={format}></ic-date-input>\n ),\n });\n\nexport const handleEvent = (input: HTMLInputElement): EventType => {\n return {\n inputType: \"insertText\",\n target: input,\n data: input.value,\n };\n};\n\nexport const keyboardEvent = (keyboardKey: string): KeyboardEvent => {\n return {\n key: `${keyboardKey}`,\n preventDefault: (): null => null,\n };\n};\n\nexport const createDateInputEnv = async (\n format?: string\n): Promise<DateInputType> => {\n const page = await createDateInput(format);\n\n const component = page.root as HTMLIcDateInputElement;\n const componentInstance = page.rootInstance;\n\n const dayInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".day-input\")!;\n const monthInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".month-input\")!;\n const yearInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".year-input\")!;\n\n const mockSelect = jest.fn();\n\n if (dayInput) dayInput.select = mockSelect;\n if (monthInput) monthInput.select = mockSelect;\n if (yearInput) yearInput.select = mockSelect;\n\n return {\n page,\n component,\n componentInstance,\n dayInput,\n monthInput,\n yearInput,\n };\n};\n"]}
1
+ {"version":3,"file":"ic-date-input.js","sourceRoot":"","sources":["../../../../../../../src/components/ic-date-input/test/helpers/ic-date-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAsBnF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,GAAG,YAAY,EAAqB,EAAE,CAC1E,WAAW,CAAC;IACV,UAAU,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;IACrC,QAAQ,EAAE,GAAG,EAAE,CAAC,CACd,qBAAe,KAAK,EAAC,YAAY,iBAAc,MAAM,GAAkB,CACxE;CACF,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAa,EAAE;IAChE,OAAO;QACL,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,KAAK,CAAC,KAAK;KAClB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAmB,EAAiB,EAAE;IAClE,OAAO;QACL,GAAG,EAAE,GAAG,WAAW,EAAE;QACrB,cAAc,EAAE,GAAS,EAAE,CAAC,IAAI;KACjC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,MAAe,EACS,EAAE;IAC1B,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAE3C,MAAM,SAAS,GAAG,IAAI,CAAC,IAA8B,CAAC;IACtD,MAAM,iBAAiB,GAAG,IAAI,CAAC,YAAY,CAAC;IAE5C,MAAM,QAAQ,GACZ,SAAS,CAAC,UAAW,CAAC,aAAa,CAAmB,YAAY,CAAE,CAAC;IACvE,MAAM,UAAU,GACd,SAAS,CAAC,UAAW,CAAC,aAAa,CAAmB,cAAc,CAAE,CAAC;IACzE,MAAM,SAAS,GACb,SAAS,CAAC,UAAW,CAAC,aAAa,CAAmB,aAAa,CAAE,CAAC;IAExE,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAE7B,IAAI,QAAQ;QAAE,QAAQ,CAAC,MAAM,GAAG,UAAU,CAAC;IAC3C,IAAI,UAAU;QAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC;IAC/C,IAAI,SAAS;QAAE,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC;IAE7C,OAAO;QACL,IAAI;QACJ,SAAS;QACT,iBAAiB;QACjB,QAAQ;QACR,UAAU;QACV,SAAS;KACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from \"@stencil/core/testing\";\nimport { DateInput } from \"../../ic-date-input\";\nimport { h } from \"@stencil/core\";\nimport { IcInputLabel } from \"@ukic/web-components/dist/components/ic-input-label\";\n\ninterface EventType {\n inputType: string;\n target: HTMLInputElement;\n data: string;\n}\n\ninterface KeyboardEvent {\n key: string;\n preventDefault: () => void;\n}\n\ninterface DateInputType {\n page: SpecPage;\n component: HTMLIcDateInputElement;\n componentInstance: any;\n dayInput: HTMLInputElement;\n monthInput: HTMLInputElement;\n yearInput: HTMLInputElement;\n}\n\nexport const createDateInput = (format = \"DD/MM/YYYY\"): Promise<SpecPage> =>\n newSpecPage({\n components: [DateInput, IcInputLabel],\n template: () => (\n <ic-date-input label=\"Test label\" date-format={format}></ic-date-input>\n ),\n });\n\nexport const handleEvent = (input: HTMLInputElement): EventType => {\n return {\n inputType: \"insertText\",\n target: input,\n data: input.value,\n };\n};\n\nexport const keyboardEvent = (keyboardKey: string): KeyboardEvent => {\n return {\n key: `${keyboardKey}`,\n preventDefault: (): null => null,\n };\n};\n\nexport const createDateInputEnv = async (\n format?: string\n): Promise<DateInputType> => {\n const page = await createDateInput(format);\n\n const component = page.root as HTMLIcDateInputElement;\n const componentInstance = page.rootInstance;\n\n const dayInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".day-input\")!;\n const monthInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".month-input\")!;\n const yearInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".year-input\")!;\n\n const mockSelect = jest.fn();\n\n if (dayInput) dayInput.select = mockSelect;\n if (monthInput) monthInput.select = mockSelect;\n if (yearInput) yearInput.select = mockSelect;\n\n return {\n page,\n component,\n componentInstance,\n dayInput,\n monthInput,\n yearInput,\n };\n};\n"]}
@@ -140,6 +140,10 @@ export class DatePicker {
140
140
  * Sets the date picker to the dark or light theme colors. "inherit" will set the color based on the system settings or ic-theme component.
141
141
  */
142
142
  this.theme = "inherit";
143
+ /**
144
+ * The value of the `aria-live` attribute on the validation message.
145
+ */
146
+ this.validationAriaLive = "polite";
143
147
  /**
144
148
  * The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in date validation.
145
149
  */
@@ -785,6 +789,7 @@ export class DatePicker {
785
789
  showCalendarButton: true,
786
790
  value: this.value,
787
791
  emitDatePartChange: this.emitDatePartChange,
792
+ validationAriaLive: this.validationAriaLive,
788
793
  };
789
794
  if (this.dateFormat !== DEFAULT_DATE_FORMAT) {
790
795
  inputProps.dateFormat = this.dateFormat;
@@ -1010,33 +1015,33 @@ export class DatePicker {
1010
1015
  yesterday.setDate(minDate.getDate() - 1);
1011
1016
  minDay = yesterday;
1012
1017
  }
1013
- return (h(Host, { key: '9f01e93a809b4c0dd0a702b7716617643140601e', onKeyDown: this.keyDownHandler, class: {
1018
+ return (h(Host, { key: 'b2137a0ddce74eafda6be2472afb1793cbf68eef', onKeyDown: this.keyDownHandler, class: {
1014
1019
  [`ic-date-picker-${size}`]: true,
1015
1020
  [`ic-theme-${theme}`]: theme !== "inherit",
1016
- } }, h("div", { key: '8c4e6a6b965562994667acf2e2f12e79cfb7f026', class: "date-input-container" }, h("ic-date-input", Object.assign({ key: '8baa5a1ba1f5042554dcc53f26945a872e6d62ca', ref: (el) => (this.inputEl = el) }, dateInputProps), h("slot", { key: 'ee77883989839f1e375e82e19a4e68dad539606f', name: "helper-text", slot: "helper-text" }))), calendarOpen && (h("div", { key: 'b6885a1077a70c25cf107be2e97e21bfb3065005' }, h("span", { key: 'e06f399f1b71353f595532fe4d75679c9a30585c', id: "dialog-description", class: "sr-only" }, dialogDescription), h("div", { key: '3b9e98f7360131d40e34072162f5b1b3a62df79b', role: "dialog", "aria-modal": "true", "aria-label": dialogLabel, "aria-describedBy": "dialog-description", class: {
1021
+ } }, h("div", { key: '642c68aca8dac1c2c65d6fc30da6fbf7cae083e9', class: "date-input-container" }, h("ic-date-input", Object.assign({ key: '7c360a109491013c58b40d0dde1cea2fa8bdf49d', ref: (el) => (this.inputEl = el) }, dateInputProps), h("slot", { key: 'e26b8ae6d4bd987ed81bb193a3de998372479ba5', name: "helper-text", slot: "helper-text" }))), calendarOpen && (h("div", { key: '4e97c468fb44045378e5a936f3f40a49e4eba65d' }, h("span", { key: 'd619d8b0db95cc30b36b4499872b29cbf25cfec2', id: "dialog-description", class: "sr-only" }, dialogDescription), h("div", { key: 'd84f35cdcff05860927ffc0f2541ebe10971937d', role: "dialog", "aria-modal": "true", "aria-label": dialogLabel, "aria-describedBy": "dialog-description", class: {
1017
1022
  "calendar-container": true,
1018
1023
  above: this.showPickerAbove,
1019
- }, onMouseDown: this.handleCalendarMouseDown, onClick: this.handleCalendarClick }, h("span", { key: '8b9d2af7ec25c7f4390b6367ba61d1cc4edc6862', ref: (el) => (this.liveRegionEl = el), id: "live-region", "aria-live": "assertive", class: "sr-only" }), h("div", { key: '8de6382adeab06868cc3679812c9dc7003a0dc38', class: {
1024
+ }, onMouseDown: this.handleCalendarMouseDown, onClick: this.handleCalendarClick }, h("span", { key: 'e17eb60cf60cae2ddfdc620c8170f3fd20c8948f', ref: (el) => (this.liveRegionEl = el), id: "live-region", "aria-live": "assertive", class: "sr-only" }), h("div", { key: 'e5553e29abf290e5e38f7a111946bd4bb9cf0f34', class: {
1020
1025
  "month-year-nav-container": true,
1021
- } }, h("div", { key: '595f1d3b587316a0a8a9401759802794379bb01a', class: "month-year-nav" }, this.previousMonthButton(), h("span", { key: 'db4136ca3865227558dce4bf7d53ff9ed745be56', id: "select-month-hint", "aria-hidden": "true" }, monthButtonText), h("ic-button", { key: '58856c4d545e0c925ff484f0268bb15c2359cb43', ref: (el) => (this.monthButtonEl = el), size: size, class: "month-picker-button", "aria-haspopup": "menu", "aria-expanded": monthPickerVisible ? "true" : "false", "full-width": "true", variant: "tertiary", "aria-label": monthLabel, "aria-describedby": "select-month-hint", onKeyDown: this.monthButtonKeyDownHandler, onClick: this.monthButtonClickHandler }, monthNames[monthInView]), this.nextMonthButton()), h("div", { key: 'd43213b8bf2c1850d3b2edc7abac54b9a601e862', class: "month-year-nav" }, this.previousYearButton(), h("span", { key: 'ba3bd8c4eed337839606019aff6f7a03c5c35b3a', id: "select-year-hint", "aria-hidden": "true" }, yearButtonText), h("ic-button", { key: '15c6ec0144f58dc3c76360f7ccfa28000c36af77', ref: (el) => (this.yearButtonEl = el), size: size, class: "year-picker-button", "aria-haspopup": "menu", "aria-expanded": yearPickerVisible ? "true" : "false", "full-width": "true", variant: "tertiary", "aria-label": yearLabel, "aria-describedby": "select-year-hint", onKeyDown: this.yearButtonKeyDownHandler, onClick: this.yearButtonClickHandler }, this.yearInView), this.nextYearButton())), !(monthPickerVisible || yearPickerVisible) && (h("div", { key: '913a72924b2cc1db4b398a1faecfa2cf1bf4be42', class: {
1026
+ } }, h("div", { key: '92ac58ac5dd9df901278bd025cf914f80e480d85', class: "month-year-nav" }, this.previousMonthButton(), h("span", { key: '27da769612a75c1e902a3167d7e9cb348fdfe343', id: "select-month-hint", "aria-hidden": "true" }, monthButtonText), h("ic-button", { key: 'a7e05080ddf126e9446bcf977ef4bec599ab953a', ref: (el) => (this.monthButtonEl = el), size: size, class: "month-picker-button", "aria-haspopup": "menu", "aria-expanded": monthPickerVisible ? "true" : "false", "full-width": "true", variant: "tertiary", "aria-label": monthLabel, "aria-describedby": "select-month-hint", onKeyDown: this.monthButtonKeyDownHandler, onClick: this.monthButtonClickHandler }, monthNames[monthInView]), this.nextMonthButton()), h("div", { key: '9287686fe19a31a1cea431402ec91eb33463a859', class: "month-year-nav" }, this.previousYearButton(), h("span", { key: '49bff3660edba939bb848a052b2904d81ce2ee54', id: "select-year-hint", "aria-hidden": "true" }, yearButtonText), h("ic-button", { key: '9f05b2770f7c14c976f6c3f09a1661856f1a57f8', ref: (el) => (this.yearButtonEl = el), size: size, class: "year-picker-button", "aria-haspopup": "menu", "aria-expanded": yearPickerVisible ? "true" : "false", "full-width": "true", variant: "tertiary", "aria-label": yearLabel, "aria-describedby": "select-year-hint", onKeyDown: this.yearButtonKeyDownHandler, onClick: this.yearButtonClickHandler }, this.yearInView), this.nextYearButton())), !(monthPickerVisible || yearPickerVisible) && (h("div", { key: '1a7880de3748d7d033a43599aabd2798af90f32b', class: {
1022
1027
  calendar: true,
1023
1028
  hidden: monthPickerVisible || yearPickerVisible,
1024
- }, onKeyDown: this.handleCalendarKeyDown }, h("div", { key: '5f9784f58378b05de6e52a2763acab163ab6e3e5', class: "weekdays", "aria-hidden": "true" }, orderedDaysOfWeek.map((dayName) => {
1029
+ }, onKeyDown: this.handleCalendarKeyDown }, h("div", { key: '0a3e3df8eab3fb77e1ce9c2550c20cf160f4f650', class: "weekdays", "aria-hidden": "true" }, orderedDaysOfWeek.map((dayName) => {
1025
1030
  const header = size === "small" ? dayName.charAt(0) : dayName;
1026
1031
  return (h("div", { class: "calendar-day-header" }, h("ic-typography", { variant: "caption" }, header)));
1027
- })), h("div", { key: '1c1cfe77f48e7b50e6a014db13a597b924baab06', class: "calendar-days-container" }, this.currMonthView.map((day) => {
1032
+ })), h("div", { key: 'f2415a435dea0633bd42657f9f19bd3bd49e6936', class: "calendar-days-container" }, this.currMonthView.map((day) => {
1028
1033
  var _a;
1029
1034
  return (h(DayButton, { day: day, disableDay: (_a = this.disableDays) === null || _a === void 0 ? void 0 : _a.includes(Number(day.getDay())), today: dateMatches(day, this.today), selected: dateMatches(day, this.selectedDate), focussed: dateMatches(day, this.focussedDate), inRange: dateInRange(day, minDay, maxDate), monthInView: monthInView, onSelectDay: this.handleSelectDay, focussedDayRef: this.setFocussedDayEl, onFocusDay: this.onDayButtonFocusHandler, onBlurDay: this.onDayButtonBlurHandler, showDaysOutsideMonth: this.showDaysOutsideMonth }));
1030
- })))), h("div", { key: '8b064369e1271b56085a85e0c00822ff7232d6e8', class: {
1035
+ })))), h("div", { key: '1ed1a8c793883412ded234f949a7e7b65e66c414', class: {
1031
1036
  "month-picker-container": true,
1032
1037
  hidden: !monthPickerVisible,
1033
- } }, monthPickerVisible && (h(MonthPicker, { key: 'cdd9f6ccb301355eb31a1607413396f44b828ca9', size: size, onSelectMonth: this.handleSelectMonth, monthInView: monthInView, focussedMonth: focussedMonth, onKeyDown: this.monthPickerKeyDownHandler, focussedMonthRef: this.setFocussedMonthEl, minDate: minDate, maxDate: maxDate, yearInView: yearInView }))), h("div", { key: 'a629d2297686220a678d2ba7870fcc386b735c84', class: {
1038
+ } }, monthPickerVisible && (h(MonthPicker, { key: 'd847bce743c2c7289184bb6cb881d81639986934', size: size, onSelectMonth: this.handleSelectMonth, monthInView: monthInView, focussedMonth: focussedMonth, onKeyDown: this.monthPickerKeyDownHandler, focussedMonthRef: this.setFocussedMonthEl, minDate: minDate, maxDate: maxDate, yearInView: yearInView }))), h("div", { key: 'e56d5c9d5a31b6b3f530ac96b81182720ef264c8', class: {
1034
1039
  "year-picker-container": true,
1035
1040
  hidden: !yearPickerVisible,
1036
- } }, yearPickerVisible && (h(YearPicker, { key: '113dfbbb61d28495a6aa0ec0c2d2aa6be1c3e881', decadeView: decadeView, size: size, focussedYear: focussedYear, onSelectYear: this.handleSelectYear, onKeyDown: this.yearPickerKeyDownHandler, onFocusYear: this.onYearButtonFocusHandler, onBlurYear: this.onYearButtonBlurHandler, yearInView: yearInView, minDate: minDate, maxDate: maxDate, focussedYearRef: this.setFocussedYearEl }))), h("div", { key: '5a3a56a0fe0af5771e88a5d6573b5b4e2e491d4f', class: {
1041
+ } }, yearPickerVisible && (h(YearPicker, { key: 'd40cc0d0384bb04d63628a4e21f9e7cec0fe1c5f', decadeView: decadeView, size: size, focussedYear: focussedYear, onSelectYear: this.handleSelectYear, onKeyDown: this.yearPickerKeyDownHandler, onFocusYear: this.onYearButtonFocusHandler, onBlurYear: this.onYearButtonBlurHandler, yearInView: yearInView, minDate: minDate, maxDate: maxDate, focussedYearRef: this.setFocussedYearEl }))), h("div", { key: 'f59442e70666f9a8216e1657d2e1099b2436e376', class: {
1037
1042
  "bottom-buttons": true,
1038
1043
  "no-today": !showPickerTodayButton,
1039
- } }, showPickerTodayButton && (h("ic-button", { key: '67e78d82526a164797c8dfa3c60b4eff27f77193', id: "today-button", variant: "tertiary", ref: (el) => (this.todayButtonEl = el), size: size, "aria-label": "Navigate to current date", onClick: this.todayButtonClickHandler, onKeyDown: this.todayButtonKeyDownHandler, disabled: this.isCurrentMonth() }, "Go to today")), showPickerClearButton && (h("ic-button", { key: 'cd6f21520ba94b85cc078b4478ff3dffaac2bb15', id: "clear-button", "aria-label": "clear selected date", ref: (el) => (this.clearButtonEl = el), variant: "tertiary", size: size, onClick: this.clearButtonClickHandler, onKeyDown: this.clearButtonKeyDownHandler, disabled: this.value === "" ||
1044
+ } }, showPickerTodayButton && (h("ic-button", { key: '506f36d5bec283f11df7cbdc3431f4f5bd5a80f6', id: "today-button", variant: "tertiary", ref: (el) => (this.todayButtonEl = el), size: size, "aria-label": "Navigate to current date", onClick: this.todayButtonClickHandler, onKeyDown: this.todayButtonKeyDownHandler, disabled: this.isCurrentMonth() }, "Go to today")), showPickerClearButton && (h("ic-button", { key: 'ad295135a146065f627b66081ad96a1820b144ce', id: "clear-button", "aria-label": "clear selected date", ref: (el) => (this.clearButtonEl = el), variant: "tertiary", size: size, onClick: this.clearButtonClickHandler, onKeyDown: this.clearButtonKeyDownHandler, disabled: this.value === "" ||
1040
1045
  this.value === null ||
1041
1046
  this.value === undefined }, "Clear"))))))));
1042
1047
  }
@@ -1634,6 +1639,32 @@ export class DatePicker {
1634
1639
  "reflect": false,
1635
1640
  "defaultValue": "\"inherit\""
1636
1641
  },
1642
+ "validationAriaLive": {
1643
+ "type": "string",
1644
+ "mutable": false,
1645
+ "complexType": {
1646
+ "original": "IcAriaLive",
1647
+ "resolved": "\"assertive\" | \"off\" | \"polite\"",
1648
+ "references": {
1649
+ "IcAriaLive": {
1650
+ "location": "import",
1651
+ "path": "../../utils/types",
1652
+ "id": "src/utils/types.ts::IcAriaLive"
1653
+ }
1654
+ }
1655
+ },
1656
+ "required": false,
1657
+ "optional": false,
1658
+ "docs": {
1659
+ "tags": [],
1660
+ "text": "The value of the `aria-live` attribute on the validation message."
1661
+ },
1662
+ "getter": false,
1663
+ "setter": false,
1664
+ "attribute": "validation-aria-live",
1665
+ "reflect": false,
1666
+ "defaultValue": "\"polite\""
1667
+ },
1637
1668
  "validationStatus": {
1638
1669
  "type": "string",
1639
1670
  "mutable": false,