@ukic/canary-web-components 3.0.0-canary.30 → 3.0.0-canary.31

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 (494) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/date-helpers-d7ee7b45.js.map +1 -1
  3. package/dist/cjs/{helpers-da852478.js → helpers-6f4b406b.js} +20 -20
  4. package/dist/cjs/helpers-6f4b406b.js.map +1 -0
  5. package/dist/cjs/ic-button_3.cjs.entry.js +5 -5
  6. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-calendar_2.cjs.entry.js +2354 -0
  8. package/dist/cjs/ic-calendar_2.cjs.entry.js.map +1 -0
  9. package/dist/cjs/ic-card-horizontal.cjs.entry.js +6 -6
  10. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-checkbox-group.cjs.entry.js +2 -2
  12. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-checkbox_3.cjs.entry.js +39 -16
  14. package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
  16. package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
  18. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +4 -4
  20. package/dist/cjs/ic-data-table.cjs.entry.js +8 -8
  21. package/dist/cjs/ic-date-picker.cjs.entry.js +98 -854
  22. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  26. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-hero.cjs.entry.js +11 -6
  28. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
  30. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +10 -10
  32. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-layout-grid-item.cjs.entry.js +2 -2
  34. package/dist/cjs/ic-layout-grid-item.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-layout-grid.cjs.entry.js +2 -2
  36. package/dist/cjs/ic-layout-grid.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-menu.cjs.entry.js +3 -3
  42. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-navigation-menu.cjs.entry.js +4 -4
  46. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-page-header.cjs.entry.js +6 -6
  48. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-pagination_4.cjs.entry.js +18 -18
  50. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-popover-menu.cjs.entry.js +4 -4
  52. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-radio-group.cjs.entry.js +4 -4
  54. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-radio-option.cjs.entry.js +4 -4
  56. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-search-bar.cjs.entry.js +9 -9
  58. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  60. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-side-navigation.cjs.entry.js +4 -4
  62. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  64. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  66. package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
  68. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-step.cjs.entry.js +13 -13
  70. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
  72. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-switch.cjs.entry.js +4 -4
  74. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
  76. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-tab-group.cjs.entry.js +2 -2
  78. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  80. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-table-of-contents.cjs.entry.js +4 -4
  82. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  83. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-time-input.cjs.entry.js +5 -5
  85. package/dist/cjs/ic-time-input.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  87. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-toast.cjs.entry.js +4 -4
  89. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +2 -2
  91. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  92. package/dist/cjs/ic-toggle-button.cjs.entry.js +2 -2
  93. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-tree-item.cjs.entry.js +3 -3
  95. package/dist/cjs/ic-tree-view.cjs.entry.js +4 -4
  96. package/dist/cjs/index-d337cd8a.js +4 -4
  97. package/dist/cjs/loader.cjs.js +1 -1
  98. package/dist/collection/collection-manifest.json +1 -0
  99. package/dist/collection/components/ic-calendar/ic-calendar.css +910 -0
  100. package/dist/collection/components/ic-calendar/ic-calendar.js +1542 -0
  101. package/dist/collection/components/ic-calendar/ic-calendar.js.map +1 -0
  102. package/dist/collection/components/ic-calendar/ic-calendar.stories.js +295 -0
  103. package/dist/collection/components/ic-calendar/ic-calendar.stories.js.map +1 -0
  104. package/dist/collection/components/ic-calendar/ic-day-button.js.map +1 -0
  105. package/dist/collection/components/ic-calendar/ic-month-picker.js +35 -0
  106. package/dist/collection/components/ic-calendar/ic-month-picker.js.map +1 -0
  107. package/dist/collection/components/ic-calendar/ic-year-picker.js +57 -0
  108. package/dist/collection/components/ic-calendar/ic-year-picker.js.map +1 -0
  109. package/dist/collection/components/ic-calendar/test/a11y/ic-calendar.test.a11y.js +13 -0
  110. package/dist/collection/components/ic-calendar/test/a11y/ic-calendar.test.a11y.js.map +1 -0
  111. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +6 -6
  112. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
  113. package/dist/collection/components/ic-data-table/ic-data-table.js +7 -7
  114. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +3 -3
  115. package/dist/collection/components/ic-date-input/ic-date-input.js +8 -7
  116. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  117. package/dist/collection/components/ic-date-picker/ic-date-picker.css +7 -405
  118. package/dist/collection/components/ic-date-picker/ic-date-picker.js +145 -802
  119. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  120. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js +110 -0
  121. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -1
  122. package/dist/collection/components/ic-date-picker/story-data.js +5 -1
  123. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
  124. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +7 -7
  125. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  126. package/dist/collection/components/ic-table-of-contents/ic-table-of-contents.js +3 -3
  127. package/dist/collection/components/ic-time-input/ic-time-input.js +9 -8
  128. package/dist/collection/components/ic-time-input/ic-time-input.js.map +1 -1
  129. package/dist/collection/components/ic-tree-item/ic-tree-item.js +2 -2
  130. package/dist/collection/components/ic-tree-view/ic-tree-view.js +3 -3
  131. package/dist/collection/utils/date-helpers.js +3 -0
  132. package/dist/collection/utils/date-helpers.js.map +1 -1
  133. package/dist/collection/utils/types.js.map +1 -1
  134. package/dist/{esm/date-helpers-2b531c8c.js → components/date-helpers.js} +2 -2
  135. package/dist/components/date-helpers.js.map +1 -0
  136. package/dist/components/helpers2.js +20 -20
  137. package/dist/components/helpers2.js.map +1 -1
  138. package/dist/components/ic-calendar.d.ts +11 -0
  139. package/dist/components/ic-calendar.js +8 -0
  140. package/dist/components/ic-calendar.js.map +1 -0
  141. package/dist/components/ic-calendar2.js +1235 -0
  142. package/dist/components/ic-calendar2.js.map +1 -0
  143. package/dist/components/ic-card-horizontal.js +6 -6
  144. package/dist/components/ic-card-horizontal.js.map +1 -1
  145. package/dist/components/ic-checkbox-group.js +2 -2
  146. package/dist/components/ic-checkbox-group.js.map +1 -1
  147. package/dist/components/ic-checkbox2.js +31 -8
  148. package/dist/components/ic-checkbox2.js.map +1 -1
  149. package/dist/components/ic-data-list.js +2 -2
  150. package/dist/components/ic-data-list.js.map +1 -1
  151. package/dist/components/ic-data-row.js +2 -2
  152. package/dist/components/ic-data-row.js.map +1 -1
  153. package/dist/components/ic-data-table-title-bar.js +3 -3
  154. package/dist/components/ic-data-table.js +8 -8
  155. package/dist/components/ic-date-input2.js +6 -88
  156. package/dist/components/ic-date-input2.js.map +1 -1
  157. package/dist/components/ic-date-picker.js +113 -880
  158. package/dist/components/ic-date-picker.js.map +1 -1
  159. package/dist/components/ic-dialog.js +1 -1
  160. package/dist/components/ic-dialog.js.map +1 -1
  161. package/dist/components/ic-empty-state2.js +2 -2
  162. package/dist/components/ic-empty-state2.js.map +1 -1
  163. package/dist/components/ic-footer-link.js +2 -2
  164. package/dist/components/ic-footer-link.js.map +1 -1
  165. package/dist/components/ic-hero.js +12 -6
  166. package/dist/components/ic-hero.js.map +1 -1
  167. package/dist/components/ic-horizontal-scroll2.js +5 -5
  168. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  169. package/dist/components/ic-input-component-container2.js +3 -3
  170. package/dist/components/ic-input-component-container2.js.map +1 -1
  171. package/dist/components/ic-input-container2.js +2 -2
  172. package/dist/components/ic-input-container2.js.map +1 -1
  173. package/dist/components/ic-input-label2.js +2 -2
  174. package/dist/components/ic-input-label2.js.map +1 -1
  175. package/dist/components/ic-input-validation2.js +3 -3
  176. package/dist/components/ic-input-validation2.js.map +1 -1
  177. package/dist/components/ic-layout-grid-item.js +2 -2
  178. package/dist/components/ic-layout-grid-item.js.map +1 -1
  179. package/dist/components/ic-layout-grid.js +2 -2
  180. package/dist/components/ic-layout-grid.js.map +1 -1
  181. package/dist/components/ic-link2.js +1 -1
  182. package/dist/components/ic-link2.js.map +1 -1
  183. package/dist/components/ic-loading-indicator2.js +5 -5
  184. package/dist/components/ic-loading-indicator2.js.map +1 -1
  185. package/dist/components/ic-menu-group.js +1 -1
  186. package/dist/components/ic-menu-group.js.map +1 -1
  187. package/dist/components/ic-menu2.js +3 -3
  188. package/dist/components/ic-menu2.js.map +1 -1
  189. package/dist/components/ic-navigation-group.js +1 -1
  190. package/dist/components/ic-navigation-group.js.map +1 -1
  191. package/dist/components/ic-navigation-menu2.js +4 -4
  192. package/dist/components/ic-navigation-menu2.js.map +1 -1
  193. package/dist/components/ic-page-header.js +6 -6
  194. package/dist/components/ic-page-header.js.map +1 -1
  195. package/dist/components/ic-pagination-bar2.js +6 -6
  196. package/dist/components/ic-pagination-bar2.js.map +1 -1
  197. package/dist/components/ic-pagination-item2.js +1 -1
  198. package/dist/components/ic-pagination-item2.js.map +1 -1
  199. package/dist/components/ic-pagination2.js +4 -4
  200. package/dist/components/ic-pagination2.js.map +1 -1
  201. package/dist/components/ic-popover-menu.js +4 -4
  202. package/dist/components/ic-popover-menu.js.map +1 -1
  203. package/dist/components/ic-radio-group.js +4 -4
  204. package/dist/components/ic-radio-group.js.map +1 -1
  205. package/dist/components/ic-radio-option.js +4 -4
  206. package/dist/components/ic-radio-option.js.map +1 -1
  207. package/dist/components/ic-search-bar.js +9 -9
  208. package/dist/components/ic-search-bar.js.map +1 -1
  209. package/dist/components/ic-section-container2.js +2 -2
  210. package/dist/components/ic-section-container2.js.map +1 -1
  211. package/dist/components/ic-select2.js +7 -7
  212. package/dist/components/ic-select2.js.map +1 -1
  213. package/dist/components/ic-side-navigation.js +4 -4
  214. package/dist/components/ic-side-navigation.js.map +1 -1
  215. package/dist/components/ic-skeleton.js +2 -2
  216. package/dist/components/ic-skeleton.js.map +1 -1
  217. package/dist/components/ic-skip-link.js +2 -2
  218. package/dist/components/ic-skip-link.js.map +1 -1
  219. package/dist/components/ic-status-tag.js +2 -2
  220. package/dist/components/ic-status-tag.js.map +1 -1
  221. package/dist/components/ic-step.js +13 -13
  222. package/dist/components/ic-step.js.map +1 -1
  223. package/dist/components/ic-stepper.js +2 -2
  224. package/dist/components/ic-stepper.js.map +1 -1
  225. package/dist/components/ic-switch.js +4 -4
  226. package/dist/components/ic-switch.js.map +1 -1
  227. package/dist/components/ic-tab-context.js +1 -1
  228. package/dist/components/ic-tab-context.js.map +1 -1
  229. package/dist/components/ic-tab-group.js +2 -2
  230. package/dist/components/ic-tab-group.js.map +1 -1
  231. package/dist/components/ic-tab-panel.js +2 -2
  232. package/dist/components/ic-tab-panel.js.map +1 -1
  233. package/dist/components/ic-table-of-contents.js +3 -3
  234. package/dist/components/ic-text-field2.js +6 -6
  235. package/dist/components/ic-text-field2.js.map +1 -1
  236. package/dist/components/ic-theme.js +1 -1
  237. package/dist/components/ic-theme.js.map +1 -1
  238. package/dist/components/ic-time-input.js +5 -5
  239. package/dist/components/ic-time-input.js.map +1 -1
  240. package/dist/components/ic-toast-region.js +1 -1
  241. package/dist/components/ic-toast-region.js.map +1 -1
  242. package/dist/components/ic-toast.js +4 -4
  243. package/dist/components/ic-toast.js.map +1 -1
  244. package/dist/components/ic-toggle-button-group.js +2 -2
  245. package/dist/components/ic-toggle-button-group.js.map +1 -1
  246. package/dist/components/ic-toggle-button.js +2 -2
  247. package/dist/components/ic-toggle-button.js.map +1 -1
  248. package/dist/components/ic-tree-item.js +3 -3
  249. package/dist/components/ic-tree-view.js +4 -4
  250. package/dist/core/core.css +21 -9
  251. package/dist/core/core.esm.js +1 -1
  252. package/dist/core/core.esm.js.map +1 -1
  253. package/dist/core/{p-9fade6ad.entry.js → p-0043b019.entry.js} +2 -2
  254. package/dist/core/{p-9fade6ad.entry.js.map → p-0043b019.entry.js.map} +1 -1
  255. package/dist/core/{p-889bb8db.entry.js → p-04cb17d7.entry.js} +2 -2
  256. package/dist/core/{p-889bb8db.entry.js.map → p-04cb17d7.entry.js.map} +1 -1
  257. package/dist/core/{p-5ef453b6.entry.js → p-15c05eb8.entry.js} +2 -2
  258. package/dist/core/{p-5ef453b6.entry.js.map → p-15c05eb8.entry.js.map} +1 -1
  259. package/dist/core/p-1a976789.entry.js +2 -0
  260. package/dist/core/p-1a976789.entry.js.map +1 -0
  261. package/dist/core/{p-1be092cc.entry.js → p-2188b483.entry.js} +2 -2
  262. package/dist/core/{p-1be092cc.entry.js.map → p-2188b483.entry.js.map} +1 -1
  263. package/dist/core/{p-8c94541e.entry.js → p-24bac55f.entry.js} +2 -2
  264. package/dist/core/{p-8c94541e.entry.js.map → p-24bac55f.entry.js.map} +1 -1
  265. package/dist/core/{p-7f304d85.entry.js → p-2646a629.entry.js} +2 -2
  266. package/dist/core/{p-7f304d85.entry.js.map → p-2646a629.entry.js.map} +1 -1
  267. package/dist/core/{p-5cf704e3.entry.js → p-319e3d5b.entry.js} +2 -2
  268. package/dist/core/{p-5cf704e3.entry.js.map → p-319e3d5b.entry.js.map} +1 -1
  269. package/dist/core/{p-9e200827.entry.js → p-31f3fb15.entry.js} +2 -2
  270. package/dist/core/{p-9e200827.entry.js.map → p-31f3fb15.entry.js.map} +1 -1
  271. package/dist/core/{p-fd64c0e5.entry.js → p-3891ce53.entry.js} +2 -2
  272. package/dist/core/{p-fd64c0e5.entry.js.map → p-3891ce53.entry.js.map} +1 -1
  273. package/dist/core/{p-fad44bc8.entry.js → p-3ba2b455.entry.js} +2 -2
  274. package/dist/core/{p-fad44bc8.entry.js.map → p-3ba2b455.entry.js.map} +1 -1
  275. package/dist/core/{p-df220b91.entry.js → p-3ef2e98d.entry.js} +2 -2
  276. package/dist/core/{p-03ae0bc3.entry.js → p-41def410.entry.js} +2 -2
  277. package/dist/core/{p-03ae0bc3.entry.js.map → p-41def410.entry.js.map} +1 -1
  278. package/dist/core/p-4b188516.entry.js +2 -0
  279. package/dist/core/p-4b188516.entry.js.map +1 -0
  280. package/dist/core/{p-93e1ba0a.entry.js → p-5254a078.entry.js} +2 -2
  281. package/dist/core/{p-93e1ba0a.entry.js.map → p-5254a078.entry.js.map} +1 -1
  282. package/dist/core/{p-9c2e9189.entry.js → p-53740194.entry.js} +2 -2
  283. package/dist/core/{p-9c2e9189.entry.js.map → p-53740194.entry.js.map} +1 -1
  284. package/dist/core/{p-e380a54e.entry.js → p-5a4344cb.entry.js} +2 -2
  285. package/dist/core/{p-e380a54e.entry.js.map → p-5a4344cb.entry.js.map} +1 -1
  286. package/dist/core/p-5b32aaf3.entry.js +2 -0
  287. package/dist/core/p-5b32aaf3.entry.js.map +1 -0
  288. package/dist/core/{p-d8200098.entry.js → p-67c3985d.entry.js} +2 -2
  289. package/dist/core/{p-d8200098.entry.js.map → p-67c3985d.entry.js.map} +1 -1
  290. package/dist/core/{p-982a173d.entry.js → p-7332320d.entry.js} +2 -2
  291. package/dist/core/{p-982a173d.entry.js.map → p-7332320d.entry.js.map} +1 -1
  292. package/dist/core/{p-bc441e4c.js → p-75c3b882.js} +2 -2
  293. package/dist/core/{p-bc441e4c.js.map → p-75c3b882.js.map} +1 -1
  294. package/dist/core/{p-b88db5e3.entry.js → p-7a0f62c2.entry.js} +2 -2
  295. package/dist/core/{p-b88db5e3.entry.js.map → p-7a0f62c2.entry.js.map} +1 -1
  296. package/dist/core/p-81f12581.entry.js +2 -0
  297. package/dist/core/p-81f12581.entry.js.map +1 -0
  298. package/dist/core/{p-193afb53.entry.js → p-847cbb16.entry.js} +2 -2
  299. package/dist/core/{p-193afb53.entry.js.map → p-847cbb16.entry.js.map} +1 -1
  300. package/dist/core/{p-f3ccaa0b.entry.js → p-8e592393.entry.js} +2 -2
  301. package/dist/core/{p-f3ccaa0b.entry.js.map → p-8e592393.entry.js.map} +1 -1
  302. package/dist/core/p-9044539c.entry.js +2 -0
  303. package/dist/core/p-9044539c.entry.js.map +1 -0
  304. package/dist/core/{p-f4e7cae6.entry.js → p-90611726.entry.js} +2 -2
  305. package/dist/core/{p-f4e7cae6.entry.js.map → p-90611726.entry.js.map} +1 -1
  306. package/dist/core/{p-b00efb15.entry.js → p-9674b63f.entry.js} +2 -2
  307. package/dist/core/{p-b00efb15.entry.js.map → p-9674b63f.entry.js.map} +1 -1
  308. package/dist/core/{p-a27e1cee.entry.js → p-9a95f428.entry.js} +2 -2
  309. package/dist/core/{p-a27e1cee.entry.js.map → p-9a95f428.entry.js.map} +1 -1
  310. package/dist/core/{p-fb43abd6.entry.js → p-9ca147f3.entry.js} +2 -2
  311. package/dist/core/{p-fb43abd6.entry.js.map → p-9ca147f3.entry.js.map} +1 -1
  312. package/dist/core/{p-a8cc28a6.entry.js → p-9f76eed6.entry.js} +2 -2
  313. package/dist/core/{p-035dbee0.entry.js → p-a1448064.entry.js} +2 -2
  314. package/dist/core/{p-035dbee0.entry.js.map → p-a1448064.entry.js.map} +1 -1
  315. package/dist/core/{p-9ce9d39a.entry.js → p-a237af88.entry.js} +2 -2
  316. package/dist/core/{p-9ce9d39a.entry.js.map → p-a237af88.entry.js.map} +1 -1
  317. package/dist/core/{p-09c31ac6.entry.js → p-adde6c66.entry.js} +2 -2
  318. package/dist/core/{p-09c31ac6.entry.js.map → p-adde6c66.entry.js.map} +1 -1
  319. package/dist/core/{p-72b7051a.entry.js → p-af821831.entry.js} +2 -2
  320. package/dist/core/{p-72b7051a.entry.js.map → p-af821831.entry.js.map} +1 -1
  321. package/dist/core/{p-12e8dcdd.entry.js → p-afedcfdb.entry.js} +2 -2
  322. package/dist/core/{p-12e8dcdd.entry.js.map → p-afedcfdb.entry.js.map} +1 -1
  323. package/dist/core/{p-f098e531.entry.js → p-b4a2f6fa.entry.js} +2 -2
  324. package/dist/core/{p-f098e531.entry.js.map → p-b4a2f6fa.entry.js.map} +1 -1
  325. package/dist/core/p-b4bfaf8f.entry.js +2 -0
  326. package/dist/core/p-b4bfaf8f.entry.js.map +1 -0
  327. package/dist/core/{p-ea1de762.entry.js → p-b80b08ae.entry.js} +2 -2
  328. package/dist/core/p-b80b08ae.entry.js.map +1 -0
  329. package/dist/core/{p-7bf9bbde.entry.js → p-ba21f477.entry.js} +2 -2
  330. package/dist/core/{p-7bf9bbde.entry.js.map → p-ba21f477.entry.js.map} +1 -1
  331. package/dist/core/{p-63203e59.entry.js → p-ba75ed34.entry.js} +2 -2
  332. package/dist/core/{p-63203e59.entry.js.map → p-ba75ed34.entry.js.map} +1 -1
  333. package/dist/core/{p-15a81f32.entry.js → p-bd9a76d8.entry.js} +2 -2
  334. package/dist/core/{p-15a81f32.entry.js.map → p-bd9a76d8.entry.js.map} +1 -1
  335. package/dist/core/{p-10950727.entry.js → p-c3eddb99.entry.js} +2 -2
  336. package/dist/core/{p-10950727.entry.js.map → p-c3eddb99.entry.js.map} +1 -1
  337. package/dist/core/{p-a99ad459.entry.js → p-c5d65718.entry.js} +2 -2
  338. package/dist/core/{p-a99ad459.entry.js.map → p-c5d65718.entry.js.map} +1 -1
  339. package/dist/core/{p-eb958cc8.entry.js → p-c6c87e58.entry.js} +2 -2
  340. package/dist/core/{p-eb958cc8.entry.js.map → p-c6c87e58.entry.js.map} +1 -1
  341. package/dist/core/{p-c8ce7d60.entry.js → p-e00e67ff.entry.js} +2 -2
  342. package/dist/core/{p-c8ce7d60.entry.js.map → p-e00e67ff.entry.js.map} +1 -1
  343. package/dist/core/{p-069e758b.entry.js → p-e1920777.entry.js} +2 -2
  344. package/dist/core/{p-92936b49.entry.js → p-ef5b6622.entry.js} +2 -2
  345. package/dist/core/{p-0f22f41e.js → p-f48ce5f6.js} +2 -2
  346. package/dist/core/p-f48ce5f6.js.map +1 -0
  347. package/dist/core/{p-1ca62941.entry.js → p-f5cea10d.entry.js} +2 -2
  348. package/dist/esm/core.js +1 -1
  349. package/dist/esm/date-helpers-5723de08.js +86 -0
  350. package/dist/esm/{date-helpers-2b531c8c.js.map → date-helpers-5723de08.js.map} +1 -1
  351. package/dist/esm/{helpers-89cb996d.js → helpers-9f228880.js} +21 -21
  352. package/dist/esm/helpers-9f228880.js.map +1 -0
  353. package/dist/esm/ic-button_3.entry.js +5 -5
  354. package/dist/esm/ic-button_3.entry.js.map +1 -1
  355. package/dist/esm/ic-calendar_2.entry.js +2349 -0
  356. package/dist/esm/ic-calendar_2.entry.js.map +1 -0
  357. package/dist/esm/ic-card-horizontal.entry.js +6 -6
  358. package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
  359. package/dist/esm/ic-checkbox-group.entry.js +2 -2
  360. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  361. package/dist/esm/ic-checkbox_3.entry.js +39 -16
  362. package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
  363. package/dist/esm/ic-data-list.entry.js +2 -2
  364. package/dist/esm/ic-data-list.entry.js.map +1 -1
  365. package/dist/esm/ic-data-row.entry.js +2 -2
  366. package/dist/esm/ic-data-row.entry.js.map +1 -1
  367. package/dist/esm/ic-data-table-title-bar.entry.js +4 -4
  368. package/dist/esm/ic-data-table.entry.js +8 -8
  369. package/dist/esm/ic-date-picker.entry.js +100 -856
  370. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  371. package/dist/esm/ic-dialog.entry.js +1 -1
  372. package/dist/esm/ic-dialog.entry.js.map +1 -1
  373. package/dist/esm/ic-footer-link.entry.js +2 -2
  374. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  375. package/dist/esm/ic-hero.entry.js +11 -6
  376. package/dist/esm/ic-hero.entry.js.map +1 -1
  377. package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
  378. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  379. package/dist/esm/ic-input-component-container_4.entry.js +10 -10
  380. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
  381. package/dist/esm/ic-layout-grid-item.entry.js +2 -2
  382. package/dist/esm/ic-layout-grid-item.entry.js.map +1 -1
  383. package/dist/esm/ic-layout-grid.entry.js +2 -2
  384. package/dist/esm/ic-layout-grid.entry.js.map +1 -1
  385. package/dist/esm/ic-link.entry.js +1 -1
  386. package/dist/esm/ic-link.entry.js.map +1 -1
  387. package/dist/esm/ic-menu-group.entry.js +1 -1
  388. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  389. package/dist/esm/ic-menu.entry.js +3 -3
  390. package/dist/esm/ic-menu.entry.js.map +1 -1
  391. package/dist/esm/ic-navigation-group.entry.js +1 -1
  392. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  393. package/dist/esm/ic-navigation-menu.entry.js +4 -4
  394. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  395. package/dist/esm/ic-page-header.entry.js +6 -6
  396. package/dist/esm/ic-page-header.entry.js.map +1 -1
  397. package/dist/esm/ic-pagination_4.entry.js +18 -18
  398. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  399. package/dist/esm/ic-popover-menu.entry.js +4 -4
  400. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  401. package/dist/esm/ic-radio-group.entry.js +4 -4
  402. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  403. package/dist/esm/ic-radio-option.entry.js +4 -4
  404. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  405. package/dist/esm/ic-search-bar.entry.js +9 -9
  406. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  407. package/dist/esm/ic-section-container.entry.js +2 -2
  408. package/dist/esm/ic-section-container.entry.js.map +1 -1
  409. package/dist/esm/ic-side-navigation.entry.js +4 -4
  410. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  411. package/dist/esm/ic-skeleton.entry.js +2 -2
  412. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  413. package/dist/esm/ic-skip-link.entry.js +2 -2
  414. package/dist/esm/ic-skip-link.entry.js.map +1 -1
  415. package/dist/esm/ic-status-tag.entry.js +2 -2
  416. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  417. package/dist/esm/ic-step.entry.js +13 -13
  418. package/dist/esm/ic-step.entry.js.map +1 -1
  419. package/dist/esm/ic-stepper.entry.js +2 -2
  420. package/dist/esm/ic-stepper.entry.js.map +1 -1
  421. package/dist/esm/ic-switch.entry.js +4 -4
  422. package/dist/esm/ic-switch.entry.js.map +1 -1
  423. package/dist/esm/ic-tab-context.entry.js +1 -1
  424. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  425. package/dist/esm/ic-tab-group.entry.js +2 -2
  426. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  427. package/dist/esm/ic-tab-panel.entry.js +2 -2
  428. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  429. package/dist/esm/ic-table-of-contents.entry.js +4 -4
  430. package/dist/esm/ic-theme.entry.js +1 -1
  431. package/dist/esm/ic-theme.entry.js.map +1 -1
  432. package/dist/esm/ic-time-input.entry.js +5 -5
  433. package/dist/esm/ic-time-input.entry.js.map +1 -1
  434. package/dist/esm/ic-toast-region.entry.js +1 -1
  435. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  436. package/dist/esm/ic-toast.entry.js +4 -4
  437. package/dist/esm/ic-toast.entry.js.map +1 -1
  438. package/dist/esm/ic-toggle-button-group.entry.js +2 -2
  439. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  440. package/dist/esm/ic-toggle-button.entry.js +2 -2
  441. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  442. package/dist/esm/ic-tree-item.entry.js +3 -3
  443. package/dist/esm/ic-tree-view.entry.js +4 -4
  444. package/dist/esm/index-a7a720e7.js +4 -4
  445. package/dist/esm/loader.js +1 -1
  446. package/dist/types/components/ic-calendar/ic-calendar.d.ts +216 -0
  447. package/dist/types/components/ic-calendar/ic-calendar.stories.d.ts +151 -0
  448. package/dist/types/components/ic-calendar/test/a11y/ic-calendar.test.a11y.d.ts +1 -0
  449. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +1 -2
  450. package/dist/types/components/ic-date-input/ic-date-input.d.ts +2 -2
  451. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +22 -105
  452. package/dist/types/components/ic-date-picker/ic-date-picker.stories.d.ts +81 -0
  453. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +1 -1
  454. package/dist/types/components/ic-time-input/ic-time-input.d.ts +2 -2
  455. package/dist/types/components.d.ts +213 -14
  456. package/dist/types/utils/date-helpers.d.ts +1 -0
  457. package/dist/types/utils/types.d.ts +1 -0
  458. package/hydrate/index.js +2085 -1639
  459. package/hydrate/index.mjs +2085 -1639
  460. package/package.json +3 -3
  461. package/dist/cjs/helpers-da852478.js.map +0 -1
  462. package/dist/cjs/ic-date-input.cjs.entry.js +0 -1214
  463. package/dist/cjs/ic-date-input.cjs.entry.js.map +0 -1
  464. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +0 -1
  465. package/dist/collection/components/ic-date-picker/ic-month-picker.js +0 -29
  466. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +0 -1
  467. package/dist/collection/components/ic-date-picker/ic-year-picker.js +0 -39
  468. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +0 -1
  469. package/dist/core/p-0f22f41e.js.map +0 -1
  470. package/dist/core/p-13c8859b.entry.js +0 -2
  471. package/dist/core/p-13c8859b.entry.js.map +0 -1
  472. package/dist/core/p-2528ecec.entry.js +0 -2
  473. package/dist/core/p-2528ecec.entry.js.map +0 -1
  474. package/dist/core/p-402870f7.entry.js +0 -2
  475. package/dist/core/p-402870f7.entry.js.map +0 -1
  476. package/dist/core/p-bd8c2e24.entry.js +0 -2
  477. package/dist/core/p-bd8c2e24.entry.js.map +0 -1
  478. package/dist/core/p-c0d4db72.entry.js +0 -2
  479. package/dist/core/p-c0d4db72.entry.js.map +0 -1
  480. package/dist/core/p-ea1de762.entry.js.map +0 -1
  481. package/dist/core/p-f16c4210.entry.js +0 -2
  482. package/dist/core/p-f16c4210.entry.js.map +0 -1
  483. package/dist/esm/helpers-89cb996d.js.map +0 -1
  484. package/dist/esm/ic-date-input.entry.js +0 -1210
  485. package/dist/esm/ic-date-input.entry.js.map +0 -1
  486. /package/dist/collection/components/{ic-date-picker → ic-calendar}/ic-day-button.js +0 -0
  487. /package/dist/core/{p-df220b91.entry.js.map → p-3ef2e98d.entry.js.map} +0 -0
  488. /package/dist/core/{p-a8cc28a6.entry.js.map → p-9f76eed6.entry.js.map} +0 -0
  489. /package/dist/core/{p-069e758b.entry.js.map → p-e1920777.entry.js.map} +0 -0
  490. /package/dist/core/{p-92936b49.entry.js.map → p-ef5b6622.entry.js.map} +0 -0
  491. /package/dist/core/{p-1ca62941.entry.js.map → p-f5cea10d.entry.js.map} +0 -0
  492. /package/dist/types/components/{ic-date-picker → ic-calendar}/ic-day-button.d.ts +0 -0
  493. /package/dist/types/components/{ic-date-picker → ic-calendar}/ic-month-picker.d.ts +0 -0
  494. /package/dist/types/components/{ic-date-picker → ic-calendar}/ic-year-picker.d.ts +0 -0
