@ukic/canary-web-components 2.0.0-canary.4 → 2.0.0-canary.41

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 (832) hide show
  1. package/README.md +7 -2
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/date-helpers-c9551119.js +150 -0
  4. package/dist/cjs/date-helpers-c9551119.js.map +1 -0
  5. package/dist/cjs/helpers-951fb33a.js +433 -0
  6. package/dist/cjs/helpers-951fb33a.js.map +1 -0
  7. package/dist/cjs/{helpers-bbe55215.js → helpers-eabe59b6.js} +147 -100
  8. package/dist/cjs/helpers-eabe59b6.js.map +1 -0
  9. package/dist/cjs/ic-accordion-group.cjs.entry.js +31 -4
  10. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-accordion.cjs.entry.js +11 -4
  12. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-alert.cjs.entry.js +20 -6
  14. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-back-to-top.cjs.entry.js +26 -17
  16. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-badge.cjs.entry.js +86 -83
  18. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +62 -25
  20. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
  22. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-button_3.cjs.entry.js +145 -103
  24. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-card-horizontal.cjs.entry.js +130 -0
  26. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
  27. package/dist/cjs/ic-card.cjs.entry.js +30 -7
  28. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-checkbox-group.cjs.entry.js +28 -17
  30. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-checkbox.cjs.entry.js +50 -31
  32. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-chip.cjs.entry.js +45 -21
  34. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-classification-banner.cjs.entry.js +14 -5
  36. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
  38. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
  40. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
  42. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
  43. package/dist/cjs/ic-data-table.cjs.entry.js +1079 -84
  44. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-date-input.cjs.entry.js +1123 -0
  46. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -0
  47. package/dist/cjs/ic-date-picker.cjs.entry.js +1129 -0
  48. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -0
  49. package/dist/cjs/ic-dialog.cjs.entry.js +54 -12
  50. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-empty-state_2.cjs.entry.js +388 -0
  53. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
  54. package/dist/cjs/ic-footer-link-group.cjs.entry.js +4 -4
  55. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
  57. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-footer.cjs.entry.js +18 -7
  59. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-hero.cjs.entry.js +12 -2
  61. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
  63. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +164 -0
  65. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -0
  66. package/dist/cjs/ic-link.cjs.entry.js +34 -16
  67. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  69. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-menu-item.cjs.entry.js +21 -20
  71. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +2740 -0
  73. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -0
  74. package/dist/cjs/{ic-input-component-container_3.cjs.entry.js → ic-menu.cjs.entry.js} +17 -80
  75. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -0
  76. package/dist/cjs/ic-navigation-button.cjs.entry.js +28 -7
  77. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-navigation-group.cjs.entry.js +32 -22
  79. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-navigation-item.cjs.entry.js +82 -36
  81. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  83. package/dist/cjs/ic-page-header.cjs.entry.js +10 -10
  84. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-pagination_4.cjs.entry.js +231 -116
  86. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-popover-menu.cjs.entry.js +40 -36
  88. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  89. package/dist/cjs/ic-radio-group.cjs.entry.js +100 -59
  90. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  91. package/dist/cjs/ic-radio-option.cjs.entry.js +59 -42
  92. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  93. package/dist/cjs/ic-search-bar.cjs.entry.js +22 -30
  94. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  96. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  97. package/dist/cjs/ic-select-with-multi.cjs.entry.js +796 -0
  98. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -0
  99. package/dist/cjs/ic-side-navigation.cjs.entry.js +53 -73
  100. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  101. package/dist/cjs/ic-skeleton.cjs.entry.js +16 -35
  102. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  103. package/dist/cjs/ic-status-tag.cjs.entry.js +4 -2
  104. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  105. package/dist/cjs/ic-step.cjs.entry.js +5 -2
  106. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  107. package/dist/cjs/ic-stepper.cjs.entry.js +31 -9
  108. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  109. package/dist/cjs/ic-switch.cjs.entry.js +7 -3
  110. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  111. package/dist/cjs/ic-tab-context.cjs.entry.js +78 -130
  112. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  113. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  114. package/dist/cjs/ic-tab-panel.cjs.entry.js +5 -13
  115. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  116. package/dist/cjs/ic-tab.cjs.entry.js +16 -14
  117. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  118. package/dist/cjs/ic-theme.cjs.entry.js +13 -22
  119. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  120. package/dist/cjs/ic-toast-region.cjs.entry.js +6 -0
  121. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  122. package/dist/cjs/ic-toast.cjs.entry.js +21 -18
  123. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  124. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +201 -0
  125. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
  126. package/dist/cjs/ic-toggle-button.cjs.entry.js +97 -0
  127. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -0
  128. package/dist/cjs/ic-top-navigation.cjs.entry.js +60 -82
  129. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  130. package/dist/cjs/ic-tree-item.cjs.entry.js +253 -0
  131. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
  132. package/dist/cjs/ic-tree-view.cjs.entry.js +215 -0
  133. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
  134. package/dist/cjs/ic-typography.cjs.entry.js +51 -14
  135. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  136. package/dist/cjs/index-4cf27b16.js +48 -12
  137. package/dist/cjs/loader.cjs.js +1 -1
  138. package/dist/collection/assets/arrow-dropdown.svg +3 -0
  139. package/dist/collection/assets/calendar.svg +3 -0
  140. package/dist/collection/collection-manifest.json +11 -1
  141. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +658 -0
  142. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +375 -0
  143. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
  144. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js +605 -0
  145. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js.map +1 -0
  146. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js +2 -0
  147. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -0
  148. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +140 -0
  149. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -0
  150. package/dist/collection/components/ic-data-table/ic-data-table.css +286 -10
  151. package/dist/collection/components/ic-data-table/ic-data-table.js +1533 -123
  152. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  153. package/dist/collection/components/ic-data-table/ic-data-table.stories.js +414 -0
  154. package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -0
  155. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  156. package/dist/collection/components/ic-data-table/story-data.js +1326 -43
  157. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  158. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +460 -3
  159. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  160. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +91 -0
  161. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
  162. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
  163. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js +98 -0
  164. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js.map +1 -0
  165. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js +11 -0
  166. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
  167. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
  168. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
  169. package/dist/collection/components/ic-date-input/ic-date-input.css +564 -0
  170. package/dist/collection/components/ic-date-input/ic-date-input.js +1808 -0
  171. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -0
  172. package/dist/collection/components/ic-date-input/ic-date-input.stories.js +341 -0
  173. package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -0
  174. package/dist/collection/components/ic-date-input/story-data.js +28 -0
  175. package/dist/collection/components/ic-date-input/story-data.js.map +1 -0
  176. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +1158 -0
  177. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -0
  178. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +42 -0
  179. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -0
  180. package/dist/collection/components/ic-date-picker/ic-date-picker.css +885 -0
  181. package/dist/collection/components/ic-date-picker/ic-date-picker.js +1688 -0
  182. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -0
  183. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js +167 -0
  184. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -0
  185. package/dist/collection/components/ic-date-picker/ic-day-button.js +36 -0
  186. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -0
  187. package/dist/collection/components/ic-date-picker/ic-month-picker.js +29 -0
  188. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -0
  189. package/dist/collection/components/ic-date-picker/ic-year-picker.js +39 -0
  190. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -0
  191. package/dist/collection/components/ic-date-picker/story-data.js +179 -0
  192. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -0
  193. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js +13 -0
  194. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +1 -0
  195. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js +207 -0
  196. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js.map +1 -0
  197. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +1030 -0
  198. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -0
  199. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +701 -0
  200. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +1599 -0
  201. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -0
  202. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +1057 -0
  203. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -0
  204. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +346 -166
  205. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  206. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +260 -0
  207. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js.map +1 -0
  208. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  209. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  210. package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js +8 -1
  211. package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js.map +1 -1
  212. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +75 -12
  213. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
  214. package/dist/collection/components/ic-select-with-multi/assets/Check.svg +3 -0
  215. package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +3 -0
  216. package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +3 -0
  217. package/dist/collection/components/ic-select-with-multi/ic-select-multi.stories.js +144 -0
  218. package/dist/collection/components/ic-select-with-multi/ic-select-multi.stories.js.map +1 -0
  219. package/dist/collection/components/ic-select-with-multi/ic-select.css +693 -0
  220. package/dist/collection/components/ic-select-with-multi/ic-select.js +1649 -0
  221. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -0
  222. package/dist/collection/components/ic-select-with-multi/story-data.js +216 -0
  223. package/dist/collection/components/ic-select-with-multi/story-data.js.map +1 -0
  224. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +1518 -0
  225. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -0
  226. package/dist/collection/components/ic-tree-item/ic-tree-item.css +186 -0
  227. package/dist/collection/components/ic-tree-item/ic-tree-item.js +620 -0
  228. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
  229. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +117 -0
  230. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
  231. package/dist/collection/components/ic-tree-view/ic-tree-view.css +74 -0
  232. package/dist/collection/components/ic-tree-view/ic-tree-view.js +346 -0
  233. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
  234. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js +456 -0
  235. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -0
  236. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
  237. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
  238. package/dist/collection/utils/constants.js +83 -0
  239. package/dist/collection/utils/constants.js.map +1 -0
  240. package/dist/collection/utils/date-helpers.js +133 -0
  241. package/dist/collection/utils/date-helpers.js.map +1 -0
  242. package/dist/collection/utils/helpers.js +473 -5
  243. package/dist/collection/utils/helpers.js.map +1 -1
  244. package/dist/collection/utils/types.js +58 -0
  245. package/dist/collection/utils/types.js.map +1 -0
  246. package/dist/components/helpers.js +141 -98
  247. package/dist/components/helpers.js.map +1 -1
  248. package/dist/components/helpers2.js +403 -0
  249. package/dist/components/helpers2.js.map +1 -0
  250. package/dist/components/ic-accordion-group.js +38 -7
  251. package/dist/components/ic-accordion-group.js.map +1 -1
  252. package/dist/components/ic-accordion.js +12 -4
  253. package/dist/components/ic-accordion.js.map +1 -1
  254. package/dist/components/ic-alert2.js +21 -6
  255. package/dist/components/ic-alert2.js.map +1 -1
  256. package/dist/components/ic-back-to-top.js +34 -18
  257. package/dist/components/ic-back-to-top.js.map +1 -1
  258. package/dist/components/ic-badge.js +91 -84
  259. package/dist/components/ic-badge.js.map +1 -1
  260. package/dist/components/ic-breadcrumb-group.js +66 -25
  261. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  262. package/dist/components/ic-breadcrumb2.js +2 -2
  263. package/dist/components/ic-breadcrumb2.js.map +1 -1
  264. package/dist/components/ic-button2.js +104 -74
  265. package/dist/components/ic-button2.js.map +1 -1
  266. package/dist/components/ic-card-horizontal.d.ts +11 -0
  267. package/dist/components/ic-card-horizontal.js +168 -0
  268. package/dist/components/ic-card-horizontal.js.map +1 -0
  269. package/dist/components/ic-card.js +34 -21
  270. package/dist/components/ic-card.js.map +1 -1
  271. package/dist/components/ic-checkbox-group.js +33 -18
  272. package/dist/components/ic-checkbox-group.js.map +1 -1
  273. package/dist/components/ic-checkbox.js +58 -33
  274. package/dist/components/ic-checkbox.js.map +1 -1
  275. package/dist/components/ic-chip.js +52 -23
  276. package/dist/components/ic-chip.js.map +1 -1
  277. package/dist/components/ic-classification-banner.js +14 -5
  278. package/dist/components/ic-classification-banner.js.map +1 -1
  279. package/dist/components/ic-data-entity.js +3 -6
  280. package/dist/components/ic-data-entity.js.map +1 -1
  281. package/dist/components/ic-data-row.js +21 -35
  282. package/dist/components/ic-data-row.js.map +1 -1
  283. package/dist/components/ic-data-table-title-bar.d.ts +11 -0
  284. package/dist/components/ic-data-table-title-bar.js +136 -0
  285. package/dist/components/ic-data-table-title-bar.js.map +1 -0
  286. package/dist/components/ic-data-table.js +1119 -91
  287. package/dist/components/ic-data-table.js.map +1 -1
  288. package/dist/components/ic-date-input.d.ts +11 -0
  289. package/dist/components/ic-date-input.js +8 -0
  290. package/dist/components/ic-date-input.js.map +1 -0
  291. package/dist/components/ic-date-input2.js +1359 -0
  292. package/dist/components/ic-date-input2.js.map +1 -0
  293. package/dist/components/ic-date-picker.d.ts +11 -0
  294. package/dist/components/ic-date-picker.js +1258 -0
  295. package/dist/components/ic-date-picker.js.map +1 -0
  296. package/dist/components/ic-dialog.js +55 -12
  297. package/dist/components/ic-dialog.js.map +1 -1
  298. package/dist/components/ic-divider2.js +1 -1
  299. package/dist/components/ic-empty-state.js +1 -57
  300. package/dist/components/ic-empty-state.js.map +1 -1
  301. package/dist/{esm/ic-empty-state.entry.js → components/ic-empty-state2.js} +47 -11
  302. package/dist/components/ic-empty-state2.js.map +1 -0
  303. package/dist/components/ic-footer-link-group.js +4 -4
  304. package/dist/components/ic-footer-link-group.js.map +1 -1
  305. package/dist/components/ic-footer-link.js +3 -3
  306. package/dist/components/ic-footer-link.js.map +1 -1
  307. package/dist/components/ic-footer.js +18 -7
  308. package/dist/components/ic-footer.js.map +1 -1
  309. package/dist/components/ic-hero.js +12 -2
  310. package/dist/components/ic-hero.js.map +1 -1
  311. package/dist/components/ic-horizontal-scroll2.js +5 -5
  312. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  313. package/dist/components/ic-input-component-container2.js +24 -8
  314. package/dist/components/ic-input-component-container2.js.map +1 -1
  315. package/dist/components/ic-input-label2.js +7 -5
  316. package/dist/components/ic-input-label2.js.map +1 -1
  317. package/dist/components/ic-input-validation2.js +1 -1
  318. package/dist/components/ic-link2.js +35 -17
  319. package/dist/components/ic-link2.js.map +1 -1
  320. package/dist/components/ic-loading-indicator2.js +2 -2
  321. package/dist/components/ic-loading-indicator2.js.map +1 -1
  322. package/dist/components/ic-menu-group.js +2 -2
  323. package/dist/components/ic-menu-group.js.map +1 -1
  324. package/dist/components/ic-menu-item2.js +26 -23
  325. package/dist/components/ic-menu-item2.js.map +1 -1
  326. package/dist/components/ic-menu-with-multi.d.ts +11 -0
  327. package/dist/components/ic-menu-with-multi.js +8 -0
  328. package/dist/components/ic-menu-with-multi.js.map +1 -0
  329. package/dist/components/ic-menu2.js +14 -14
  330. package/dist/components/ic-menu2.js.map +1 -1
  331. package/dist/components/ic-menu3.js +2806 -0
  332. package/dist/components/ic-menu3.js.map +1 -0
  333. package/dist/components/ic-navigation-button.js +29 -8
  334. package/dist/components/ic-navigation-button.js.map +1 -1
  335. package/dist/components/ic-navigation-group.js +34 -24
  336. package/dist/components/ic-navigation-group.js.map +1 -1
  337. package/dist/components/ic-navigation-item.js +84 -37
  338. package/dist/components/ic-navigation-item.js.map +1 -1
  339. package/dist/components/ic-navigation-menu2.js +1 -1
  340. package/dist/components/ic-page-header.js +10 -10
  341. package/dist/components/ic-page-header.js.map +1 -1
  342. package/dist/components/ic-pagination-bar2.js +244 -161
  343. package/dist/components/ic-pagination-bar2.js.map +1 -1
  344. package/dist/components/ic-pagination-item2.js +27 -12
  345. package/dist/components/ic-pagination-item2.js.map +1 -1
  346. package/dist/components/ic-pagination2.js +30 -10
  347. package/dist/components/ic-pagination2.js.map +1 -1
  348. package/dist/components/ic-popover-menu.js +43 -38
  349. package/dist/components/ic-popover-menu.js.map +1 -1
  350. package/dist/components/ic-radio-group.js +101 -59
  351. package/dist/components/ic-radio-group.js.map +1 -1
  352. package/dist/components/ic-radio-option.js +63 -44
  353. package/dist/components/ic-radio-option.js.map +1 -1
  354. package/dist/components/ic-search-bar.js +23 -30
  355. package/dist/components/ic-search-bar.js.map +1 -1
  356. package/dist/components/ic-section-container2.js +1 -1
  357. package/dist/components/ic-section-container2.js.map +1 -1
  358. package/dist/components/ic-select-with-multi.d.ts +11 -0
  359. package/dist/components/ic-select-with-multi.js +921 -0
  360. package/dist/components/ic-select-with-multi.js.map +1 -0
  361. package/dist/components/ic-select2.js +77 -30
  362. package/dist/components/ic-select2.js.map +1 -1
  363. package/dist/components/ic-side-navigation.js +56 -74
  364. package/dist/components/ic-side-navigation.js.map +1 -1
  365. package/dist/components/ic-skeleton.js +17 -40
  366. package/dist/components/ic-skeleton.js.map +1 -1
  367. package/dist/components/ic-status-tag.js +3 -1
  368. package/dist/components/ic-status-tag.js.map +1 -1
  369. package/dist/components/ic-step.js +5 -2
  370. package/dist/components/ic-step.js.map +1 -1
  371. package/dist/components/ic-stepper.js +35 -9
  372. package/dist/components/ic-stepper.js.map +1 -1
  373. package/dist/components/ic-switch.js +9 -4
  374. package/dist/components/ic-switch.js.map +1 -1
  375. package/dist/components/ic-tab-context.js +79 -130
  376. package/dist/components/ic-tab-context.js.map +1 -1
  377. package/dist/components/ic-tab-panel.js +6 -17
  378. package/dist/components/ic-tab-panel.js.map +1 -1
  379. package/dist/components/ic-tab.js +16 -14
  380. package/dist/components/ic-tab.js.map +1 -1
  381. package/dist/components/ic-text-field2.js +120 -72
  382. package/dist/components/ic-text-field2.js.map +1 -1
  383. package/dist/components/ic-theme.js +13 -22
  384. package/dist/components/ic-theme.js.map +1 -1
  385. package/dist/components/ic-toast-region.js +6 -0
  386. package/dist/components/ic-toast-region.js.map +1 -1
  387. package/dist/components/ic-toast.js +24 -19
  388. package/dist/components/ic-toast.js.map +1 -1
  389. package/dist/components/ic-toggle-button-group.js +230 -0
  390. package/dist/components/ic-toggle-button-group.js.map +1 -0
  391. package/dist/components/ic-toggle-button.js +148 -0
  392. package/dist/components/ic-toggle-button.js.map +1 -0
  393. package/dist/components/ic-tooltip2.js +52 -30
  394. package/dist/components/ic-tooltip2.js.map +1 -1
  395. package/dist/components/ic-top-navigation.js +61 -83
  396. package/dist/components/ic-top-navigation.js.map +1 -1
  397. package/dist/components/ic-tree-item.d.ts +11 -0
  398. package/dist/components/ic-tree-item.js +300 -0
  399. package/dist/components/ic-tree-item.js.map +1 -0
  400. package/dist/components/ic-tree-view.d.ts +11 -0
  401. package/dist/components/ic-tree-view.js +252 -0
  402. package/dist/components/ic-tree-view.js.map +1 -0
  403. package/dist/components/ic-typography2.js +57 -17
  404. package/dist/components/ic-typography2.js.map +1 -1
  405. package/dist/core/core.css +8 -5
  406. package/dist/core/core.esm.js +1 -1
  407. package/dist/core/core.esm.js.map +1 -1
  408. package/dist/core/p-0229eb46.entry.js +2 -0
  409. package/dist/core/p-0229eb46.entry.js.map +1 -0
  410. package/dist/core/p-04fe848d.entry.js +2 -0
  411. package/dist/core/p-04fe848d.entry.js.map +1 -0
  412. package/dist/core/p-05ae9a59.entry.js +2 -0
  413. package/dist/core/p-05ae9a59.entry.js.map +1 -0
  414. package/dist/core/p-074e64d0.entry.js +2 -0
  415. package/dist/core/p-074e64d0.entry.js.map +1 -0
  416. package/dist/core/p-0f1706e8.entry.js +2 -0
  417. package/dist/core/p-0f1706e8.entry.js.map +1 -0
  418. package/dist/core/p-11877d23.entry.js +2 -0
  419. package/dist/core/p-11877d23.entry.js.map +1 -0
  420. package/dist/core/p-1e450833.entry.js +2 -0
  421. package/dist/core/p-1e450833.entry.js.map +1 -0
  422. package/dist/core/{p-4409f656.entry.js → p-23408776.entry.js} +2 -2
  423. package/dist/core/p-23408776.entry.js.map +1 -0
  424. package/dist/core/p-26fa17fb.entry.js +2 -0
  425. package/dist/core/p-26fa17fb.entry.js.map +1 -0
  426. package/dist/core/p-2b15ea77.entry.js +2 -0
  427. package/dist/core/p-2b15ea77.entry.js.map +1 -0
  428. package/dist/core/p-2d44b81a.entry.js +2 -0
  429. package/dist/core/p-2d44b81a.entry.js.map +1 -0
  430. package/dist/core/p-2ea7af8b.entry.js +2 -0
  431. package/dist/core/p-2ea7af8b.entry.js.map +1 -0
  432. package/dist/core/p-33dd24eb.js +2 -0
  433. package/dist/core/p-33dd24eb.js.map +1 -0
  434. package/dist/core/p-38f329ab.entry.js +2 -0
  435. package/dist/core/p-38f329ab.entry.js.map +1 -0
  436. package/dist/core/p-3cd2056f.entry.js +2 -0
  437. package/dist/core/p-3cd2056f.entry.js.map +1 -0
  438. package/dist/core/p-3d00ad9e.entry.js +2 -0
  439. package/dist/core/p-3d00ad9e.entry.js.map +1 -0
  440. package/dist/core/p-3ebd4703.entry.js +2 -0
  441. package/dist/core/p-3ebd4703.entry.js.map +1 -0
  442. package/dist/core/p-44036532.entry.js +2 -0
  443. package/dist/core/p-44036532.entry.js.map +1 -0
  444. package/dist/core/p-44680720.entry.js +2 -0
  445. package/dist/core/p-44680720.entry.js.map +1 -0
  446. package/dist/core/{p-24945ee5.entry.js → p-452985d9.entry.js} +2 -2
  447. package/dist/core/p-452985d9.entry.js.map +1 -0
  448. package/dist/core/{p-b97dc365.entry.js → p-487fd924.entry.js} +2 -2
  449. package/dist/core/p-56db5123.entry.js +2 -0
  450. package/dist/core/p-56db5123.entry.js.map +1 -0
  451. package/dist/core/p-5a90eaa8.entry.js +2 -0
  452. package/dist/core/p-5a90eaa8.entry.js.map +1 -0
  453. package/dist/core/p-5dd6381a.entry.js +2 -0
  454. package/dist/core/p-5dd6381a.entry.js.map +1 -0
  455. package/dist/core/p-5f149106.entry.js +2 -0
  456. package/dist/core/p-5f149106.entry.js.map +1 -0
  457. package/dist/core/p-61848e6b.entry.js +2 -0
  458. package/dist/core/p-61848e6b.entry.js.map +1 -0
  459. package/dist/core/{p-d77960f6.entry.js → p-656378ba.entry.js} +2 -2
  460. package/dist/core/p-6a920114.entry.js +2 -0
  461. package/dist/core/p-6a920114.entry.js.map +1 -0
  462. package/dist/core/p-6cdf5de2.entry.js +2 -0
  463. package/dist/core/p-6cdf5de2.entry.js.map +1 -0
  464. package/dist/core/p-70ad364c.entry.js +2 -0
  465. package/dist/core/p-70ad364c.entry.js.map +1 -0
  466. package/dist/core/p-70c659ec.entry.js +2 -0
  467. package/dist/core/p-70c659ec.entry.js.map +1 -0
  468. package/dist/core/p-74b42302.entry.js +2 -0
  469. package/dist/core/p-74b42302.entry.js.map +1 -0
  470. package/dist/core/p-75bd12f8.entry.js +2 -0
  471. package/dist/core/p-75bd12f8.entry.js.map +1 -0
  472. package/dist/core/p-780294b8.entry.js +2 -0
  473. package/dist/core/p-780294b8.entry.js.map +1 -0
  474. package/dist/core/{p-baf81f30.entry.js → p-787ffd96.entry.js} +2 -2
  475. package/dist/core/p-787ffd96.entry.js.map +1 -0
  476. package/dist/core/p-7edc19be.entry.js +2 -0
  477. package/dist/core/p-7edc19be.entry.js.map +1 -0
  478. package/dist/core/p-8ab58daa.js +2 -0
  479. package/dist/core/p-8ab58daa.js.map +1 -0
  480. package/dist/core/p-8ced1495.entry.js +2 -0
  481. package/dist/core/p-8ced1495.entry.js.map +1 -0
  482. package/dist/core/{p-939baa93.entry.js → p-95545b4c.entry.js} +2 -2
  483. package/dist/core/p-95545b4c.entry.js.map +1 -0
  484. package/dist/core/p-95d057b8.entry.js +2 -0
  485. package/dist/core/p-95d057b8.entry.js.map +1 -0
  486. package/dist/core/p-987cd821.entry.js +2 -0
  487. package/dist/core/p-987cd821.entry.js.map +1 -0
  488. package/dist/core/{p-41aa0ed3.entry.js → p-9b386822.entry.js} +2 -2
  489. package/dist/core/p-9b386822.entry.js.map +1 -0
  490. package/dist/core/{p-39e20b87.entry.js → p-9bbe221f.entry.js} +2 -2
  491. package/dist/core/{p-39e20b87.entry.js.map → p-9bbe221f.entry.js.map} +1 -1
  492. package/dist/core/p-9f157649.entry.js +2 -0
  493. package/dist/core/p-9f157649.entry.js.map +1 -0
  494. package/dist/core/{p-356b8a4c.entry.js → p-9f3cf053.entry.js} +2 -2
  495. package/dist/core/{p-356b8a4c.entry.js.map → p-9f3cf053.entry.js.map} +1 -1
  496. package/dist/core/p-9f58998d.entry.js +2 -0
  497. package/dist/core/p-9f58998d.entry.js.map +1 -0
  498. package/dist/core/p-a4f28ef1.entry.js +2 -0
  499. package/dist/core/p-a4f28ef1.entry.js.map +1 -0
  500. package/dist/core/p-ac8090a5.entry.js +2 -0
  501. package/dist/core/p-ac8090a5.entry.js.map +1 -0
  502. package/dist/core/p-b1f89f44.entry.js +2 -0
  503. package/dist/core/p-b1f89f44.entry.js.map +1 -0
  504. package/dist/core/p-bc350ec5.entry.js +2 -0
  505. package/dist/core/p-bc350ec5.entry.js.map +1 -0
  506. package/dist/core/p-bd0328f3.entry.js +2 -0
  507. package/dist/core/p-bd0328f3.entry.js.map +1 -0
  508. package/dist/core/p-bf06977d.js +2 -0
  509. package/dist/core/p-bf06977d.js.map +1 -0
  510. package/dist/core/p-c0a2a040.entry.js +2 -0
  511. package/dist/core/p-c0a2a040.entry.js.map +1 -0
  512. package/dist/core/p-cc0e0b46.entry.js +2 -0
  513. package/dist/core/p-cc0e0b46.entry.js.map +1 -0
  514. package/dist/core/p-d0020f6f.entry.js +2 -0
  515. package/dist/core/p-d0020f6f.entry.js.map +1 -0
  516. package/dist/core/{p-3d618bc2.entry.js → p-d1045cd5.entry.js} +2 -2
  517. package/dist/core/p-d56248df.entry.js +2 -0
  518. package/dist/core/p-d56248df.entry.js.map +1 -0
  519. package/dist/core/p-d921dc2c.entry.js +2 -0
  520. package/dist/core/p-d921dc2c.entry.js.map +1 -0
  521. package/dist/core/p-da398a5d.entry.js +2 -0
  522. package/dist/core/p-da398a5d.entry.js.map +1 -0
  523. package/dist/core/{p-2e9e8e7c.entry.js → p-db5af9f7.entry.js} +2 -2
  524. package/dist/core/p-db5af9f7.entry.js.map +1 -0
  525. package/dist/core/p-dd4c83ad.entry.js +2 -0
  526. package/dist/core/p-dd4c83ad.entry.js.map +1 -0
  527. package/dist/core/p-e362b5f3.entry.js +2 -0
  528. package/dist/core/p-e362b5f3.entry.js.map +1 -0
  529. package/dist/core/p-e89c2feb.entry.js +2 -0
  530. package/dist/core/p-e89c2feb.entry.js.map +1 -0
  531. package/dist/core/p-eaeaa096.entry.js +2 -0
  532. package/dist/core/p-eaeaa096.entry.js.map +1 -0
  533. package/dist/core/{p-c2b5e7b1.entry.js → p-eb87b43b.entry.js} +2 -2
  534. package/dist/core/{p-c2b5e7b1.entry.js.map → p-eb87b43b.entry.js.map} +1 -1
  535. package/dist/core/p-f5dfcf4f.entry.js +2 -0
  536. package/dist/core/p-f5dfcf4f.entry.js.map +1 -0
  537. package/dist/core/p-f5fbfbc9.entry.js +2 -0
  538. package/dist/core/p-f5fbfbc9.entry.js.map +1 -0
  539. package/dist/core/p-fac387e8.entry.js +2 -0
  540. package/dist/core/p-fac387e8.entry.js.map +1 -0
  541. package/dist/esm/core.js +1 -1
  542. package/dist/esm/date-helpers-0e5e32a7.js +136 -0
  543. package/dist/esm/date-helpers-0e5e32a7.js.map +1 -0
  544. package/dist/esm/helpers-948df101.js +403 -0
  545. package/dist/esm/helpers-948df101.js.map +1 -0
  546. package/dist/esm/{helpers-268c2b7f.js → helpers-cd64688a.js} +142 -99
  547. package/dist/esm/helpers-cd64688a.js.map +1 -0
  548. package/dist/esm/ic-accordion-group.entry.js +31 -4
  549. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  550. package/dist/esm/ic-accordion.entry.js +11 -4
  551. package/dist/esm/ic-accordion.entry.js.map +1 -1
  552. package/dist/esm/ic-alert.entry.js +20 -6
  553. package/dist/esm/ic-alert.entry.js.map +1 -1
  554. package/dist/esm/ic-back-to-top.entry.js +26 -17
  555. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  556. package/dist/esm/ic-badge.entry.js +86 -83
  557. package/dist/esm/ic-badge.entry.js.map +1 -1
  558. package/dist/esm/ic-breadcrumb-group.entry.js +62 -25
  559. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  560. package/dist/esm/ic-breadcrumb.entry.js +2 -2
  561. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  562. package/dist/esm/ic-button_3.entry.js +145 -103
  563. package/dist/esm/ic-button_3.entry.js.map +1 -1
  564. package/dist/esm/ic-card-horizontal.entry.js +126 -0
  565. package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
  566. package/dist/esm/ic-card.entry.js +30 -7
  567. package/dist/esm/ic-card.entry.js.map +1 -1
  568. package/dist/esm/ic-checkbox-group.entry.js +28 -17
  569. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  570. package/dist/esm/ic-checkbox.entry.js +50 -31
  571. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  572. package/dist/esm/ic-chip.entry.js +45 -21
  573. package/dist/esm/ic-chip.entry.js.map +1 -1
  574. package/dist/esm/ic-classification-banner.entry.js +14 -5
  575. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  576. package/dist/esm/ic-data-entity.entry.js +3 -6
  577. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  578. package/dist/esm/ic-data-row.entry.js +21 -35
  579. package/dist/esm/ic-data-row.entry.js.map +1 -1
  580. package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
  581. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
  582. package/dist/esm/ic-data-table.entry.js +1080 -85
  583. package/dist/esm/ic-data-table.entry.js.map +1 -1
  584. package/dist/esm/ic-date-input.entry.js +1119 -0
  585. package/dist/esm/ic-date-input.entry.js.map +1 -0
  586. package/dist/esm/ic-date-picker.entry.js +1125 -0
  587. package/dist/esm/ic-date-picker.entry.js.map +1 -0
  588. package/dist/esm/ic-dialog.entry.js +54 -12
  589. package/dist/esm/ic-dialog.entry.js.map +1 -1
  590. package/dist/esm/ic-divider.entry.js +1 -1
  591. package/dist/esm/ic-empty-state_2.entry.js +383 -0
  592. package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
  593. package/dist/esm/ic-footer-link-group.entry.js +4 -4
  594. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  595. package/dist/esm/ic-footer-link.entry.js +3 -3
  596. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  597. package/dist/esm/ic-footer.entry.js +18 -7
  598. package/dist/esm/ic-footer.entry.js.map +1 -1
  599. package/dist/esm/ic-hero.entry.js +12 -2
  600. package/dist/esm/ic-hero.entry.js.map +1 -1
  601. package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
  602. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  603. package/dist/esm/ic-input-component-container_4.entry.js +157 -0
  604. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -0
  605. package/dist/esm/ic-link.entry.js +35 -17
  606. package/dist/esm/ic-link.entry.js.map +1 -1
  607. package/dist/esm/ic-menu-group.entry.js +2 -2
  608. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  609. package/dist/esm/ic-menu-item.entry.js +21 -20
  610. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  611. package/dist/esm/ic-menu-with-multi.entry.js +2736 -0
  612. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -0
  613. package/dist/esm/{ic-input-component-container_3.entry.js → ic-menu.entry.js} +19 -80
  614. package/dist/esm/ic-menu.entry.js.map +1 -0
  615. package/dist/esm/ic-navigation-button.entry.js +29 -8
  616. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  617. package/dist/esm/ic-navigation-group.entry.js +33 -23
  618. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  619. package/dist/esm/ic-navigation-item.entry.js +83 -37
  620. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  621. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  622. package/dist/esm/ic-page-header.entry.js +10 -10
  623. package/dist/esm/ic-page-header.entry.js.map +1 -1
  624. package/dist/esm/ic-pagination_4.entry.js +232 -117
  625. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  626. package/dist/esm/ic-popover-menu.entry.js +40 -36
  627. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  628. package/dist/esm/ic-radio-group.entry.js +100 -59
  629. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  630. package/dist/esm/ic-radio-option.entry.js +59 -42
  631. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  632. package/dist/esm/ic-search-bar.entry.js +22 -30
  633. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  634. package/dist/esm/ic-section-container.entry.js +1 -1
  635. package/dist/esm/ic-section-container.entry.js.map +1 -1
  636. package/dist/esm/ic-select-with-multi.entry.js +792 -0
  637. package/dist/esm/ic-select-with-multi.entry.js.map +1 -0
  638. package/dist/esm/ic-side-navigation.entry.js +53 -73
  639. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  640. package/dist/esm/ic-skeleton.entry.js +16 -35
  641. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  642. package/dist/esm/ic-status-tag.entry.js +4 -2
  643. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  644. package/dist/esm/ic-step.entry.js +5 -2
  645. package/dist/esm/ic-step.entry.js.map +1 -1
  646. package/dist/esm/ic-stepper.entry.js +31 -9
  647. package/dist/esm/ic-stepper.entry.js.map +1 -1
  648. package/dist/esm/ic-switch.entry.js +7 -3
  649. package/dist/esm/ic-switch.entry.js.map +1 -1
  650. package/dist/esm/ic-tab-context.entry.js +78 -130
  651. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  652. package/dist/esm/ic-tab-group.entry.js +1 -1
  653. package/dist/esm/ic-tab-panel.entry.js +5 -13
  654. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  655. package/dist/esm/ic-tab.entry.js +16 -14
  656. package/dist/esm/ic-tab.entry.js.map +1 -1
  657. package/dist/esm/ic-theme.entry.js +13 -22
  658. package/dist/esm/ic-theme.entry.js.map +1 -1
  659. package/dist/esm/ic-toast-region.entry.js +6 -0
  660. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  661. package/dist/esm/ic-toast.entry.js +21 -18
  662. package/dist/esm/ic-toast.entry.js.map +1 -1
  663. package/dist/esm/ic-toggle-button-group.entry.js +197 -0
  664. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
  665. package/dist/esm/ic-toggle-button.entry.js +93 -0
  666. package/dist/esm/ic-toggle-button.entry.js.map +1 -0
  667. package/dist/esm/ic-top-navigation.entry.js +60 -82
  668. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  669. package/dist/esm/ic-tree-item.entry.js +249 -0
  670. package/dist/esm/ic-tree-item.entry.js.map +1 -0
  671. package/dist/esm/ic-tree-view.entry.js +211 -0
  672. package/dist/esm/ic-tree-view.entry.js.map +1 -0
  673. package/dist/esm/ic-typography.entry.js +52 -15
  674. package/dist/esm/ic-typography.entry.js.map +1 -1
  675. package/dist/esm/index-93509377.js +48 -12
  676. package/dist/esm/loader.js +1 -1
  677. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +71 -0
  678. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.stories.d.ts +82 -0
  679. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.types.d.ts +1 -0
  680. package/dist/types/components/ic-data-table/ic-data-table.d.ts +218 -19
  681. package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +239 -0
  682. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +43 -0
  683. package/dist/types/components/ic-data-table/story-data.d.ts +492 -2
  684. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
  685. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.d.ts +47 -0
  686. package/dist/types/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts +1 -0
  687. package/dist/types/components/ic-date-input/ic-date-input.d.ts +264 -0
  688. package/dist/types/components/ic-date-input/ic-date-input.stories.d.ts +124 -0
  689. package/dist/types/components/ic-date-input/story-data.d.ts +1 -0
  690. package/dist/types/components/ic-date-input/test/helpers/ic-date-input.d.ts +23 -0
  691. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +262 -0
  692. package/dist/types/components/ic-date-picker/ic-date-picker.stories.d.ts +153 -0
  693. package/dist/types/components/ic-date-picker/ic-day-button.d.ts +16 -0
  694. package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +14 -0
  695. package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +16 -0
  696. package/dist/types/components/ic-date-picker/story-data.d.ts +24 -0
  697. package/dist/types/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.d.ts +1 -0
  698. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +218 -0
  699. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +65 -23
  700. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.stories.d.ts +106 -0
  701. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
  702. package/dist/types/components/ic-select-with-multi/ic-select-multi.stories.d.ts +106 -0
  703. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +289 -0
  704. package/dist/types/components/ic-select-with-multi/story-data.d.ts +32 -0
  705. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +101 -0
  706. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +51 -0
  707. package/dist/types/components/ic-tree-view/ic-tree-view.stories.d.ts +99 -0
  708. package/dist/types/components.d.ts +1711 -127
  709. package/dist/types/interface.d.ts +1 -0
  710. package/dist/types/utils/constants.d.ts +38 -0
  711. package/dist/types/utils/date-helpers.d.ts +22 -0
  712. package/dist/types/utils/helpers.d.ts +144 -2
  713. package/dist/types/utils/types.d.ts +126 -0
  714. package/hydrate/index.js +18298 -9132
  715. package/package.json +27 -17
  716. package/dist/cjs/helpers-bbe55215.js.map +0 -1
  717. package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
  718. package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
  719. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +0 -1
  720. package/dist/cjs/ic-input-label_2.cjs.entry.js +0 -86
  721. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +0 -1
  722. package/dist/cjs/ic-pagination-bar.cjs.entry.js +0 -285
  723. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
  724. package/dist/collection/components/ic-pagination/ic-pagination.types.js +0 -2
  725. package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +0 -1
  726. package/dist/core/p-0083465b.entry.js +0 -2
  727. package/dist/core/p-0083465b.entry.js.map +0 -1
  728. package/dist/core/p-03487f12.entry.js +0 -2
  729. package/dist/core/p-03487f12.entry.js.map +0 -1
  730. package/dist/core/p-03f8fa1a.entry.js +0 -2
  731. package/dist/core/p-03f8fa1a.entry.js.map +0 -1
  732. package/dist/core/p-0c18b6a0.entry.js +0 -2
  733. package/dist/core/p-0c18b6a0.entry.js.map +0 -1
  734. package/dist/core/p-1bc034aa.entry.js +0 -2
  735. package/dist/core/p-1bc034aa.entry.js.map +0 -1
  736. package/dist/core/p-20a76d1d.entry.js +0 -2
  737. package/dist/core/p-20a76d1d.entry.js.map +0 -1
  738. package/dist/core/p-24945ee5.entry.js.map +0 -1
  739. package/dist/core/p-2dc35696.entry.js +0 -2
  740. package/dist/core/p-2dc35696.entry.js.map +0 -1
  741. package/dist/core/p-2e9e8e7c.entry.js.map +0 -1
  742. package/dist/core/p-3ee25a6d.entry.js +0 -2
  743. package/dist/core/p-3ee25a6d.entry.js.map +0 -1
  744. package/dist/core/p-41aa0ed3.entry.js.map +0 -1
  745. package/dist/core/p-4314aa0e.entry.js +0 -2
  746. package/dist/core/p-4314aa0e.entry.js.map +0 -1
  747. package/dist/core/p-4409f656.entry.js.map +0 -1
  748. package/dist/core/p-47abbd06.entry.js +0 -2
  749. package/dist/core/p-47abbd06.entry.js.map +0 -1
  750. package/dist/core/p-485823b6.entry.js +0 -2
  751. package/dist/core/p-485823b6.entry.js.map +0 -1
  752. package/dist/core/p-4ee59448.entry.js +0 -2
  753. package/dist/core/p-4ee59448.entry.js.map +0 -1
  754. package/dist/core/p-5157cfab.entry.js +0 -2
  755. package/dist/core/p-5157cfab.entry.js.map +0 -1
  756. package/dist/core/p-53083575.entry.js +0 -2
  757. package/dist/core/p-53083575.entry.js.map +0 -1
  758. package/dist/core/p-55d5541f.entry.js +0 -2
  759. package/dist/core/p-55d5541f.entry.js.map +0 -1
  760. package/dist/core/p-5bb32ee6.entry.js +0 -2
  761. package/dist/core/p-5bb32ee6.entry.js.map +0 -1
  762. package/dist/core/p-67eea079.entry.js +0 -2
  763. package/dist/core/p-67eea079.entry.js.map +0 -1
  764. package/dist/core/p-6bd0e984.entry.js +0 -2
  765. package/dist/core/p-6bd0e984.entry.js.map +0 -1
  766. package/dist/core/p-75bf6162.entry.js +0 -2
  767. package/dist/core/p-75bf6162.entry.js.map +0 -1
  768. package/dist/core/p-76959313.entry.js +0 -2
  769. package/dist/core/p-76959313.entry.js.map +0 -1
  770. package/dist/core/p-7de813a3.entry.js +0 -2
  771. package/dist/core/p-7de813a3.entry.js.map +0 -1
  772. package/dist/core/p-7eae5f70.entry.js +0 -2
  773. package/dist/core/p-7eae5f70.entry.js.map +0 -1
  774. package/dist/core/p-85508347.entry.js +0 -2
  775. package/dist/core/p-85508347.entry.js.map +0 -1
  776. package/dist/core/p-8da152c4.entry.js +0 -2
  777. package/dist/core/p-8da152c4.entry.js.map +0 -1
  778. package/dist/core/p-8fd4ca0a.js +0 -2
  779. package/dist/core/p-8fd4ca0a.js.map +0 -1
  780. package/dist/core/p-939baa93.entry.js.map +0 -1
  781. package/dist/core/p-9777ebb1.entry.js +0 -2
  782. package/dist/core/p-9777ebb1.entry.js.map +0 -1
  783. package/dist/core/p-9c27b73e.entry.js +0 -2
  784. package/dist/core/p-9c27b73e.entry.js.map +0 -1
  785. package/dist/core/p-9fa6844f.entry.js +0 -2
  786. package/dist/core/p-9fa6844f.entry.js.map +0 -1
  787. package/dist/core/p-9fdd7d73.entry.js +0 -2
  788. package/dist/core/p-9fdd7d73.entry.js.map +0 -1
  789. package/dist/core/p-a3ab9f4c.entry.js +0 -2
  790. package/dist/core/p-a3ab9f4c.entry.js.map +0 -1
  791. package/dist/core/p-a51e5c7c.entry.js +0 -2
  792. package/dist/core/p-a51e5c7c.entry.js.map +0 -1
  793. package/dist/core/p-a7481232.entry.js +0 -2
  794. package/dist/core/p-a7481232.entry.js.map +0 -1
  795. package/dist/core/p-ab9f8a3f.entry.js +0 -2
  796. package/dist/core/p-ab9f8a3f.entry.js.map +0 -1
  797. package/dist/core/p-b2aa3d7c.entry.js +0 -2
  798. package/dist/core/p-b2aa3d7c.entry.js.map +0 -1
  799. package/dist/core/p-b5cf6d65.entry.js +0 -2
  800. package/dist/core/p-b5cf6d65.entry.js.map +0 -1
  801. package/dist/core/p-baf81f30.entry.js.map +0 -1
  802. package/dist/core/p-bc187bb5.entry.js +0 -2
  803. package/dist/core/p-bc187bb5.entry.js.map +0 -1
  804. package/dist/core/p-bd9cecce.entry.js +0 -2
  805. package/dist/core/p-bd9cecce.entry.js.map +0 -1
  806. package/dist/core/p-be980606.entry.js +0 -2
  807. package/dist/core/p-be980606.entry.js.map +0 -1
  808. package/dist/core/p-c1256810.entry.js +0 -2
  809. package/dist/core/p-c1256810.entry.js.map +0 -1
  810. package/dist/core/p-d76cfa5a.entry.js +0 -2
  811. package/dist/core/p-d76cfa5a.entry.js.map +0 -1
  812. package/dist/core/p-e189f1d0.entry.js +0 -2
  813. package/dist/core/p-e189f1d0.entry.js.map +0 -1
  814. package/dist/core/p-e9e145aa.entry.js +0 -2
  815. package/dist/core/p-e9e145aa.entry.js.map +0 -1
  816. package/dist/core/p-f0e9a83f.entry.js +0 -2
  817. package/dist/core/p-f0e9a83f.entry.js.map +0 -1
  818. package/dist/core/p-f23d2102.entry.js +0 -2
  819. package/dist/core/p-f23d2102.entry.js.map +0 -1
  820. package/dist/core/p-f87e8411.entry.js +0 -2
  821. package/dist/core/p-f87e8411.entry.js.map +0 -1
  822. package/dist/esm/helpers-268c2b7f.js.map +0 -1
  823. package/dist/esm/ic-empty-state.entry.js.map +0 -1
  824. package/dist/esm/ic-input-component-container_3.entry.js.map +0 -1
  825. package/dist/esm/ic-input-label_2.entry.js +0 -81
  826. package/dist/esm/ic-input-label_2.entry.js.map +0 -1
  827. package/dist/esm/ic-pagination-bar.entry.js +0 -281
  828. package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
  829. package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
  830. /package/dist/core/{p-b97dc365.entry.js.map → p-487fd924.entry.js.map} +0 -0
  831. /package/dist/core/{p-d77960f6.entry.js.map → p-656378ba.entry.js.map} +0 -0
  832. /package/dist/core/{p-3d618bc2.entry.js.map → p-d1045cd5.entry.js.map} +0 -0
