@ukic/canary-web-components 2.0.0-canary.11 → 2.0.0-canary.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (474) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-7a069459.js → helpers-b525d45a.js} +2 -7
  3. package/dist/cjs/helpers-b525d45a.js.map +1 -0
  4. package/dist/cjs/{helpers-f75cf7cf.js → helpers-c4444a7e.js} +48 -94
  5. package/dist/cjs/helpers-c4444a7e.js.map +1 -0
  6. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-badge.cjs.entry.js +8 -16
  10. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-button_3.cjs.entry.js +2 -8
  14. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
  21. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
  22. package/dist/cjs/ic-data-table.cjs.entry.js +308 -43
  23. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-dialog.cjs.entry.js +2 -3
  25. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  27. package/dist/cjs/{ic-pagination-bar.cjs.entry.js → ic-empty-state_2.cjs.entry.js} +34 -4
  28. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
  29. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  34. package/dist/cjs/{ic-menu.cjs.entry.js → ic-input-component-container_3.cjs.entry.js} +69 -5
  35. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -0
  36. package/dist/cjs/ic-input-label_2.cjs.entry.js +86 -0
  37. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -0
  38. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-navigation-group.cjs.entry.js +13 -16
  45. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-navigation-item.cjs.entry.js +32 -28
  47. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-pagination_4.cjs.entry.js +5 -5
  51. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-select-with-multi.cjs.entry.js +19 -6
  57. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-top-navigation.cjs.entry.js +60 -46
  70. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-typography.cjs.entry.js +35 -11
  72. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  73. package/dist/cjs/index-4cf27b16.js +10 -18
  74. package/dist/cjs/loader.cjs.js +1 -1
  75. package/dist/collection/collection-manifest.json +1 -2
  76. package/dist/collection/components/ic-data-table/ic-data-table.css +82 -7
  77. package/dist/collection/components/ic-data-table/ic-data-table.js +535 -44
  78. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  79. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  80. package/dist/collection/components/ic-data-table/story-data.js +386 -11
  81. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  82. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.e2e.js +217 -0
  83. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.e2e.js.map +1 -0
  84. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +319 -0
  85. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  86. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +87 -0
  87. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
  88. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
  89. package/dist/collection/components/{ic-date-picker/test/a11y/ic-date-picker.test.a11y.js → ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js} +3 -5
  90. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
  91. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
  92. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
  93. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +2 -2
  94. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
  95. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +1 -1
  96. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  97. package/dist/collection/components/ic-select-with-multi/ic-select.js +2 -2
  98. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -1
  99. package/dist/collection/utils/constants.js +0 -55
  100. package/dist/collection/utils/constants.js.map +1 -1
  101. package/dist/collection/utils/helpers.js +42 -272
  102. package/dist/collection/utils/helpers.js.map +1 -1
  103. package/dist/collection/utils/types.js +0 -45
  104. package/dist/collection/utils/types.js.map +1 -1
  105. package/dist/components/helpers.js +2 -7
  106. package/dist/components/helpers.js.map +1 -1
  107. package/dist/components/helpers2.js +45 -91
  108. package/dist/components/helpers2.js.map +1 -1
  109. package/dist/components/ic-badge.js +8 -16
  110. package/dist/components/ic-badge.js.map +1 -1
  111. package/dist/components/ic-button2.js +3 -11
  112. package/dist/components/ic-button2.js.map +1 -1
  113. package/dist/components/ic-card.js +1 -1
  114. package/dist/components/ic-checkbox-group.js +1 -1
  115. package/dist/components/ic-checkbox.js +1 -1
  116. package/dist/components/ic-chip.js +1 -1
  117. package/dist/components/{ic-date-input.d.ts → ic-data-table-title-bar.d.ts} +4 -4
  118. package/dist/components/ic-data-table-title-bar.js +136 -0
  119. package/dist/components/ic-data-table-title-bar.js.map +1 -0
  120. package/dist/components/ic-data-table.js +334 -49
  121. package/dist/components/ic-data-table.js.map +1 -1
  122. package/dist/components/ic-dialog.js +1 -2
  123. package/dist/components/ic-dialog.js.map +1 -1
  124. package/dist/components/ic-empty-state.js +1 -57
  125. package/dist/components/ic-empty-state.js.map +1 -1
  126. package/dist/{esm/ic-empty-state.entry.js → components/ic-empty-state2.js} +38 -11
  127. package/dist/components/ic-empty-state2.js.map +1 -0
  128. package/dist/components/ic-input-component-container2.js +1 -1
  129. package/dist/components/ic-input-component-container2.js.map +1 -1
  130. package/dist/components/ic-link2.js +1 -1
  131. package/dist/components/ic-menu-item2.js +1 -1
  132. package/dist/components/ic-menu2.js +2 -2
  133. package/dist/components/ic-menu2.js.map +1 -1
  134. package/dist/components/ic-menu3.js +1 -1
  135. package/dist/components/ic-menu3.js.map +1 -1
  136. package/dist/components/ic-navigation-button.js +1 -1
  137. package/dist/components/ic-navigation-group.js +12 -15
  138. package/dist/components/ic-navigation-group.js.map +1 -1
  139. package/dist/components/ic-navigation-item.js +32 -28
  140. package/dist/components/ic-navigation-item.js.map +1 -1
  141. package/dist/components/ic-pagination-bar2.js +1 -1
  142. package/dist/components/ic-pagination-bar2.js.map +1 -1
  143. package/dist/components/ic-pagination-item2.js +1 -1
  144. package/dist/components/ic-pagination2.js +5 -5
  145. package/dist/components/ic-pagination2.js.map +1 -1
  146. package/dist/components/ic-radio-group.js +1 -1
  147. package/dist/components/ic-radio-option.js +1 -1
  148. package/dist/components/ic-search-bar.js +1 -1
  149. package/dist/components/ic-select-with-multi.js +14 -1
  150. package/dist/components/ic-select-with-multi.js.map +1 -1
  151. package/dist/components/ic-select2.js +1 -1
  152. package/dist/components/ic-switch.js +1 -1
  153. package/dist/components/ic-tab.js +1 -1
  154. package/dist/components/ic-text-field2.js +1 -1
  155. package/dist/components/ic-toggle-button.js +1 -1
  156. package/dist/components/ic-top-navigation.js +61 -47
  157. package/dist/components/ic-top-navigation.js.map +1 -1
  158. package/dist/components/ic-typography2.js +38 -12
  159. package/dist/components/ic-typography2.js.map +1 -1
  160. package/dist/core/core.css +1 -1
  161. package/dist/core/core.esm.js +1 -1
  162. package/dist/core/core.esm.js.map +1 -1
  163. package/dist/core/p-045359e1.entry.js +2 -0
  164. package/dist/core/{p-b1e3f20a.entry.js.map → p-045359e1.entry.js.map} +1 -1
  165. package/dist/core/{p-e9e7a7f9.entry.js → p-10fb4c46.entry.js} +2 -2
  166. package/dist/core/p-169bfa51.entry.js +2 -0
  167. package/dist/core/p-169bfa51.entry.js.map +1 -0
  168. package/dist/core/{p-21da96a9.entry.js → p-1ca332ca.entry.js} +2 -2
  169. package/dist/core/p-1e91f540.entry.js +2 -0
  170. package/dist/core/p-1e91f540.entry.js.map +1 -0
  171. package/dist/core/{p-170f6408.entry.js → p-204ace96.entry.js} +2 -2
  172. package/dist/core/{p-2f31bb92.entry.js → p-2eac7dcc.entry.js} +2 -2
  173. package/dist/core/p-347e8dab.entry.js +2 -0
  174. package/dist/core/p-347e8dab.entry.js.map +1 -0
  175. package/dist/core/p-3803a5b5.entry.js +2 -0
  176. package/dist/core/p-3803a5b5.entry.js.map +1 -0
  177. package/dist/core/p-4753bac8.entry.js +2 -0
  178. package/dist/core/p-4753bac8.entry.js.map +1 -0
  179. package/dist/core/{p-a16c6ff3.entry.js → p-4baa0916.entry.js} +2 -2
  180. package/dist/core/{p-655df7fe.entry.js → p-4f413fc0.entry.js} +2 -2
  181. package/dist/core/p-5171169f.entry.js +2 -0
  182. package/dist/core/p-5171169f.entry.js.map +1 -0
  183. package/dist/core/{p-56d01bdb.entry.js → p-595be57d.entry.js} +2 -2
  184. package/dist/core/{p-23a13636.entry.js → p-5ae93c16.entry.js} +2 -2
  185. package/dist/core/{p-0b32ba5b.entry.js → p-5e0c830b.entry.js} +2 -2
  186. package/dist/core/p-5ee4319c.entry.js +2 -0
  187. package/dist/core/p-5ee4319c.entry.js.map +1 -0
  188. package/dist/core/p-5f4e96ec.entry.js +2 -0
  189. package/dist/core/p-5f4e96ec.entry.js.map +1 -0
  190. package/dist/core/{p-95374ba1.entry.js → p-624d4f5f.entry.js} +2 -2
  191. package/dist/core/{p-df63896a.entry.js → p-6933f8e9.entry.js} +2 -2
  192. package/dist/core/{p-70b48a14.entry.js → p-6c3044b6.entry.js} +2 -2
  193. package/dist/core/p-7267fe19.entry.js +2 -0
  194. package/dist/core/p-7267fe19.entry.js.map +1 -0
  195. package/dist/core/{p-02d0ecd2.entry.js → p-75dac3d1.entry.js} +2 -2
  196. package/dist/core/{p-a6e9a8e7.entry.js → p-7ef8d616.entry.js} +2 -2
  197. package/dist/core/{p-0388b484.entry.js → p-81ddc39d.entry.js} +2 -2
  198. package/dist/core/{p-6e32683c.entry.js → p-869954a2.entry.js} +2 -2
  199. package/dist/core/{p-e2155d7f.entry.js → p-88d54b72.entry.js} +2 -2
  200. package/dist/core/{p-98c8d46a.entry.js → p-8b08d8fe.entry.js} +2 -2
  201. package/dist/core/{p-0080bbce.entry.js → p-917c5721.entry.js} +2 -2
  202. package/dist/core/p-942282cd.entry.js +2 -0
  203. package/dist/core/p-942282cd.entry.js.map +1 -0
  204. package/dist/core/p-96b3e7e2.js +2 -0
  205. package/dist/core/p-96b3e7e2.js.map +1 -0
  206. package/dist/core/p-9caf19eb.js +2 -0
  207. package/dist/core/p-9caf19eb.js.map +1 -0
  208. package/dist/core/{p-7373beb0.entry.js → p-a0f8efb2.entry.js} +2 -2
  209. package/dist/core/{p-1f1b4b8b.entry.js → p-a31031a5.entry.js} +2 -2
  210. package/dist/core/{p-221d03e1.entry.js → p-a434c3d4.entry.js} +2 -2
  211. package/dist/core/{p-25a458bf.entry.js → p-a43c12cd.entry.js} +2 -2
  212. package/dist/core/{p-31fdb740.entry.js → p-a50c3b9e.entry.js} +2 -2
  213. package/dist/core/p-aac4185b.entry.js +2 -0
  214. package/dist/core/p-aac4185b.entry.js.map +1 -0
  215. package/dist/core/{p-65a8c1d6.entry.js → p-ab09986c.entry.js} +2 -2
  216. package/dist/core/{p-9e3178e8.entry.js → p-b6639e4a.entry.js} +2 -2
  217. package/dist/core/{p-9e3178e8.entry.js.map → p-b6639e4a.entry.js.map} +1 -1
  218. package/dist/core/{p-e21083c8.entry.js → p-b82dcc29.entry.js} +2 -2
  219. package/dist/core/p-ba86928c.entry.js +2 -0
  220. package/dist/core/{p-4f0178a7.entry.js.map → p-ba86928c.entry.js.map} +1 -1
  221. package/dist/core/{p-b3ce9fe4.entry.js → p-c34848da.entry.js} +2 -2
  222. package/dist/core/{p-8f1aa87d.entry.js → p-d8469ac0.entry.js} +2 -2
  223. package/dist/core/{p-75a2cdac.entry.js → p-db9c03c0.entry.js} +2 -2
  224. package/dist/core/{p-fb58d1d1.entry.js → p-e3997d60.entry.js} +2 -2
  225. package/dist/core/{p-06aef486.entry.js → p-e834344e.entry.js} +2 -2
  226. package/dist/core/p-f14454b1.entry.js +2 -0
  227. package/dist/core/{p-9f9b3151.entry.js.map → p-f14454b1.entry.js.map} +1 -1
  228. package/dist/core/{p-ee09f1b3.entry.js → p-f3c840cd.entry.js} +2 -2
  229. package/dist/core/p-f6888309.entry.js +2 -0
  230. package/dist/core/p-f6888309.entry.js.map +1 -0
  231. package/dist/core/p-f74a8752.entry.js +2 -0
  232. package/dist/core/p-f74a8752.entry.js.map +1 -0
  233. package/dist/core/{p-b1e646e4.entry.js → p-f7a14c01.entry.js} +2 -2
  234. package/dist/core/{p-ce898d90.entry.js → p-f843da01.entry.js} +2 -2
  235. package/dist/core/p-fc5611e2.entry.js +2 -0
  236. package/dist/core/p-fc5611e2.entry.js.map +1 -0
  237. package/dist/esm/core.js +1 -1
  238. package/dist/esm/{helpers-b5f64263.js → helpers-12b4266a.js} +3 -8
  239. package/dist/esm/helpers-12b4266a.js.map +1 -0
  240. package/dist/esm/{helpers-f328a7b6.js → helpers-1f07eb61.js} +46 -92
  241. package/dist/esm/helpers-1f07eb61.js.map +1 -0
  242. package/dist/esm/ic-accordion.entry.js +1 -1
  243. package/dist/esm/ic-alert.entry.js +1 -1
  244. package/dist/esm/ic-back-to-top.entry.js +1 -1
  245. package/dist/esm/ic-badge.entry.js +8 -16
  246. package/dist/esm/ic-badge.entry.js.map +1 -1
  247. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  248. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  249. package/dist/esm/ic-button_3.entry.js +2 -8
  250. package/dist/esm/ic-button_3.entry.js.map +1 -1
  251. package/dist/esm/ic-card.entry.js +1 -1
  252. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  253. package/dist/esm/ic-checkbox.entry.js +1 -1
  254. package/dist/esm/ic-chip.entry.js +1 -1
  255. package/dist/esm/ic-data-row.entry.js +1 -1
  256. package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
  257. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
  258. package/dist/esm/ic-data-table.entry.js +309 -44
  259. package/dist/esm/ic-data-table.entry.js.map +1 -1
  260. package/dist/esm/ic-dialog.entry.js +2 -3
  261. package/dist/esm/ic-dialog.entry.js.map +1 -1
  262. package/dist/esm/ic-divider.entry.js +1 -1
  263. package/dist/esm/{ic-pagination-bar.entry.js → ic-empty-state_2.entry.js} +34 -5
  264. package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
  265. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  266. package/dist/esm/ic-footer-link.entry.js +1 -1
  267. package/dist/esm/ic-footer.entry.js +1 -1
  268. package/dist/esm/ic-hero.entry.js +1 -1
  269. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  270. package/dist/esm/{ic-menu.entry.js → ic-input-component-container_3.entry.js} +69 -7
  271. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -0
  272. package/dist/esm/ic-input-label_2.entry.js +81 -0
  273. package/dist/esm/ic-input-label_2.entry.js.map +1 -0
  274. package/dist/esm/ic-link.entry.js +1 -1
  275. package/dist/esm/ic-menu-group.entry.js +1 -1
  276. package/dist/esm/ic-menu-item.entry.js +1 -1
  277. package/dist/esm/ic-menu-with-multi.entry.js +1 -1
  278. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
  279. package/dist/esm/ic-navigation-button.entry.js +1 -1
  280. package/dist/esm/ic-navigation-group.entry.js +13 -16
  281. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  282. package/dist/esm/ic-navigation-item.entry.js +32 -28
  283. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  284. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  285. package/dist/esm/ic-page-header.entry.js +1 -1
  286. package/dist/esm/ic-pagination_4.entry.js +5 -5
  287. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  288. package/dist/esm/ic-popover-menu.entry.js +1 -1
  289. package/dist/esm/ic-radio-group.entry.js +1 -1
  290. package/dist/esm/ic-radio-option.entry.js +1 -1
  291. package/dist/esm/ic-search-bar.entry.js +1 -1
  292. package/dist/esm/ic-select-with-multi.entry.js +14 -1
  293. package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
  294. package/dist/esm/ic-side-navigation.entry.js +1 -1
  295. package/dist/esm/ic-status-tag.entry.js +1 -1
  296. package/dist/esm/ic-step.entry.js +1 -1
  297. package/dist/esm/ic-stepper.entry.js +1 -1
  298. package/dist/esm/ic-switch.entry.js +1 -1
  299. package/dist/esm/ic-tab-group.entry.js +1 -1
  300. package/dist/esm/ic-tab-panel.entry.js +1 -1
  301. package/dist/esm/ic-tab.entry.js +1 -1
  302. package/dist/esm/ic-theme.entry.js +1 -1
  303. package/dist/esm/ic-toast.entry.js +1 -1
  304. package/dist/esm/ic-toggle-button.entry.js +1 -1
  305. package/dist/esm/ic-top-navigation.entry.js +60 -46
  306. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  307. package/dist/esm/ic-typography.entry.js +36 -12
  308. package/dist/esm/ic-typography.entry.js.map +1 -1
  309. package/dist/esm/index-93509377.js +10 -18
  310. package/dist/esm/loader.js +1 -1
  311. package/dist/esm/polyfills/core-js.js +0 -0
  312. package/dist/esm/polyfills/dom.js +0 -0
  313. package/dist/esm/polyfills/es5-html-element.js +0 -0
  314. package/dist/esm/polyfills/index.js +0 -0
  315. package/dist/esm/polyfills/system.js +0 -0
  316. package/dist/types/components/ic-data-table/ic-data-table.d.ts +96 -1
  317. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +11 -0
  318. package/dist/types/components/ic-data-table/story-data.d.ts +99 -0
  319. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
  320. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +2 -2
  321. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +2 -2
  322. package/dist/types/components.d.ts +141 -390
  323. package/dist/types/utils/constants.d.ts +0 -37
  324. package/dist/types/utils/helpers.d.ts +16 -84
  325. package/dist/types/utils/types.d.ts +1 -92
  326. package/hydrate/index.js +952 -2965
  327. package/package.json +3 -4
  328. package/dist/cjs/date-helpers-c9551119.js +0 -150
  329. package/dist/cjs/date-helpers-c9551119.js.map +0 -1
  330. package/dist/cjs/helpers-7a069459.js.map +0 -1
  331. package/dist/cjs/helpers-f75cf7cf.js.map +0 -1
  332. package/dist/cjs/ic-date-input.cjs.entry.js +0 -1089
  333. package/dist/cjs/ic-date-input.cjs.entry.js.map +0 -1
  334. package/dist/cjs/ic-date-picker.cjs.entry.js +0 -1050
  335. package/dist/cjs/ic-date-picker.cjs.entry.js.map +0 -1
  336. package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
  337. package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
  338. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +0 -150
  339. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +0 -1
  340. package/dist/cjs/ic-menu.cjs.entry.js.map +0 -1
  341. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
  342. package/dist/collection/assets/calendar.svg +0 -3
  343. package/dist/collection/components/ic-date-input/ic-date-input.css +0 -560
  344. package/dist/collection/components/ic-date-input/ic-date-input.js +0 -1712
  345. package/dist/collection/components/ic-date-input/ic-date-input.js.map +0 -1
  346. package/dist/collection/components/ic-date-input/story-data.js +0 -28
  347. package/dist/collection/components/ic-date-input/story-data.js.map +0 -1
  348. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +0 -1139
  349. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +0 -1
  350. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +0 -42
  351. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +0 -1
  352. package/dist/collection/components/ic-date-picker/ic-date-picker.css +0 -878
  353. package/dist/collection/components/ic-date-picker/ic-date-picker.js +0 -1506
  354. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +0 -1
  355. package/dist/collection/components/ic-date-picker/ic-day-button.js +0 -36
  356. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +0 -1
  357. package/dist/collection/components/ic-date-picker/ic-month-picker.js +0 -29
  358. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +0 -1
  359. package/dist/collection/components/ic-date-picker/ic-year-picker.js +0 -39
  360. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +0 -1
  361. package/dist/collection/components/ic-date-picker/story-data.js +0 -148
  362. package/dist/collection/components/ic-date-picker/story-data.js.map +0 -1
  363. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +0 -1
  364. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js +0 -207
  365. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js.map +0 -1
  366. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +0 -962
  367. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +0 -1
  368. package/dist/collection/utils/date-helpers.js +0 -133
  369. package/dist/collection/utils/date-helpers.js.map +0 -1
  370. package/dist/components/ic-date-input.js +0 -8
  371. package/dist/components/ic-date-input.js.map +0 -1
  372. package/dist/components/ic-date-input2.js +0 -1318
  373. package/dist/components/ic-date-input2.js.map +0 -1
  374. package/dist/components/ic-date-picker.d.ts +0 -11
  375. package/dist/components/ic-date-picker.js +0 -1171
  376. package/dist/components/ic-date-picker.js.map +0 -1
  377. package/dist/core/p-1857e9a7.entry.js +0 -2
  378. package/dist/core/p-1857e9a7.entry.js.map +0 -1
  379. package/dist/core/p-2c3cdfa3.js +0 -2
  380. package/dist/core/p-2c3cdfa3.js.map +0 -1
  381. package/dist/core/p-33dd24eb.js +0 -2
  382. package/dist/core/p-33dd24eb.js.map +0 -1
  383. package/dist/core/p-40ba5a51.entry.js +0 -2
  384. package/dist/core/p-40ba5a51.entry.js.map +0 -1
  385. package/dist/core/p-4f0178a7.entry.js +0 -2
  386. package/dist/core/p-5d6750ea.entry.js +0 -2
  387. package/dist/core/p-5d6750ea.entry.js.map +0 -1
  388. package/dist/core/p-7c0f24b6.entry.js +0 -2
  389. package/dist/core/p-7c0f24b6.entry.js.map +0 -1
  390. package/dist/core/p-9f9b3151.entry.js +0 -2
  391. package/dist/core/p-a22fd338.entry.js +0 -2
  392. package/dist/core/p-a22fd338.entry.js.map +0 -1
  393. package/dist/core/p-aabab75f.entry.js +0 -2
  394. package/dist/core/p-aabab75f.entry.js.map +0 -1
  395. package/dist/core/p-b1e3f20a.entry.js +0 -2
  396. package/dist/core/p-c680c7f9.entry.js +0 -2
  397. package/dist/core/p-c680c7f9.entry.js.map +0 -1
  398. package/dist/core/p-c7590421.entry.js +0 -2
  399. package/dist/core/p-c7590421.entry.js.map +0 -1
  400. package/dist/core/p-cd799087.js +0 -2
  401. package/dist/core/p-cd799087.js.map +0 -1
  402. package/dist/core/p-d184d9e2.entry.js +0 -2
  403. package/dist/core/p-d184d9e2.entry.js.map +0 -1
  404. package/dist/core/p-df5d7aa4.entry.js +0 -2
  405. package/dist/core/p-df5d7aa4.entry.js.map +0 -1
  406. package/dist/core/p-e189f1d0.entry.js +0 -2
  407. package/dist/core/p-e189f1d0.entry.js.map +0 -1
  408. package/dist/core/p-e33bdca9.entry.js +0 -2
  409. package/dist/core/p-e33bdca9.entry.js.map +0 -1
  410. package/dist/core/p-eeacd610.entry.js +0 -2
  411. package/dist/core/p-eeacd610.entry.js.map +0 -1
  412. package/dist/core/p-f24c9356.entry.js +0 -2
  413. package/dist/core/p-f24c9356.entry.js.map +0 -1
  414. package/dist/core/p-f5d5f0be.entry.js +0 -2
  415. package/dist/core/p-f5d5f0be.entry.js.map +0 -1
  416. package/dist/core/p-f62cd6d2.entry.js +0 -2
  417. package/dist/core/p-f62cd6d2.entry.js.map +0 -1
  418. package/dist/esm/date-helpers-0e5e32a7.js +0 -136
  419. package/dist/esm/date-helpers-0e5e32a7.js.map +0 -1
  420. package/dist/esm/helpers-b5f64263.js.map +0 -1
  421. package/dist/esm/helpers-f328a7b6.js.map +0 -1
  422. package/dist/esm/ic-date-input.entry.js +0 -1085
  423. package/dist/esm/ic-date-input.entry.js.map +0 -1
  424. package/dist/esm/ic-date-picker.entry.js +0 -1046
  425. package/dist/esm/ic-date-picker.entry.js.map +0 -1
  426. package/dist/esm/ic-empty-state.entry.js.map +0 -1
  427. package/dist/esm/ic-input-component-container_4.entry.js +0 -143
  428. package/dist/esm/ic-input-component-container_4.entry.js.map +0 -1
  429. package/dist/esm/ic-menu.entry.js.map +0 -1
  430. package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
  431. package/dist/types/components/ic-date-input/ic-date-input.d.ts +0 -248
  432. package/dist/types/components/ic-date-input/story-data.d.ts +0 -1
  433. package/dist/types/components/ic-date-input/test/helpers/ic-date-input.d.ts +0 -23
  434. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +0 -251
  435. package/dist/types/components/ic-date-picker/ic-day-button.d.ts +0 -16
  436. package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +0 -14
  437. package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +0 -16
  438. package/dist/types/components/ic-date-picker/story-data.d.ts +0 -22
  439. package/dist/types/utils/date-helpers.d.ts +0 -22
  440. /package/dist/core/{p-e9e7a7f9.entry.js.map → p-10fb4c46.entry.js.map} +0 -0
  441. /package/dist/core/{p-21da96a9.entry.js.map → p-1ca332ca.entry.js.map} +0 -0
  442. /package/dist/core/{p-170f6408.entry.js.map → p-204ace96.entry.js.map} +0 -0
  443. /package/dist/core/{p-2f31bb92.entry.js.map → p-2eac7dcc.entry.js.map} +0 -0
  444. /package/dist/core/{p-a16c6ff3.entry.js.map → p-4baa0916.entry.js.map} +0 -0
  445. /package/dist/core/{p-655df7fe.entry.js.map → p-4f413fc0.entry.js.map} +0 -0
  446. /package/dist/core/{p-56d01bdb.entry.js.map → p-595be57d.entry.js.map} +0 -0
  447. /package/dist/core/{p-23a13636.entry.js.map → p-5ae93c16.entry.js.map} +0 -0
  448. /package/dist/core/{p-0b32ba5b.entry.js.map → p-5e0c830b.entry.js.map} +0 -0
  449. /package/dist/core/{p-95374ba1.entry.js.map → p-624d4f5f.entry.js.map} +0 -0
  450. /package/dist/core/{p-df63896a.entry.js.map → p-6933f8e9.entry.js.map} +0 -0
  451. /package/dist/core/{p-70b48a14.entry.js.map → p-6c3044b6.entry.js.map} +0 -0
  452. /package/dist/core/{p-02d0ecd2.entry.js.map → p-75dac3d1.entry.js.map} +0 -0
  453. /package/dist/core/{p-a6e9a8e7.entry.js.map → p-7ef8d616.entry.js.map} +0 -0
  454. /package/dist/core/{p-0388b484.entry.js.map → p-81ddc39d.entry.js.map} +0 -0
  455. /package/dist/core/{p-6e32683c.entry.js.map → p-869954a2.entry.js.map} +0 -0
  456. /package/dist/core/{p-e2155d7f.entry.js.map → p-88d54b72.entry.js.map} +0 -0
  457. /package/dist/core/{p-98c8d46a.entry.js.map → p-8b08d8fe.entry.js.map} +0 -0
  458. /package/dist/core/{p-0080bbce.entry.js.map → p-917c5721.entry.js.map} +0 -0
  459. /package/dist/core/{p-7373beb0.entry.js.map → p-a0f8efb2.entry.js.map} +0 -0
  460. /package/dist/core/{p-1f1b4b8b.entry.js.map → p-a31031a5.entry.js.map} +0 -0
  461. /package/dist/core/{p-221d03e1.entry.js.map → p-a434c3d4.entry.js.map} +0 -0
  462. /package/dist/core/{p-25a458bf.entry.js.map → p-a43c12cd.entry.js.map} +0 -0
  463. /package/dist/core/{p-31fdb740.entry.js.map → p-a50c3b9e.entry.js.map} +0 -0
  464. /package/dist/core/{p-65a8c1d6.entry.js.map → p-ab09986c.entry.js.map} +0 -0
  465. /package/dist/core/{p-e21083c8.entry.js.map → p-b82dcc29.entry.js.map} +0 -0
  466. /package/dist/core/{p-b3ce9fe4.entry.js.map → p-c34848da.entry.js.map} +0 -0
  467. /package/dist/core/{p-8f1aa87d.entry.js.map → p-d8469ac0.entry.js.map} +0 -0
  468. /package/dist/core/{p-75a2cdac.entry.js.map → p-db9c03c0.entry.js.map} +0 -0
  469. /package/dist/core/{p-fb58d1d1.entry.js.map → p-e3997d60.entry.js.map} +0 -0
  470. /package/dist/core/{p-06aef486.entry.js.map → p-e834344e.entry.js.map} +0 -0
  471. /package/dist/core/{p-ee09f1b3.entry.js.map → p-f3c840cd.entry.js.map} +0 -0
  472. /package/dist/core/{p-b1e646e4.entry.js.map → p-f7a14c01.entry.js.map} +0 -0
  473. /package/dist/core/{p-ce898d90.entry.js.map → p-f843da01.entry.js.map} +0 -0
  474. /package/dist/types/components/{ic-date-picker/test/a11y/ic-date-picker.test.a11y.d.ts → ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts} +0 -0