@@ -1,1210 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7a720e7.js';
2
- import { b as isEmptyString, s as stringEnumToArray, q as getInputDescribedByText, r as removeDisabledFalse, v as removeFormResetListener, w as addFormResetListener, o as onComponentRequiredPropUndefined, t as isNumeric, u as IcInformationStatus, x as renderHiddenInput, k as IcDayNames, l as IcDateInputMonths } from './helpers-89cb996d.js';
3
- import { b as dateMatches, i as isDateOrEpoch, j as convertToDoubleDigits, s as splitStringDate, h as createDate, k as extractDateFromZuluDateTime } from './date-helpers-2b531c8c.js';
4
- import { C as Clear } from './clear-icon-1c79bda2.js';
5
-
6
- const Calendar = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
7
- <path d="M16.6667 2.50004H15.8334V0.833374H14.1667V2.50004H5.83342V0.833374H4.16675V2.50004H3.33341C2.41675 2.50004 1.66675 3.25004 1.66675 4.16671V17.5C1.66675 18.4167 2.41675 19.1667 3.33341 19.1667H16.6667C17.5834 19.1667 18.3334 18.4167 18.3334 17.5V4.16671C18.3334 3.25004 17.5834 2.50004 16.6667 2.50004ZM16.6667 17.5H3.33341V6.66671H16.6667V17.5Z" fill="currentColor"/>
8
- </svg>`;
9
-
10
- const icDateInputCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--ic-input-label-helpertext-padding:var(--ic-space-xs);--input-bg-color:var(--ic-date-input-bg);--ic-input-label-text-color:var(--ic-date-input-label);--ic-input-label-helper-text-color:var(--ic-date-input-subtitle);--border-color:var(--ic-date-input-border);--border-color-disabled:var(--ic-date-input-border-disabled);--border-color-hover:var(--ic-date-input-border-default-hover);--border-color-pressed:var(--ic-date-input-border-default-pressed);--border-error-color:var(--ic-date-input-border-error);--border-error-color-hover:var(--ic-date-input-border-error-hover);--border-error-color-pressed:var(--ic-date-input-border-error-pressed);--border-success-color:var(--ic-date-input-border-success);--border-success-color-hover:var(--ic-date-input-border-success-hover);--border-success-color-pressed:var(--ic-date-input-border-success-pressed);--border-warning-color:var(--ic-date-input-border-warning);--border-warning-color-hover:var(--ic-date-input-border-warning-hover);--border-warning-color-pressed:var(--ic-date-input-border-warning-pressed)}:host(.ic-date-input-disabled){--ic-input-label-text-color:var(--ic-date-input-label-disabled);--ic-input-label-helper-text-color:var(--ic-date-input-subtitle-disabled)}input{border:0;height:100%;padding:0;outline:none;background:none;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield;color:var(--ic-date-input-text-filled);caret-color:var(--ic-date-input-typing-cursor)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}input:-webkit-autofill{box-shadow:0 0 0 var(--ic-space-sm) var(--ic-color-background-primary) inset;-webkit-text-fill-color:var(--ic-date-input-text-filled) !important}input::-moz-placeholder{color:var(--ic-date-input-text-placeholder)}input::placeholder{color:var(--ic-date-input-text-placeholder)}ic-input-component-container{cursor:text}ic-input-component-container .focus-indicator{padding:var(--ic-space-xxxs) var(--ic-space-xs);align-items:center}.date-inputs{color:var(--ic-date-input-text-placeholder)}.day-input{width:1.438rem}.month-input{width:1.813rem}.year-input,.year-input.fit-to-value{width:2.313rem}.fit-to-value{width:1.25rem}.sr-only{position:absolute;left:-9999px}.input-container{width:100%;display:flex;justify-content:space-between;align-items:center;position:relative}.action-buttons{display:flex;align-items:center}.show-calendar-button-wrapper{display:flex;justify-content:center;align-items:center}.clear-button,.calendar-button{border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);margin:0}.clear-button.hidden{display:none}.clear-button:focus,.calendar-button:focus,.clear-button:active,.calendar-button:active{background-color:var(--ic-color-focus-inner) !important;box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer) !important;border-radius:0.25rem}.calendar-button:focus,.calendar-button:active{--ic-button-tertiary-text-active:var(--ic-atoms-input-clear-button-focus);--ic-button-tertiary-text-hover-active:var(\n --ic-atoms-input-clear-button-focus\n );--ic-button-tertiary-text-pressed-active:var(\n --ic-atoms-input-clear-button-focus\n )}.clear-button:focus,.calendar-button:focus,.clear-button:active *,.calendar-button:active *{fill:var(--ic-atoms-input-clear-button-focus)}.clear-button svg{color:var(--ic-date-input-clear-icon)}.clear-button:focus svg{color:var(--ic-atoms-input-clear-button-focus)}.divider{margin:0 var(--ic-space-xxs);width:var(--ic-space-1px);background-color:var(--ic-atoms-input-divider);border-radius:var(--ic-space-1px)}.divider.small{height:var(--ic-space-md)}.divider.medium{height:calc(var(--ic-space-sm) + var(--ic-space-xs))}.divider.large{height:var(--ic-space-lg)}ic-input-validation{--ic-input-validation-status-text-color:var(--ic-date-input-status-text);--ic-input-validation-error:var(--ic-date-input-icon-error);--ic-input-validation-warning-icon-color:var(--ic-date-input-icon-warning);--ic-input-validation-success-icon-color:var(--ic-date-input-icon-success)}@media (forced-colors: active){.clear-button svg{color:currentcolor}}";
11
- const IcDateInputStyle0 = icDateInputCss;
12
-
13
- let inputIds = 0;
14
- const DateInput = class {
15
- constructor(hostRef) {
16
- registerInstance(this, hostRef);
17
- this.calendarButtonClicked = createEvent(this, "calendarButtonClicked", 7);
18
- this.icBlur = createEvent(this, "icBlur", 7);
19
- this.icChange = createEvent(this, "icChange", 7);
20
- this.icFocus = createEvent(this, "icFocus", 7);
21
- this.DEFAULT_DATE_FORMAT = "DD/MM/YYYY";
22
- this.ARIA_INVALID = "aria-invalid";
23
- this.ARIA_LABEL = "aria-label";
24
- this.ARIA_LABELLED_BY = "aria-labelledby";
25
- this.EVENT_OBJECT_STRING = "[object Event]";
26
- this.FIT_TO_VALUE = "fit-to-value";
27
- this.initialValue = this.value;
28
- this.INPUT_EVENT_OBJECT_STRING = "[object InputEvent]";
29
- this.inputsInOrder = [];
30
- this.isAfterMax = false;
31
- this.isBeforeMin = false;
32
- this.preventInputsUpdating = false;
33
- this.isDisabledDate = false;
34
- this.isValidDay = true;
35
- this.isValidMonth = true;
36
- this.isValidDate = true;
37
- this.isZuluTime = false;
38
- this.KEYBOARD_EVENT_OBJECT_STRING = "[object KeyboardEvent]";
39
- this.MAX_DAY = 31;
40
- this.MAX_MONTH = 12;
41
- this.previousSelectedDate = null;
42
- this.selectedDate = null;
43
- this.externalSetDate = false;
44
- this.clearInput = false;
45
- this.calendarIsOpen = false;
46
- this.calendarFocused = false;
47
- this.clearButtonFocused = false;
48
- this.removeLabelledBy = false;
49
- this.day = "";
50
- this.month = "";
51
- this.year = "";
52
- /**
53
- * The format in which the date will be displayed.
54
- */
55
- this.dateFormat = this.DEFAULT_DATE_FORMAT;
56
- /**
57
- * If `true`, every individual input field completed will emit an icChange event.
58
- */
59
- this.emitDatePartChange = false;
60
- /**
61
- * If `true`, the disabled state will be set.
62
- */
63
- this.disabled = false;
64
- /**
65
- * The days of the week to disable.
66
- */
67
- this.disableDays = [];
68
- /**
69
- * The text to display as the validation message when `disableDays` is set and a disabled date is entered.
70
- */
71
- this.disableDaysMessage = "The date you have selected is on a day of the week that is not allowed. Please select another date.";
72
- /**
73
- * If `true`, dates in the future are not allowed. A validation message will appear if a date in the future is entered.
74
- */
75
- this.disableFuture = false;
76
- /**
77
- * The text to display as the validation message when `disableFuture` is true and a date in the future is entered.
78
- */
79
- this.disableFutureMessage = "Dates in the future are not allowed. Please select a date in the past.";
80
- /**
81
- * If `true`, dates in the past are not allowed. A validation message will appear if a date in the past is entered.
82
- */
83
- this.disablePast = false;
84
- /**
85
- * The text to display as the validation message when `disablePast` is true and a date in the past is entered.
86
- */
87
- this.disablePastMessage = "Dates in the past are not allowed. Please select a date in the future.";
88
- /**
89
- * If `true`, the helper text will be visually hidden, but still read out by screenreaders.
90
- */
91
- this.hideHelperText = false;
92
- /**
93
- * If `true`, the label will be visually hidden, but will still be read out by screen readers.
94
- */
95
- this.hideLabel = false;
96
- /**
97
- * The ID for the input.
98
- */
99
- this.inputId = `ic-date-input-${inputIds++}`;
100
- /**
101
- * The text to display as the validation message when an invalid date is entered.
102
- */
103
- this.invalidDateMessage = "Please enter a valid date.";
104
- /**
105
- * The latest date that will be allowed. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.
106
- * The value of this prop is ignored if `disableFuture` is set to `true`.
107
- */
108
- this.max = "";
109
- /**
110
- * The earliest date that will be allowed. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.
111
- * The value of this prop is ignored if `disablePast` is set to `true`.
112
- */
113
- this.min = "";
114
- /**
115
- * The name of the control, which is submitted with the form data.
116
- */
117
- this.name = this.inputId;
118
- /**
119
- * If `true`, the input will require a value.
120
- */
121
- this.required = false;
122
- /**
123
- * @internal If `true`, a button which displays the calendar view when clicked will be displayed.
124
- */
125
- this.showCalendarButton = false;
126
- /**
127
- * If `true`, a button which clears the date input when clicked will be displayed.
128
- */
129
- this.showClearButton = true;
130
- /**
131
- * The size of the date input to be displayed.
132
- */
133
- this.size = "medium";
134
- /**
135
- * 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.
136
- */
137
- this.theme = "inherit";
138
- /**
139
- * The value of the date input. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.
140
- */
141
- this.value = "";
142
- /**
143
- * The value of the `aria-live` attribute on the validation message.
144
- */
145
- this.validationAriaLive = "polite";
146
- /**
147
- * The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in date validation.
148
- */
149
- this.validationStatus = "";
150
- /**
151
- * The text to display as the validation message. This will override the built-in date validation.
152
- */
153
- this.validationText = "";
154
- this.setInputPasteValue = (input, pastedValue) => {
155
- if (input) {
156
- const inputEl = input;
157
- inputEl.value = pastedValue;
158
- inputEl.classList.add(this.FIT_TO_VALUE);
159
- }
160
- };
161
- this.checkSingleCopiedValueIsValid = (input, pastedValue) => {
162
- let isValid = false;
163
- const value = Number(pastedValue);
164
- switch (input) {
165
- case this.dayInputEl:
166
- isValid = value >= 1 && value <= this.MAX_DAY;
167
- break;
168
- case this.monthInputEl:
169
- isValid = value >= 1 && value <= this.MAX_MONTH;
170
- break;
171
- case this.yearInputEl:
172
- isValid = true;
173
- break;
174
- }
175
- return isValid;
176
- };
177
- /**
178
- * Using Object.prototype.string to determine type if event from user
179
- * @param event - event object used to differentiate keyboard, generic or input event
180
- * @returns boolean
181
- */
182
- this.isKeyboardOrEvent = (event) => {
183
- return (Object.prototype.toString.call(event) === this.EVENT_OBJECT_STRING ||
184
- Object.prototype.toString.call(event) ===
185
- this.KEYBOARD_EVENT_OBJECT_STRING);
186
- };
187
- this.setDateValidity = () => {
188
- if (!isEmptyString(this.day)) {
189
- this.isValidDay = +this.day > this.MAX_DAY ? false : true;
190
- }
191
- else {
192
- this.isValidDay = true;
193
- }
194
- if (!isEmptyString(this.month)) {
195
- this.isValidMonth = +this.month > this.MAX_MONTH ? false : true;
196
- }
197
- else {
198
- this.isValidMonth = true;
199
- }
200
- };
201
- this.handleInput = (event) => {
202
- const inputEvent = event;
203
- const input = event.target;
204
- if (input !== this.yearInputEl) {
205
- // Only auto-format if input event is not a character being deleted
206
- // and not as user is changing value using up / down keys
207
- if (inputEvent.inputType !== "deleteContentBackward" &&
208
- !this.preventAutoFormatting) {
209
- if (input.value.length === 1 &&
210
- ((input === this.dayInputEl && +input.value >= 4) ||
211
- (input === this.monthInputEl && +input.value >= 2)) &&
212
- +input.value <= 9) {
213
- this.setInputValue(input);
214
- this.notifyScreenReader(input, event);
215
- this.moveToNextInput(input);
216
- }
217
- if (input.value.length === 2) {
218
- if (+input.value === 0) {
219
- input.value = "01";
220
- }
221
- this.setInputValue(input);
222
- this.setPreventInput(input, true);
223
- this.notifyScreenReader(input, event);
224
- this.moveToNextInput(input);
225
- }
226
- else {
227
- this.setPreventInput(input, false);
228
- }
229
- }
230
- else if (this.preventAutoFormatting) {
231
- /**
232
- * Using arrow keys prevents auto formatting so need to deal with
233
- * switching from arrow keys to inputting numbers
234
- **/
235
- if (input.value.length === 2 && !this.isKeyboardOrEvent(event)) {
236
- this.setInputValue(input);
237
- this.setPreventInput(input, true);
238
- this.moveToNextInput(input);
239
- }
240
- else {
241
- this.setInputValue(input);
242
- }
243
- }
244
- if (input.value.length !== 2) {
245
- this.setPreventInput(input, false);
246
- }
247
- }
248
- else {
249
- if (input.value.length === 4) {
250
- this.setInputValue(input);
251
- if (Object.prototype.toString.call(event) !== this.EVENT_OBJECT_STRING) {
252
- this.moveToNextInput(input);
253
- }
254
- this.setPreventInput(input, true);
255
- }
256
- else {
257
- this.setPreventInput(input, false);
258
- }
259
- }
260
- // Add / remove class to make input width match size of value i.e. 2 digits' width for day / month, 4 for year
261
- this.setFitToValueStyling(input);
262
- if (input.value.length === 0) {
263
- this.setInputValue(input, true);
264
- this.setValidationMessage();
265
- }
266
- this.notifyScreenReader(input, event);
267
- };
268
- this.handleKeyDown = (event, isInputPrevented) => {
269
- var _a;
270
- const input = event.target;
271
- const eventKey = (_a = event.key) === null || _a === void 0 ? void 0 : _a.toLowerCase();
272
- // Regex required due to FF allowing all characters as values for number text field.
273
- const regex = /-?\d*\.?\d+(e[-+]?\d+)?|[/-]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;
274
- if (!regex.test(eventKey) &&
275
- !((event.ctrlKey || event.metaKey) &&
276
- (eventKey === "v" || eventKey === "c"))) {
277
- event.preventDefault();
278
- }
279
- switch (eventKey) {
280
- case "/":
281
- case "-":
282
- case ".":
283
- event.preventDefault();
284
- this.setPasteInvalidText();
285
- this.moveToNextInput(input);
286
- break;
287
- case "arrowright":
288
- case "arrowleft":
289
- event.preventDefault();
290
- this.handleLeftRightArrowKeyPress(input, eventKey);
291
- break;
292
- case "arrowup":
293
- case "arrowdown":
294
- this.preventAutoFormatting = true;
295
- this.handleUpDownArrowKeyPress(input, event);
296
- break;
297
- case "backspace":
298
- if (input.value.length === 0) {
299
- event.preventDefault();
300
- this.moveToPreviousInput(input);
301
- }
302
- break;
303
- }
304
- this.preventInput(event, isInputPrevented);
305
- this.preventInputsUpdating = true;
306
- };
307
- this.handleFocus = (event) => {
308
- // Highlight / select all characters in input for easy replacement
309
- const input = event.target;
310
- input.select();
311
- };
312
- this.handleBlur = (event) => {
313
- const input = event.target;
314
- if (input) {
315
- this.setPasteInvalidText();
316
- this.autocompleteInput(input);
317
- }
318
- };
319
- this.handleLeftRightArrowKeyPress = (input, key) => {
320
- if (key === "arrowright") {
321
- this.moveToNextInput(input);
322
- }
323
- else {
324
- this.moveToPreviousInput(input);
325
- }
326
- this.setPasteInvalidText();
327
- };
328
- this.notifyScreenReaderSelectedDate = () => {
329
- if (this.selectedDate && this.selectedDateInfoEl) {
330
- const dayNames = stringEnumToArray(IcDayNames);
331
- const months = stringEnumToArray(IcDateInputMonths);
332
- this.selectedDateInfoEl.textContent = `Selected date: ${dayNames[this.selectedDate.getDay()]}, ${this.selectedDate.getDate()} ${months[this.selectedDate.getMonth()]} ${this.selectedDate.getFullYear()}`;
333
- }
334
- };
335
- this.handleUpDownArrowKeyPress = (input, event) => {
336
- const minValue = input === this.yearInputEl ? 0 : 1;
337
- let maxValue = 9999;
338
- switch (input) {
339
- case this.dayInputEl:
340
- maxValue = this.MAX_DAY;
341
- break;
342
- case this.monthInputEl:
343
- maxValue = this.MAX_MONTH;
344
- break;
345
- case this.yearInputEl:
346
- maxValue = 9999;
347
- }
348
- // Make value loop round when min / max reached
349
- if (input === null || input === void 0 ? void 0 : input.value) {
350
- if (event.key === "ArrowUp") {
351
- if (+input.value === maxValue) {
352
- event.preventDefault();
353
- input.value = `0${minValue}`;
354
- }
355
- else {
356
- input.value =
357
- +input.value + 1 < 10
358
- ? `0${+input.value + 1}`
359
- : (+input.value + 1).toString();
360
- }
361
- this.notifyScreenReader(input, event);
362
- }
363
- if (event.key === "ArrowDown") {
364
- if (+input.value === minValue) {
365
- event.preventDefault();
366
- input.value = maxValue.toString();
367
- }
368
- else {
369
- input.value =
370
- +input.value - 1 < 10
371
- ? `0${+input.value - 1}`
372
- : (+input.value - 1).toString();
373
- }
374
- this.notifyScreenReader(input, event);
375
- }
376
- }
377
- else {
378
- if (event.key === "ArrowDown") {
379
- event.preventDefault();
380
- input.value =
381
- input === this.yearInputEl
382
- ? new Date().getFullYear().toString()
383
- : maxValue.toString();
384
- this.notifyScreenReader(input, event);
385
- }
386
- else if (event.key === "ArrowUp") {
387
- event.preventDefault();
388
- input.value =
389
- input === this.yearInputEl
390
- ? new Date().getFullYear().toString()
391
- : `0${minValue}`;
392
- this.notifyScreenReader(input, event);
393
- }
394
- }
395
- this.setInputValue(input);
396
- this.setFitToValueStyling(input);
397
- };
398
- this.handleDateChange = (force) => {
399
- // Prevent icChange being emitted when each individual input is changed
400
- // This method is used within componentWillUpdate instead of using @Watch('value');
401
- if (force || !dateMatches(this.selectedDate, this.previousSelectedDate)) {
402
- if (this.value) {
403
- this.inputsInOrder.forEach((input) => {
404
- input.classList.add(this.FIT_TO_VALUE);
405
- });
406
- }
407
- if (this.day && this.month && this.year && this.invalidDateText === "") {
408
- this.setValueAndEmitChange(this.selectedDate);
409
- this.notifyScreenReaderSelectedDate();
410
- }
411
- else if (!(this.selectedDate === null && this.previousSelectedDate === null) &&
412
- this.selectedDateInfoEl) {
413
- this.setValueAndEmitChange(null);
414
- this.selectedDateInfoEl.textContent = "";
415
- }
416
- this.previousSelectedDate = this.selectedDate;
417
- if (!this.preventInputsUpdating) {
418
- this.updateInputValues(this.day, this.month, this.year);
419
- }
420
- }
421
- };
422
- this.slicePastedDate = (valueLength, datePart) => {
423
- return datePart.length > valueLength
424
- ? datePart.slice(0, valueLength)
425
- : datePart;
426
- };
427
- this.isPastedStringDateValid = (value) => {
428
- if (/\d+-\d+-\d+$/.test(value) ||
429
- /\d+\/\d+\/\d+/.test(value) ||
430
- /\d+\.\d+\.\d+/.test(value)) {
431
- return true;
432
- }
433
- if (/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:\.\d+)?)?Z/.test(value)) {
434
- this.isZuluTime = true;
435
- return true;
436
- }
437
- return false;
438
- };
439
- // Set value of each input to value of pasted date part
440
- // Allows formats separated by '-' or '/'
441
- this.handlePaste = (event) => {
442
- var _a;
443
- event.preventDefault();
444
- const pastedValue = ((_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData("Text")) || "";
445
- const isValidDate = this.isPastedStringDateValid(pastedValue);
446
- this.setPastedValueAndValidation(isValidDate, pastedValue, event);
447
- };
448
- this.setDate = (date) => {
449
- if (date === null || date === "" || date === undefined) {
450
- if (this.day)
451
- this.day = "";
452
- if (this.month)
453
- this.month = "";
454
- if (this.year)
455
- this.year = "";
456
- this.inputsInOrder.forEach((input) => {
457
- input.classList.remove(this.FIT_TO_VALUE);
458
- this.setPreventInput(input, false);
459
- });
460
- this.handleDateChange(true);
461
- }
462
- else {
463
- if (isDateOrEpoch(date)) {
464
- let newDate;
465
- if (typeof date === "string") {
466
- // Checking if epoch date time
467
- newDate = new Date(+date);
468
- }
469
- else {
470
- newDate = date;
471
- }
472
- this.day = convertToDoubleDigits(newDate.getDate());
473
- this.month = convertToDoubleDigits(newDate.getMonth() + 1);
474
- this.year = newDate.getFullYear().toString();
475
- }
476
- else if (typeof date === "string") {
477
- const defaultDateArray = splitStringDate(date, this.dateFormat);
478
- this.selectedDate = new Date(Number(defaultDateArray[0]), Number(defaultDateArray[1]) - 1, Number(defaultDateArray[2]));
479
- this.year = defaultDateArray[0];
480
- this.month = defaultDateArray[1];
481
- this.day = defaultDateArray[2];
482
- this.setValueAndEmitChange(this.selectedDate);
483
- }
484
- }
485
- this.setValidationMessage();
486
- };
487
- this.formatMinMax = (date) => {
488
- let formattedDate;
489
- const day = convertToDoubleDigits(date.getDate());
490
- const month = convertToDoubleDigits(date.getMonth() + 1);
491
- const year = date.getFullYear();
492
- switch (this.dateFormat) {
493
- case this.DEFAULT_DATE_FORMAT:
494
- formattedDate = `${day}/${month}/${year}`;
495
- break;
496
- case "MM/DD/YYYY":
497
- formattedDate = `${month}/${day}/${year}`;
498
- break;
499
- case "YYYY/MM/DD":
500
- formattedDate = `${year}/${month}/${day}`;
501
- break;
502
- }
503
- return formattedDate;
504
- };
505
- this.updateInputValues = (day, month, year) => {
506
- if (this.dayInputEl && this.monthInputEl && this.yearInputEl) {
507
- this.dayInputEl.value = day;
508
- this.monthInputEl.value = month;
509
- this.yearInputEl.value = year;
510
- }
511
- };
512
- // Set value in state based on input
513
- this.setInputValue = (input, clear = false) => {
514
- const newValue = clear ? "" : input.value;
515
- switch (input) {
516
- case this.dayInputEl:
517
- this.day = newValue;
518
- break;
519
- case this.monthInputEl:
520
- this.month = newValue;
521
- break;
522
- case this.yearInputEl:
523
- if (this.year !== newValue) {
524
- this.year = newValue;
525
- }
526
- }
527
- this.setValidationMessage();
528
- };
529
- this.setValidationMessage = () => {
530
- this.setDateValidity();
531
- if (!isEmptyString(this.day) &&
532
- !isEmptyString(this.month) &&
533
- !isEmptyString(this.year)) {
534
- // Check whether date actually exists
535
- // (used https://www.hectane.com/blog/javascript-date-validation-with-leap-year)
536
- this.selectedDate = this.convertToDate(this.year, this.month, this.day);
537
- this.isValidDate =
538
- !!this.selectedDate && this.selectedDate.getDate() == +this.day;
539
- this.isDisabledDate = this.isSelectedDateDisabled();
540
- if (!this.isValidDate || this.isDisabledDate) {
541
- this.inputsInOrder.forEach((input) => input.setAttribute(this.ARIA_INVALID, "true"));
542
- }
543
- else {
544
- this.inputsInOrder.forEach((input) => input.removeAttribute(this.ARIA_INVALID));
545
- }
546
- }
547
- else {
548
- this.selectedDate = null;
549
- }
550
- if (!(this.isValidDay && this.isValidMonth && this.isValidDate)) {
551
- this.invalidDateText = this.invalidDateMessage;
552
- }
553
- else if (this.isDisabledDate && this.selectedDate !== null) {
554
- if (this.isBeforeMin) {
555
- if (this.disablePast) {
556
- this.invalidDateText = this.disablePastMessage;
557
- }
558
- else {
559
- this.invalidDateText = `Please enter a date after ${this.formatMinMax(this.minDate)}.`;
560
- }
561
- }
562
- else if (this.isAfterMax) {
563
- if (this.disableFuture) {
564
- this.invalidDateText = this.disableFutureMessage;
565
- }
566
- else {
567
- this.invalidDateText = `Please enter a date before ${this.formatMinMax(this.maxDate)}.`;
568
- }
569
- }
570
- else if (this.disableDays.length !== 0) {
571
- this.invalidDateText = this.disableDaysMessage;
572
- }
573
- else {
574
- if (this.disablePast) {
575
- this.invalidDateText = this.disablePastMessage;
576
- }
577
- if (this.disableFuture) {
578
- this.invalidDateText = this.disableFutureMessage;
579
- }
580
- }
581
- }
582
- else {
583
- this.invalidDateText = "";
584
- }
585
- };
586
- // Set refs to the input elements in the order they are displayed (based on the dateFormat)
587
- this.setInputsInOrder = () => {
588
- var _a;
589
- (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("input").forEach((input) => this.inputsInOrder.push(input));
590
- };
591
- // Includes text usually added using aria-describedby
592
- // (which doesn't work on input component container)
593
- this.setAriaLabelledBy = () => {
594
- var _a, _b, _c;
595
- if (this.disabled &&
596
- !isEmptyString((_a = this.inputCompContainerEl) === null || _a === void 0 ? void 0 : _a.getAttribute(this.ARIA_LABELLED_BY))) {
597
- this.removeAriaLabelledBy();
598
- return;
599
- }
600
- if (this.disabled) {
601
- return;
602
- }
603
- const labelEl = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("label");
604
- const labelId = `${this.inputId}-label`;
605
- if (labelEl !== null && labelEl !== undefined) {
606
- labelEl.id = labelId;
607
- }
608
- const hasValidation = !isEmptyString(this.validationStatus) ||
609
- !isEmptyString(this.invalidDateText);
610
- const labelledBy = `${(_c = labelEl === null || labelEl === void 0 ? void 0 : labelEl.id) !== null && _c !== void 0 ? _c : ""} ${this.screenReaderInfoId} ${getInputDescribedByText(this.el, this.inputId, this.helperText !== "" && this.helperText !== this.defaultHelperText, hasValidation)} ${this.selectedDate ? this.selectedDateInfoId : ""} ${this.assistiveHintId}`;
611
- this.inputCompContainerEl.setAttribute(this.ARIA_LABELLED_BY, labelledBy);
612
- };
613
- // Sets boolean for each input, used to limit the number of characters within each field (2 for day / month, 4 for year)
614
- this.setPreventInput = (input, isPrevented) => {
615
- switch (input) {
616
- case this.dayInputEl:
617
- this.preventDayInput = isPrevented;
618
- break;
619
- case this.monthInputEl:
620
- this.preventMonthInput = isPrevented;
621
- break;
622
- case this.yearInputEl:
623
- this.preventYearInput = isPrevented;
624
- }
625
- };
626
- // Get input based on letter representing each date part ("D", "M" or "Y")
627
- // (retrieved from dateFormat)
628
- this.getInputFromDatePart = (datePart) => {
629
- const dayInput = (h("input", { class: "day-input", id: "day-input", ref: (el) => (this.dayInputEl = el), "aria-label": "day", placeholder: "DD", disabled: this.disabled, "aria-required": `${this.required}`, onPaste: this.handlePaste, inputmode: "number", pattern: "[0-9]*", onKeyDown: (event) => this.handleKeyDown(event, this.preventDayInput) }));
630
- const monthInput = (h("input", { id: "month-input", class: "month-input", ref: (el) => (this.monthInputEl = el), "aria-label": "month", placeholder: "MM", disabled: this.disabled, "aria-required": `${this.required}`, onPaste: this.handlePaste, inputmode: "number", pattern: "[0-9]*", onKeyDown: (event) => this.handleKeyDown(event, this.preventMonthInput) }));
631
- const yearInput = (h("input", { id: "year-input", class: "year-input", ref: (el) => (this.yearInputEl = el), "aria-label": "year", placeholder: "YYYY", maxLength: 4, disabled: this.disabled, "aria-required": `${this.required}`, onPaste: this.handlePaste, inputmode: "number", pattern: "[0-9]*", onKeyDown: (event) => this.handleKeyDown(event, this.preventYearInput) }));
632
- let input;
633
- switch (datePart) {
634
- case "D":
635
- input = dayInput;
636
- break;
637
- case "M":
638
- input = monthInput;
639
- break;
640
- case "Y":
641
- input = yearInput;
642
- }
643
- return input;
644
- };
645
- // Get input elements in order of chosen date format
646
- this.getInputsInOrder = () => {
647
- const dateParts = this.dateFormat.split("/");
648
- const inputsInOrder = [];
649
- dateParts.forEach((part) => {
650
- inputsInOrder.push(this.getInputFromDatePart(part.substring(0, 1)));
651
- });
652
- return inputsInOrder;
653
- };
654
- // To add to the end of assistive hint to make it clearer that each date part has its own input
655
- // that can be changed individually
656
- this.getDescOfInputsOrder = () => {
657
- let description;
658
- switch (this.dateFormat) {
659
- case this.DEFAULT_DATE_FORMAT:
660
- description = "day, month, and year";
661
- break;
662
- case "MM/DD/YYYY":
663
- description = "month, day, and year";
664
- break;
665
- case "YYYY/MM/DD":
666
- description = "year, month, and day";
667
- }
668
- return description;
669
- };
670
- // Add 'required' or 'invalid data' to span used in aria-labelledby
671
- // Many ARIA attributes aren't read out by screen reader when on the input component container
672
- this.getScreenReaderInfo = (validationStatus) => {
673
- let inputDescriptors = "";
674
- if (this.required) {
675
- inputDescriptors += "required";
676
- }
677
- if (validationStatus === IcInformationStatus.Error) {
678
- inputDescriptors += " invalid data";
679
- }
680
- return inputDescriptors === "" ? "" : inputDescriptors + ", ";
681
- };
682
- // Prevent non-number characters being entered
683
- // ('e' or '.' - which are usually allowed in <input type="number">)
684
- // And limit the number of characters within each field (2 for day / month, 4 for year)
685
- // (because 'maxlength' doesn't work on <input type="number">)
686
- this.preventInput = (event, isInputPrevented) => {
687
- const key = event.key;
688
- const input = event.target;
689
- let selectedString;
690
- if (input) {
691
- selectedString = input.value.substring(input.selectionStart || 0, input.selectionEnd || undefined);
692
- }
693
- if (key === "e" ||
694
- key === "." ||
695
- key === "-" ||
696
- (event.key >= "0" &&
697
- event.key <= "9" &&
698
- isInputPrevented &&
699
- !selectedString)) {
700
- event.preventDefault();
701
- }
702
- };
703
- /**
704
- * Get whether date has been disabled using disableFuture or disablePast prop, but always allow current day
705
- * Consider using dateClamp and inDateRange
706
- * @returns `boolean`
707
- */
708
- this.isSelectedDateDisabled = () => {
709
- if (!this.selectedDate)
710
- return false;
711
- const currentDate = new Date();
712
- const isNotToday = this.selectedDate.toDateString() !== currentDate.toDateString();
713
- this.isAfterMax =
714
- this.maxDate && this.selectedDate > this.maxDate && isNotToday;
715
- this.isBeforeMin =
716
- this.minDate && this.selectedDate < this.minDate && isNotToday;
717
- return (this.isAfterMax ||
718
- this.isBeforeMin ||
719
- this.disableDays.includes(this.selectedDate.getDay()) ||
720
- (((!!this.disablePast && this.selectedDate < currentDate) ||
721
- (!!this.disableFuture && this.selectedDate > currentDate)) &&
722
- isNotToday));
723
- };
724
- this.moveToNextInput = (currentInput) => {
725
- var _a;
726
- this.preventAutoFormatting = false;
727
- (_a = this.inputsInOrder[this.inputsInOrder.findIndex((input) => input === currentInput) + 1]) === null || _a === void 0 ? void 0 : _a.focus();
728
- };
729
- this.moveToPreviousInput = (currentInput) => {
730
- var _a;
731
- this.preventAutoFormatting = false;
732
- (_a = this.inputsInOrder[this.inputsInOrder.findIndex((input) => input === currentInput) - 1]) === null || _a === void 0 ? void 0 : _a.focus();
733
- };
734
- this.autocompleteInput = (input) => {
735
- const inputValue = input.value;
736
- if (this.yearInputEl && input === this.yearInputEl) {
737
- // Autocomplete year as current millennium when fewer than 4 characters entered
738
- const yearNumbers = ["2", "0", "0"];
739
- let autocompletedInput = "";
740
- if (inputValue) {
741
- yearNumbers.forEach((number, index) => {
742
- if (inputValue.length + index <= 3) {
743
- autocompletedInput += number;
744
- }
745
- });
746
- this.yearInputEl.value = `${autocompletedInput}${inputValue}`;
747
- }
748
- }
749
- else if (inputValue.length === 1) {
750
- // Autocomplete input as 2 characters (leading zero) when only 1 character entered (for day and month)
751
- input.value = +inputValue === 0 ? "01" : `0${inputValue}`;
752
- }
753
- if (input.value) {
754
- this.setInputValue(input);
755
- }
756
- };
757
- this.convertToDate = (year, month, day) => {
758
- if (!isEmptyString(year) && !isEmptyString(month) && !isEmptyString(day)) {
759
- return new Date(+year, +month - 1, +day);
760
- }
761
- else {
762
- return null;
763
- }
764
- };
765
- this.handleHostBlur = () => {
766
- this.removeLabelledBy = false;
767
- this.icBlur.emit({ value: this.selectedDate });
768
- };
769
- this.handleHostFocus = () => {
770
- var _a, _b;
771
- if ((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) === null || _b === void 0 ? void 0 : _b.id.match(/(day|month|year)-input$/)) {
772
- this.removeLabelledBy = false;
773
- }
774
- else {
775
- this.removeLabelledBy = true;
776
- }
777
- this.icFocus.emit({ value: this.selectedDate });
778
- };
779
- this.handleFormReset = () => {
780
- // Get the initial value and populate day, month and year again.
781
- this.setDate(this.initialValue);
782
- this.setValidationMessage();
783
- this.handleDateChange(false);
784
- };
785
- this.getAriaLabel = (input) => input.getAttribute(this.ARIA_LABEL);
786
- this.notifyScreenReaderArrowKeys = (input) => {
787
- var _a;
788
- const liveRegion = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("#live-region");
789
- const ariaLabel = this.getAriaLabel(input);
790
- if (liveRegion && input.value && ariaLabel) {
791
- let announcement = "";
792
- if (input === this.monthInputEl &&
793
- !!IcDateInputMonths[+input.value - 1]) {
794
- announcement = `${input.value} - ${IcDateInputMonths[+input.value - 1]}, ${ariaLabel}`;
795
- }
796
- if (input === this.dayInputEl || input === this.yearInputEl) {
797
- announcement = `${input.value}, ${ariaLabel}`;
798
- }
799
- liveRegion.textContent = announcement;
800
- }
801
- };
802
- this.notifyScreenReaderInput = (input, liveRegion) => {
803
- const ariaLabel = this.getAriaLabel(input);
804
- const value = input.value;
805
- if (ariaLabel && value) {
806
- let announcement = "";
807
- const monthValue = IcDateInputMonths[+value - 1];
808
- if (input === this.monthInputEl &&
809
- !!monthValue &&
810
- this.isValidMonth &&
811
- value.length === 2) {
812
- announcement = `${value} - ${monthValue}`;
813
- }
814
- else if ((input === this.dayInputEl && this.isValidDay && value.length === 2) ||
815
- (input === this.yearInputEl && value.length === 4)) {
816
- announcement = value;
817
- }
818
- liveRegion.textContent = `${announcement}, ${ariaLabel}`;
819
- }
820
- };
821
- this.setFitToValueStyling = (input) => {
822
- if (input.value) {
823
- input.classList.add(this.FIT_TO_VALUE);
824
- }
825
- else {
826
- input.classList.remove(this.FIT_TO_VALUE);
827
- }
828
- };
829
- this.setAriaInvalid = (validDay, validMonth, validDate, disabledDate) => {
830
- var _a, _b;
831
- if (this.inputsInOrder.length) {
832
- this.inputsInOrder.forEach((input) => {
833
- input.removeAttribute(this.ARIA_INVALID);
834
- });
835
- if (!validDay) {
836
- (_a = this.dayInputEl) === null || _a === void 0 ? void 0 : _a.setAttribute(this.ARIA_INVALID, "true");
837
- }
838
- if (!validMonth) {
839
- (_b = this.monthInputEl) === null || _b === void 0 ? void 0 : _b.setAttribute(this.ARIA_INVALID, "true");
840
- }
841
- if (!validDate || disabledDate) {
842
- this.inputsInOrder.forEach((input) => {
843
- input.setAttribute(this.ARIA_INVALID, "true");
844
- });
845
- }
846
- }
847
- };
848
- this.handleClear = () => {
849
- this.clearInput = true;
850
- this.inputsInOrder.forEach((input) => {
851
- input.classList.remove(this.FIT_TO_VALUE);
852
- this.setInputValue(input, true);
853
- this.setPreventInput(input, false);
854
- });
855
- this.clearInput = false;
856
- this.preventInputsUpdating = false;
857
- this.setValidationMessage();
858
- this.handleDateChange(true);
859
- this.inputsInOrder[0].focus();
860
- };
861
- this.handleCalendarOpen = (ev) => {
862
- var _a, _b, _c, _d, _e, _f;
863
- ev.stopImmediatePropagation();
864
- (_c = (_b = (_a = this.calendarButtonEl) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("ic-tooltip")) === null || _c === void 0 ? void 0 : _c.displayTooltip(false);
865
- this.calendarButtonClicked.emit({ value: this.selectedDate });
866
- (_f = (_e = (_d = this.calendarButtonEl) === null || _d === void 0 ? void 0 : _d.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector("ic-tooltip")) === null || _f === void 0 ? void 0 : _f.displayTooltip(false);
867
- this.preventInputsUpdating = false;
868
- this.calendarIsOpen = true;
869
- };
870
- this.setValueAndEmitChange = (value) => {
871
- if (!dateMatches(this.value ? new Date(this.value) : null, value)) {
872
- this.emitIcChange(value);
873
- this.value = value;
874
- }
875
- };
876
- this.handleCalendarFocus = () => {
877
- this.calendarFocused = true;
878
- if (this.calendarIsOpen) {
879
- // focus event triggered by closing calendar dialog so inputs should update
880
- this.preventInputsUpdating = false;
881
- this.calendarIsOpen = false;
882
- }
883
- else {
884
- this.preventInputsUpdating = true;
885
- }
886
- };
887
- this.handleCalendarBlur = () => {
888
- this.calendarFocused = false;
889
- this.preventInputsUpdating = true;
890
- };
891
- this.handleClearFocus = () => {
892
- this.removeLabelledBy = true;
893
- this.preventInputsUpdating = true;
894
- this.clearButtonFocused = true;
895
- };
896
- this.handleClearBlur = (ev) => {
897
- var _a;
898
- this.clearButtonFocused = false;
899
- this.preventInputsUpdating = true;
900
- if ((_a = ev.relatedTarget) === null || _a === void 0 ? void 0 : _a.id.match(/(day|year)-input$/)) {
901
- this.removeLabelledBy = false;
902
- return;
903
- }
904
- this.removeLabelledBy = true;
905
- };
906
- this.emitIcChange = (d) => {
907
- this.selectedDate = d;
908
- if (!dateMatches(this.selectedDate, d) ||
909
- this.day !== null ||
910
- this.month !== null ||
911
- this.year !== null) {
912
- let UTCDate = null;
913
- if (d !== null) {
914
- UTCDate = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()));
915
- }
916
- this.icChange.emit({
917
- value: d,
918
- dateObject: {
919
- day: this.day === "" ? null : this.day,
920
- month: this.month === "" ? null : this.month,
921
- year: this.year === "" ? null : this.year,
922
- },
923
- utcValue: UTCDate,
924
- });
925
- }
926
- };
927
- }
928
- watchInputHandler() {
929
- if (this.emitDatePartChange &&
930
- !this.externalSetDate &&
931
- !this.clearInput &&
932
- !(this.day && this.month && this.year) &&
933
- this.selectedDate === null) {
934
- this.emitIcChange(this.selectedDate);
935
- }
936
- }
937
- watchDisabledHandler() {
938
- removeDisabledFalse(this.disabled, this.el);
939
- }
940
- watchDisableFutureHandler() {
941
- this.watchMaxHandler();
942
- }
943
- watchDisablePastHandler() {
944
- this.watchMinHandler();
945
- }
946
- watchMaxHandler() {
947
- if (this.disableFuture) {
948
- this.maxDate = new Date();
949
- }
950
- else {
951
- this.maxDate = createDate(this.max, this.dateFormat);
952
- }
953
- }
954
- watchMinHandler() {
955
- if (this.disablePast) {
956
- this.minDate = new Date();
957
- }
958
- else {
959
- this.minDate = createDate(this.min, this.dateFormat);
960
- }
961
- }
962
- watchRequiredHandler() {
963
- var _a, _b;
964
- // Prevent asterisk being read out after the label by screen reader (by applying aria-hidden)
965
- // Needed because label is included in 'aria-labelledby' instead of using 'aria-label'
966
- const labelEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("label");
967
- if (this.required) {
968
- const asteriskSpan = document.createElement("span");
969
- asteriskSpan.setAttribute("id", "asterisk-span");
970
- asteriskSpan.setAttribute("aria-hidden", "true");
971
- asteriskSpan.textContent = " *";
972
- labelEl === null || labelEl === void 0 ? void 0 : labelEl.appendChild(asteriskSpan);
973
- }
974
- else {
975
- const asteriskSpan = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("#asterisk-span");
976
- if (asteriskSpan) {
977
- asteriskSpan.remove();
978
- }
979
- }
980
- }
981
- disconnectedCallback() {
982
- removeFormResetListener(this.el, this.handleFormReset);
983
- }
984
- componentWillLoad() {
985
- this.defaultHelperText = `Use format ${this.dateFormat}`;
986
- if (isEmptyString(this.helperText))
987
- this.helperText = this.defaultHelperText;
988
- this.watchMinHandler();
989
- this.watchMaxHandler();
990
- if (this.value) {
991
- this.externalSetDate = true;
992
- this.setDate(this.value);
993
- }
994
- this.screenReaderInfoId = `${this.inputId}-screen-reader-info`;
995
- this.assistiveHintId = `${this.inputId}-assistive-hint`;
996
- this.selectedDateInfoId = `${this.inputId}-selected-date-info`;
997
- addFormResetListener(this.el, this.handleFormReset);
998
- removeDisabledFalse(this.disabled, this.el);
999
- }
1000
- componentDidLoad() {
1001
- this.setInputsInOrder();
1002
- onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Date Input");
1003
- if (this.value) {
1004
- this.updateInputValues(this.day, this.month, this.year);
1005
- this.inputsInOrder.forEach((input) => {
1006
- input.classList.add(this.FIT_TO_VALUE);
1007
- });
1008
- }
1009
- this.setAriaInvalid(this.isValidDay, this.isValidMonth, this.isValidDate, this.isDisabledDate);
1010
- if (this.value) {
1011
- this.notifyScreenReaderSelectedDate();
1012
- }
1013
- this.inputsInOrder.forEach((input) => {
1014
- input.addEventListener("input", this.handleInput);
1015
- input.addEventListener("focus", this.handleFocus);
1016
- input.addEventListener("blur", this.handleBlur);
1017
- });
1018
- this.watchRequiredHandler();
1019
- }
1020
- componentWillUpdate() {
1021
- if (isEmptyString(this.helperText))
1022
- this.helperText = this.defaultHelperText;
1023
- if (!this.preventInputsUpdating)
1024
- this.setDate(this.value);
1025
- this.setAriaInvalid(this.isValidDay, this.isValidMonth, this.isValidDate, this.isDisabledDate);
1026
- this.handleDateChange(false);
1027
- this.preventInputsUpdating = false;
1028
- }
1029
- componentDidRender() {
1030
- if (this.removeLabelledBy) {
1031
- this.removeAriaLabelledBy();
1032
- return;
1033
- }
1034
- this.setAriaLabelledBy();
1035
- }
1036
- /**
1037
- * Returns the value as a Date object
1038
- * @returns Date
1039
- */
1040
- async getDate() {
1041
- return this.selectedDate;
1042
- }
1043
- /**
1044
- * @internal Sets focus on the calendar button.
1045
- */
1046
- async setCalendarFocus() {
1047
- if (this.calendarButtonEl) {
1048
- this.calendarButtonEl.focus();
1049
- }
1050
- }
1051
- /**
1052
- * @internal Used to pass disabledDays from parent component.
1053
- */
1054
- async setDisableDays(days) {
1055
- this.disableDays = days;
1056
- }
1057
- /**
1058
- * @internal Used to enable other components to invoke an IcChange event from the input.
1059
- */
1060
- async triggerIcChange(d) {
1061
- this.externalSetDate = true;
1062
- this.setDate(d);
1063
- this.emitIcChange(d);
1064
- this.externalSetDate = false;
1065
- }
1066
- removeAriaLabelledBy() {
1067
- this.inputCompContainerEl.removeAttribute(this.ARIA_LABELLED_BY);
1068
- }
1069
- setPastedValueAndValidation(isValidDate, pastedValue, event) {
1070
- switch (true) {
1071
- case isValidDate: {
1072
- const nextParsedValue = this.isZuluTime
1073
- ? extractDateFromZuluDateTime(pastedValue)
1074
- : pastedValue;
1075
- const dateParts = nextParsedValue.split(/-|\/|\./);
1076
- this.inputsInOrder.forEach((input, index) => {
1077
- input.classList.add(this.FIT_TO_VALUE);
1078
- if (this.isZuluTime) {
1079
- this.pasteZuluDateTime(dateParts, index);
1080
- }
1081
- else {
1082
- let dateValue;
1083
- if (input === this.dayInputEl || input === this.monthInputEl) {
1084
- dateValue = this.slicePastedDate(2, dateParts[index]);
1085
- }
1086
- else {
1087
- dateValue = this.slicePastedDate(4, dateParts[index]);
1088
- }
1089
- input.value = dateValue;
1090
- this.setInputValue(input);
1091
- this.autocompleteInput(input);
1092
- }
1093
- });
1094
- this.isZuluTime = false;
1095
- break;
1096
- }
1097
- case (pastedValue.length === 1 ||
1098
- pastedValue.length === 2 ||
1099
- pastedValue.length === 4) &&
1100
- isNumeric(pastedValue):
1101
- if (this.checkSingleCopiedValueIsValid(event.target, pastedValue)) {
1102
- // Check if copied value can be pasted into input
1103
- this.setInputPasteValue(event.target, pastedValue);
1104
- this.setInputValue(event.target);
1105
- }
1106
- else {
1107
- this.displayPastedValidation(event);
1108
- }
1109
- break;
1110
- case pastedValue.length === 3 && isNumeric(pastedValue):
1111
- if (event.target !== this.yearInputEl) {
1112
- this.displayPastedValidation(event);
1113
- }
1114
- else {
1115
- this.setInputPasteValue(event.target, pastedValue);
1116
- this.setInputValue(event.target);
1117
- }
1118
- break;
1119
- case pastedValue.length >= 5 && isNumeric(pastedValue):
1120
- this.displayPastedValidation(event);
1121
- }
1122
- }
1123
- pasteZuluDateTime(dateParts, index) {
1124
- // ['YYYY', 'MM', 'DD']
1125
- if (index === 0 && this.yearInputEl) {
1126
- const dateValue = this.slicePastedDate(4, dateParts[index]);
1127
- this.yearInputEl.value = dateValue;
1128
- this.setInputValue(this.yearInputEl);
1129
- }
1130
- else if (index === 1 && this.monthInputEl) {
1131
- // The month value is the second item in the array
1132
- const dateValue = this.slicePastedDate(2, dateParts[index]);
1133
- this.monthInputEl.value = dateValue;
1134
- this.setInputValue(this.monthInputEl);
1135
- }
1136
- else if (this.dayInputEl) {
1137
- const dateValue = this.slicePastedDate(2, dateParts[index]);
1138
- this.dayInputEl.value = dateValue;
1139
- this.setInputValue(this.dayInputEl);
1140
- }
1141
- }
1142
- displayPastedValidation(event) {
1143
- var _a;
1144
- if (((_a = this.invalidDateText) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1145
- this.previousInvalidDateTest = this.invalidDateText;
1146
- }
1147
- this.invalidDateText = `Please paste a valid ${this.getAriaLabel(event.target)}`;
1148
- this.validationStatus = IcInformationStatus.Error;
1149
- this.isPasteValidationDisplayed = true;
1150
- }
1151
- setPasteInvalidText() {
1152
- var _a;
1153
- if (this.isPasteValidationDisplayed) {
1154
- this.invalidDateText = (_a = this.previousInvalidDateTest) !== null && _a !== void 0 ? _a : "";
1155
- this.isPasteValidationDisplayed = false;
1156
- // This is to prevent setDate from triggering within componentWillUpdate
1157
- this.preventInputsUpdating = true;
1158
- }
1159
- }
1160
- notifyScreenReader(input, event) {
1161
- var _a;
1162
- const liveRegion = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("#live-region");
1163
- if (liveRegion) {
1164
- if (this.isKeyboardOrEvent(event)) {
1165
- this.notifyScreenReaderArrowKeys(input);
1166
- }
1167
- else if (Object.prototype.toString.call(event) === this.INPUT_EVENT_OBJECT_STRING) {
1168
- this.notifyScreenReaderInput(input, liveRegion);
1169
- }
1170
- }
1171
- }
1172
- render() {
1173
- const { inputId, label, disabled, helperText, hideHelperText, hideLabel, showClearButton, showCalendarButton, size, theme, validationAriaLive, } = this;
1174
- const hasCustomValidation = !isEmptyString(this.validationStatus);
1175
- const validationStatus = hasCustomValidation
1176
- ? this.validationStatus
1177
- : !isEmptyString(this.invalidDateText)
1178
- ? IcInformationStatus.Error
1179
- : "";
1180
- const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;
1181
- renderHiddenInput(true, this.el, this.name, this.convertToDate(this.year, this.month, this.day), this.disabled);
1182
- return (h(Host, { key: 'c076a1712793e36c9fd904692d64f44297a41d58', class: {
1183
- [`ic-theme-${theme}`]: theme !== "inherit",
1184
- [`ic-date-input-disabled`]: disabled,
1185
- }, onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, h("ic-input-container", { key: 'a706d073ade2f587fe661e8eedd533fcac2eb8d2', disabled: disabled }, !(hideLabel && hideHelperText) && (h("ic-input-label", { key: '2df45206bb1dec22719805dd75419d99ce0321dd', for: inputId, label: label, hideLabel: hideLabel, helperText: !hideHelperText ? helperText : "", disabled: disabled }, h("slot", { key: '8f5458681b9ea085c67ff7c1022f5512181dd37a', name: "helper-text", slot: "helper-text" }))), h("span", { key: 'cc1ced7c0cf7e46b0792ad06995b15273126c040', id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), hideLabel && `${label}\n`, hideHelperText && `${helperText}\n`, `${this.defaultHelperText}.`), h("span", { key: '53cc25e4eccf56a7a64a7b28d207c98e78abeec7', id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), h("span", { key: '652f13800a903a2f92451abe2abfbbf63f72fd73', id: "live-region", "aria-live": "assertive", class: "sr-only" }), h("ic-input-component-container", { key: 'e2ec60bbf7e7f39e79de567ef30642f0e175b1c6', id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group", class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, h("div", { key: '891bb0f4b524a7dae73ea3eacbaacd460ceab542', class: "input-container" }, h("div", { key: '476965e1b07bc962741ffe0f74661d6e4631d576', class: "date-inputs" }, this.getInputsInOrder()[0], "/", this.getInputsInOrder()[1], "/", this.getInputsInOrder()[2]), h("div", { key: '752c0fd5df110547b8161b1cde61edb690c6c7fa', class: "action-buttons" }, showClearButton && (h("ic-button", { key: 'cf5c9fe8b8348071a764c57df98ed7d217674735', id: "clear-button", "aria-label": "Clear input", class: {
1186
- ["clear-button"]: true,
1187
- ["hidden"]: isEmptyString(this.day) &&
1188
- isEmptyString(this.month) &&
1189
- isEmptyString(this.year),
1190
- }, disabled: this.disabled, innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearFocus, onBlur: this.handleClearBlur, variant: "icon-tertiary", theme: this.clearButtonFocused ? "light" : "dark", size: size })), showCalendarButton && (h("div", { key: '6e018c3cfb028691aa57c88df2f7d29e0adb1f78', class: "show-calendar-button-wrapper" }, h("div", { key: 'dcd83751b62337a77a4471489c7ba38d43cd45a6', class: { divider: true, [size]: true } }), h("ic-button", { key: '5b917499227bc7e7c1d3dd5b01f0040f10c7adc1', id: "calendar-button", ref: (el) => (this.calendarButtonEl = el), "aria-label": "Display calendar", "aria-haspopup": "dialog", class: "calendar-button", disabled: this.disabled, innerHTML: Calendar, onClick: this.handleCalendarOpen, variant: "icon-tertiary", size: size, onFocus: this.handleCalendarFocus, onBlur: this.handleCalendarBlur, theme: this.calendarFocused ? "light" : "dark" })))))), h("span", { key: 'a1d4b4da8df73e766ba1096f193142a95af941d8', id: this.selectedDateInfoId, class: "sr-only", "aria-live": "polite" }, h("span", { key: '92e0f6e22dca3f9c5f0f05dcf1a6e5fa43e2e05a', ref: (el) => (this.selectedDateInfoEl = el), role: "status" })), h("ic-input-validation", { key: '3d38e48eb14e60ad40639bb7ee44a1307585c4e3', status: validationStatus, message: hasCustomValidation ? this.validationText : this.invalidDateText, for: inputId, ariaLiveMode: validationAriaLive }))));
1191
- }
1192
- static get delegatesFocus() { return true; }
1193
- get el() { return getElement(this); }
1194
- static get watchers() { return {
1195
- "day": ["watchInputHandler"],
1196
- "month": ["watchInputHandler"],
1197
- "year": ["watchInputHandler"],
1198
- "disabled": ["watchDisabledHandler"],
1199
- "disableFuture": ["watchDisableFutureHandler"],
1200
- "disablePast": ["watchDisablePastHandler"],
1201
- "max": ["watchMaxHandler"],
1202
- "min": ["watchMinHandler"],
1203
- "required": ["watchRequiredHandler"]
1204
- }; }
1205
- };
1206
- DateInput.style = IcDateInputStyle0;
1207
-
1208
- export { DateInput as ic_date_input };
1209
-
1210
- //# sourceMappingURL=ic-date-input.entry.js.map