@@ -0,0 +1,1119 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-93509377.js';
2
+ import { b as isEmptyString, s as stringEnumToArray, z as getInputDescribedByText, r as removeDisabledFalse, v as removeFormResetListener, x as addFormResetListener, o as onComponentRequiredPropUndefined, F as isNumeric, D as IcInformationStatus, y as renderHiddenInput, I as IcThemeForegroundEnum, k as IcDayNames, l as IcDateInputMonths } from './helpers-948df101.js';
3
+ import { b as dateMatches, i as isDateOrEpoch, j as convertToDoubleDigits, s as splitStringDate, h as createDate, k as extractDateFromZuluDateTime } from './date-helpers-0e5e32a7.js';
4
+
5
+ const Clear = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <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"/>
7
+ </svg>
8
+ `;
9
+
10
+ const Calendar = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
11
+ <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"/>
12
+ </svg>`;
13
+
14
+ 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}input:-webkit-autofill{box-shadow:0 0 0 var(--ic-space-sm) var(--ic-architectural-white) inset}ic-input-component-container{cursor:text}ic-input-component-container,ic-input-component-container:hover{color:var(--ic-color-tertiary-text)}ic-input-component-container .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)}";
15
+
16
+ let inputIds = 0;
17
+ const DateInput = class {
18
+ constructor(hostRef) {
19
+ registerInstance(this, hostRef);
20
+ this.calendarButtonClicked = createEvent(this, "calendarButtonClicked", 7);
21
+ this.icBlur = createEvent(this, "icBlur", 7);
22
+ this.icChange = createEvent(this, "icChange", 7);
23
+ this.icFocus = createEvent(this, "icFocus", 7);
24
+ this.ARIA_INVALID = "aria-invalid";
25
+ this.ARIA_LABEL = "aria-label";
26
+ this.ARIA_LABELLED_BY = "aria-labelledby";
27
+ this.EVENT_OBJECT_STRING = "[object Event]";
28
+ this.FIT_TO_VALUE = "fit-to-value";
29
+ this.initialValue = this.value;
30
+ this.INPUT_EVENT_OBJECT_STRING = "[object InputEvent]";
31
+ this.inputsInOrder = [];
32
+ this.isAfterMax = false;
33
+ this.isBeforeMin = false;
34
+ this.isDateSetFromKeyboardEvent = false;
35
+ this.isDisabledDate = false;
36
+ this.isValidDay = true;
37
+ this.isValidMonth = true;
38
+ this.isValidDate = true;
39
+ this.isZuluTime = false;
40
+ this.KEYBOARD_EVENT_OBJECT_STRING = "[object KeyboardEvent]";
41
+ this.MAX_DAY = 31;
42
+ this.MAX_MONTH = 12;
43
+ this.previousEmittedDate = undefined;
44
+ this.previousSelectedDate = null;
45
+ this.selectedDate = null;
46
+ this.setInputPasteValue = (input, pastedValue) => {
47
+ const inputEl = input;
48
+ inputEl.value = pastedValue;
49
+ inputEl.classList.add(this.FIT_TO_VALUE);
50
+ };
51
+ this.checkSingleCopiedValueIsValid = (input, pastedValue) => {
52
+ let isValid = false;
53
+ const value = Number(pastedValue);
54
+ switch (input) {
55
+ case this.dayInputEl:
56
+ isValid = value >= 1 && value <= this.MAX_DAY;
57
+ break;
58
+ case this.monthInputEl:
59
+ isValid = value >= 1 && value <= this.MAX_MONTH;
60
+ break;
61
+ case this.yearInputEl:
62
+ isValid = true;
63
+ break;
64
+ default:
65
+ isValid = false;
66
+ break;
67
+ }
68
+ return isValid;
69
+ };
70
+ /**
71
+ * Using Object.prototype.string to determine type if event from user
72
+ * @param event - event object used to differentiate keyboard, generic or input event
73
+ * @returns boolean
74
+ */
75
+ this.isKeyboardOrEvent = (event) => {
76
+ return (Object.prototype.toString.call(event) === this.EVENT_OBJECT_STRING ||
77
+ Object.prototype.toString.call(event) ===
78
+ this.KEYBOARD_EVENT_OBJECT_STRING);
79
+ };
80
+ this.setDateValidity = () => {
81
+ if (!isEmptyString(this.day)) {
82
+ this.isValidDay = +this.day > this.MAX_DAY ? false : true;
83
+ }
84
+ else {
85
+ this.isValidDay = true;
86
+ }
87
+ if (!isEmptyString(this.month)) {
88
+ this.isValidMonth = +this.month > this.MAX_MONTH ? false : true;
89
+ }
90
+ else {
91
+ this.isValidMonth = true;
92
+ }
93
+ };
94
+ this.handleInput = (event) => {
95
+ const inputEvent = event;
96
+ const input = event.target;
97
+ if (input !== this.yearInputEl) {
98
+ // Only auto-format if input event is not a character being deleted
99
+ // and not as user is changing value using up / down keys
100
+ if (inputEvent.inputType !== "deleteContentBackward" &&
101
+ !this.preventAutoFormatting) {
102
+ if (input.value.length === 1 &&
103
+ ((input === this.dayInputEl && +input.value >= 4) ||
104
+ (input === this.monthInputEl && +input.value >= 2)) &&
105
+ +input.value <= 9) {
106
+ this.setInputValue(input);
107
+ this.notifyScreenReader(input, event);
108
+ this.moveToNextInput(input);
109
+ }
110
+ if (input.value.length === 2) {
111
+ if (+input.value === 0) {
112
+ input.value = "01";
113
+ }
114
+ this.setInputValue(input);
115
+ this.setPreventInput(input, true);
116
+ this.notifyScreenReader(input, event);
117
+ this.moveToNextInput(input);
118
+ }
119
+ else {
120
+ this.setPreventInput(input, false);
121
+ }
122
+ }
123
+ else if (this.preventAutoFormatting) {
124
+ /**
125
+ * Using arrow keys prevents auto formatting so need to deal with
126
+ * switching from arrow keys to inputting numbers
127
+ **/
128
+ if (input.value.length === 2 && !this.isKeyboardOrEvent(event)) {
129
+ this.setInputValue(input);
130
+ this.setPreventInput(input, true);
131
+ this.moveToNextInput(input);
132
+ }
133
+ else {
134
+ this.setInputValue(input);
135
+ }
136
+ }
137
+ if (input.value.length !== 2) {
138
+ this.setPreventInput(input, false);
139
+ }
140
+ }
141
+ else {
142
+ if (input.value.length === 4) {
143
+ this.setInputValue(input);
144
+ if (Object.prototype.toString.call(event) !== this.EVENT_OBJECT_STRING) {
145
+ this.moveToNextInput(input);
146
+ }
147
+ this.setPreventInput(input, true);
148
+ }
149
+ else {
150
+ this.setInputValue(input, true);
151
+ this.setPreventInput(input, false);
152
+ }
153
+ }
154
+ // Add / remove class to make input width match size of value i.e. 2 digits' width for day / month, 4 for year
155
+ this.setFitToValueStyling(input);
156
+ if (input.value.length === 0) {
157
+ this.setInputValue(input, true);
158
+ this.setValidationMessage();
159
+ }
160
+ this.notifyScreenReader(input, event);
161
+ };
162
+ this.handleKeyDown = (event, isInputPrevented) => {
163
+ var _a;
164
+ const input = event.target;
165
+ const eventKey = (_a = event.key) === null || _a === void 0 ? void 0 : _a.toLowerCase();
166
+ // Regex required due to FF allowing all characters as values for number text field.
167
+ const regex = /-?\d*\.?\d+(e[-+]?\d+)?|[/-]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;
168
+ if (!regex.test(eventKey) &&
169
+ !((event.ctrlKey || event.metaKey) &&
170
+ (eventKey === "v" || eventKey === "c"))) {
171
+ event.preventDefault();
172
+ }
173
+ switch (eventKey) {
174
+ case "/":
175
+ case "-":
176
+ case ".":
177
+ event.preventDefault();
178
+ this.setPasteInvalidText();
179
+ this.moveToNextInput(input);
180
+ break;
181
+ case "arrowright":
182
+ case "arrowleft":
183
+ event.preventDefault();
184
+ this.handleLeftRightArrowKeyPress(input, eventKey);
185
+ break;
186
+ case "arrowup":
187
+ case "arrowdown":
188
+ this.preventAutoFormatting = true;
189
+ this.handleUpDownArrowKeyPress(input, event);
190
+ break;
191
+ case "backspace":
192
+ if (input.value.length === 0) {
193
+ event.preventDefault();
194
+ this.moveToPreviousInput(input);
195
+ }
196
+ break;
197
+ }
198
+ this.preventInput(event, isInputPrevented);
199
+ this.isDateSetFromKeyboardEvent = true;
200
+ };
201
+ this.handleFocus = (event) => {
202
+ // Highlight / select all characters in input for easy replacement
203
+ const input = event.target;
204
+ input.select();
205
+ };
206
+ this.handleBlur = (event) => {
207
+ const input = event.target;
208
+ this.setPasteInvalidText();
209
+ this.autocompleteInput(input);
210
+ };
211
+ this.handleLeftRightArrowKeyPress = (input, key) => {
212
+ if (key === "arrowright") {
213
+ this.moveToNextInput(input);
214
+ }
215
+ else {
216
+ this.moveToPreviousInput(input);
217
+ }
218
+ this.setPasteInvalidText();
219
+ };
220
+ this.notifyScreenReaderSelectedDate = () => {
221
+ const dayNames = stringEnumToArray(IcDayNames);
222
+ const months = stringEnumToArray(IcDateInputMonths);
223
+ this.selectedDateInfoEl.textContent = `Selected date: ${dayNames[this.selectedDate.getDay()]}, ${this.selectedDate.getDate()} ${months[this.selectedDate.getMonth()]} ${this.selectedDate.getFullYear()}`;
224
+ };
225
+ this.handleUpDownArrowKeyPress = (input, event) => {
226
+ const minValue = input === this.yearInputEl ? 0 : 1;
227
+ let maxValue;
228
+ switch (input) {
229
+ case this.dayInputEl:
230
+ maxValue = this.MAX_DAY;
231
+ break;
232
+ case this.monthInputEl:
233
+ maxValue = this.MAX_MONTH;
234
+ break;
235
+ case this.yearInputEl:
236
+ maxValue = 9999;
237
+ }
238
+ // Make value loop round when min / max reached
239
+ if (input === null || input === void 0 ? void 0 : input.value) {
240
+ if (event.key === "ArrowUp") {
241
+ if (+input.value === maxValue) {
242
+ event.preventDefault();
243
+ input.value = `0${minValue}`;
244
+ }
245
+ else {
246
+ input.value =
247
+ +input.value + 1 < 10
248
+ ? `0${+input.value + 1}`
249
+ : (+input.value + 1).toString();
250
+ }
251
+ this.notifyScreenReader(input, event);
252
+ }
253
+ if (event.key === "ArrowDown") {
254
+ if (+input.value === minValue) {
255
+ event.preventDefault();
256
+ input.value = maxValue.toString();
257
+ }
258
+ else {
259
+ input.value =
260
+ +input.value - 1 < 10
261
+ ? `0${+input.value - 1}`
262
+ : (+input.value - 1).toString();
263
+ }
264
+ this.notifyScreenReader(input, event);
265
+ }
266
+ }
267
+ else {
268
+ if (event.key === "ArrowDown") {
269
+ event.preventDefault();
270
+ if (input === this.yearInputEl) {
271
+ input.value = new Date().getFullYear().toString();
272
+ }
273
+ else {
274
+ input.value = maxValue.toString();
275
+ }
276
+ this.notifyScreenReader(input, event);
277
+ }
278
+ else if (event.key === "ArrowUp") {
279
+ event.preventDefault();
280
+ if (input === this.yearInputEl) {
281
+ input.value = new Date().getFullYear().toString();
282
+ }
283
+ else {
284
+ input.value = `0${minValue}`;
285
+ }
286
+ this.notifyScreenReader(input, event);
287
+ }
288
+ }
289
+ this.setInputValue(input);
290
+ this.setFitToValueStyling(input);
291
+ };
292
+ this.handleDateChange = (force) => {
293
+ // Prevent icChange being emitted when each individual input is changed
294
+ // This method is used within componentWillUpdate instead of using @Watch('value');
295
+ if (force || !dateMatches(this.selectedDate, this.previousSelectedDate)) {
296
+ if (this.value) {
297
+ this.inputsInOrder.forEach((input) => {
298
+ input.classList.add(this.FIT_TO_VALUE);
299
+ });
300
+ }
301
+ if (this.day && this.month && this.year && this.invalidDateText === "") {
302
+ this.setValueAndEmitChange(this.selectedDate);
303
+ this.notifyScreenReaderSelectedDate();
304
+ }
305
+ else if (!(this.selectedDate === null && this.previousSelectedDate === null)) {
306
+ this.setValueAndEmitChange(null);
307
+ this.selectedDateInfoEl.textContent = "";
308
+ }
309
+ this.previousSelectedDate = this.selectedDate;
310
+ if (!this.isDateSetFromKeyboardEvent) {
311
+ this.updateInputValues(this.day, this.month, this.year);
312
+ }
313
+ }
314
+ };
315
+ this.slicePastedDate = (valueLength, datePart) => {
316
+ return datePart.length > valueLength
317
+ ? datePart.slice(0, valueLength)
318
+ : datePart;
319
+ };
320
+ this.isPastedStringDateValid = (value) => {
321
+ if (/\d+-\d+-\d+$/.test(value) ||
322
+ /\d+\/\d+\/\d+/.test(value) ||
323
+ /\d+\.\d+\.\d+/.test(value)) {
324
+ return true;
325
+ }
326
+ if (/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:\.\d+)?)?Z/.test(value)) {
327
+ this.isZuluTime = true;
328
+ return true;
329
+ }
330
+ return false;
331
+ };
332
+ // Set value of each input to value of pasted date part
333
+ // Allows formats separated by '-' or '/'
334
+ this.handlePaste = (event) => {
335
+ event.preventDefault();
336
+ const pastedValue = event.clipboardData.getData("Text");
337
+ const isValidDate = this.isPastedStringDateValid(pastedValue);
338
+ this.setPastedValueAndValidation(isValidDate, pastedValue, event);
339
+ };
340
+ this.setDate = (date) => {
341
+ if (date === null || date === "" || date === undefined) {
342
+ this.day = null;
343
+ this.month = null;
344
+ this.year = null;
345
+ this.inputsInOrder.forEach((input) => {
346
+ input.classList.remove(this.FIT_TO_VALUE);
347
+ this.setPreventInput(input, false);
348
+ });
349
+ this.handleDateChange(true);
350
+ }
351
+ else {
352
+ if (isDateOrEpoch(date)) {
353
+ let newDate;
354
+ if (typeof date === "string") {
355
+ // Checking if epoch date time
356
+ newDate = new Date(+date);
357
+ }
358
+ else {
359
+ newDate = date;
360
+ }
361
+ this.day = convertToDoubleDigits(newDate.getDate());
362
+ this.month = convertToDoubleDigits(newDate.getMonth() + 1);
363
+ this.year = newDate.getFullYear().toString();
364
+ }
365
+ else if (typeof date === "string") {
366
+ const defaultDateArray = splitStringDate(date, this.dateFormat);
367
+ this.year = defaultDateArray[0];
368
+ this.month = defaultDateArray[1];
369
+ this.day = defaultDateArray[2];
370
+ }
371
+ }
372
+ this.setValidationMessage();
373
+ };
374
+ this.formatMinMax = (date) => {
375
+ let formattedDate;
376
+ const day = convertToDoubleDigits(date.getDate());
377
+ const month = convertToDoubleDigits(date.getMonth() + 1);
378
+ const year = date.getFullYear();
379
+ switch (this.dateFormat) {
380
+ case "DD/MM/YYYY":
381
+ formattedDate = `${day}/${month}/${year}`;
382
+ break;
383
+ case "MM/DD/YYYY":
384
+ formattedDate = `${month}/${day}/${year}`;
385
+ break;
386
+ case "YYYY/MM/DD":
387
+ formattedDate = `${year}/${month}/${day}`;
388
+ break;
389
+ }
390
+ return formattedDate;
391
+ };
392
+ this.updateInputValues = (day, month, year) => {
393
+ this.dayInputEl.value = day;
394
+ this.monthInputEl.value = month;
395
+ this.yearInputEl.value = year;
396
+ };
397
+ // Set value in state based on input
398
+ this.setInputValue = (input, clear = false) => {
399
+ const newValue = clear ? "" : input.value;
400
+ switch (input) {
401
+ case this.dayInputEl:
402
+ this.day = newValue;
403
+ break;
404
+ case this.monthInputEl:
405
+ this.month = newValue;
406
+ break;
407
+ case this.yearInputEl:
408
+ if (this.year !== newValue) {
409
+ this.year = newValue;
410
+ }
411
+ }
412
+ this.setValidationMessage();
413
+ };
414
+ this.setValidationMessage = () => {
415
+ this.setDateValidity();
416
+ if (!isEmptyString(this.day) &&
417
+ !isEmptyString(this.month) &&
418
+ !isEmptyString(this.year)) {
419
+ // Check whether date actually exists
420
+ // (used https://www.hectane.com/blog/javascript-date-validation-with-leap-year)
421
+ this.selectedDate = this.convertToDate(this.year, this.month, this.day);
422
+ this.isValidDate =
423
+ +this.selectedDate !== 0 && this.selectedDate.getDate() == +this.day;
424
+ this.isDisabledDate = this.isSelectedDateDisabled();
425
+ if (!this.isValidDate || this.isDisabledDate) {
426
+ this.inputsInOrder.forEach((input) => input.setAttribute(this.ARIA_INVALID, "true"));
427
+ }
428
+ else {
429
+ this.inputsInOrder.forEach((input) => input.removeAttribute(this.ARIA_INVALID));
430
+ }
431
+ }
432
+ else {
433
+ this.selectedDate = null;
434
+ }
435
+ if (!(this.isValidDay && this.isValidMonth && this.isValidDate)) {
436
+ this.invalidDateText = this.invalidDateMessage;
437
+ }
438
+ else if (this.isDisabledDate && this.selectedDate !== null) {
439
+ if (this.isBeforeMin) {
440
+ if (this.disablePast) {
441
+ this.invalidDateText = this.disablePastMessage;
442
+ }
443
+ else {
444
+ this.invalidDateText = `Please enter a date after ${this.formatMinMax(this.minDate)}.`;
445
+ }
446
+ }
447
+ else if (this.isAfterMax) {
448
+ if (this.disableFuture) {
449
+ this.invalidDateText = this.disableFutureMessage;
450
+ }
451
+ else {
452
+ this.invalidDateText = `Please enter a date before ${this.formatMinMax(this.maxDate)}.`;
453
+ }
454
+ }
455
+ else if (this.disableDays.length !== 0) {
456
+ this.invalidDateText = this.disableDaysMessage;
457
+ }
458
+ else {
459
+ if (this.disablePast) {
460
+ this.invalidDateText = this.disablePastMessage;
461
+ }
462
+ if (this.disableFuture) {
463
+ this.invalidDateText = this.disableFutureMessage;
464
+ }
465
+ }
466
+ }
467
+ else {
468
+ this.invalidDateText = "";
469
+ }
470
+ };
471
+ // Set refs to the input elements in the order they are displayed (based on the dateFormat)
472
+ this.setInputsInOrder = () => {
473
+ const inputs = this.el.shadowRoot.querySelectorAll("input");
474
+ inputs.forEach((input) => this.inputsInOrder.push(input));
475
+ };
476
+ // Includes text usually added using aria-describedby
477
+ // (which doesn't work on input component container)
478
+ this.setAriaLabelledBy = () => {
479
+ var _a, _b;
480
+ if (this.disabled &&
481
+ !isEmptyString((_a = this.inputCompContainerEl) === null || _a === void 0 ? void 0 : _a.getAttribute(this.ARIA_LABELLED_BY))) {
482
+ this.removeAriaLabelledBy();
483
+ return;
484
+ }
485
+ if (this.disabled) {
486
+ return;
487
+ }
488
+ const labelEl = this.el.shadowRoot.querySelector("label");
489
+ const labelId = `${this.inputId}-label`;
490
+ if (labelEl !== null && labelEl !== undefined) {
491
+ labelEl.id = labelId;
492
+ }
493
+ const hasValidation = (!isEmptyString(this.validationStatus) &&
494
+ !isEmptyString(this.validationText)) ||
495
+ !isEmptyString(this.invalidDateText);
496
+ const labelledBy = `${(_b = labelEl === null || labelEl === void 0 ? void 0 : labelEl.id) !== null && _b !== void 0 ? _b : ""} ${this.screenReaderInfoId} ${getInputDescribedByText(this.inputId, this.helperText !== "" && this.helperText !== this.defaultHelperText, hasValidation)} ${this.selectedDate ? this.selectedDateInfoId : ""} ${this.assistiveHintId}`;
497
+ this.inputCompContainerEl.setAttribute(this.ARIA_LABELLED_BY, labelledBy);
498
+ };
499
+ // Sets boolean for each input, used to limit the number of characters within each field (2 for day / month, 4 for year)
500
+ this.setPreventInput = (input, isPrevented) => {
501
+ switch (input) {
502
+ case this.dayInputEl:
503
+ this.preventDayInput = isPrevented;
504
+ break;
505
+ case this.monthInputEl:
506
+ this.preventMonthInput = isPrevented;
507
+ break;
508
+ case this.yearInputEl:
509
+ this.preventYearInput = isPrevented;
510
+ }
511
+ };
512
+ // Get input based on letter representing each date part ("D", "M" or "Y")
513
+ // (retrieved from dateFormat)
514
+ this.getInputFromDatePart = (datePart) => {
515
+ 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) }));
516
+ 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) }));
517
+ 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) }));
518
+ let input;
519
+ switch (datePart) {
520
+ case "D":
521
+ input = dayInput;
522
+ break;
523
+ case "M":
524
+ input = monthInput;
525
+ break;
526
+ case "Y":
527
+ input = yearInput;
528
+ }
529
+ return input;
530
+ };
531
+ // Get input elements in order of chosen date format
532
+ this.getInputsInOrder = () => {
533
+ const dateParts = this.dateFormat.split("/");
534
+ const inputsInOrder = [];
535
+ dateParts.forEach((part) => {
536
+ inputsInOrder.push(this.getInputFromDatePart(part.substring(0, 1)));
537
+ });
538
+ return inputsInOrder;
539
+ };
540
+ // To add to the end of assistive hint to make it clearer that each date part has its own input
541
+ // that can be changed individually
542
+ this.getDescOfInputsOrder = () => {
543
+ let description;
544
+ switch (this.dateFormat) {
545
+ case "DD/MM/YYYY":
546
+ description = "day, month, and year";
547
+ break;
548
+ case "MM/DD/YYYY":
549
+ description = "month, day, and year";
550
+ break;
551
+ case "YYYY/MM/DD":
552
+ description = "year, month, and day";
553
+ }
554
+ return description;
555
+ };
556
+ // Add 'required' or 'invalid data' to span used in aria-labelledby
557
+ // Many ARIA attributes aren't read out by screen reader when on the input component container
558
+ this.getScreenReaderInfo = (validationStatus) => {
559
+ let inputDescriptors = "";
560
+ if (this.required) {
561
+ inputDescriptors += "required";
562
+ }
563
+ if (validationStatus === IcInformationStatus.Error) {
564
+ inputDescriptors += " invalid data";
565
+ }
566
+ return inputDescriptors === "" ? "" : inputDescriptors + ", ";
567
+ };
568
+ // Prevent non-number characters being entered
569
+ // ('e' or '.' - which are usually allowed in <input type="number">)
570
+ // And limit the number of characters within each field (2 for day / month, 4 for year)
571
+ // (because 'maxlength' doesn't work on <input type="number">)
572
+ this.preventInput = (event, isInputPrevented) => {
573
+ const key = event.key;
574
+ const input = event.target;
575
+ let selectedString;
576
+ if (input) {
577
+ selectedString = input.value.substring(input.selectionStart, input.selectionEnd);
578
+ }
579
+ if (key === "e" ||
580
+ key === "." ||
581
+ key === "-" ||
582
+ (event.key >= "0" &&
583
+ event.key <= "9" &&
584
+ isInputPrevented &&
585
+ !selectedString)) {
586
+ event.preventDefault();
587
+ }
588
+ };
589
+ // Get whether date has been disabled using disableFuture or disablePast prop, but always allow current day
590
+ // Consider using dateClamp and inDateRange
591
+ this.isSelectedDateDisabled = () => {
592
+ const currentDate = new Date();
593
+ this.isAfterMax = false;
594
+ this.isBeforeMin = false;
595
+ let disabled = false;
596
+ const isNotToday = this.selectedDate.toDateString() !== currentDate.toDateString();
597
+ if (this.minDate && this.selectedDate < this.minDate && isNotToday) {
598
+ this.isBeforeMin = true;
599
+ disabled = true;
600
+ }
601
+ if (this.maxDate && this.selectedDate > this.maxDate && isNotToday) {
602
+ this.isAfterMax = true;
603
+ disabled = true;
604
+ }
605
+ if (this.disableDays.includes(this.selectedDate.getDay())) {
606
+ disabled = true;
607
+ }
608
+ if (((this.disablePast && this.selectedDate < currentDate) ||
609
+ (this.disableFuture && this.selectedDate > currentDate)) &&
610
+ isNotToday) {
611
+ disabled = true;
612
+ }
613
+ return disabled;
614
+ };
615
+ this.moveToNextInput = (currentInput) => {
616
+ const currentInputPos = this.inputsInOrder.findIndex((input) => input === currentInput);
617
+ const nextInput = this.inputsInOrder[currentInputPos + 1];
618
+ this.preventAutoFormatting = false;
619
+ if (nextInput) {
620
+ nextInput.focus();
621
+ }
622
+ };
623
+ this.moveToPreviousInput = (currentInput) => {
624
+ const currentInputPos = this.inputsInOrder.findIndex((input) => input === currentInput);
625
+ this.preventAutoFormatting = false;
626
+ if (this.inputsInOrder[currentInputPos - 1]) {
627
+ this.inputsInOrder[currentInputPos - 1].focus();
628
+ }
629
+ };
630
+ this.autocompleteInput = (input) => {
631
+ if (input === this.yearInputEl) {
632
+ this.autocompleteYear();
633
+ }
634
+ else {
635
+ const inputValue = input.value;
636
+ // Autocomplete input as 2 characters (leading zero) when only 1 character entered (for day and month)
637
+ if (inputValue.length === 1) {
638
+ if (+inputValue === 0) {
639
+ input.value = "01";
640
+ }
641
+ else {
642
+ input.value = `0${inputValue}`;
643
+ }
644
+ }
645
+ }
646
+ if (input.value) {
647
+ this.setInputValue(input);
648
+ }
649
+ };
650
+ // Autocomplete year as current millennium when fewer than 4 characters entered
651
+ this.autocompleteYear = () => {
652
+ const inputValue = this.yearInputEl.value;
653
+ const yearNumbers = ["2", "0", "0"];
654
+ let autocompletedInput = "";
655
+ if (inputValue) {
656
+ yearNumbers.forEach((number, index) => {
657
+ if (inputValue.length + index <= 3) {
658
+ autocompletedInput += number;
659
+ }
660
+ });
661
+ this.yearInputEl.value = `${autocompletedInput}${inputValue}`;
662
+ }
663
+ };
664
+ this.convertToDate = (year, month, day) => {
665
+ if (!isEmptyString(year) && !isEmptyString(month) && !isEmptyString(day)) {
666
+ return new Date(+year, +month - 1, +day);
667
+ }
668
+ else {
669
+ return null;
670
+ }
671
+ };
672
+ this.handleHostBlur = () => {
673
+ this.removeLabelledBy = false;
674
+ this.icBlur.emit({ value: this.selectedDate });
675
+ };
676
+ this.handleHostFocus = () => {
677
+ var _a;
678
+ if ((_a = this.el.shadowRoot.activeElement) === null || _a === void 0 ? void 0 : _a.id.match(/(day|month|year)-input$/)) {
679
+ this.removeLabelledBy = false;
680
+ }
681
+ else {
682
+ this.removeLabelledBy = true;
683
+ }
684
+ this.icFocus.emit({ value: this.selectedDate });
685
+ };
686
+ this.handleFormReset = () => {
687
+ // Get the initial value and populate day, month and year again.
688
+ this.setDate(this.initialValue);
689
+ this.setValidationMessage();
690
+ this.handleDateChange(false);
691
+ };
692
+ this.getAriaLabel = (input) => {
693
+ return input.getAttribute(this.ARIA_LABEL);
694
+ };
695
+ this.notifyScreenReaderArrowKeys = (input) => {
696
+ const liveRegion = this.el.shadowRoot.querySelector("#live-region");
697
+ let announcement = "";
698
+ const ariaLabel = this.getAriaLabel(input);
699
+ if (liveRegion && input.value) {
700
+ if (input === this.monthInputEl &&
701
+ !!IcDateInputMonths[+input.value - 1]) {
702
+ announcement = `${input.value} - ${IcDateInputMonths[+input.value - 1]}, ${ariaLabel}`;
703
+ }
704
+ if (input === this.dayInputEl || input === this.yearInputEl) {
705
+ announcement = `${input.value}, ${ariaLabel}`;
706
+ }
707
+ liveRegion.textContent = announcement;
708
+ }
709
+ };
710
+ this.notifyScreenReaderInput = (input, liveRegion) => {
711
+ let announcement = "";
712
+ const ariaLabel = this.getAriaLabel(input);
713
+ if (input === this.dayInputEl || input === this.monthInputEl) {
714
+ if (input.value.length === 2) {
715
+ if (input === this.monthInputEl &&
716
+ !!IcDateInputMonths[+input.value - 1] &&
717
+ this.isValidMonth) {
718
+ announcement = `${input.value} - ${IcDateInputMonths[+input.value - 1]}, ${ariaLabel}`;
719
+ }
720
+ if (input === this.dayInputEl && this.isValidDay) {
721
+ announcement = `${input.value}, ${ariaLabel}`;
722
+ }
723
+ }
724
+ else {
725
+ announcement = "";
726
+ }
727
+ }
728
+ else {
729
+ if (input.value.length === 4) {
730
+ announcement = `${input.value}, ${ariaLabel}`;
731
+ }
732
+ else {
733
+ announcement = "";
734
+ }
735
+ }
736
+ liveRegion.textContent = announcement;
737
+ };
738
+ this.setFitToValueStyling = (input) => {
739
+ if (input.value) {
740
+ input.classList.add(this.FIT_TO_VALUE);
741
+ }
742
+ else {
743
+ input.classList.remove(this.FIT_TO_VALUE);
744
+ }
745
+ };
746
+ this.setAriaInvalid = (validDay, validMonth, validDate, disabledDate) => {
747
+ if (this.inputsInOrder.length) {
748
+ this.inputsInOrder.forEach((input) => {
749
+ input.removeAttribute(this.ARIA_INVALID);
750
+ });
751
+ if (!validDay) {
752
+ this.dayInputEl.setAttribute(this.ARIA_INVALID, "true");
753
+ }
754
+ if (!validMonth) {
755
+ this.monthInputEl.setAttribute(this.ARIA_INVALID, "true");
756
+ }
757
+ if (!validDate || disabledDate) {
758
+ this.inputsInOrder.forEach((input) => {
759
+ input.setAttribute(this.ARIA_INVALID, "true");
760
+ });
761
+ }
762
+ }
763
+ };
764
+ this.handleClear = () => {
765
+ this.inputsInOrder.forEach((input) => {
766
+ input.classList.remove(this.FIT_TO_VALUE);
767
+ this.setInputValue(input, true);
768
+ this.setPreventInput(input, false);
769
+ });
770
+ this.isDateSetFromKeyboardEvent = false;
771
+ this.setValidationMessage();
772
+ this.handleDateChange(true);
773
+ this.inputsInOrder[0].focus();
774
+ };
775
+ this.handleCalendarOpen = (ev) => {
776
+ var _a, _b;
777
+ ev.stopImmediatePropagation();
778
+ (_a = this.calendarButtonEl) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);
779
+ this.calendarButtonClicked.emit({ value: this.selectedDate });
780
+ (_b = this.calendarButtonEl) === null || _b === void 0 ? void 0 : _b.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);
781
+ this.isDateSetFromKeyboardEvent = false;
782
+ };
783
+ this.setValueAndEmitChange = (value) => {
784
+ if (!dateMatches(new Date(this.value), value)) {
785
+ this.emitIcChange(value);
786
+ this.value = value;
787
+ }
788
+ };
789
+ this.handleCalendarFocus = () => {
790
+ this.calendarFocused = true;
791
+ };
792
+ this.handleCalendarBlur = () => {
793
+ this.calendarFocused = false;
794
+ };
795
+ this.handleClearFocus = () => {
796
+ this.removeLabelledBy = true;
797
+ this.clearButtonFocused = true;
798
+ };
799
+ this.handleClearBlur = (ev) => {
800
+ var _a;
801
+ this.clearButtonFocused = false;
802
+ if ((_a = ev.relatedTarget) === null || _a === void 0 ? void 0 : _a.id.match(/(day|year)-input$/)) {
803
+ this.removeLabelledBy = false;
804
+ return;
805
+ }
806
+ this.removeLabelledBy = true;
807
+ };
808
+ this.emitIcChange = (d) => {
809
+ if (!(d === null && this.previousEmittedDate === null) &&
810
+ !dateMatches(d, this.previousEmittedDate)) {
811
+ this.previousEmittedDate = d;
812
+ this.icChange.emit({ value: d });
813
+ }
814
+ };
815
+ this.day = "";
816
+ this.invalidDateText = undefined;
817
+ this.maxDate = undefined;
818
+ this.minDate = undefined;
819
+ this.month = "";
820
+ this.year = "";
821
+ this.calendarFocused = false;
822
+ this.clearButtonFocused = false;
823
+ this.removeLabelledBy = false;
824
+ this.dateFormat = "DD/MM/YYYY";
825
+ this.disabled = false;
826
+ this.disableDays = [];
827
+ this.disableDaysMessage = "The date you have selected is on a day of the week that is not allowed. Please select another date.";
828
+ this.disableFuture = false;
829
+ this.disableFutureMessage = "Dates in the future are not allowed. Please select a date in the past.";
830
+ this.disablePast = false;
831
+ this.disablePastMessage = "Dates in the past are not allowed. Please select a date in the future.";
832
+ this.helperText = undefined;
833
+ this.hideHelperText = false;
834
+ this.hideLabel = false;
835
+ this.inputId = `ic-date-input-${inputIds++}`;
836
+ this.invalidDateMessage = "Please enter a valid date.";
837
+ this.label = undefined;
838
+ this.max = "";
839
+ this.min = "";
840
+ this.name = this.inputId;
841
+ this.required = false;
842
+ this.showCalendarButton = false;
843
+ this.showClearButton = true;
844
+ this.size = "default";
845
+ this.value = "";
846
+ this.validationStatus = "";
847
+ this.validationText = "";
848
+ }
849
+ watchDisabledHandler() {
850
+ removeDisabledFalse(this.disabled, this.el);
851
+ }
852
+ watchDisableFutureHandler() {
853
+ this.watchMaxHandler();
854
+ }
855
+ watchDisablePastHandler() {
856
+ this.watchMinHandler();
857
+ }
858
+ watchMaxHandler() {
859
+ if (this.disableFuture) {
860
+ this.maxDate = new Date();
861
+ }
862
+ else {
863
+ this.maxDate = createDate(this.max, this.dateFormat);
864
+ }
865
+ }
866
+ watchMinHandler() {
867
+ if (this.disablePast) {
868
+ this.minDate = new Date();
869
+ }
870
+ else {
871
+ this.minDate = createDate(this.min, this.dateFormat);
872
+ }
873
+ }
874
+ watchRequiredHandler() {
875
+ // Prevent asterisk being read out after the label by screen reader (by applying aria-hidden)
876
+ // Needed because label is included in 'aria-labelledby' instead of using 'aria-label'
877
+ const labelEl = this.el.shadowRoot.querySelector("label");
878
+ if (this.required) {
879
+ const asteriskSpan = document.createElement("span");
880
+ asteriskSpan.setAttribute("id", "asterisk-span");
881
+ asteriskSpan.setAttribute("aria-hidden", "true");
882
+ asteriskSpan.textContent = " *";
883
+ labelEl === null || labelEl === void 0 ? void 0 : labelEl.appendChild(asteriskSpan);
884
+ }
885
+ else {
886
+ const asteriskSpan = this.el.shadowRoot.querySelector("#asterisk-span");
887
+ if (asteriskSpan) {
888
+ asteriskSpan.remove();
889
+ }
890
+ }
891
+ }
892
+ disconnectedCallback() {
893
+ removeFormResetListener(this.el, this.handleFormReset);
894
+ }
895
+ componentWillLoad() {
896
+ this.defaultHelperText = `Use format ${this.dateFormat}`;
897
+ if (isEmptyString(this.helperText))
898
+ this.helperText = this.defaultHelperText;
899
+ this.watchMinHandler();
900
+ this.watchMaxHandler();
901
+ if (this.value) {
902
+ this.setDate(this.value);
903
+ this.previousEmittedDate = this.selectedDate;
904
+ }
905
+ else {
906
+ this.previousEmittedDate = null;
907
+ }
908
+ this.screenReaderInfoId = `${this.inputId}-screen-reader-info`;
909
+ this.assistiveHintId = `${this.inputId}-assistive-hint`;
910
+ this.selectedDateInfoId = `${this.inputId}-selected-date-info`;
911
+ addFormResetListener(this.el, this.handleFormReset);
912
+ removeDisabledFalse(this.disabled, this.el);
913
+ }
914
+ componentDidLoad() {
915
+ this.setInputsInOrder();
916
+ onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Date Input");
917
+ if (this.value) {
918
+ this.updateInputValues(this.day, this.month, this.year);
919
+ this.inputsInOrder.forEach((input) => {
920
+ input.classList.add(this.FIT_TO_VALUE);
921
+ });
922
+ }
923
+ this.setAriaInvalid(this.isValidDay, this.isValidMonth, this.isValidDate, this.isDisabledDate);
924
+ if (this.value) {
925
+ this.notifyScreenReaderSelectedDate();
926
+ }
927
+ this.inputsInOrder.forEach((input) => {
928
+ input.addEventListener("input", this.handleInput);
929
+ input.addEventListener("focus", this.handleFocus);
930
+ input.addEventListener("blur", this.handleBlur);
931
+ });
932
+ this.watchRequiredHandler();
933
+ }
934
+ componentWillUpdate() {
935
+ if (isEmptyString(this.helperText))
936
+ this.helperText = this.defaultHelperText;
937
+ if (!this.isDateSetFromKeyboardEvent)
938
+ this.setDate(this.value);
939
+ this.setAriaInvalid(this.isValidDay, this.isValidMonth, this.isValidDate, this.isDisabledDate);
940
+ this.handleDateChange(false);
941
+ this.isDateSetFromKeyboardEvent = false;
942
+ }
943
+ componentDidRender() {
944
+ if (this.removeLabelledBy) {
945
+ this.removeAriaLabelledBy();
946
+ return;
947
+ }
948
+ this.setAriaLabelledBy();
949
+ }
950
+ /**
951
+ * Returns the value as a Date object
952
+ * @returns Date
953
+ */
954
+ async getDate() {
955
+ return this.selectedDate;
956
+ }
957
+ /**
958
+ * @internal Sets focus on the calendar button.
959
+ */
960
+ async setCalendarFocus() {
961
+ if (this.calendarButtonEl) {
962
+ this.calendarButtonEl.focus();
963
+ }
964
+ }
965
+ /**
966
+ * @internal Used to pass disabledDays from parent component.
967
+ */
968
+ async setDisableDays(days) {
969
+ this.disableDays = days;
970
+ }
971
+ /**
972
+ * @internal Used to enable other components to invoke an IcChange event from the input.
973
+ */
974
+ async triggerIcChange(d) {
975
+ this.emitIcChange(d);
976
+ }
977
+ removeAriaLabelledBy() {
978
+ this.inputCompContainerEl.removeAttribute(this.ARIA_LABELLED_BY);
979
+ }
980
+ setPastedValueAndValidation(isValidDate, pastedValue, event) {
981
+ switch (true) {
982
+ case isValidDate: {
983
+ const nextParsedValue = this.isZuluTime
984
+ ? extractDateFromZuluDateTime(pastedValue)
985
+ : pastedValue;
986
+ const dateParts = nextParsedValue.split(/-|\/|\./);
987
+ this.inputsInOrder.forEach((input, index) => {
988
+ input.classList.add(this.FIT_TO_VALUE);
989
+ if (this.isZuluTime) {
990
+ this.pasteZuluDateTime(dateParts, index);
991
+ }
992
+ else {
993
+ let dateValue;
994
+ if (input === this.dayInputEl || input === this.monthInputEl) {
995
+ dateValue = this.slicePastedDate(2, dateParts[index]);
996
+ }
997
+ else {
998
+ dateValue = this.slicePastedDate(4, dateParts[index]);
999
+ }
1000
+ input.value = dateValue;
1001
+ this.setInputValue(input);
1002
+ this.autocompleteInput(input);
1003
+ }
1004
+ });
1005
+ this.isZuluTime = false;
1006
+ break;
1007
+ }
1008
+ case (pastedValue.length === 1 ||
1009
+ pastedValue.length === 2 ||
1010
+ pastedValue.length === 4) &&
1011
+ isNumeric(pastedValue):
1012
+ if (this.checkSingleCopiedValueIsValid(event.target, pastedValue)) {
1013
+ // Check if copied value can be pasted into input
1014
+ this.setInputPasteValue(event.target, pastedValue);
1015
+ this.setInputValue(event.target);
1016
+ }
1017
+ else {
1018
+ this.displayPastedValidation(event);
1019
+ }
1020
+ break;
1021
+ case pastedValue.length === 3 && isNumeric(pastedValue):
1022
+ if (event.target !== this.yearInputEl) {
1023
+ this.displayPastedValidation(event);
1024
+ }
1025
+ else {
1026
+ this.setInputPasteValue(event.target, pastedValue);
1027
+ this.setInputValue(event.target);
1028
+ }
1029
+ break;
1030
+ case pastedValue.length >= 5 && isNumeric(pastedValue):
1031
+ this.displayPastedValidation(event);
1032
+ }
1033
+ }
1034
+ pasteZuluDateTime(dateParts, index) {
1035
+ // ['YYYY', 'MM', 'DD']
1036
+ if (index === 0) {
1037
+ const dateValue = this.slicePastedDate(4, dateParts[index]);
1038
+ this.yearInputEl.value = dateValue;
1039
+ this.setInputValue(this.yearInputEl);
1040
+ }
1041
+ else if (index === 1) {
1042
+ // The month value is the second item in the array
1043
+ const dateValue = this.slicePastedDate(2, dateParts[index]);
1044
+ this.monthInputEl.value = dateValue;
1045
+ this.setInputValue(this.monthInputEl);
1046
+ }
1047
+ else {
1048
+ const dateValue = this.slicePastedDate(2, dateParts[index]);
1049
+ this.dayInputEl.value = dateValue;
1050
+ this.setInputValue(this.dayInputEl);
1051
+ }
1052
+ }
1053
+ displayPastedValidation(event) {
1054
+ var _a;
1055
+ if (((_a = this.invalidDateText) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1056
+ this.previousInvalidDateTest = this.invalidDateText;
1057
+ }
1058
+ this.invalidDateText = `Please paste a valid ${this.getAriaLabel(event.target)}`;
1059
+ this.validationStatus = IcInformationStatus.Error;
1060
+ this.isPasteValidationDisplayed = true;
1061
+ }
1062
+ setPasteInvalidText() {
1063
+ var _a;
1064
+ if (this.isPasteValidationDisplayed) {
1065
+ this.invalidDateText = (_a = this.previousInvalidDateTest) !== null && _a !== void 0 ? _a : "";
1066
+ this.isPasteValidationDisplayed = false;
1067
+ // This is to prevent setDate from triggering within componentWillUpdate
1068
+ this.isDateSetFromKeyboardEvent = true;
1069
+ }
1070
+ }
1071
+ notifyScreenReader(input, event) {
1072
+ const liveRegion = this.el.shadowRoot.querySelector("#live-region");
1073
+ if (liveRegion) {
1074
+ if (this.isKeyboardOrEvent(event)) {
1075
+ this.notifyScreenReaderArrowKeys(input);
1076
+ }
1077
+ else if (Object.prototype.toString.call(event) === this.INPUT_EVENT_OBJECT_STRING) {
1078
+ this.notifyScreenReaderInput(input, liveRegion);
1079
+ }
1080
+ }
1081
+ }
1082
+ render() {
1083
+ const { inputId, label, disabled, helperText, hideHelperText, hideLabel, showClearButton, showCalendarButton, size, } = this;
1084
+ const hasCustomValidation = !isEmptyString(this.validationStatus) &&
1085
+ !isEmptyString(this.validationText);
1086
+ const validationStatus = hasCustomValidation
1087
+ ? this.validationStatus
1088
+ : !isEmptyString(this.invalidDateText)
1089
+ ? IcInformationStatus.Error
1090
+ : "";
1091
+ const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;
1092
+ renderHiddenInput(true, this.el, this.name, this.convertToDate(this.year, this.month, this.day), this.disabled);
1093
+ return (h(Host, { onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, h("ic-input-container", { disabled: disabled }, !(hideLabel && hideHelperText) && (h("ic-input-label", { for: inputId, label: label, hideLabel: hideLabel, helperText: !hideHelperText ? helperText : "", disabled: disabled })), h("span", { id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), hideLabel && `${label}\n`, hideHelperText && `${helperText}\n`, `${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: {
1094
+ ["clear-button"]: true,
1095
+ ["hidden"]: isEmptyString(this.day) &&
1096
+ isEmptyString(this.month) &&
1097
+ isEmptyString(this.year),
1098
+ }, disabled: this.disabled, innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearFocus, onBlur: this.handleClearBlur, variant: "icon", appearance: this.clearButtonFocused
1099
+ ? IcThemeForegroundEnum.Light
1100
+ : 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
1101
+ ? IcThemeForegroundEnum.Light
1102
+ : 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 })))));
1103
+ }
1104
+ static get delegatesFocus() { return true; }
1105
+ get el() { return getElement(this); }
1106
+ static get watchers() { return {
1107
+ "disabled": ["watchDisabledHandler"],
1108
+ "disableFuture": ["watchDisableFutureHandler"],
1109
+ "disablePast": ["watchDisablePastHandler"],
1110
+ "max": ["watchMaxHandler"],
1111
+ "min": ["watchMinHandler"],
1112
+ "required": ["watchRequiredHandler"]
1113
+ }; }
1114
+ };
1115
+ DateInput.style = icDateInputCss;
1116
+
1117
+ export { DateInput as ic_date_input };
1118
+
1119
+ //# sourceMappingURL=ic-date-input.entry.js.map