@@ -1,1318 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { i as isEmptyString, s as stringEnumToArray, g as getInputDescribedByText, r as removeFormResetListener, a as addFormResetListener, o as onComponentRequiredPropUndefined, b as isNumeric, I as IcInformationStatus, d as renderHiddenInput, e as IcThemeForegroundEnum, f as IcDayNames, h as IcDateInputMonths } from './helpers2.js';
3
- import { d as defineCustomElement$8 } from './ic-button2.js';
4
- import { d as defineCustomElement$7 } from './ic-input-component-container2.js';
5
- import { d as defineCustomElement$6 } from './ic-input-container2.js';
6
- import { d as defineCustomElement$5 } from './ic-input-label2.js';
7
- import { d as defineCustomElement$4 } from './ic-input-validation2.js';
8
- import { d as defineCustomElement$3 } from './ic-loading-indicator2.js';
9
- import { d as defineCustomElement$2 } from './ic-tooltip2.js';
10
- import { d as defineCustomElement$1 } from './ic-typography2.js';
11
-
12
- const isMonthFirstFormat = (dateString) => {
13
- const monthFirstFormat = /^(0[1-9]|1[0-2])(\/|-)(0[1-9]|[12][0-9]|3[01])(\/|-)\d{4}$/;
14
- return monthFirstFormat.test(dateString);
15
- };
16
- const isDayFirstFormat = (dateString) => {
17
- const dayFirstFormat = /^(0[1-9]|[12][0-9]|3[01])(\/|-)(0[1-9]|1[0-2])(\/|-)\d{4}$/;
18
- return dayFirstFormat.test(dateString);
19
- };
20
- const createDate = (date, dateFormat) => {
21
- let newDate;
22
- if (isDateOrEpoch(date)) {
23
- newDate = typeof date === "string" ? new Date(date) : date;
24
- }
25
- else if (typeof date === "string") {
26
- const dateArray = splitStringDate(date, dateFormat);
27
- const year = Number(dateArray[0]);
28
- const month = Number(dateArray[1]) - 1;
29
- const day = Number(dateArray[2]);
30
- newDate = new Date(year, month, day);
31
- }
32
- return newDate;
33
- };
34
- const isDateOrEpoch = (date) => {
35
- return date instanceof Date || !isNaN(+new Date(+date));
36
- };
37
- const extractDateFromZuluDateTime = (zuluDateTime) => zuluDateTime.slice(0, zuluDateTime.indexOf("T"));
38
- const splitStringDate = (date, dateFormat) => {
39
- // returns an array where item 1 is year, item 2 is month, item 3 is day
40
- if (date.includes("T") && date.includes("Z")) {
41
- const nextDate = extractDateFromZuluDateTime(date);
42
- return nextDate.split("-");
43
- }
44
- let newDate = [];
45
- const dateWithSlashes = date.replace(/-/g, "/");
46
- if (dateWithSlashes.split("/").length > 1) {
47
- const dateParts = dateWithSlashes.split("/");
48
- // pad any values to 2 characters
49
- dateParts.forEach((d, i) => {
50
- if (d.length === 1) {
51
- dateParts[i] = convertToDoubleDigits(d);
52
- }
53
- });
54
- if (dateParts[0].length === 4) {
55
- newDate = [dateParts[0], dateParts[1], dateParts[2]];
56
- }
57
- else {
58
- const newDateStr = dateParts.join("/");
59
- const validDayFirst = isDayFirstFormat(newDateStr);
60
- const validMonthFirst = isMonthFirstFormat(newDateStr);
61
- if (validDayFirst && validMonthFirst) {
62
- if (dateFormat.charAt(0) === "M") {
63
- newDate = [dateParts[2], dateParts[0], dateParts[1]];
64
- }
65
- else {
66
- newDate = [dateParts[2], dateParts[1], dateParts[0]];
67
- }
68
- }
69
- else if (validMonthFirst) {
70
- newDate = [dateParts[2], dateParts[0], dateParts[1]];
71
- }
72
- else {
73
- newDate = [dateParts[2], dateParts[1], dateParts[0]];
74
- }
75
- }
76
- }
77
- return newDate;
78
- };
79
- const convertToDoubleDigits = (value) => {
80
- if (+value < 10) {
81
- return `0${value}`;
82
- }
83
- return value.toString();
84
- };
85
- const getWeekStart = (date, startDay) => {
86
- const tmpDate = new Date(date);
87
- const day = tmpDate.getDay();
88
- const diff = (day < startDay ? 7 : 0) + day - startDay;
89
- tmpDate.setDate(tmpDate.getDate() - diff);
90
- return tmpDate;
91
- };
92
- const getWeekEnd = (date, startDay) => {
93
- const d = new Date(date);
94
- const day = d.getDay();
95
- const diff = (day < startDay ? -7 : 0) + 6 - (day - startDay);
96
- d.setDate(d.getDate() + diff);
97
- return d;
98
- };
99
- const getMonthStart = (date) => {
100
- return new Date(date.getFullYear(), date.getMonth(), 1);
101
- };
102
- const getMonthEnd = (date) => {
103
- return new Date(date.getFullYear(), date.getMonth() + 1, 0);
104
- };
105
- /**
106
- * Compare if two dates are equal exactly equal
107
- */
108
- const dateMatches = (a, b) => {
109
- if (a === null || b === null) {
110
- return false;
111
- }
112
- return (a.getFullYear() === b.getFullYear() &&
113
- a.getMonth() === b.getMonth() &&
114
- a.getDate() === b.getDate());
115
- };
116
- const clampDate = (date, min, max) => {
117
- const time = date.getTime();
118
- if (min !== null && time < min.getTime()) {
119
- return min;
120
- }
121
- if (max !== null && time > max.getTime()) {
122
- return max;
123
- }
124
- return date;
125
- };
126
- /**
127
- * Compare if date is within specified range
128
- */
129
- const dateInRange = (date, min, max) => {
130
- return clampDate(date, min, max) === date;
131
- };
132
- const yearInRange = (year, min, max) => {
133
- let allowed = true;
134
- if (year !== null) {
135
- if (min !== null && year < min.getFullYear()) {
136
- allowed = false;
137
- }
138
- if (allowed && max !== null && year > max.getFullYear()) {
139
- allowed = false;
140
- }
141
- }
142
- return allowed;
143
- };
144
-
145
- const Clear = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
146
- <path d="M15.8327 5.34199L14.6577 4.16699L9.99935 8.82533L5.34102 4.16699L4.16602 5.34199L8.82435 10.0003L4.16602 14.6587L5.34102 15.8337L9.99935 11.1753L14.6577 15.8337L15.8327 14.6587L11.1743 10.0003L15.8327 5.34199Z" fill="currentColor"/>
147
- </svg>
148
- `;
149
-
150
- const Calendar = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
151
- <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"/>
152
- </svg>`;
153
-
154
- 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}input{border:0;height:100%;padding:0;outline:none;background:none;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}ic-input-component-container{cursor:text}ic-input-component-container,ic-input-component-container:hover{color:var(--ic-color-tertiary-text)}.focus-indicator{padding:var(--ic-space-xxxs) var(--ic-space-xs);align-items:center}.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-focus-blue) !important;box-shadow:inset 0 0 0 0.125rem var(--ic-focus-glow) !important;border-radius:0.25rem}.clear-button:focus,.calendar-button:focus,.clear-button:active *,.calendar-button:active *{fill:var(--ic-architectural-white)}.divider{margin:0 var(--ic-space-xxs);width:var(--ic-space-1px);background-color:var(--ic-architectural-400);border-radius:var(--ic-space-1px)}.divider.small{height:var(--ic-space-md)}.divider.default{height:calc(var(--ic-space-sm) + var(--ic-space-xs))}.divider.large{height:var(--ic-space-lg)}";
155
-
156
- let inputIds = 0;
157
- const DateInput = /*@__PURE__*/ proxyCustomElement(class DateInput extends HTMLElement {
158
- constructor() {
159
- super();
160
- this.__registerHost();
161
- this.__attachShadow();
162
- this.calendarButtonClicked = createEvent(this, "calendarButtonClicked", 7);
163
- this.icBlur = createEvent(this, "icBlur", 7);
164
- this.icChange = createEvent(this, "icChange", 7);
165
- this.icFocus = createEvent(this, "icFocus", 7);
166
- this.ARIA_INVALID = "aria-invalid";
167
- this.ARIA_LABEL = "aria-label";
168
- this.ARIA_LABELLED_BY = "aria-labelledby";
169
- this.EVENT_OBJECT_STRING = "[object Event]";
170
- this.FIT_TO_VALUE = "fit-to-value";
171
- this.initialValue = this.value;
172
- this.INPUT_EVENT_OBJECT_STRING = "[object InputEvent]";
173
- this.inputsInOrder = [];
174
- this.isAfterMax = false;
175
- this.isBeforeMin = false;
176
- this.isDateSetFromKeyboardEvent = false;
177
- this.isDisabledDate = false;
178
- this.isValidDay = true;
179
- this.isValidMonth = true;
180
- this.isValidDate = true;
181
- this.isZuluTime = false;
182
- this.KEYBOARD_EVENT_OBJECT_STRING = "[object KeyboardEvent]";
183
- this.MAX_DAY = 31;
184
- this.MAX_MONTH = 12;
185
- this.previousEmittedDate = undefined;
186
- this.previousSelectedDate = null;
187
- this.selectedDate = null;
188
- this.setInputPasteValue = (input, pastedValue) => {
189
- const inputEl = input;
190
- inputEl.value = pastedValue;
191
- inputEl.classList.add(this.FIT_TO_VALUE);
192
- };
193
- this.checkSingleCopiedValueIsValid = (input, pastedValue) => {
194
- let isValid = false;
195
- const value = Number(pastedValue);
196
- switch (input) {
197
- case this.dayInputEl:
198
- isValid = value >= 1 && value <= this.MAX_DAY;
199
- break;
200
- case this.monthInputEl:
201
- isValid = value >= 1 && value <= this.MAX_MONTH;
202
- break;
203
- case this.yearInputEl:
204
- isValid = true;
205
- break;
206
- default:
207
- isValid = false;
208
- break;
209
- }
210
- return isValid;
211
- };
212
- /**
213
- * Using Object.prototype.string to determine type if event from user
214
- * @param event - event object used to differentiate keyboard, generic or input event
215
- * @returns boolean
216
- */
217
- this.isKeyboardOrEvent = (event) => {
218
- return (Object.prototype.toString.call(event) === this.EVENT_OBJECT_STRING ||
219
- Object.prototype.toString.call(event) ===
220
- this.KEYBOARD_EVENT_OBJECT_STRING);
221
- };
222
- this.setDateValidity = () => {
223
- if (!isEmptyString(this.day)) {
224
- this.isValidDay = +this.day > this.MAX_DAY ? false : true;
225
- }
226
- else {
227
- this.isValidDay = true;
228
- }
229
- if (!isEmptyString(this.month)) {
230
- this.isValidMonth = +this.month > this.MAX_MONTH ? false : true;
231
- }
232
- else {
233
- this.isValidMonth = true;
234
- }
235
- };
236
- this.handleInput = (event) => {
237
- const inputEvent = event;
238
- const input = event.target;
239
- if (input !== this.yearInputEl) {
240
- // Only auto-format if input event is not a character being deleted
241
- // and not as user is changing value using up / down keys
242
- if (inputEvent.inputType !== "deleteContentBackward" &&
243
- !this.preventAutoFormatting) {
244
- if (input.value.length === 1 &&
245
- ((input === this.dayInputEl && +input.value >= 4) ||
246
- (input === this.monthInputEl && +input.value >= 2)) &&
247
- +input.value <= 9) {
248
- this.setInputValue(input);
249
- this.notifyScreenReader(input, event);
250
- this.moveToNextInput(input);
251
- }
252
- if (input.value.length === 2) {
253
- if (+input.value === 0) {
254
- input.value = "01";
255
- }
256
- this.setInputValue(input);
257
- this.setPreventInput(input, true);
258
- this.notifyScreenReader(input, event);
259
- this.moveToNextInput(input);
260
- }
261
- else {
262
- this.setPreventInput(input, false);
263
- }
264
- }
265
- else if (this.preventAutoFormatting) {
266
- /**
267
- * Using arrow keys prevents auto formatting so need to deal with
268
- * switching from arrow keys to inputting numbers
269
- **/
270
- if (input.value.length === 2 && !this.isKeyboardOrEvent(event)) {
271
- this.setInputValue(input);
272
- this.setPreventInput(input, true);
273
- this.moveToNextInput(input);
274
- }
275
- else {
276
- this.setInputValue(input);
277
- }
278
- }
279
- if (input.value.length !== 2) {
280
- this.setPreventInput(input, false);
281
- }
282
- }
283
- else {
284
- if (input.value.length === 4) {
285
- this.setInputValue(input);
286
- if (Object.prototype.toString.call(event) !== this.EVENT_OBJECT_STRING) {
287
- this.moveToNextInput(input);
288
- }
289
- this.setPreventInput(input, true);
290
- }
291
- else {
292
- this.setInputValue(input, true);
293
- this.setPreventInput(input, false);
294
- }
295
- }
296
- // Add / remove class to make input width match size of value i.e. 2 digits' width for day / month, 4 for year
297
- this.setFitToValueStyling(input);
298
- if (input.value.length === 0) {
299
- this.setInputValue(input, true);
300
- this.setValidationMessage();
301
- }
302
- this.notifyScreenReader(input, event);
303
- };
304
- this.handleKeyDown = (event, isInputPrevented) => {
305
- const input = event.target;
306
- const eventKey = event.key.toLowerCase();
307
- // Regex required due to FF allowing all characters as values for number text field.
308
- const regex = /-?\d*\.?\d+(e[-+]?\d+)?|[/-]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;
309
- if (!regex.test(eventKey) &&
310
- !((event.ctrlKey || event.metaKey) &&
311
- (eventKey === "v" || eventKey === "c"))) {
312
- event.preventDefault();
313
- }
314
- switch (eventKey) {
315
- case "/":
316
- case "-":
317
- case ".":
318
- event.preventDefault();
319
- this.setPasteInvalidText();
320
- this.moveToNextInput(input);
321
- break;
322
- case "arrowright":
323
- case "arrowleft":
324
- event.preventDefault();
325
- this.handleLeftRightArrowKeyPress(input, eventKey);
326
- break;
327
- case "arrowup":
328
- case "arrowdown":
329
- this.preventAutoFormatting = true;
330
- this.handleUpDownArrowKeyPress(input, event);
331
- break;
332
- }
333
- this.preventInput(event, isInputPrevented);
334
- this.isDateSetFromKeyboardEvent = true;
335
- };
336
- this.handleFocus = (event) => {
337
- // Highlight / select all characters in input for easy replacement
338
- const input = event.target;
339
- input.select();
340
- };
341
- this.handleBlur = (event) => {
342
- const input = event.target;
343
- this.setPasteInvalidText();
344
- this.autocompleteInput(input);
345
- };
346
- this.handleLeftRightArrowKeyPress = (input, key) => {
347
- if (key === "arrowright") {
348
- this.moveToNextInput(input);
349
- }
350
- else {
351
- this.moveToPreviousInput(input);
352
- }
353
- this.setPasteInvalidText();
354
- };
355
- this.notifyScreenReaderSelectedDate = () => {
356
- const dayNames = stringEnumToArray(IcDayNames);
357
- const months = stringEnumToArray(IcDateInputMonths);
358
- this.selectedDateInfoEl.textContent = `Selected date: ${dayNames[this.selectedDate.getDay()]}, ${this.selectedDate.getDate()} ${months[this.selectedDate.getMonth()]} ${this.selectedDate.getFullYear()}`;
359
- };
360
- this.handleUpDownArrowKeyPress = (input, event) => {
361
- const minValue = input === this.yearInputEl ? 0 : 1;
362
- let maxValue;
363
- switch (input) {
364
- case this.dayInputEl:
365
- maxValue = this.MAX_DAY;
366
- break;
367
- case this.monthInputEl:
368
- maxValue = this.MAX_MONTH;
369
- break;
370
- case this.yearInputEl:
371
- maxValue = 9999;
372
- }
373
- // Make value loop round when min / max reached
374
- if (input === null || input === void 0 ? void 0 : input.value) {
375
- if (event.key === "ArrowUp") {
376
- if (+input.value === maxValue) {
377
- event.preventDefault();
378
- input.value = `0${minValue}`;
379
- }
380
- else {
381
- input.value =
382
- +input.value + 1 < 10
383
- ? `0${+input.value + 1}`
384
- : (+input.value + 1).toString();
385
- }
386
- this.notifyScreenReader(input, event);
387
- }
388
- if (event.key === "ArrowDown") {
389
- if (+input.value === minValue) {
390
- event.preventDefault();
391
- input.value = maxValue.toString();
392
- }
393
- else {
394
- input.value =
395
- +input.value - 1 < 10
396
- ? `0${+input.value - 1}`
397
- : (+input.value - 1).toString();
398
- }
399
- this.notifyScreenReader(input, event);
400
- }
401
- }
402
- else {
403
- if (event.key === "ArrowDown") {
404
- event.preventDefault();
405
- if (input === this.yearInputEl) {
406
- input.value = new Date().getFullYear().toString();
407
- }
408
- else {
409
- input.value = maxValue.toString();
410
- }
411
- this.notifyScreenReader(input, event);
412
- }
413
- else if (event.key === "ArrowUp") {
414
- event.preventDefault();
415
- if (input === this.yearInputEl) {
416
- input.value = new Date().getFullYear().toString();
417
- }
418
- else {
419
- input.value = `0${minValue}`;
420
- }
421
- this.notifyScreenReader(input, event);
422
- }
423
- }
424
- this.setInputValue(input);
425
- this.setFitToValueStyling(input);
426
- };
427
- this.handleDateChange = (force) => {
428
- // Prevent icChange being emitted when each individual input is changed
429
- // This method is used within componentWillUpdate instead of using @Watch('value');
430
- if (force || !dateMatches(this.selectedDate, this.previousSelectedDate)) {
431
- if (this.value) {
432
- this.inputsInOrder.forEach((input) => {
433
- input.classList.add(this.FIT_TO_VALUE);
434
- });
435
- }
436
- if (this.day && this.month && this.year && this.invalidDateText === "") {
437
- this.setValueAndEmitChange(this.selectedDate);
438
- this.notifyScreenReaderSelectedDate();
439
- }
440
- else if (!(this.selectedDate === null && this.previousSelectedDate === null)) {
441
- this.setValueAndEmitChange(null);
442
- this.selectedDateInfoEl.textContent = "";
443
- }
444
- this.previousSelectedDate = this.selectedDate;
445
- if (!this.isDateSetFromKeyboardEvent) {
446
- this.updateInputValues(this.day, this.month, this.year);
447
- }
448
- }
449
- };
450
- this.slicePastedDate = (valueLength, datePart) => {
451
- return datePart.length > valueLength
452
- ? datePart.slice(0, valueLength)
453
- : datePart;
454
- };
455
- this.isPastedStringDateValid = (value) => {
456
- if (/\d+-\d+-\d+$/.test(value) ||
457
- /\d+\/\d+\/\d+/.test(value) ||
458
- /\d+\.\d+\.\d+/.test(value)) {
459
- return true;
460
- }
461
- if (/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:\.\d+)?)?Z/.test(value)) {
462
- this.isZuluTime = true;
463
- return true;
464
- }
465
- return false;
466
- };
467
- // Set value of each input to value of pasted date part
468
- // Allows formats separated by '-' or '/'
469
- this.handlePaste = (event) => {
470
- event.preventDefault();
471
- const pastedValue = event.clipboardData.getData("Text");
472
- const isValidDate = this.isPastedStringDateValid(pastedValue);
473
- this.setPastedValueAndValidation(isValidDate, pastedValue, event);
474
- };
475
- this.setDate = (date) => {
476
- if (date === null || date === "" || date === undefined) {
477
- this.day = null;
478
- this.month = null;
479
- this.year = null;
480
- this.inputsInOrder.forEach((input) => {
481
- input.classList.remove(this.FIT_TO_VALUE);
482
- this.setPreventInput(input, false);
483
- });
484
- this.handleDateChange(true);
485
- }
486
- else {
487
- if (isDateOrEpoch(date)) {
488
- let newDate;
489
- if (typeof date === "string") {
490
- // Checking if epoch date time
491
- newDate = new Date(+date);
492
- }
493
- else {
494
- newDate = date;
495
- }
496
- this.day = convertToDoubleDigits(newDate.getDate());
497
- this.month = convertToDoubleDigits(newDate.getMonth() + 1);
498
- this.year = newDate.getFullYear().toString();
499
- }
500
- else if (typeof date === "string") {
501
- const defaultDateArray = splitStringDate(date, this.dateFormat);
502
- this.year = defaultDateArray[0];
503
- this.month = defaultDateArray[1];
504
- this.day = defaultDateArray[2];
505
- }
506
- }
507
- this.setValidationMessage();
508
- };
509
- this.formatMinMax = (date) => {
510
- let formattedDate;
511
- const day = convertToDoubleDigits(date.getDate());
512
- const month = convertToDoubleDigits(date.getMonth() + 1);
513
- const year = date.getFullYear();
514
- switch (this.dateFormat) {
515
- case "DD/MM/YYYY":
516
- formattedDate = `${day}/${month}/${year}`;
517
- break;
518
- case "MM/DD/YYYY":
519
- formattedDate = `${month}/${day}/${year}`;
520
- break;
521
- case "YYYY/MM/DD":
522
- formattedDate = `${year}/${month}/${day}`;
523
- break;
524
- }
525
- return formattedDate;
526
- };
527
- this.updateInputValues = (day, month, year) => {
528
- this.dayInputEl.value = day;
529
- this.monthInputEl.value = month;
530
- this.yearInputEl.value = year;
531
- };
532
- // Set value in state based on input
533
- this.setInputValue = (input, clear = false) => {
534
- const newValue = clear ? "" : input.value;
535
- switch (input) {
536
- case this.dayInputEl:
537
- this.day = newValue;
538
- break;
539
- case this.monthInputEl:
540
- this.month = newValue;
541
- break;
542
- case this.yearInputEl:
543
- if (this.year !== newValue) {
544
- this.year = newValue;
545
- }
546
- }
547
- this.setValidationMessage();
548
- };
549
- this.setValidationMessage = () => {
550
- this.setDateValidity();
551
- if (!isEmptyString(this.day) &&
552
- !isEmptyString(this.month) &&
553
- !isEmptyString(this.year)) {
554
- // Check whether date actually exists
555
- // (used https://www.hectane.com/blog/javascript-date-validation-with-leap-year)
556
- this.selectedDate = this.convertToDate(this.year, this.month, this.day);
557
- this.isValidDate =
558
- +this.selectedDate !== 0 && this.selectedDate.getDate() == +this.day;
559
- this.isDisabledDate = this.isSelectedDateDisabled();
560
- if (!this.isValidDate || this.isDisabledDate) {
561
- this.inputsInOrder.forEach((input) => input.setAttribute(this.ARIA_INVALID, "true"));
562
- }
563
- else {
564
- this.inputsInOrder.forEach((input) => input.removeAttribute(this.ARIA_INVALID));
565
- }
566
- }
567
- else {
568
- this.selectedDate = null;
569
- }
570
- if (!(this.isValidDay && this.isValidMonth && this.isValidDate)) {
571
- this.invalidDateText = "Please enter a valid date.";
572
- }
573
- else if (this.isDisabledDate && this.selectedDate !== null) {
574
- if (this.isBeforeMin) {
575
- if (this.disablePast) {
576
- this.invalidDateText = this.disablePastMessage;
577
- }
578
- else {
579
- this.invalidDateText = `Please enter a date after ${this.formatMinMax(this.minDate)}.`;
580
- }
581
- }
582
- else if (this.isAfterMax) {
583
- if (this.disableFuture) {
584
- this.invalidDateText = this.disableFutureMessage;
585
- }
586
- else {
587
- this.invalidDateText = `Please enter a date before ${this.formatMinMax(this.maxDate)}.`;
588
- }
589
- }
590
- else if (this.disableDays.length !== 0) {
591
- this.invalidDateText = this.disableDaysMessage;
592
- }
593
- else {
594
- if (this.disablePast) {
595
- this.invalidDateText = this.disablePastMessage;
596
- }
597
- if (this.disableFuture) {
598
- this.invalidDateText = this.disableFutureMessage;
599
- }
600
- }
601
- }
602
- else {
603
- this.invalidDateText = "";
604
- }
605
- };
606
- // Set refs to the input elements in the order they are displayed (based on the dateFormat)
607
- this.setInputsInOrder = () => {
608
- const inputs = this.el.shadowRoot.querySelectorAll("input");
609
- inputs.forEach((input) => this.inputsInOrder.push(input));
610
- };
611
- // Includes text usually added using aria-describedby
612
- // (which doesn't work on input component container)
613
- this.setAriaLabelledBy = () => {
614
- var _a;
615
- if (this.disabled &&
616
- !isEmptyString((_a = this.inputCompContainerEl) === null || _a === void 0 ? void 0 : _a.getAttribute(this.ARIA_LABELLED_BY))) {
617
- this.removeAriaLabelledBy();
618
- return;
619
- }
620
- if (this.disabled) {
621
- return;
622
- }
623
- const labelEl = this.el.shadowRoot.querySelector("label");
624
- const labelId = `${this.inputId}-label`;
625
- if (labelEl !== null && labelEl !== undefined) {
626
- labelEl.id = labelId;
627
- const hasValidation = (!isEmptyString(this.validationStatus) &&
628
- !isEmptyString(this.validationText)) ||
629
- !isEmptyString(this.invalidDateText);
630
- const labelledBy = `${labelId} ${this.screenReaderInfoId} ${getInputDescribedByText(this.inputId, this.helperText !== "" && this.helperText !== this.defaultHelperText, hasValidation)} ${this.selectedDate ? this.selectedDateInfoId : ""} ${this.assistiveHintId}`;
631
- this.inputCompContainerEl.setAttribute(this.ARIA_LABELLED_BY, labelledBy);
632
- }
633
- };
634
- // Sets boolean for each input, used to limit the number of characters within each field (2 for day / month, 4 for year)
635
- this.setPreventInput = (input, isPrevented) => {
636
- switch (input) {
637
- case this.dayInputEl:
638
- this.preventDayInput = isPrevented;
639
- break;
640
- case this.monthInputEl:
641
- this.preventMonthInput = isPrevented;
642
- break;
643
- case this.yearInputEl:
644
- this.preventYearInput = isPrevented;
645
- }
646
- };
647
- // Get input based on letter representing each date part ("D", "M" or "Y")
648
- // (retrieved from dateFormat)
649
- this.getInputFromDatePart = (datePart) => {
650
- const dayInput = (h("input", { class: "day-input", id: "day-input", ref: (el) => (this.dayInputEl = el), "aria-label": "day", placeholder: "DD", disabled: this.disabled, onPaste: this.handlePaste, inputmode: "number", pattern: "[0-9]*", onKeyDown: (event) => this.handleKeyDown(event, this.preventDayInput) }));
651
- const monthInput = (h("input", { id: "month-input", class: "month-input", ref: (el) => (this.monthInputEl = el), "aria-label": "month", placeholder: "MM", disabled: this.disabled, onPaste: this.handlePaste, inputmode: "number", pattern: "[0-9]*", onKeyDown: (event) => this.handleKeyDown(event, this.preventMonthInput) }));
652
- 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, onPaste: this.handlePaste, inputmode: "number", pattern: "[0-9]*", onKeyDown: (event) => this.handleKeyDown(event, this.preventYearInput) }));
653
- let input;
654
- switch (datePart) {
655
- case "D":
656
- input = dayInput;
657
- break;
658
- case "M":
659
- input = monthInput;
660
- break;
661
- case "Y":
662
- input = yearInput;
663
- }
664
- return input;
665
- };
666
- // Get input elements in order of chosen date format
667
- this.getInputsInOrder = () => {
668
- const dateParts = this.dateFormat.split("/");
669
- const inputsInOrder = [];
670
- dateParts.forEach((part) => {
671
- inputsInOrder.push(this.getInputFromDatePart(part.substring(0, 1)));
672
- });
673
- return inputsInOrder;
674
- };
675
- // To add to the end of assistive hint to make it clearer that each date part has its own input
676
- // that can be changed individually
677
- this.getDescOfInputsOrder = () => {
678
- let description;
679
- switch (this.dateFormat) {
680
- case "DD/MM/YYYY":
681
- description = "day, month, and year";
682
- break;
683
- case "MM/DD/YYYY":
684
- description = "month, day, and year";
685
- break;
686
- case "YYYY/MM/DD":
687
- description = "year, month, and day";
688
- }
689
- return description;
690
- };
691
- // Add 'required' or 'invalid data' to span used in aria-labelledby
692
- // Many ARIA attributes aren't read out by screen reader when on the input component container
693
- this.getScreenReaderInfo = (validationStatus) => {
694
- let inputDescriptors = "";
695
- if (this.required) {
696
- inputDescriptors += "required";
697
- }
698
- if (validationStatus === IcInformationStatus.Error) {
699
- inputDescriptors += " invalid data";
700
- }
701
- return inputDescriptors === "" ? "" : inputDescriptors + ", ";
702
- };
703
- // Prevent non-number characters being entered
704
- // ('e' or '.' - which are usually allowed in <input type="number">)
705
- // And limit the number of characters within each field (2 for day / month, 4 for year)
706
- // (because 'maxlength' doesn't work on <input type="number">)
707
- this.preventInput = (event, isInputPrevented) => {
708
- const key = event.key;
709
- const input = event.target;
710
- let selectedString;
711
- if (input) {
712
- selectedString = input.value.substring(input.selectionStart, input.selectionEnd);
713
- }
714
- if (key === "e" ||
715
- key === "." ||
716
- key === "-" ||
717
- (event.key >= "0" &&
718
- event.key <= "9" &&
719
- isInputPrevented &&
720
- !selectedString)) {
721
- event.preventDefault();
722
- }
723
- };
724
- // Get whether date has been disabled using disableFuture or disablePast prop, but always allow current day
725
- // Consider using dateClamp and inDateRange
726
- this.isSelectedDateDisabled = () => {
727
- const currentDate = new Date();
728
- this.isAfterMax = false;
729
- this.isBeforeMin = false;
730
- let disabled = false;
731
- const isNotToday = this.selectedDate.toDateString() !== currentDate.toDateString();
732
- if (this.minDate && this.selectedDate < this.minDate && isNotToday) {
733
- this.isBeforeMin = true;
734
- disabled = true;
735
- }
736
- if (this.maxDate && this.selectedDate > this.maxDate && isNotToday) {
737
- this.isAfterMax = true;
738
- disabled = true;
739
- }
740
- if (this.disableDays.includes(this.selectedDate.getDay())) {
741
- disabled = true;
742
- }
743
- if (((this.disablePast && this.selectedDate < currentDate) ||
744
- (this.disableFuture && this.selectedDate > currentDate)) &&
745
- isNotToday) {
746
- disabled = true;
747
- }
748
- return disabled;
749
- };
750
- this.moveToNextInput = (currentInput) => {
751
- const currentInputPos = this.inputsInOrder.findIndex((input) => input === currentInput);
752
- const nextInput = this.inputsInOrder[currentInputPos + 1];
753
- this.preventAutoFormatting = false;
754
- if (nextInput) {
755
- nextInput.focus();
756
- }
757
- };
758
- this.moveToPreviousInput = (currentInput) => {
759
- const currentInputPos = this.inputsInOrder.findIndex((input) => input === currentInput);
760
- this.preventAutoFormatting = false;
761
- if (this.inputsInOrder[currentInputPos - 1]) {
762
- this.inputsInOrder[currentInputPos - 1].focus();
763
- }
764
- };
765
- this.autocompleteInput = (input) => {
766
- if (input === this.yearInputEl) {
767
- this.autocompleteYear();
768
- }
769
- else {
770
- const inputValue = input.value;
771
- // Autocomplete input as 2 characters (leading zero) when only 1 character entered (for day and month)
772
- if (inputValue.length === 1) {
773
- if (+inputValue === 0) {
774
- input.value = "01";
775
- }
776
- else {
777
- input.value = `0${inputValue}`;
778
- }
779
- }
780
- }
781
- if (input.value) {
782
- this.setInputValue(input);
783
- }
784
- };
785
- // Autocomplete year as current millennium when fewer than 4 characters entered
786
- this.autocompleteYear = () => {
787
- const inputValue = this.yearInputEl.value;
788
- const yearNumbers = ["2", "0", "0"];
789
- let autocompletedInput = "";
790
- if (inputValue) {
791
- yearNumbers.forEach((number, index) => {
792
- if (inputValue.length + index <= 3) {
793
- autocompletedInput += number;
794
- }
795
- });
796
- this.yearInputEl.value = `${autocompletedInput}${inputValue}`;
797
- }
798
- };
799
- this.convertToDate = (year, month, day) => {
800
- if (!isEmptyString(year) && !isEmptyString(month) && !isEmptyString(day)) {
801
- return new Date(+year, +month - 1, +day);
802
- }
803
- else {
804
- return null;
805
- }
806
- };
807
- this.handleHostBlur = () => {
808
- this.removeLabelledBy = false;
809
- this.icBlur.emit({ value: this.selectedDate });
810
- };
811
- this.handleHostFocus = () => {
812
- var _a;
813
- if ((_a = this.el.shadowRoot.activeElement) === null || _a === void 0 ? void 0 : _a.id.match(/(day|month|year)-input$/)) {
814
- this.removeLabelledBy = false;
815
- }
816
- else {
817
- this.removeLabelledBy = true;
818
- }
819
- this.icFocus.emit({ value: this.selectedDate });
820
- };
821
- this.handleFormReset = () => {
822
- // Get the initial value and populate day, month and year again.
823
- this.setDate(this.initialValue);
824
- this.setValidationMessage();
825
- this.handleDateChange(false);
826
- };
827
- this.getAriaLabel = (input) => {
828
- return input.getAttribute(this.ARIA_LABEL);
829
- };
830
- this.notifyScreenReaderArrowKeys = (input) => {
831
- const liveRegion = this.el.shadowRoot.querySelector("#live-region");
832
- let announcement = "";
833
- const ariaLabel = this.getAriaLabel(input);
834
- if (liveRegion && input.value) {
835
- if (input === this.monthInputEl &&
836
- !!IcDateInputMonths[+input.value - 1]) {
837
- announcement = `${input.value} - ${IcDateInputMonths[+input.value - 1]}, ${ariaLabel}`;
838
- }
839
- if (input === this.dayInputEl || input === this.yearInputEl) {
840
- announcement = `${input.value}, ${ariaLabel}`;
841
- }
842
- liveRegion.textContent = announcement;
843
- }
844
- };
845
- this.notifyScreenReaderInput = (input, liveRegion) => {
846
- let announcement = "";
847
- const ariaLabel = this.getAriaLabel(input);
848
- if (input === this.dayInputEl || input === this.monthInputEl) {
849
- if (input.value.length === 2) {
850
- if (input === this.monthInputEl &&
851
- !!IcDateInputMonths[+input.value - 1] &&
852
- this.isValidMonth) {
853
- announcement = `${input.value} - ${IcDateInputMonths[+input.value - 1]}, ${ariaLabel}`;
854
- }
855
- if (input === this.dayInputEl && this.isValidDay) {
856
- announcement = `${input.value}, ${ariaLabel}`;
857
- }
858
- }
859
- else {
860
- announcement = "";
861
- }
862
- }
863
- else {
864
- if (input.value.length === 4) {
865
- announcement = `${input.value}, ${ariaLabel}`;
866
- }
867
- else {
868
- announcement = "";
869
- }
870
- }
871
- liveRegion.textContent = announcement;
872
- };
873
- this.setFitToValueStyling = (input) => {
874
- if (input.value) {
875
- input.classList.add(this.FIT_TO_VALUE);
876
- }
877
- else {
878
- input.classList.remove(this.FIT_TO_VALUE);
879
- }
880
- };
881
- this.setAriaInvalid = (validDay, validMonth, validDate, disabledDate) => {
882
- if (this.inputsInOrder.length) {
883
- this.inputsInOrder.forEach((input) => {
884
- input.removeAttribute(this.ARIA_INVALID);
885
- });
886
- if (!validDay) {
887
- this.dayInputEl.setAttribute(this.ARIA_INVALID, "true");
888
- }
889
- if (!validMonth) {
890
- this.monthInputEl.setAttribute(this.ARIA_INVALID, "true");
891
- }
892
- if (!validDate || disabledDate) {
893
- this.inputsInOrder.forEach((input) => {
894
- input.setAttribute(this.ARIA_INVALID, "true");
895
- });
896
- }
897
- }
898
- };
899
- this.handleClear = () => {
900
- this.inputsInOrder.forEach((input) => {
901
- input.classList.remove(this.FIT_TO_VALUE);
902
- this.setInputValue(input, true);
903
- this.setPreventInput(input, false);
904
- });
905
- this.isDateSetFromKeyboardEvent = false;
906
- this.setValidationMessage();
907
- this.handleDateChange(true);
908
- this.inputsInOrder[0].focus();
909
- };
910
- this.handleCalendarOpen = (ev) => {
911
- var _a, _b;
912
- ev.stopImmediatePropagation();
913
- (_a = this.calendarButtonEl) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);
914
- this.calendarButtonClicked.emit({ value: this.selectedDate });
915
- (_b = this.calendarButtonEl) === null || _b === void 0 ? void 0 : _b.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);
916
- this.isDateSetFromKeyboardEvent = false;
917
- };
918
- this.setValueAndEmitChange = (value) => {
919
- if (!dateMatches(new Date(this.value), value)) {
920
- this.emitIcChange(value);
921
- this.value = value;
922
- }
923
- };
924
- this.handleCalendarFocus = () => {
925
- this.calendarFocused = true;
926
- };
927
- this.handleCalendarBlur = () => {
928
- this.calendarFocused = false;
929
- };
930
- this.handleClearFocus = () => {
931
- this.removeLabelledBy = true;
932
- this.clearButtonFocused = true;
933
- };
934
- this.handleClearBlur = (ev) => {
935
- var _a;
936
- this.clearButtonFocused = false;
937
- if ((_a = ev.relatedTarget) === null || _a === void 0 ? void 0 : _a.id.match(/(day|year)-input$/)) {
938
- this.removeLabelledBy = false;
939
- return;
940
- }
941
- this.removeLabelledBy = true;
942
- };
943
- this.emitIcChange = (d) => {
944
- if (!(d === null && this.previousEmittedDate === null) &&
945
- !dateMatches(d, this.previousEmittedDate)) {
946
- this.previousEmittedDate = d;
947
- this.icChange.emit({ value: d });
948
- }
949
- };
950
- this.day = "";
951
- this.invalidDateText = undefined;
952
- this.maxDate = undefined;
953
- this.minDate = undefined;
954
- this.month = "";
955
- this.year = "";
956
- this.calendarFocused = false;
957
- this.clearButtonFocused = false;
958
- this.removeLabelledBy = false;
959
- this.dateFormat = "DD/MM/YYYY";
960
- this.disabled = false;
961
- this.disableDays = [];
962
- this.disableDaysMessage = "The date you have selected is on a day of the week that is not allowed. Please select another date.";
963
- this.disableFuture = false;
964
- this.disableFutureMessage = "Dates in the future are not allowed. Please select a date in the past.";
965
- this.disablePast = false;
966
- this.disablePastMessage = "Dates in the past are not allowed. Please select a date in the future.";
967
- this.helperText = undefined;
968
- this.inputId = `ic-date-input-${inputIds++}`;
969
- this.label = undefined;
970
- this.max = "";
971
- this.min = "";
972
- this.name = this.inputId;
973
- this.required = false;
974
- this.showCalendarButton = false;
975
- this.showClearButton = true;
976
- this.size = "default";
977
- this.value = "";
978
- this.validationStatus = "";
979
- this.validationText = "";
980
- }
981
- watchMaxHandler() {
982
- if (this.disableFuture) {
983
- this.maxDate = new Date();
984
- }
985
- else {
986
- this.maxDate = createDate(this.max, this.dateFormat);
987
- }
988
- }
989
- watchMinHandler() {
990
- if (this.disablePast) {
991
- this.minDate = new Date();
992
- }
993
- else {
994
- this.minDate = createDate(this.min, this.dateFormat);
995
- }
996
- }
997
- disconnectedCallback() {
998
- removeFormResetListener(this.el, this.handleFormReset);
999
- }
1000
- componentWillLoad() {
1001
- this.defaultHelperText = `Use format ${this.dateFormat}`;
1002
- if (isEmptyString(this.helperText)) {
1003
- this.helperText = this.defaultHelperText;
1004
- }
1005
- this.watchMinHandler();
1006
- this.watchMaxHandler();
1007
- if (this.value) {
1008
- this.setDate(this.value);
1009
- this.previousEmittedDate = this.selectedDate;
1010
- }
1011
- else {
1012
- this.previousEmittedDate = null;
1013
- }
1014
- this.screenReaderInfoId = `${this.inputId}-screen-reader-info`;
1015
- this.assistiveHintId = `${this.inputId}-assistive-hint`;
1016
- this.selectedDateInfoId = `${this.inputId}-selected-date-info`;
1017
- addFormResetListener(this.el, this.handleFormReset);
1018
- }
1019
- componentDidLoad() {
1020
- this.setInputsInOrder();
1021
- onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Date Input");
1022
- if (this.value) {
1023
- this.updateInputValues(this.day, this.month, this.year);
1024
- this.inputsInOrder.forEach((input) => {
1025
- input.classList.add(this.FIT_TO_VALUE);
1026
- });
1027
- }
1028
- this.setAriaInvalid(this.isValidDay, this.isValidMonth, this.isValidDate, this.isDisabledDate);
1029
- if (this.value) {
1030
- this.notifyScreenReaderSelectedDate();
1031
- }
1032
- this.inputsInOrder.forEach((input) => {
1033
- input.addEventListener("input", this.handleInput);
1034
- input.addEventListener("focus", this.handleFocus);
1035
- input.addEventListener("blur", this.handleBlur);
1036
- });
1037
- // Prevent asterisk being read out after the label by screen reader (by applying aria-hidden)
1038
- // Needed because label is included in 'aria-labelledby' instead of using 'aria-label'
1039
- const labelEl = this.el.shadowRoot.querySelector("label");
1040
- if (this.required) {
1041
- const asteriskSpan = document.createElement("span");
1042
- asteriskSpan.setAttribute("aria-hidden", "true");
1043
- asteriskSpan.textContent = " *";
1044
- labelEl === null || labelEl === void 0 ? void 0 : labelEl.appendChild(asteriskSpan);
1045
- }
1046
- }
1047
- componentWillUpdate() {
1048
- if (!this.isDateSetFromKeyboardEvent) {
1049
- this.setDate(this.value);
1050
- }
1051
- this.setAriaInvalid(this.isValidDay, this.isValidMonth, this.isValidDate, this.isDisabledDate);
1052
- this.handleDateChange(false);
1053
- this.isDateSetFromKeyboardEvent = false;
1054
- }
1055
- componentDidRender() {
1056
- if (this.removeLabelledBy) {
1057
- this.removeAriaLabelledBy();
1058
- return;
1059
- }
1060
- this.setAriaLabelledBy();
1061
- }
1062
- /**
1063
- * Returns the value as a Date object
1064
- * @returns Date
1065
- */
1066
- async getDate() {
1067
- return this.selectedDate;
1068
- }
1069
- /**
1070
- * @internal Sets focus on the calendar button.
1071
- */
1072
- async setCalendarFocus() {
1073
- if (this.calendarButtonEl) {
1074
- this.calendarButtonEl.focus();
1075
- }
1076
- }
1077
- /**
1078
- * @internal Used to pass disabledDays from parent component.
1079
- */
1080
- async setDisableDays(days) {
1081
- this.disableDays = days;
1082
- }
1083
- /**
1084
- * @internal Used to enable other components to invoke an IcChange event from the input.
1085
- */
1086
- async triggerIcChange(d) {
1087
- this.emitIcChange(d);
1088
- }
1089
- removeAriaLabelledBy() {
1090
- this.inputCompContainerEl.removeAttribute(this.ARIA_LABELLED_BY);
1091
- }
1092
- setPastedValueAndValidation(isValidDate, pastedValue, event) {
1093
- switch (true) {
1094
- case isValidDate: {
1095
- const nextParsedValue = this.isZuluTime
1096
- ? extractDateFromZuluDateTime(pastedValue)
1097
- : pastedValue;
1098
- const dateParts = nextParsedValue.split(/-|\/|\./);
1099
- this.inputsInOrder.forEach((input, index) => {
1100
- input.classList.add(this.FIT_TO_VALUE);
1101
- if (this.isZuluTime) {
1102
- this.pasteZuluDateTime(dateParts, index);
1103
- }
1104
- else {
1105
- let dateValue;
1106
- if (input === this.dayInputEl || input === this.monthInputEl) {
1107
- dateValue = this.slicePastedDate(2, dateParts[index]);
1108
- }
1109
- else {
1110
- dateValue = this.slicePastedDate(4, dateParts[index]);
1111
- }
1112
- input.value = dateValue;
1113
- this.setInputValue(input);
1114
- this.autocompleteInput(input);
1115
- }
1116
- });
1117
- this.isZuluTime = false;
1118
- break;
1119
- }
1120
- case (pastedValue.length === 1 ||
1121
- pastedValue.length === 2 ||
1122
- pastedValue.length === 4) &&
1123
- isNumeric(pastedValue):
1124
- if (this.checkSingleCopiedValueIsValid(event.target, pastedValue)) {
1125
- // Check if copied value can be pasted into input
1126
- this.setInputPasteValue(event.target, pastedValue);
1127
- this.setInputValue(event.target);
1128
- }
1129
- else {
1130
- this.displayPastedValidation(event);
1131
- }
1132
- break;
1133
- case pastedValue.length === 3 && isNumeric(pastedValue):
1134
- if (event.target !== this.yearInputEl) {
1135
- this.displayPastedValidation(event);
1136
- }
1137
- else {
1138
- this.setInputPasteValue(event.target, pastedValue);
1139
- this.setInputValue(event.target);
1140
- }
1141
- break;
1142
- case pastedValue.length >= 5 && isNumeric(pastedValue):
1143
- this.displayPastedValidation(event);
1144
- }
1145
- }
1146
- pasteZuluDateTime(dateParts, index) {
1147
- // ['YYYY', 'MM', 'DD']
1148
- if (index === 0) {
1149
- const dateValue = this.slicePastedDate(4, dateParts[index]);
1150
- this.yearInputEl.value = dateValue;
1151
- this.setInputValue(this.yearInputEl);
1152
- }
1153
- else if (index === 1) {
1154
- // The month value is the second item in the array
1155
- const dateValue = this.slicePastedDate(2, dateParts[index]);
1156
- this.monthInputEl.value = dateValue;
1157
- this.setInputValue(this.monthInputEl);
1158
- }
1159
- else {
1160
- const dateValue = this.slicePastedDate(2, dateParts[index]);
1161
- this.dayInputEl.value = dateValue;
1162
- this.setInputValue(this.dayInputEl);
1163
- }
1164
- }
1165
- displayPastedValidation(event) {
1166
- var _a;
1167
- if (((_a = this.invalidDateText) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1168
- this.previousInvalidDateTest = this.invalidDateText;
1169
- }
1170
- this.invalidDateText = `Please paste a valid ${this.getAriaLabel(event.target)}`;
1171
- this.validationStatus = IcInformationStatus.Error;
1172
- this.isPasteValidationDisplayed = true;
1173
- }
1174
- setPasteInvalidText() {
1175
- var _a;
1176
- if (this.isPasteValidationDisplayed) {
1177
- this.invalidDateText = (_a = this.previousInvalidDateTest) !== null && _a !== void 0 ? _a : "";
1178
- this.isPasteValidationDisplayed = false;
1179
- // This is to prevent setDate from triggering within componentWillUpdate
1180
- this.isDateSetFromKeyboardEvent = true;
1181
- }
1182
- }
1183
- notifyScreenReader(input, event) {
1184
- const liveRegion = this.el.shadowRoot.querySelector("#live-region");
1185
- if (liveRegion) {
1186
- if (this.isKeyboardOrEvent(event)) {
1187
- this.notifyScreenReaderArrowKeys(input);
1188
- }
1189
- else if (Object.prototype.toString.call(event) === this.INPUT_EVENT_OBJECT_STRING) {
1190
- this.notifyScreenReaderInput(input, liveRegion);
1191
- }
1192
- }
1193
- }
1194
- render() {
1195
- const { inputId, label, disabled, helperText, showClearButton, showCalendarButton, size, } = this;
1196
- const hasCustomValidation = !isEmptyString(this.validationStatus) &&
1197
- !isEmptyString(this.validationText);
1198
- const validationStatus = hasCustomValidation
1199
- ? this.validationStatus
1200
- : !isEmptyString(this.invalidDateText)
1201
- ? IcInformationStatus.Error
1202
- : "";
1203
- const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;
1204
- renderHiddenInput(true, this.el, this.name, this.convertToDate(this.year, this.month, this.day), this.disabled);
1205
- return (h(Host, { onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, h("ic-input-container", { disabled: disabled }, h("ic-input-label", { for: inputId, label: label, helperText: helperText, disabled: disabled }), h("span", { id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), `${this.defaultHelperText}.`), h("span", { id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), h("span", { id: "live-region", "aria-live": "assertive", class: "sr-only" }), h("ic-input-component-container", { id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group" }, h("div", { class: "input-container" }, h("div", { class: "date-inputs" }, this.getInputsInOrder()[0], "/", this.getInputsInOrder()[1], "/", this.getInputsInOrder()[2]), h("div", { class: "action-buttons" }, showClearButton && (h("ic-button", { id: "clear-button", "aria-label": "Clear input", class: {
1206
- ["clear-button"]: true,
1207
- ["hidden"]: isEmptyString(this.day) &&
1208
- isEmptyString(this.month) &&
1209
- isEmptyString(this.year),
1210
- }, disabled: this.disabled, innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearFocus, onBlur: this.handleClearBlur, variant: "icon", appearance: this.clearButtonFocused
1211
- ? IcThemeForegroundEnum.Light
1212
- : IcThemeForegroundEnum.Dark, size: size })), showCalendarButton && (h("div", { class: "show-calendar-button-wrapper" }, h("div", { class: { divider: true, [size]: true } }), h("ic-button", { 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", size: size, onFocus: this.handleCalendarFocus, onBlur: this.handleCalendarBlur, appearance: this.calendarFocused
1213
- ? IcThemeForegroundEnum.Light
1214
- : IcThemeForegroundEnum.Default })))))), h("span", { id: this.selectedDateInfoId, class: "sr-only", "aria-live": "polite" }, h("span", { ref: (el) => (this.selectedDateInfoEl = el), role: "status" })), (hasCustomValidation || !isEmptyString(this.invalidDateText)) && (h("ic-input-validation", { status: validationStatus, message: hasCustomValidation ? this.validationText : this.invalidDateText, for: inputId })))));
1215
- }
1216
- static get delegatesFocus() { return true; }
1217
- get el() { return this; }
1218
- static get watchers() { return {
1219
- "max": ["watchMaxHandler"],
1220
- "min": ["watchMinHandler"]
1221
- }; }
1222
- static get style() { return icDateInputCss; }
1223
- }, [17, "ic-date-input", {
1224
- "dateFormat": [1, "date-format"],
1225
- "disabled": [4],
1226
- "disableDays": [1040],
1227
- "disableDaysMessage": [1, "disable-days-message"],
1228
- "disableFuture": [4, "disable-future"],
1229
- "disableFutureMessage": [1, "disable-future-message"],
1230
- "disablePast": [4, "disable-past"],
1231
- "disablePastMessage": [1, "disable-past-message"],
1232
- "helperText": [1025, "helper-text"],
1233
- "inputId": [1, "input-id"],
1234
- "label": [1],
1235
- "max": [1],
1236
- "min": [1],
1237
- "name": [1],
1238
- "required": [4],
1239
- "showCalendarButton": [4, "show-calendar-button"],
1240
- "showClearButton": [4, "show-clear-button"],
1241
- "size": [1],
1242
- "value": [1025],
1243
- "validationStatus": [1025, "validation-status"],
1244
- "validationText": [1, "validation-text"],
1245
- "day": [32],
1246
- "invalidDateText": [32],
1247
- "maxDate": [32],
1248
- "minDate": [32],
1249
- "month": [32],
1250
- "year": [32],
1251
- "calendarFocused": [32],
1252
- "clearButtonFocused": [32],
1253
- "removeLabelledBy": [32],
1254
- "getDate": [64],
1255
- "setCalendarFocus": [64],
1256
- "setDisableDays": [64],
1257
- "triggerIcChange": [64]
1258
- }, undefined, {
1259
- "max": ["watchMaxHandler"],
1260
- "min": ["watchMinHandler"]
1261
- }]);
1262
- function defineCustomElement() {
1263
- if (typeof customElements === "undefined") {
1264
- return;
1265
- }
1266
- const components = ["ic-date-input", "ic-button", "ic-input-component-container", "ic-input-container", "ic-input-label", "ic-input-validation", "ic-loading-indicator", "ic-tooltip", "ic-typography"];
1267
- components.forEach(tagName => { switch (tagName) {
1268
- case "ic-date-input":
1269
- if (!customElements.get(tagName)) {
1270
- customElements.define(tagName, DateInput);
1271
- }
1272
- break;
1273
- case "ic-button":
1274
- if (!customElements.get(tagName)) {
1275
- defineCustomElement$8();
1276
- }
1277
- break;
1278
- case "ic-input-component-container":
1279
- if (!customElements.get(tagName)) {
1280
- defineCustomElement$7();
1281
- }
1282
- break;
1283
- case "ic-input-container":
1284
- if (!customElements.get(tagName)) {
1285
- defineCustomElement$6();
1286
- }
1287
- break;
1288
- case "ic-input-label":
1289
- if (!customElements.get(tagName)) {
1290
- defineCustomElement$5();
1291
- }
1292
- break;
1293
- case "ic-input-validation":
1294
- if (!customElements.get(tagName)) {
1295
- defineCustomElement$4();
1296
- }
1297
- break;
1298
- case "ic-loading-indicator":
1299
- if (!customElements.get(tagName)) {
1300
- defineCustomElement$3();
1301
- }
1302
- break;
1303
- case "ic-tooltip":
1304
- if (!customElements.get(tagName)) {
1305
- defineCustomElement$2();
1306
- }
1307
- break;
1308
- case "ic-typography":
1309
- if (!customElements.get(tagName)) {
1310
- defineCustomElement$1();
1311
- }
1312
- break;
1313
- } });
1314
- }
1315
-
1316
- export { DateInput as D, dateInRange as a, getMonthStart as b, dateMatches as c, defineCustomElement as d, getWeekStart as e, getWeekEnd as f, getMonthEnd as g, clampDate as h, createDate as i, yearInRange as y };
1317
-
1318
- //# sourceMappingURL=ic-date-input2.js.map