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