@ukic/canary-web-components 3.0.0-canary.1 → 3.0.0-canary.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (646) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-33b42cd6.js → helpers-36cdc6cb.js} +24 -1
  3. package/dist/cjs/helpers-36cdc6cb.js.map +1 -0
  4. package/dist/cjs/{helpers-6817cfbb.js → helpers-a67ad3a4.js} +15 -129
  5. package/dist/cjs/helpers-a67ad3a4.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-accordion.cjs.entry.js +2 -2
  8. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-alert.cjs.entry.js +2 -2
  10. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-badge.cjs.entry.js +2 -2
  13. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  15. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-button_3.cjs.entry.js +17 -16
  18. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-card-horizontal.cjs.entry.js +2 -2
  20. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -2
  22. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-checkbox-group.cjs.entry.js +3 -3
  24. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-checkbox.cjs.entry.js +3 -3
  26. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-chip.cjs.entry.js +21 -14
  28. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +2 -2
  33. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-data-table.cjs.entry.js +31 -8
  35. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-date-input.cjs.entry.js +11 -10
  37. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-date-picker.cjs.entry.js +4 -2
  39. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-divider.cjs.entry.js +2 -2
  42. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-empty-state_2.cjs.entry.js +24 -17
  44. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  46. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  48. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-footer.cjs.entry.js +2 -2
  50. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +2 -2
  53. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1012 -0
  55. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -0
  56. package/dist/cjs/ic-input-label_2.cjs.entry.js +86 -0
  57. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -0
  58. package/dist/cjs/ic-link.cjs.entry.js +2 -2
  59. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  61. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
  63. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-navigation-group.cjs.entry.js +2 -2
  66. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -2
  68. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-navigation-menu.cjs.entry.js +2 -2
  70. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-page-header.cjs.entry.js +5 -5
  72. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-pagination_4.cjs.entry.js +151 -41
  74. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-popover-menu.cjs.entry.js +27 -21
  76. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-radio-group.cjs.entry.js +20 -10
  78. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-radio-option.cjs.entry.js +27 -22
  80. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-search-bar.cjs.entry.js +12 -25
  82. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -2
  84. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-skeleton.cjs.entry.js +4 -4
  86. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
  88. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  89. package/dist/cjs/ic-step.cjs.entry.js +4 -5
  90. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  91. package/dist/cjs/ic-stepper.cjs.entry.js +12 -2
  92. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  93. package/dist/cjs/ic-switch.cjs.entry.js +7 -4
  94. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-tab-context.cjs.entry.js +58 -122
  96. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  97. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  98. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  99. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-tab.cjs.entry.js +6 -7
  101. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  103. package/dist/cjs/ic-toast.cjs.entry.js +3 -3
  104. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  105. package/dist/cjs/ic-toggle-button.cjs.entry.js +2 -2
  106. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  107. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  108. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  109. package/dist/cjs/ic-tree-item.cjs.entry.js +5 -3
  110. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  111. package/dist/cjs/ic-tree-view.cjs.entry.js +10 -2
  112. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  113. package/dist/cjs/ic-typography.cjs.entry.js +5 -3
  114. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  115. package/dist/cjs/index-4cf27b16.js +4 -12
  116. package/dist/cjs/loader.cjs.js +1 -1
  117. package/dist/collection/collection-manifest.json +0 -2
  118. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +8 -8
  119. package/dist/collection/components/ic-data-table/ic-data-table.css +20 -4
  120. package/dist/collection/components/ic-data-table/ic-data-table.js +35 -12
  121. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  122. package/dist/collection/components/ic-data-table/story-data.js +46 -5
  123. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  124. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +3 -3
  125. package/dist/collection/components/ic-date-input/ic-date-input.css +3 -3
  126. package/dist/collection/components/ic-date-input/ic-date-input.js +27 -8
  127. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  128. package/dist/collection/components/ic-date-picker/ic-date-picker.css +6 -6
  129. package/dist/collection/components/ic-date-picker/ic-date-picker.js +20 -0
  130. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  131. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +72 -21
  132. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  133. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  134. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  135. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +20 -2
  136. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
  137. package/dist/collection/components/ic-tree-item/ic-tree-item.css +13 -2
  138. package/dist/collection/components/ic-tree-item/ic-tree-item.js +23 -3
  139. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  140. package/dist/collection/components/ic-tree-view/ic-tree-view.js +29 -1
  141. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  142. package/dist/collection/utils/helpers.js +1 -1
  143. package/dist/collection/utils/helpers.js.map +1 -1
  144. package/dist/collection/utils/types.js.map +1 -1
  145. package/dist/components/helpers.js +22 -1
  146. package/dist/components/helpers.js.map +1 -1
  147. package/dist/components/helpers2.js +14 -121
  148. package/dist/components/helpers2.js.map +1 -1
  149. package/dist/components/ic-accordion.js +1 -1
  150. package/dist/components/ic-accordion.js.map +1 -1
  151. package/dist/components/ic-alert.js +1 -1
  152. package/dist/components/ic-alert.js.map +1 -1
  153. package/dist/components/ic-badge.js +1 -1
  154. package/dist/components/ic-badge.js.map +1 -1
  155. package/dist/components/ic-breadcrumb2.js +1 -1
  156. package/dist/components/ic-breadcrumb2.js.map +1 -1
  157. package/dist/components/ic-button2.js +6 -7
  158. package/dist/components/ic-button2.js.map +1 -1
  159. package/dist/components/ic-card-horizontal.js +1 -1
  160. package/dist/components/ic-card-horizontal.js.map +1 -1
  161. package/dist/components/ic-card-vertical.js +1 -1
  162. package/dist/components/ic-card-vertical.js.map +1 -1
  163. package/dist/components/ic-checkbox-group.js +2 -2
  164. package/dist/components/ic-checkbox-group.js.map +1 -1
  165. package/dist/components/ic-checkbox.js +2 -2
  166. package/dist/components/ic-checkbox.js.map +1 -1
  167. package/dist/components/ic-chip.js +23 -14
  168. package/dist/components/ic-chip.js.map +1 -1
  169. package/dist/components/ic-classification-banner.js +1 -1
  170. package/dist/components/ic-classification-banner.js.map +1 -1
  171. package/dist/components/ic-data-table-title-bar.js +1 -1
  172. package/dist/components/ic-data-table-title-bar.js.map +1 -1
  173. package/dist/components/ic-data-table.js +31 -8
  174. package/dist/components/ic-data-table.js.map +1 -1
  175. package/dist/components/ic-date-input2.js +12 -10
  176. package/dist/components/ic-date-input2.js.map +1 -1
  177. package/dist/components/ic-date-picker.js +5 -2
  178. package/dist/components/ic-date-picker.js.map +1 -1
  179. package/dist/components/ic-divider2.js +1 -1
  180. package/dist/components/ic-divider2.js.map +1 -1
  181. package/dist/components/ic-footer-link-group.js +1 -1
  182. package/dist/components/ic-footer-link-group.js.map +1 -1
  183. package/dist/components/ic-footer-link.js +1 -1
  184. package/dist/components/ic-footer-link.js.map +1 -1
  185. package/dist/components/ic-footer.js +2 -2
  186. package/dist/components/ic-footer.js.map +1 -1
  187. package/dist/components/ic-horizontal-scroll2.js +2 -2
  188. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  189. package/dist/components/ic-input-component-container2.js +1 -1
  190. package/dist/components/ic-input-component-container2.js.map +1 -1
  191. package/dist/components/ic-input-label2.js +10 -6
  192. package/dist/components/ic-input-label2.js.map +1 -1
  193. package/dist/components/ic-input-validation2.js +1 -1
  194. package/dist/components/ic-input-validation2.js.map +1 -1
  195. package/dist/components/ic-link2.js +1 -1
  196. package/dist/components/ic-link2.js.map +1 -1
  197. package/dist/components/ic-loading-indicator2.js +11 -9
  198. package/dist/components/ic-loading-indicator2.js.map +1 -1
  199. package/dist/components/ic-menu-group.js +1 -1
  200. package/dist/components/ic-menu-group.js.map +1 -1
  201. package/dist/components/ic-menu-item2.js +1 -1
  202. package/dist/components/ic-menu-item2.js.map +1 -1
  203. package/dist/components/ic-menu2.js +450 -167
  204. package/dist/components/ic-menu2.js.map +1 -1
  205. package/dist/components/ic-navigation-group.js +2 -2
  206. package/dist/components/ic-navigation-group.js.map +1 -1
  207. package/dist/components/ic-navigation-item.js +2 -2
  208. package/dist/components/ic-navigation-item.js.map +1 -1
  209. package/dist/components/ic-navigation-menu2.js +2 -2
  210. package/dist/components/ic-navigation-menu2.js.map +1 -1
  211. package/dist/components/ic-page-header.js +4 -4
  212. package/dist/components/ic-page-header.js.map +1 -1
  213. package/dist/components/ic-pagination-bar2.js +27 -17
  214. package/dist/components/ic-pagination-bar2.js.map +1 -1
  215. package/dist/components/ic-pagination-item2.js +2 -2
  216. package/dist/components/ic-pagination-item2.js.map +1 -1
  217. package/dist/components/ic-popover-menu.js +30 -22
  218. package/dist/components/ic-popover-menu.js.map +1 -1
  219. package/dist/components/ic-radio-group.js +19 -9
  220. package/dist/components/ic-radio-group.js.map +1 -1
  221. package/dist/components/ic-radio-option.js +27 -22
  222. package/dist/components/ic-radio-option.js.map +1 -1
  223. package/dist/components/ic-search-bar.js +12 -25
  224. package/dist/components/ic-search-bar.js.map +1 -1
  225. package/dist/components/ic-select2.js +149 -38
  226. package/dist/components/ic-select2.js.map +1 -1
  227. package/dist/components/ic-side-navigation.js +2 -2
  228. package/dist/components/ic-side-navigation.js.map +1 -1
  229. package/dist/components/ic-skeleton.js +5 -5
  230. package/dist/components/ic-skeleton.js.map +1 -1
  231. package/dist/components/ic-status-tag.js +1 -1
  232. package/dist/components/ic-status-tag.js.map +1 -1
  233. package/dist/components/ic-step.js +4 -4
  234. package/dist/components/ic-step.js.map +1 -1
  235. package/dist/components/ic-stepper.js +14 -3
  236. package/dist/components/ic-stepper.js.map +1 -1
  237. package/dist/components/ic-switch.js +7 -3
  238. package/dist/components/ic-switch.js.map +1 -1
  239. package/dist/components/ic-tab-context.js +58 -122
  240. package/dist/components/ic-tab-context.js.map +1 -1
  241. package/dist/components/ic-tab-panel.js +1 -1
  242. package/dist/components/ic-tab-panel.js.map +1 -1
  243. package/dist/components/ic-tab.js +5 -6
  244. package/dist/components/ic-tab.js.map +1 -1
  245. package/dist/components/ic-text-field2.js +3 -3
  246. package/dist/components/ic-text-field2.js.map +1 -1
  247. package/dist/components/ic-theme.js +1 -1
  248. package/dist/components/ic-toast.js +3 -3
  249. package/dist/components/ic-toast.js.map +1 -1
  250. package/dist/components/ic-toggle-button.js +1 -1
  251. package/dist/components/ic-toggle-button.js.map +1 -1
  252. package/dist/components/ic-tooltip2.js +1 -1
  253. package/dist/components/ic-tooltip2.js.map +1 -1
  254. package/dist/components/ic-top-navigation.js +2 -2
  255. package/dist/components/ic-top-navigation.js.map +1 -1
  256. package/dist/components/ic-tree-item.js +5 -2
  257. package/dist/components/ic-tree-item.js.map +1 -1
  258. package/dist/components/ic-tree-view.js +12 -2
  259. package/dist/components/ic-tree-view.js.map +1 -1
  260. package/dist/components/ic-typography2.js +4 -2
  261. package/dist/components/ic-typography2.js.map +1 -1
  262. package/dist/core/core.css +661 -37
  263. package/dist/core/core.esm.js +1 -1
  264. package/dist/core/core.esm.js.map +1 -1
  265. package/dist/core/{p-c033e7d6.entry.js → p-036d251b.entry.js} +2 -2
  266. package/dist/core/{p-9397b15b.js → p-043cf5de.js} +2 -2
  267. package/dist/core/p-043cf5de.js.map +1 -0
  268. package/dist/core/p-044689ef.entry.js +2 -0
  269. package/dist/core/p-044689ef.entry.js.map +1 -0
  270. package/dist/core/p-095da817.entry.js +2 -0
  271. package/dist/core/p-095da817.entry.js.map +1 -0
  272. package/dist/core/{p-cb6cebdd.entry.js → p-13d2db9b.entry.js} +2 -2
  273. package/dist/core/{p-cb6cebdd.entry.js.map → p-13d2db9b.entry.js.map} +1 -1
  274. package/dist/core/p-13e01a1e.entry.js +2 -0
  275. package/dist/core/p-13e01a1e.entry.js.map +1 -0
  276. package/dist/core/p-1ae71507.entry.js +2 -0
  277. package/dist/core/p-1ae71507.entry.js.map +1 -0
  278. package/dist/core/p-2200ca85.entry.js +2 -0
  279. package/dist/core/p-2200ca85.entry.js.map +1 -0
  280. package/dist/core/p-2257f5e8.entry.js +2 -0
  281. package/dist/core/p-2257f5e8.entry.js.map +1 -0
  282. package/dist/core/{p-897b8d16.entry.js → p-24d03bbd.entry.js} +2 -2
  283. package/dist/core/{p-a78cf2cb.entry.js → p-266098ee.entry.js} +2 -2
  284. package/dist/core/{p-5f313e1a.entry.js → p-26613dbd.entry.js} +2 -2
  285. package/dist/core/{p-5f313e1a.entry.js.map → p-26613dbd.entry.js.map} +1 -1
  286. package/dist/core/p-283a2274.entry.js +2 -0
  287. package/dist/core/p-283a2274.entry.js.map +1 -0
  288. package/dist/core/{p-77a32de5.entry.js → p-2a3bd99a.entry.js} +2 -2
  289. package/dist/core/p-42f88966.entry.js +2 -0
  290. package/dist/core/p-42f88966.entry.js.map +1 -0
  291. package/dist/core/p-44ee5375.entry.js +2 -0
  292. package/dist/core/p-44ee5375.entry.js.map +1 -0
  293. package/dist/core/p-48a78218.entry.js +2 -0
  294. package/dist/core/p-48a78218.entry.js.map +1 -0
  295. package/dist/core/p-4e316ae5.entry.js +2 -0
  296. package/dist/core/p-4e316ae5.entry.js.map +1 -0
  297. package/dist/core/p-50dd2744.entry.js +2 -0
  298. package/dist/core/p-50dd2744.entry.js.map +1 -0
  299. package/dist/core/{p-bf670360.entry.js → p-51ea45cb.entry.js} +2 -2
  300. package/dist/core/{p-bf670360.entry.js.map → p-51ea45cb.entry.js.map} +1 -1
  301. package/dist/core/p-5458d818.entry.js +2 -0
  302. package/dist/core/p-5458d818.entry.js.map +1 -0
  303. package/dist/core/{p-202bc922.entry.js → p-5ad1a7fb.entry.js} +2 -2
  304. package/dist/core/p-5b061abc.entry.js +2 -0
  305. package/dist/core/p-5b061abc.entry.js.map +1 -0
  306. package/dist/core/{p-f98b1afc.entry.js → p-6727166b.entry.js} +2 -2
  307. package/dist/core/{p-f98b1afc.entry.js.map → p-6727166b.entry.js.map} +1 -1
  308. package/dist/core/p-6dc00a8f.entry.js +2 -0
  309. package/dist/core/p-6dc00a8f.entry.js.map +1 -0
  310. package/dist/core/p-6dffaac0.entry.js +2 -0
  311. package/dist/core/p-6dffaac0.entry.js.map +1 -0
  312. package/dist/core/p-6fd89ed5.entry.js +2 -0
  313. package/dist/core/p-6fd89ed5.entry.js.map +1 -0
  314. package/dist/core/p-7aa6b76e.entry.js +2 -0
  315. package/dist/core/p-7aa6b76e.entry.js.map +1 -0
  316. package/dist/core/{p-e5d99316.entry.js → p-7b90f0ae.entry.js} +2 -2
  317. package/dist/core/{p-5f5403e2.entry.js → p-7e1603cc.entry.js} +2 -2
  318. package/dist/core/p-7e1603cc.entry.js.map +1 -0
  319. package/dist/core/{p-30b046b2.entry.js → p-7e5b0fff.entry.js} +2 -2
  320. package/dist/core/{p-d8563643.entry.js → p-80b296cd.entry.js} +2 -2
  321. package/dist/core/p-80b296cd.entry.js.map +1 -0
  322. package/dist/core/{p-73b40c79.entry.js → p-82aa8136.entry.js} +2 -2
  323. package/dist/core/{p-73b40c79.entry.js.map → p-82aa8136.entry.js.map} +1 -1
  324. package/dist/core/p-83b4efe2.entry.js +2 -0
  325. package/dist/core/p-83b4efe2.entry.js.map +1 -0
  326. package/dist/core/p-83e4d955.entry.js +2 -0
  327. package/dist/core/p-83e4d955.entry.js.map +1 -0
  328. package/dist/core/p-86b608b5.entry.js +2 -0
  329. package/dist/core/p-86b608b5.entry.js.map +1 -0
  330. package/dist/core/p-878df16f.entry.js +2 -0
  331. package/dist/core/p-878df16f.entry.js.map +1 -0
  332. package/dist/core/p-89be0a21.js +2 -0
  333. package/dist/core/p-89be0a21.js.map +1 -0
  334. package/dist/core/{p-306def43.entry.js → p-8bec76d1.entry.js} +2 -2
  335. package/dist/core/p-8bec76d1.entry.js.map +1 -0
  336. package/dist/core/p-94141606.entry.js +2 -0
  337. package/dist/core/p-94141606.entry.js.map +1 -0
  338. package/dist/core/{p-108a9029.entry.js → p-94416b6b.entry.js} +2 -2
  339. package/dist/core/p-94416b6b.entry.js.map +1 -0
  340. package/dist/core/{p-f743b0eb.entry.js → p-a4439688.entry.js} +2 -2
  341. package/dist/core/{p-f743b0eb.entry.js.map → p-a4439688.entry.js.map} +1 -1
  342. package/dist/core/p-a8106c56.entry.js +2 -0
  343. package/dist/core/p-a8106c56.entry.js.map +1 -0
  344. package/dist/core/p-affd7f55.entry.js +2 -0
  345. package/dist/core/p-affd7f55.entry.js.map +1 -0
  346. package/dist/core/{p-c21d0db8.entry.js → p-b3d93bc1.entry.js} +2 -2
  347. package/dist/core/p-b3d93bc1.entry.js.map +1 -0
  348. package/dist/core/p-bac2beeb.entry.js +2 -0
  349. package/dist/core/p-bac2beeb.entry.js.map +1 -0
  350. package/dist/core/p-c29b2b48.entry.js +2 -0
  351. package/dist/core/p-c29b2b48.entry.js.map +1 -0
  352. package/dist/core/p-c40c57ee.entry.js +2 -0
  353. package/dist/core/p-c40c57ee.entry.js.map +1 -0
  354. package/dist/core/p-c6a62d1b.entry.js +2 -0
  355. package/dist/core/p-c6a62d1b.entry.js.map +1 -0
  356. package/dist/core/{p-266341f5.entry.js → p-cc22644d.entry.js} +2 -2
  357. package/dist/core/{p-266341f5.entry.js.map → p-cc22644d.entry.js.map} +1 -1
  358. package/dist/core/p-cfd81370.entry.js +2 -0
  359. package/dist/core/p-cfd81370.entry.js.map +1 -0
  360. package/dist/core/p-d53fb899.entry.js +2 -0
  361. package/dist/core/p-d53fb899.entry.js.map +1 -0
  362. package/dist/core/p-d5e9cf81.entry.js +2 -0
  363. package/dist/core/p-d5e9cf81.entry.js.map +1 -0
  364. package/dist/core/{p-505250cf.entry.js → p-d7632baf.entry.js} +2 -2
  365. package/dist/core/p-dcccd9c1.entry.js +2 -0
  366. package/dist/core/{p-aee8d45b.entry.js.map → p-dcccd9c1.entry.js.map} +1 -1
  367. package/dist/core/p-edfd0946.entry.js +2 -0
  368. package/dist/core/p-edfd0946.entry.js.map +1 -0
  369. package/dist/core/p-f1842a68.entry.js +2 -0
  370. package/dist/core/p-f1842a68.entry.js.map +1 -0
  371. package/dist/core/{p-f1072c28.entry.js → p-f64abdff.entry.js} +2 -2
  372. package/dist/core/p-f64abdff.entry.js.map +1 -0
  373. package/dist/core/p-f8c1d7e8.entry.js +2 -0
  374. package/dist/core/p-f8c1d7e8.entry.js.map +1 -0
  375. package/dist/core/{p-d03374fc.entry.js → p-fbb5c8f2.entry.js} +2 -2
  376. package/dist/core/p-fc2f336d.entry.js +2 -0
  377. package/dist/core/p-fc2f336d.entry.js.map +1 -0
  378. package/dist/esm/core.js +1 -1
  379. package/dist/esm/{helpers-5bd2012a.js → helpers-a7b13f5a.js} +15 -122
  380. package/dist/esm/helpers-a7b13f5a.js.map +1 -0
  381. package/dist/esm/{helpers-dab8ddfe.js → helpers-c326255f.js} +23 -2
  382. package/dist/esm/helpers-c326255f.js.map +1 -0
  383. package/dist/esm/ic-accordion-group.entry.js +1 -1
  384. package/dist/esm/ic-accordion.entry.js +2 -2
  385. package/dist/esm/ic-accordion.entry.js.map +1 -1
  386. package/dist/esm/ic-alert.entry.js +2 -2
  387. package/dist/esm/ic-alert.entry.js.map +1 -1
  388. package/dist/esm/ic-back-to-top.entry.js +1 -1
  389. package/dist/esm/ic-badge.entry.js +2 -2
  390. package/dist/esm/ic-badge.entry.js.map +1 -1
  391. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  392. package/dist/esm/ic-breadcrumb.entry.js +2 -2
  393. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  394. package/dist/esm/ic-button_3.entry.js +17 -16
  395. package/dist/esm/ic-button_3.entry.js.map +1 -1
  396. package/dist/esm/ic-card-horizontal.entry.js +2 -2
  397. package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
  398. package/dist/esm/ic-card-vertical.entry.js +2 -2
  399. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  400. package/dist/esm/ic-checkbox-group.entry.js +3 -3
  401. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  402. package/dist/esm/ic-checkbox.entry.js +3 -3
  403. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  404. package/dist/esm/ic-chip.entry.js +22 -15
  405. package/dist/esm/ic-chip.entry.js.map +1 -1
  406. package/dist/esm/ic-classification-banner.entry.js +1 -1
  407. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  408. package/dist/esm/ic-data-row.entry.js +1 -1
  409. package/dist/esm/ic-data-table-title-bar.entry.js +2 -2
  410. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -1
  411. package/dist/esm/ic-data-table.entry.js +31 -8
  412. package/dist/esm/ic-data-table.entry.js.map +1 -1
  413. package/dist/esm/ic-date-input.entry.js +11 -10
  414. package/dist/esm/ic-date-input.entry.js.map +1 -1
  415. package/dist/esm/ic-date-picker.entry.js +4 -2
  416. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  417. package/dist/esm/ic-dialog.entry.js +1 -1
  418. package/dist/esm/ic-divider.entry.js +2 -2
  419. package/dist/esm/ic-divider.entry.js.map +1 -1
  420. package/dist/esm/ic-empty-state_2.entry.js +24 -17
  421. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  422. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  423. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  424. package/dist/esm/ic-footer-link.entry.js +2 -2
  425. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  426. package/dist/esm/ic-footer.entry.js +2 -2
  427. package/dist/esm/ic-footer.entry.js.map +1 -1
  428. package/dist/esm/ic-hero.entry.js +1 -1
  429. package/dist/esm/ic-horizontal-scroll.entry.js +2 -2
  430. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  431. package/dist/{collection/components/ic-menu-with-multi/ic-menu.js → esm/ic-input-component-container_3.entry.js} +157 -727
  432. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -0
  433. package/dist/esm/ic-input-label_2.entry.js +81 -0
  434. package/dist/esm/ic-input-label_2.entry.js.map +1 -0
  435. package/dist/esm/ic-link.entry.js +2 -2
  436. package/dist/esm/ic-link.entry.js.map +1 -1
  437. package/dist/esm/ic-menu-group.entry.js +2 -2
  438. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  439. package/dist/esm/ic-menu-item.entry.js +2 -2
  440. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  441. package/dist/esm/ic-navigation-button.entry.js +1 -1
  442. package/dist/esm/ic-navigation-group.entry.js +2 -2
  443. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  444. package/dist/esm/ic-navigation-item.entry.js +2 -2
  445. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  446. package/dist/esm/ic-navigation-menu.entry.js +2 -2
  447. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  448. package/dist/esm/ic-page-header.entry.js +5 -5
  449. package/dist/esm/ic-page-header.entry.js.map +1 -1
  450. package/dist/esm/ic-pagination_4.entry.js +151 -41
  451. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  452. package/dist/esm/ic-popover-menu.entry.js +27 -21
  453. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  454. package/dist/esm/ic-radio-group.entry.js +20 -10
  455. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  456. package/dist/esm/ic-radio-option.entry.js +27 -22
  457. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  458. package/dist/esm/ic-search-bar.entry.js +12 -25
  459. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  460. package/dist/esm/ic-side-navigation.entry.js +2 -2
  461. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  462. package/dist/esm/ic-skeleton.entry.js +4 -4
  463. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  464. package/dist/esm/ic-status-tag.entry.js +2 -2
  465. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  466. package/dist/esm/ic-step.entry.js +4 -5
  467. package/dist/esm/ic-step.entry.js.map +1 -1
  468. package/dist/esm/ic-stepper.entry.js +12 -2
  469. package/dist/esm/ic-stepper.entry.js.map +1 -1
  470. package/dist/esm/ic-switch.entry.js +7 -4
  471. package/dist/esm/ic-switch.entry.js.map +1 -1
  472. package/dist/esm/ic-tab-context.entry.js +58 -122
  473. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  474. package/dist/esm/ic-tab-group.entry.js +1 -1
  475. package/dist/esm/ic-tab-panel.entry.js +2 -2
  476. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  477. package/dist/esm/ic-tab.entry.js +6 -7
  478. package/dist/esm/ic-tab.entry.js.map +1 -1
  479. package/dist/esm/ic-theme.entry.js +1 -1
  480. package/dist/esm/ic-toast.entry.js +3 -3
  481. package/dist/esm/ic-toast.entry.js.map +1 -1
  482. package/dist/esm/ic-toggle-button.entry.js +2 -2
  483. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  484. package/dist/esm/ic-top-navigation.entry.js +2 -2
  485. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  486. package/dist/esm/ic-tree-item.entry.js +5 -3
  487. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  488. package/dist/esm/ic-tree-view.entry.js +10 -2
  489. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  490. package/dist/esm/ic-typography.entry.js +5 -3
  491. package/dist/esm/ic-typography.entry.js.map +1 -1
  492. package/dist/esm/index-93509377.js +4 -12
  493. package/dist/esm/loader.js +1 -1
  494. package/dist/types/components/ic-data-table/ic-data-table.d.ts +4 -0
  495. package/dist/types/components/ic-data-table/story-data.d.ts +15 -0
  496. package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
  497. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
  498. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +14 -5
  499. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
  500. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +5 -1
  501. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +5 -0
  502. package/dist/types/components.d.ts +63 -472
  503. package/dist/types/utils/helpers.d.ts +1 -1
  504. package/dist/types/utils/types.d.ts +1 -0
  505. package/hydrate/index.js +3695 -6960
  506. package/package.json +3 -3
  507. package/dist/cjs/helpers-33b42cd6.js.map +0 -1
  508. package/dist/cjs/helpers-6817cfbb.js.map +0 -1
  509. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +0 -156
  510. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +0 -1
  511. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +0 -2738
  512. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +0 -1
  513. package/dist/cjs/ic-menu.cjs.entry.js +0 -658
  514. package/dist/cjs/ic-menu.cjs.entry.js.map +0 -1
  515. package/dist/cjs/ic-select-with-multi.cjs.entry.js +0 -788
  516. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +0 -1
  517. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +0 -712
  518. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +0 -1
  519. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +0 -1057
  520. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +0 -1
  521. package/dist/collection/components/ic-select-with-multi/assets/Check.svg +0 -3
  522. package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +0 -3
  523. package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +0 -3
  524. package/dist/collection/components/ic-select-with-multi/ic-select.css +0 -695
  525. package/dist/collection/components/ic-select-with-multi/ic-select.js +0 -1520
  526. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +0 -1
  527. package/dist/collection/components/ic-select-with-multi/story-data.js +0 -216
  528. package/dist/collection/components/ic-select-with-multi/story-data.js.map +0 -1
  529. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +0 -1518
  530. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +0 -1
  531. package/dist/components/ic-menu-with-multi.d.ts +0 -11
  532. package/dist/components/ic-menu-with-multi.js +0 -8
  533. package/dist/components/ic-menu-with-multi.js.map +0 -1
  534. package/dist/components/ic-menu3.js +0 -2803
  535. package/dist/components/ic-menu3.js.map +0 -1
  536. package/dist/components/ic-select-with-multi.d.ts +0 -11
  537. package/dist/components/ic-select-with-multi.js +0 -906
  538. package/dist/components/ic-select-with-multi.js.map +0 -1
  539. package/dist/core/p-06eeb7f2.entry.js +0 -2
  540. package/dist/core/p-06eeb7f2.entry.js.map +0 -1
  541. package/dist/core/p-0922c552.entry.js +0 -2
  542. package/dist/core/p-0922c552.entry.js.map +0 -1
  543. package/dist/core/p-0bc0e852.entry.js +0 -2
  544. package/dist/core/p-0bc0e852.entry.js.map +0 -1
  545. package/dist/core/p-108a9029.entry.js.map +0 -1
  546. package/dist/core/p-13100d3c.entry.js +0 -2
  547. package/dist/core/p-13100d3c.entry.js.map +0 -1
  548. package/dist/core/p-1769df1d.entry.js +0 -2
  549. package/dist/core/p-1769df1d.entry.js.map +0 -1
  550. package/dist/core/p-297e99cf.js +0 -2
  551. package/dist/core/p-297e99cf.js.map +0 -1
  552. package/dist/core/p-306def43.entry.js.map +0 -1
  553. package/dist/core/p-3778cc5e.entry.js +0 -2
  554. package/dist/core/p-3778cc5e.entry.js.map +0 -1
  555. package/dist/core/p-383a5a76.entry.js +0 -2
  556. package/dist/core/p-383a5a76.entry.js.map +0 -1
  557. package/dist/core/p-3a0510e2.entry.js +0 -2
  558. package/dist/core/p-3a0510e2.entry.js.map +0 -1
  559. package/dist/core/p-3ace51f5.entry.js +0 -2
  560. package/dist/core/p-3ace51f5.entry.js.map +0 -1
  561. package/dist/core/p-3f0391c1.entry.js +0 -2
  562. package/dist/core/p-3f0391c1.entry.js.map +0 -1
  563. package/dist/core/p-41fecc61.entry.js +0 -2
  564. package/dist/core/p-41fecc61.entry.js.map +0 -1
  565. package/dist/core/p-46cb94a2.entry.js +0 -2
  566. package/dist/core/p-46cb94a2.entry.js.map +0 -1
  567. package/dist/core/p-4e67f127.entry.js +0 -2
  568. package/dist/core/p-4e67f127.entry.js.map +0 -1
  569. package/dist/core/p-50e48f4d.entry.js +0 -2
  570. package/dist/core/p-50e48f4d.entry.js.map +0 -1
  571. package/dist/core/p-56e7459a.entry.js +0 -2
  572. package/dist/core/p-56e7459a.entry.js.map +0 -1
  573. package/dist/core/p-59028160.entry.js +0 -2
  574. package/dist/core/p-59028160.entry.js.map +0 -1
  575. package/dist/core/p-5e6fd734.entry.js +0 -2
  576. package/dist/core/p-5e6fd734.entry.js.map +0 -1
  577. package/dist/core/p-5f5403e2.entry.js.map +0 -1
  578. package/dist/core/p-710c6a42.entry.js +0 -2
  579. package/dist/core/p-710c6a42.entry.js.map +0 -1
  580. package/dist/core/p-7a9de008.entry.js +0 -2
  581. package/dist/core/p-7a9de008.entry.js.map +0 -1
  582. package/dist/core/p-801414e2.entry.js +0 -2
  583. package/dist/core/p-801414e2.entry.js.map +0 -1
  584. package/dist/core/p-82ba744d.entry.js +0 -2
  585. package/dist/core/p-82ba744d.entry.js.map +0 -1
  586. package/dist/core/p-9397b15b.js.map +0 -1
  587. package/dist/core/p-9af6adb1.entry.js +0 -2
  588. package/dist/core/p-9af6adb1.entry.js.map +0 -1
  589. package/dist/core/p-9b54feca.entry.js +0 -2
  590. package/dist/core/p-9b54feca.entry.js.map +0 -1
  591. package/dist/core/p-a57cd616.entry.js +0 -2
  592. package/dist/core/p-a57cd616.entry.js.map +0 -1
  593. package/dist/core/p-a5eaed1a.entry.js +0 -2
  594. package/dist/core/p-a5eaed1a.entry.js.map +0 -1
  595. package/dist/core/p-a91340b4.entry.js +0 -2
  596. package/dist/core/p-a91340b4.entry.js.map +0 -1
  597. package/dist/core/p-aee8d45b.entry.js +0 -2
  598. package/dist/core/p-badd4c8d.entry.js +0 -2
  599. package/dist/core/p-badd4c8d.entry.js.map +0 -1
  600. package/dist/core/p-c07af2d8.entry.js +0 -2
  601. package/dist/core/p-c07af2d8.entry.js.map +0 -1
  602. package/dist/core/p-c21d0db8.entry.js.map +0 -1
  603. package/dist/core/p-c678f73d.entry.js +0 -2
  604. package/dist/core/p-c678f73d.entry.js.map +0 -1
  605. package/dist/core/p-c6ae9bad.entry.js +0 -2
  606. package/dist/core/p-c6ae9bad.entry.js.map +0 -1
  607. package/dist/core/p-c6c1e08e.entry.js +0 -2
  608. package/dist/core/p-c6c1e08e.entry.js.map +0 -1
  609. package/dist/core/p-d16f364a.entry.js +0 -2
  610. package/dist/core/p-d16f364a.entry.js.map +0 -1
  611. package/dist/core/p-d239c33b.entry.js +0 -2
  612. package/dist/core/p-d239c33b.entry.js.map +0 -1
  613. package/dist/core/p-d8563643.entry.js.map +0 -1
  614. package/dist/core/p-da40757f.entry.js +0 -2
  615. package/dist/core/p-da40757f.entry.js.map +0 -1
  616. package/dist/core/p-de052137.entry.js +0 -2
  617. package/dist/core/p-de052137.entry.js.map +0 -1
  618. package/dist/core/p-e89bb650.entry.js +0 -2
  619. package/dist/core/p-e89bb650.entry.js.map +0 -1
  620. package/dist/core/p-f1072c28.entry.js.map +0 -1
  621. package/dist/core/p-f37df214.entry.js +0 -2
  622. package/dist/core/p-f37df214.entry.js.map +0 -1
  623. package/dist/core/p-fe13f1ba.entry.js +0 -2
  624. package/dist/core/p-fe13f1ba.entry.js.map +0 -1
  625. package/dist/esm/helpers-5bd2012a.js.map +0 -1
  626. package/dist/esm/helpers-dab8ddfe.js.map +0 -1
  627. package/dist/esm/ic-input-component-container_4.entry.js +0 -149
  628. package/dist/esm/ic-input-component-container_4.entry.js.map +0 -1
  629. package/dist/esm/ic-menu-with-multi.entry.js +0 -2734
  630. package/dist/esm/ic-menu-with-multi.entry.js.map +0 -1
  631. package/dist/esm/ic-menu.entry.js +0 -654
  632. package/dist/esm/ic-menu.entry.js.map +0 -1
  633. package/dist/esm/ic-select-with-multi.entry.js +0 -784
  634. package/dist/esm/ic-select-with-multi.entry.js.map +0 -1
  635. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +0 -214
  636. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +0 -259
  637. package/dist/types/components/ic-select-with-multi/story-data.d.ts +0 -32
  638. /package/dist/core/{p-c033e7d6.entry.js.map → p-036d251b.entry.js.map} +0 -0
  639. /package/dist/core/{p-897b8d16.entry.js.map → p-24d03bbd.entry.js.map} +0 -0
  640. /package/dist/core/{p-a78cf2cb.entry.js.map → p-266098ee.entry.js.map} +0 -0
  641. /package/dist/core/{p-77a32de5.entry.js.map → p-2a3bd99a.entry.js.map} +0 -0
  642. /package/dist/core/{p-202bc922.entry.js.map → p-5ad1a7fb.entry.js.map} +0 -0
  643. /package/dist/core/{p-e5d99316.entry.js.map → p-7b90f0ae.entry.js.map} +0 -0
  644. /package/dist/core/{p-30b046b2.entry.js.map → p-7e5b0fff.entry.js.map} +0 -0
  645. /package/dist/core/{p-505250cf.entry.js.map → p-d7632baf.entry.js.map} +0 -0
  646. /package/dist/core/{p-d03374fc.entry.js.map → p-fbb5c8f2.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as t,f as i,h as e,H as a,g as s,c as n}from"./p-8455d1bb.js";import{c as l,i as h,a as r}from"./p-043cf5de.js";import{w as o,x as c}from"./p-89be0a21.js";const p=":host{gap:var(--ic-space-xs);padding:var(--ic-space-xs)}:host,.action-area{display:flex;flex-direction:column}.action-area{gap:var(--ic-space-md)}:host ::slotted(svg),:host ::slotted(img){border-radius:var(--ic-space-xxs)}:host(.ic-empty-state-right),:host(.ic-empty-state-right) .action-area{align-items:flex-end;text-align:right}:host(.ic-empty-state-center),:host(.ic-empty-state-center) .action-area{align-items:center;text-align:center}:host(.image-medium) ::slotted(svg),:host(.image-medium) ::slotted(img){height:calc(3 * var(--ic-space-lg)) !important;width:calc(3 * var(--ic-space-lg)) !important}:host(.image-small) ::slotted(svg),:host(.image-small) ::slotted(img){height:var(--ic-space-xxl) !important;width:var(--ic-space-xxl) !important}:host(.image-large) ::slotted(svg),:host(.image-large) ::slotted(img){height:calc(4 * var(--ic-space-xl)) !important;width:calc(4 * var(--ic-space-xl)) !important}";const g=class{constructor(e){t(this,e);this.hostMutationObserver=null;this.hostMutationCallback=t=>{if(t.some((({type:t,addedNodes:i,removedNodes:e})=>t==="childList"?l(i,e,["image","actions"]):false))){i(this)}};this.aligned="left";this.body=undefined;this.maxLines=undefined;this.heading=undefined;this.imageSize="medium";this.subheading=undefined}disconnectedCallback(){var t;(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentDidLoad(){!h(this.el,"heading")&&r([{prop:this.heading,propName:"heading"}],"Empty State");this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}render(){const{aligned:t,body:i,maxLines:s,heading:n,imageSize:l,subheading:r}=this;return e(a,{class:{[`ic-empty-state-${t}`]:true,[`image-${l}`]:h(this.el,"image")}},h(this.el,"image")&&e("slot",{name:"image"}),e("div",null,e("slot",{name:"heading"},e("ic-typography",{variant:"h4"},n)),e("slot",{name:"subheading"},e("ic-typography",{variant:"subtitle-small"},r)),e("slot",{name:"body"},e("ic-typography",{maxLines:s},i))),h(this.el,"actions")&&e("div",{class:"action-area"},e("slot",{name:"actions"})))}get el(){return s(this)}};g.style=p;const d=":host(){display:block}.pagination-bar{height:3.5rem;display:flex;align-items:center;justify-content:flex-end;gap:var(--ic-space-xl);padding:var(--ic-space-xs) var(--ic-space-md);box-sizing:border-box}.pagination-bar-left{justify-content:flex-start}.item-controls{display:flex;align-items:center;gap:var(--ic-space-xl)}.pagination-bar-space-between .item-controls{margin-right:auto}.items-per-page-holder{display:flex;align-items:center;gap:var(--ic-space-xs)}.items-per-page-input{--input-width:5rem}.pagination-controls{display:flex;align-items:center;gap:var(--ic-space-xl)}.pagination-controls-wrap{flex-direction:column;align-items:flex-end;gap:var(--ic-space-xs)}.pagination-bar-space-between .pagination-controls{margin-left:auto}.go-to-page-holder{display:flex;align-items:center;gap:var(--ic-space-xs)}.go-to-page-input{--input-width:var(--ic-space-xl)}.go-to-page-button{--min-width:var(--ic-space-xl)}.pagination-text-default,.pagination-text-dark,.pagination-text-light{white-space:nowrap}.pagination-text-light{--ic-typography-color:var(--ic-color-white-text)}@media screen and (max-width: 768px){.pagination-bar{flex-direction:column;align-items:flex-end;height:-moz-fit-content;height:fit-content;gap:var(--ic-space-xs)}.pagination-bar-left{align-items:flex-start}}@media screen and (max-width: 320px){.item-controls,.pagination-controls{flex-direction:column;align-items:flex-end;gap:var(--ic-space-xs)}.pagination-bar-left .item-controls,.pagination-bar-left .pagination-controls,.pagination-bar-space-between .item-controls,.pagination-bar-space-between .pagination-controls{align-items:flex-start}}";const m=class{constructor(i){t(this,i);this.icPageChange=n(this,"icPageChange",7);this.icItemsPerPageChange=n(this,"icItemsPerPageChange",7);this.PAGE_INPUT_FIELD_ID="go-to-page-input";this.INVALID_PAGE_ERROR="Please enter a valid page";this.resizeObserver=null;this.changeItemsPerPage=()=>{this.setItemsPerPage(Number(this.pageDropdownEl.value))};this.changePage=t=>{this.activePage=t;this.lowerBound=t!==1?(t-1)*this.itemsPerPage+1:t;this.setUpperBound()};this.focusElFromLabel=t=>{var i;(i=this.paginationBarEl.querySelector(t))===null||i===void 0?void 0:i.setFocus()};this.goToPage=()=>{const t=this.pageInputEl;const i=Number(t.value);if(i<=this.totalPages&&i>0){this.changePage(i);this.paginationEl.setCurrentPage(i);this.activePage=i;t.value="";this.icPageChange.emit({value:i});this.pageInputTooltipEl.displayTooltip(false,false);t.validationStatus=""}else{this.setInputError(t,this.INVALID_PAGE_ERROR)}};this.goToPageLabelClickHandler=()=>{this.focusElFromLabel("ic-text-field")};this.handleBlur=()=>{const t=this.pageInputEl;if(Number(t.value)<=this.totalPages&&Number(t.value)>0||t.value===""){t.validationStatus=""}this.pageInputTooltipEl.displayTooltip(false,false)};this.handleFocus=()=>{if(this.pageInputEl.validationStatus==="error"){this.pageInputTooltipEl.displayTooltip(true,true)}};this.handleInputChange=()=>{const t=parseInt(this.pageInputEl.value);if(t>this.totalPages||t<=0){this.setInputError(this.pageInputEl,this.INVALID_PAGE_ERROR);this.pageInputTooltipEl.displayTooltip(true,true)}};this.handleKeydown=t=>{if(t.key==="Enter"){if(this.pageInputEl.validationStatus==="error"){this.pageInputTooltipEl.displayTooltip(true,true)}else{this.goToPage()}}else{this.pageInputTooltipEl.displayTooltip(false,false);this.pageInputEl.validationStatus=""}};this.handleKeyUp=t=>{if(Number.isNaN(parseInt(this.pageInputEl.value))&&t.key!=="Backspace"&&t.key!=="Enter"&&t.key!=="Tab"&&t.key!=="Shift"){this.setInputError(this.pageInputEl,"Please enter a number",false);this.pageInputTooltipEl.displayTooltip(true,false)}};this.itemsPerPageLabelClickHandler=()=>{this.focusElFromLabel("ic-select")};this.paginationShouldWrap=()=>{if(this.type==="simple"){this.paginationWrapped=this.paginationEl.clientHeight>63}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const{clientWidth:t}=this.paginationBarEl;if(t-this.paginationWidth>50||t-this.paginationWidth<-50){this.paginationWidth=t;this.paginationShouldWrap()}}));this.resizeObserver.observe(this.paginationBarEl)};this.setInputError=(t,i,e=true)=>{this.inputError=i;t.validationStatus="error";if(e)t.setFocus()};this.setItemsPerPage=t=>{if(this.itemsPerPage!==t){this.itemsPerPage=t;this.itemsPerPageString=t.toString();this.icItemsPerPageChange.emit({value:this.itemsPerPage})}this.totalPages=this.totalItems>this.itemsPerPage?Math.ceil(this.totalItems/this.itemsPerPage):1;this.setUpperBound();if(this.activePage>this.totalPages){this.paginationEl.setCurrentPage(this.totalPages);this.activePage=this.totalPages}this.icPageChange.emit({value:this.activePage,fromItemsPerPage:true})};this.setPaginationBarContent=()=>{const t=this.itemsPerPageOptions||(this.totalItems<=100?[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"}]:[{label:"25",value:"25"},{label:"100",value:"100"},{label:"1000",value:"1000"}]);!this.hideAllFromItemsPerPage&&t.push({label:"All",value:String(this.totalItems)});this.displayedItemsPerPageOptions=t.filter((({value:t})=>this.totalItems>=Number(t)));let i=0;const e=this.displayedItemsPerPageOptions.some((({value:t})=>{i=Number(t);return this.itemsPerPage<=i}));this.setItemsPerPage(e||!e&&this.itemsPerPage>i?i:this.itemsPerPage)};this.setUpperBound=()=>{this.upperBound=Math.min(this.lowerBound+this.itemsPerPage-1,this.totalItems)};this.capitalizedItemLabel=undefined;this.capitalizedPageLabel=undefined;this.activePage=1;this.displayedItemsPerPageOptions=undefined;this.inputError="Please enter a valid page";this.itemsPerPage=0;this.itemsPerPageString="0";this.lowerBound=1;this.lowerCaseItemLabel=undefined;this.lowerCasePageLabel=undefined;this.paginationWidth=undefined;this.paginationWrapped=false;this.totalPages=undefined;this.upperBound=undefined;this.alignment="right";this.appearance="default";this.currentPage=1;this.hideAllFromItemsPerPage=false;this.itemLabel="Item";this.itemsPerPageOptions=undefined;this.type="simple";this.rangeLabelType="page";this.pageLabel="Page";this.showGoToPageControl=false;this.hideRangeLabel=false;this.showItemsPerPageControl=false;this.totalItems=undefined}watchPageNumberHandler(){this.activePage=this.currentPage}watchItemLabelHandler(){this.capitalizedItemLabel=o(this.itemLabel);this.lowerCaseItemLabel=this.itemLabel.toLowerCase()}watchItemsPerPageOptionsHandler(t,i){if(JSON.stringify(t)===JSON.stringify(i))return;this.setPaginationBarContent()}watchPageLabelHandler(){this.capitalizedPageLabel=o(this.pageLabel);this.lowerCasePageLabel=this.pageLabel.toLowerCase()}watchTotalItemsHandler(){this.setPaginationBarContent()}disconnectedCallback(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){this.watchPageNumberHandler();this.watchPageLabelHandler();this.watchItemLabelHandler();this.setPaginationBarContent()}componentDidLoad(){var t,i;this.paginationWidth=this.paginationBarEl.clientWidth;c(this.runResizeObserver);const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(`.${this.PAGE_INPUT_FIELD_ID}`);if(e){const t=(i=e===null||e===void 0?void 0:e.shadowRoot)===null||i===void 0?void 0:i.querySelector("input");if(t){t.style.textAlign="center";t.style.padding="0"}}this.paginationShouldWrap()}pageChangeHandler(t){const i=t.detail.value;this.changePage(i)}render(){const{appearance:t,alignment:i,displayedItemsPerPageOptions:a,PAGE_INPUT_FIELD_ID:s,type:n,rangeLabelType:l,hideRangeLabel:h,showItemsPerPageControl:r,showGoToPageControl:o,pageLabel:c,capitalizedPageLabel:p,lowerCasePageLabel:g,capitalizedItemLabel:d,lowerCaseItemLabel:m,totalPages:u,activePage:f,itemsPerPageString:b}=this;return e("div",{class:{["pagination-bar"]:true,[`pagination-bar-${i}`]:true},ref:t=>this.paginationBarEl=t},(!h||r)&&e("div",{class:"item-controls"},r&&e("div",{class:"items-per-page-holder"},e("ic-typography",{class:{[`pagination-text-${t}`]:true,["items-per-page-control-label"]:true},variant:"label",onClick:this.itemsPerPageLabelClickHandler},d,"s per ",g),e("ic-select",{size:"small",label:"items-per-page-input",class:"items-per-page-input",hideLabel:true,options:a,value:b,onIcChange:this.changeItemsPerPage,ref:t=>this.pageDropdownEl=t})),!h&&(l==="data"?e("ic-typography",{class:{[`pagination-text-${t}`]:true,["item-pagination-label"]:true},variant:"label","aria-live":"polite"},this.upperBound===0&&`0 ${m}s`,this.upperBound>0&&`${this.lowerBound} - ${this.upperBound} of ${this.totalItems} ${m}${this.totalItems>1?"s":""}`):e("ic-typography",{class:{[`pagination-text-${t}`]:true,["page-pagination-label"]:true},variant:"label","aria-live":"polite"},p," ",f," of ",u))),e("div",{class:{["pagination-controls"]:true,["pagination-controls-wrap"]:this.paginationWrapped}},e("div",{class:"pagination-holder"},e("ic-pagination",{appearance:t,type:n,pages:u,label:c,ref:t=>this.paginationEl=t,currentPage:f})),o&&e("div",{class:"go-to-page-holder"},e("ic-typography",{class:{[`pagination-text-${t}`]:true},variant:"label",onClick:this.goToPageLabelClickHandler},"Go to ",g),e("ic-tooltip",{label:this.inputError,target:`#${s}`,disableHover:true,disableClick:true,ref:t=>this.pageInputTooltipEl=t},e("ic-text-field",{type:"number",size:"small",label:s,class:s,id:s,hideLabel:true,onKeyDown:this.handleKeydown,onKeyUp:this.handleKeyUp,onInput:this.handleInputChange,max:u,min:"1",validationInlineInternal:true,onBlur:this.handleBlur,onFocus:this.handleFocus,ref:t=>this.pageInputEl=t})),e("ic-button",{appearance:t,variant:"secondary",onClick:this.goToPage,size:"small",class:"go-to-page-button"},"Go"))))}get el(){return s(this)}static get watchers(){return{currentPage:["watchPageNumberHandler"],itemLabel:["watchItemLabelHandler"],itemsPerPageOptions:["watchItemsPerPageOptionsHandler"],pageLabel:["watchPageLabelHandler"],totalItems:["watchTotalItemsHandler"]}}};m.style=d;export{g as ic_empty_state,m as ic_pagination_bar};
2
+ //# sourceMappingURL=p-86b608b5.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icEmptyStateCss","EmptyState","constructor","hostRef","this","hostMutationObserver","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","aligned","body","undefined","maxLines","heading","imageSize","subheading","disconnectedCallback","_a","disconnect","componentDidLoad","isSlotUsed","el","onComponentRequiredPropUndefined","prop","propName","MutationObserver","observe","childList","render","h","Host","class","name","variant","icPaginationBarCss","PaginationBar","PAGE_INPUT_FIELD_ID","INVALID_PAGE_ERROR","resizeObserver","changeItemsPerPage","setItemsPerPage","Number","pageDropdownEl","value","changePage","page","activePage","lowerBound","itemsPerPage","setUpperBound","focusElFromLabel","paginationBarEl","querySelector","setFocus","goToPage","input","pageInputEl","totalPages","paginationEl","setCurrentPage","icPageChange","emit","pageInputTooltipEl","displayTooltip","validationStatus","setInputError","goToPageLabelClickHandler","handleBlur","textField","handleFocus","handleInputChange","inputValue","parseInt","handleKeydown","ev","key","handleKeyUp","isNaN","itemsPerPageLabelClickHandler","paginationShouldWrap","paginationWrapped","clientHeight","runResizeObserver","ResizeObserver","clientWidth","paginationWidth","error","focus","inputError","newValue","itemsPerPageString","toString","icItemsPerPageChange","totalItems","Math","ceil","fromItemsPerPage","setPaginationBarContent","displayedItemsPerPageOptions","itemsPerPageOptions","label","hideAllFromItemsPerPage","push","String","filter","lastOptionValue","updated","upperBound","min","watchPageNumberHandler","currentPage","watchItemLabelHandler","capitalizedItemLabel","capitalize","itemLabel","lowerCaseItemLabel","toLowerCase","watchItemsPerPageOptionsHandler","newVal","oldVal","JSON","stringify","watchPageLabelHandler","capitalizedPageLabel","pageLabel","lowerCasePageLabel","watchTotalItemsHandler","componentWillLoad","checkResizeObserver","shadowRoot","_b","style","textAlign","padding","pageChangeHandler","detail","appearance","alignment","rangeLabelType","hideRangeLabel","showItemsPerPageControl","showGoToPageControl","ref","onClick","size","hideLabel","options","onIcChange","pages","target","disableHover","disableClick","id","onKeyDown","onKeyUp","onInput","max","validationInlineInternal","onBlur","onFocus"],"sources":["../web-components/dist/collection/components/ic-empty-state/ic-empty-state.css?tag=ic-empty-state&encapsulation=shadow","../web-components/dist/collection/components/ic-empty-state/ic-empty-state.js","src/components/ic-pagination-bar/ic-pagination-bar.css?tag=ic-pagination-bar&encapsulation=shadow","src/components/ic-pagination-bar/ic-pagination-bar.tsx"],"sourcesContent":[":host {\n gap: var(--ic-space-xs);\n padding: var(--ic-space-xs);\n}\n\n:host,\n.action-area {\n display: flex;\n flex-direction: column;\n}\n\n.action-area {\n gap: var(--ic-space-md);\n}\n\n:host ::slotted(svg),\n:host ::slotted(img) {\n border-radius: var(--ic-space-xxs);\n}\n\n:host(.ic-empty-state-right),\n:host(.ic-empty-state-right) .action-area {\n align-items: flex-end;\n text-align: right;\n}\n\n:host(.ic-empty-state-center),\n:host(.ic-empty-state-center) .action-area {\n align-items: center;\n text-align: center;\n}\n\n:host(.image-medium) ::slotted(svg),\n:host(.image-medium) ::slotted(img) {\n height: calc(3 * var(--ic-space-lg)) !important;\n width: calc(3 * var(--ic-space-lg)) !important;\n}\n\n:host(.image-small) ::slotted(svg),\n:host(.image-small) ::slotted(img) {\n height: var(--ic-space-xxl) !important;\n width: var(--ic-space-xxl) !important;\n}\n\n:host(.image-large) ::slotted(svg),\n:host(.image-large) ::slotted(img) {\n height: calc(4 * var(--ic-space-xl)) !important;\n width: calc(4 * var(--ic-space-xl)) !important;\n}\n","import { h, Host, forceUpdate } from \"@stencil/core\";\nimport { isSlotUsed, onComponentRequiredPropUndefined, checkSlotInChildMutations, } from \"../../utils/helpers\";\n/**\n * @slot image - Content is placed at the top above all other content.\n * @slot actions - Content is placed at the bottom below all other content.\n * @slot heading - Content will be rendered in place of the heading prop.\n * @slot subheading - Content will be rendered in place of the subheading prop.\n * @slot body - Content will be rendered in place of the body prop.\n */\nexport class EmptyState {\n constructor() {\n this.hostMutationObserver = null;\n this.hostMutationCallback = (mutationList) => {\n if (mutationList.some(({ type, addedNodes, removedNodes }) => type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, [\n \"image\",\n \"actions\",\n ])\n : false)) {\n forceUpdate(this);\n }\n };\n this.aligned = \"left\";\n this.body = undefined;\n this.maxLines = undefined;\n this.heading = undefined;\n this.imageSize = \"medium\";\n this.subheading = undefined;\n }\n disconnectedCallback() {\n var _a;\n (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n componentDidLoad() {\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined([{ prop: this.heading, propName: \"heading\" }], \"Empty State\");\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n render() {\n const { aligned, body, maxLines, heading, imageSize, subheading } = this;\n return (h(Host, { class: {\n [`ic-empty-state-${aligned}`]: true,\n [`image-${imageSize}`]: isSlotUsed(this.el, \"image\"),\n } }, isSlotUsed(this.el, \"image\") && h(\"slot\", { name: \"image\" }), h(\"div\", null, h(\"slot\", { name: \"heading\" }, h(\"ic-typography\", { variant: \"h4\" }, heading)), h(\"slot\", { name: \"subheading\" }, h(\"ic-typography\", { variant: \"subtitle-small\" }, subheading)), h(\"slot\", { name: \"body\" }, h(\"ic-typography\", { maxLines: maxLines }, body))), isSlotUsed(this.el, \"actions\") && (h(\"div\", { class: \"action-area\" }, h(\"slot\", { name: \"actions\" })))));\n }\n static get is() { return \"ic-empty-state\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-empty-state.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-empty-state.css\"]\n };\n }\n static get properties() {\n return {\n \"aligned\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcEmptyStateAlignment\",\n \"resolved\": \"\\\"center\\\" | \\\"left\\\" | \\\"right\\\"\",\n \"references\": {\n \"IcEmptyStateAlignment\": {\n \"location\": \"import\",\n \"path\": \"./ic-empty-state.types\",\n \"id\": \"src/components/ic-empty-state/ic-empty-state.types.ts::IcEmptyStateAlignment\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The alignment of the empty state container.\"\n },\n \"attribute\": \"aligned\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"left\\\"\"\n },\n \"body\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The body text rendered in the empty state container.\"\n },\n \"attribute\": \"body\",\n \"reflect\": false\n },\n \"maxLines\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The number of lines of body text to display before truncating.\"\n },\n \"attribute\": \"max-lines\",\n \"reflect\": false\n },\n \"heading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title rendered in the empty state container.\"\n },\n \"attribute\": \"heading\",\n \"reflect\": false\n },\n \"imageSize\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the image or icon used in the image slot.\"\n },\n \"attribute\": \"image-size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"subheading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The subtitle rendered in the empty state container.\"\n },\n \"attribute\": \"subheading\",\n \"reflect\": false\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-empty-state.js.map\n",":host() {\n display: block;\n}\n\n.pagination-bar {\n height: 3.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--ic-space-xl);\n padding: var(--ic-space-xs) var(--ic-space-md);\n box-sizing: border-box;\n}\n\n.pagination-bar-left {\n justify-content: flex-start;\n}\n\n.item-controls {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xl);\n}\n\n.pagination-bar-space-between .item-controls {\n margin-right: auto;\n}\n\n.items-per-page-holder {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n.items-per-page-input {\n --input-width: 5rem;\n}\n\n.pagination-controls {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xl);\n}\n\n.pagination-controls-wrap {\n flex-direction: column;\n align-items: flex-end;\n gap: var(--ic-space-xs);\n}\n\n.pagination-bar-space-between .pagination-controls {\n margin-left: auto;\n}\n\n.go-to-page-holder {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n.go-to-page-input {\n --input-width: var(--ic-space-xl);\n}\n\n.go-to-page-button {\n --min-width: var(--ic-space-xl);\n}\n\n.pagination-text-default,\n.pagination-text-dark,\n.pagination-text-light {\n white-space: nowrap;\n}\n\n.pagination-text-light {\n --ic-typography-color: var(--ic-color-white-text);\n}\n\n@media screen and (max-width: 768px) {\n .pagination-bar {\n flex-direction: column;\n align-items: flex-end;\n height: fit-content;\n gap: var(--ic-space-xs);\n }\n\n .pagination-bar-left {\n align-items: flex-start;\n }\n}\n\n@media screen and (max-width: 320px) {\n .item-controls,\n .pagination-controls {\n flex-direction: column;\n align-items: flex-end;\n gap: var(--ic-space-xs);\n }\n\n .pagination-bar-left .item-controls,\n .pagination-bar-left .pagination-controls,\n .pagination-bar-space-between .item-controls,\n .pagination-bar-space-between .pagination-controls {\n align-items: flex-start;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Listen,\n h,\n Watch,\n} from \"@stencil/core\";\nimport { IcThemeForeground } from \"@ukic/web-components/dist/types/interface\";\nimport { checkResizeObserver, capitalize } from \"../../utils/helpers\";\nimport { IcPageChangeEventDetail } from \"./ic-pagination-bar.types\";\nimport {\n IcPaginationAlignmentOptions,\n IcPaginationLabelTypes,\n IcPaginationTypes,\n} from \"@ukic/web-components/dist/types/components/ic-pagination/ic-pagination.types\";\n\n@Component({\n tag: \"ic-pagination-bar\",\n styleUrl: \"ic-pagination-bar.css\",\n shadow: true,\n})\nexport class PaginationBar {\n private PAGE_INPUT_FIELD_ID = \"go-to-page-input\";\n\n private INVALID_PAGE_ERROR = \"Please enter a valid page\";\n\n private resizeObserver: ResizeObserver = null;\n private pageDropdownEl: HTMLIcSelectElement;\n private pageInputEl: HTMLIcTextFieldElement;\n private pageInputTooltipEl: HTMLIcTooltipElement;\n private paginationBarEl: HTMLElement;\n private paginationEl: HTMLIcPaginationElement;\n\n @Element() el: HTMLIcPaginationBarElement;\n\n @State() capitalizedItemLabel: string;\n\n @State() capitalizedPageLabel: string;\n\n @State() activePage: number = 1;\n\n @State() displayedItemsPerPageOptions?: {\n label: string;\n value: string;\n }[];\n\n @State() inputError: string = \"Please enter a valid page\";\n\n @State() itemsPerPage: number = 0;\n\n @State() itemsPerPageString: string = \"0\";\n\n @State() lowerBound: number = 1;\n\n @State() lowerCaseItemLabel: string;\n\n @State() lowerCasePageLabel: string;\n\n @State() paginationWidth: number;\n\n @State() paginationWrapped: boolean = false;\n\n @State() totalPages: number;\n\n @State() upperBound: number;\n\n /**\n * Sets the alignment of the items in the pagination bar.\n */\n @Prop() alignment?: IcPaginationAlignmentOptions = \"right\";\n\n /**\n * Sets the styling for the items in the pagination bar.\n */\n @Prop() appearance?: IcThemeForeground = \"default\";\n\n /**\n * The current page number to be displayed on the pagination bar.\n */\n @Prop() currentPage?: number = 1;\n @Watch(\"currentPage\")\n watchPageNumberHandler(): void {\n this.activePage = this.currentPage;\n }\n\n /**\n * If `true`, the 'All' option will be hidden from the 'items per page' select input.\n */\n @Prop() hideAllFromItemsPerPage?: boolean = false;\n\n /**\n * The text which will be used in place of 'Item' on the pagination bar.\n */\n @Prop() itemLabel?: string = \"Item\";\n\n @Watch(\"itemLabel\")\n watchItemLabelHandler(): void {\n this.capitalizedItemLabel = capitalize(this.itemLabel);\n this.lowerCaseItemLabel = this.itemLabel.toLowerCase();\n }\n\n /**\n * The options which will be displayed for 'items per page' select input.\n */\n @Prop() itemsPerPageOptions?: {\n label: string;\n value: string;\n }[];\n\n @Watch(\"itemsPerPageOptions\")\n watchItemsPerPageOptionsHandler(\n newVal: {\n label: string;\n value: string;\n }[],\n oldVal: {\n label: string;\n value: string;\n }[]\n ): void {\n if (JSON.stringify(newVal) === JSON.stringify(oldVal)) return;\n this.setPaginationBarContent();\n }\n\n /**\n * Whether the displayed pagination is simple or complex.\n */\n @Prop() type?: IcPaginationTypes = \"simple\";\n\n /**\n * Whether total number of items and current item range or total number of pages and current page is displayed.\n */\n @Prop() rangeLabelType?: IcPaginationLabelTypes = \"page\";\n\n /**\n * The text which will be used in place of 'Page' on the pagination bar.\n */\n @Prop() pageLabel?: string = \"Page\";\n\n @Watch(\"pageLabel\")\n watchPageLabelHandler(): void {\n this.capitalizedPageLabel = capitalize(this.pageLabel);\n this.lowerCasePageLabel = this.pageLabel.toLowerCase();\n }\n\n /**\n * If `true`, the 'go to page' control should be displayed.\n */\n @Prop() showGoToPageControl?: boolean = false;\n\n /**\n * If `true`, the number of total items and current item range or number of total pages and current page will be hidden.\n */\n @Prop() hideRangeLabel?: boolean = false;\n\n /**\n * If `true`, the select input to control 'items per page' should be displayed.\n */\n @Prop() showItemsPerPageControl?: boolean = false;\n\n /**\n * Total number of items to be displayed across all pages.\n */\n @Prop() totalItems!: number;\n\n @Watch(\"totalItems\")\n watchTotalItemsHandler(): void {\n this.setPaginationBarContent();\n }\n\n /**\n * Emitted when a page is navigated to via the 'go to' input.\n * The `detail` property contains `value` (i.e. the page number) and a `fromItemsPerPage` flag to indicate if the event was triggered by the `icItemsPerPageChange` event also occurring.\n */\n @Event() icPageChange: EventEmitter<IcPageChangeEventDetail>;\n\n /**\n * Emitted when the items per page option is changed.\n */\n @Event() icItemsPerPageChange: EventEmitter<{ value: number }>;\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.watchPageNumberHandler();\n this.watchPageLabelHandler();\n this.watchItemLabelHandler();\n this.setPaginationBarContent();\n }\n\n componentDidLoad(): void {\n this.paginationWidth = this.paginationBarEl.clientWidth;\n checkResizeObserver(this.runResizeObserver);\n const textField = this.el.shadowRoot?.querySelector(\n `.${this.PAGE_INPUT_FIELD_ID}`\n );\n if (textField) {\n const input = textField?.shadowRoot?.querySelector(\"input\");\n if (input) {\n input.style.textAlign = \"center\";\n input.style.padding = \"0\";\n }\n }\n this.paginationShouldWrap();\n }\n\n @Listen(\"icPageChange\")\n pageChangeHandler(ev: CustomEvent): void {\n const page = ev.detail.value;\n this.changePage(page);\n }\n\n private changeItemsPerPage = () => {\n this.setItemsPerPage(Number(this.pageDropdownEl.value));\n };\n\n private changePage = (page: number) => {\n this.activePage = page;\n this.lowerBound = page !== 1 ? (page - 1) * this.itemsPerPage + 1 : page;\n this.setUpperBound();\n };\n\n private focusElFromLabel = (el: \"ic-select\" | \"ic-text-field\") => {\n this.paginationBarEl.querySelector(el)?.setFocus();\n };\n\n private goToPage = () => {\n const input = this.pageInputEl;\n const page = Number(input.value);\n if (page <= this.totalPages && page > 0) {\n this.changePage(page);\n this.paginationEl.setCurrentPage(page);\n this.activePage = page;\n input.value = \"\";\n this.icPageChange.emit({ value: page });\n this.pageInputTooltipEl.displayTooltip(false, false);\n input.validationStatus = \"\";\n } else {\n this.setInputError(input, this.INVALID_PAGE_ERROR);\n }\n };\n\n private goToPageLabelClickHandler = () => {\n this.focusElFromLabel(\"ic-text-field\");\n };\n\n private handleBlur = () => {\n const textField = this.pageInputEl;\n if (\n (Number(textField.value) <= this.totalPages &&\n Number(textField.value) > 0) ||\n textField.value === \"\"\n ) {\n textField.validationStatus = \"\";\n }\n this.pageInputTooltipEl.displayTooltip(false, false);\n };\n\n private handleFocus = () => {\n if (this.pageInputEl.validationStatus === \"error\") {\n this.pageInputTooltipEl.displayTooltip(true, true);\n }\n };\n\n private handleInputChange = () => {\n const inputValue = parseInt(this.pageInputEl.value);\n\n if (inputValue > this.totalPages || inputValue <= 0) {\n this.setInputError(this.pageInputEl, this.INVALID_PAGE_ERROR);\n this.pageInputTooltipEl.displayTooltip(true, true);\n }\n };\n\n private handleKeydown = (ev: KeyboardEvent) => {\n if (ev.key === \"Enter\") {\n if (this.pageInputEl.validationStatus === \"error\") {\n this.pageInputTooltipEl.displayTooltip(true, true);\n } else {\n this.goToPage();\n }\n } else {\n this.pageInputTooltipEl.displayTooltip(false, false);\n this.pageInputEl.validationStatus = \"\";\n }\n };\n\n private handleKeyUp = (ev: KeyboardEvent) => {\n if (\n Number.isNaN(parseInt(this.pageInputEl.value)) &&\n ev.key !== \"Backspace\" &&\n ev.key !== \"Enter\" &&\n ev.key !== \"Tab\" &&\n ev.key !== \"Shift\"\n ) {\n this.setInputError(this.pageInputEl, \"Please enter a number\", false);\n this.pageInputTooltipEl.displayTooltip(true, false);\n }\n };\n\n private itemsPerPageLabelClickHandler = () => {\n this.focusElFromLabel(\"ic-select\");\n };\n\n private paginationShouldWrap = () => {\n if (this.type === \"simple\") {\n this.paginationWrapped = this.paginationEl.clientHeight > 63;\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const { clientWidth } = this.paginationBarEl;\n if (\n clientWidth - this.paginationWidth > 50 ||\n clientWidth - this.paginationWidth < -50\n ) {\n this.paginationWidth = clientWidth;\n this.paginationShouldWrap();\n }\n });\n\n this.resizeObserver.observe(this.paginationBarEl);\n };\n\n private setInputError = (\n el: HTMLIcTextFieldElement,\n error: string,\n focus = true\n ) => {\n this.inputError = error;\n el.validationStatus = \"error\";\n if (focus) el.setFocus();\n };\n\n private setItemsPerPage = (newValue: number) => {\n if (this.itemsPerPage !== newValue) {\n this.itemsPerPage = newValue;\n this.itemsPerPageString = newValue.toString();\n this.icItemsPerPageChange.emit({ value: this.itemsPerPage });\n }\n\n this.totalPages =\n this.totalItems > this.itemsPerPage\n ? Math.ceil(this.totalItems / this.itemsPerPage)\n : 1;\n\n this.setUpperBound();\n if (this.activePage > this.totalPages) {\n this.paginationEl.setCurrentPage(this.totalPages);\n this.activePage = this.totalPages;\n }\n this.icPageChange.emit({ value: this.activePage, fromItemsPerPage: true });\n };\n\n private setPaginationBarContent = (): void => {\n const displayedItemsPerPageOptions =\n this.itemsPerPageOptions ||\n (this.totalItems <= 100\n ? [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ]\n : [\n { label: \"25\", value: \"25\" },\n { label: \"100\", value: \"100\" },\n { label: \"1000\", value: \"1000\" },\n ]);\n !this.hideAllFromItemsPerPage &&\n displayedItemsPerPageOptions.push({\n label: \"All\",\n value: String(this.totalItems),\n });\n\n this.displayedItemsPerPageOptions = displayedItemsPerPageOptions.filter(\n ({ value }) => this.totalItems >= Number(value)\n );\n\n let lastOptionValue = 0;\n const updated = this.displayedItemsPerPageOptions.some(({ value }) => {\n lastOptionValue = Number(value);\n return this.itemsPerPage <= lastOptionValue;\n });\n\n this.setItemsPerPage(\n updated || (!updated && this.itemsPerPage > lastOptionValue)\n ? lastOptionValue\n : this.itemsPerPage\n );\n };\n\n private setUpperBound = () => {\n this.upperBound = Math.min(\n this.lowerBound + this.itemsPerPage - 1,\n this.totalItems\n );\n };\n\n render() {\n const {\n appearance,\n alignment,\n displayedItemsPerPageOptions,\n PAGE_INPUT_FIELD_ID,\n type,\n rangeLabelType,\n hideRangeLabel,\n showItemsPerPageControl,\n showGoToPageControl,\n pageLabel,\n capitalizedPageLabel,\n lowerCasePageLabel,\n capitalizedItemLabel,\n lowerCaseItemLabel,\n totalPages,\n activePage,\n itemsPerPageString,\n } = this;\n\n return (\n <div\n class={{\n [\"pagination-bar\"]: true,\n [`pagination-bar-${alignment}`]: true,\n }}\n ref={(el) => (this.paginationBarEl = el)}\n >\n {(!hideRangeLabel || showItemsPerPageControl) && (\n <div class=\"item-controls\">\n {showItemsPerPageControl && (\n <div class=\"items-per-page-holder\">\n <ic-typography\n class={{\n [`pagination-text-${appearance}`]: true,\n [\"items-per-page-control-label\"]: true,\n }}\n variant=\"label\"\n onClick={this.itemsPerPageLabelClickHandler}\n >\n {capitalizedItemLabel}s per {lowerCasePageLabel}\n </ic-typography>\n <ic-select\n size=\"small\"\n label=\"items-per-page-input\"\n class=\"items-per-page-input\"\n hideLabel\n options={displayedItemsPerPageOptions}\n value={itemsPerPageString}\n onIcChange={this.changeItemsPerPage}\n ref={(el: HTMLIcSelectElement) => (this.pageDropdownEl = el)}\n ></ic-select>\n </div>\n )}\n {!hideRangeLabel &&\n (rangeLabelType === \"data\" ? (\n <ic-typography\n class={{\n [`pagination-text-${appearance}`]: true,\n [\"item-pagination-label\"]: true,\n }}\n variant=\"label\"\n aria-live=\"polite\"\n >\n {this.upperBound === 0 && `0 ${lowerCaseItemLabel}s`}\n {this.upperBound > 0 &&\n `${this.lowerBound} - ${this.upperBound} of ${\n this.totalItems\n } ${lowerCaseItemLabel}${this.totalItems > 1 ? \"s\" : \"\"}`}\n </ic-typography>\n ) : (\n <ic-typography\n class={{\n [`pagination-text-${appearance}`]: true,\n [\"page-pagination-label\"]: true,\n }}\n variant=\"label\"\n aria-live=\"polite\"\n >\n {capitalizedPageLabel} {activePage} of {totalPages}\n </ic-typography>\n ))}\n </div>\n )}\n <div\n class={{\n [\"pagination-controls\"]: true,\n [\"pagination-controls-wrap\"]: this.paginationWrapped,\n }}\n >\n <div class=\"pagination-holder\">\n <ic-pagination\n appearance={appearance}\n type={type}\n pages={totalPages}\n label={pageLabel}\n ref={(el: HTMLIcPaginationElement) => (this.paginationEl = el)}\n currentPage={activePage}\n ></ic-pagination>\n </div>\n {showGoToPageControl && (\n <div class=\"go-to-page-holder\">\n <ic-typography\n class={{ [`pagination-text-${appearance}`]: true }}\n variant=\"label\"\n onClick={this.goToPageLabelClickHandler}\n >\n Go to {lowerCasePageLabel}\n </ic-typography>\n <ic-tooltip\n label={this.inputError}\n target={`#${PAGE_INPUT_FIELD_ID}`}\n disableHover\n disableClick\n ref={(el: HTMLIcTooltipElement) =>\n (this.pageInputTooltipEl = el)\n }\n >\n <ic-text-field\n type=\"number\"\n size=\"small\"\n label={PAGE_INPUT_FIELD_ID}\n class={PAGE_INPUT_FIELD_ID}\n id={PAGE_INPUT_FIELD_ID}\n hideLabel\n onKeyDown={this.handleKeydown}\n onKeyUp={this.handleKeyUp}\n onInput={this.handleInputChange}\n max={totalPages}\n min=\"1\"\n validationInlineInternal\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n ref={(el: HTMLIcTextFieldElement) => (this.pageInputEl = el)}\n ></ic-text-field>\n </ic-tooltip>\n <ic-button\n appearance={appearance}\n variant=\"secondary\"\n onClick={this.goToPage}\n size=\"small\"\n class=\"go-to-page-button\"\n >\n Go\n </ic-button>\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"mappings":"oKAAA,MAAMA,EAAkB,q5B,MCSXC,EAAU,MACnB,WAAAC,CAAAC,G,UACIC,KAAKC,qBAAuB,KAC5BD,KAAKE,qBAAwBC,IACzB,GAAIA,EAAaC,MAAK,EAAGC,OAAMC,aAAYC,kBAAmBF,IAAS,YACjEG,EAA0BF,EAAYC,EAAc,CAClD,QACA,YAEF,QAAQ,CACVE,EAAYT,K,GAGpBA,KAAKU,QAAU,OACfV,KAAKW,KAAOC,UACZZ,KAAKa,SAAWD,UAChBZ,KAAKc,QAAUF,UACfZ,KAAKe,UAAY,SACjBf,KAAKgB,WAAaJ,S,CAEtB,oBAAAK,GACI,IAAIC,GACHA,EAAKlB,KAAKC,wBA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GrCnD,EAAA,OAAKE,MAAM,qBACTF,EAAA,iBACE2G,WAAYA,EACZpI,KAAMA,EACNgJ,MAAO3F,EACP2C,MAAOwB,EACPkB,IAAMzH,GAAiCtB,KAAK2D,aAAerC,EAC3DyF,YAAahE,KAGhB+F,GACChH,EAAA,OAAKE,MAAM,qBACTF,EAAA,iBACEE,MAAO,CAAE,CAAC,mBAAmByG,KAAe,MAC5CvG,QAAQ,QACR8G,QAAShJ,KAAKmE,2BAAyB,SAEhC2D,GAEThG,EAAA,cACEuE,MAAOrG,KAAKyF,WACZ6D,OAAQ,IAAIjH,IACZkH,aAAY,KACZC,aAAY,KACZT,IAAMzH,GACHtB,KAAK+D,mBAAqBzC,GAG7BQ,EAAA,iBACEzB,KAAK,SACL4I,KAAK,QACL5C,MAAOhE,EACPL,MAAOK,EACPoH,GAAIpH,EACJ6G,UAAS,KACTQ,UAAW1J,KAAK0E,cAChBiF,QAAS3J,KAAK6E,YACd+E,QAAS5J,KAAKuE,kBACdsF,IAAKnG,EACLmD,IAAI,IACJiD,yBAAwB,KACxBC,OAAQ/J,KAAKoE,WACb4F,QAAShK,KAAKsE,YACdyE,IAAMzH,GAAgCtB,KAAKyD,YAAcnC,KAG7DQ,EAAA,aACE2G,WAAYA,EACZvG,QAAQ,YACR8G,QAAShJ,KAAKuD,SACd0F,KAAK,QACLjH,MAAM,qBAAmB,Q"}
@@ -0,0 +1,2 @@
1
+ import{r as i,c as e,h as t,H as o,g as a}from"./p-8455d1bb.js";import{b as r,r as s,q as c,a as n,i as l}from"./p-043cf5de.js";const d=`<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>\n</svg>\n`;const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;max-width:100%;vertical-align:middle}.chip{--chip-bg-color:transparent;--chip-hover-bg:var(--ic-chip-action-hover);--chip-pressed-bg:var(--ic-chip-action-pressed);display:flex;padding:var(--ic-space-xxs);font-size:0.875rem;border-radius:var(--ic-space-md);text-align:left;text-decoration:none;position:relative;background-color:var(--chip-bg-color);border:var(--ic-border-width) solid transparent;justify-content:space-between}@media (prefers-reduced-motion: no-preference){.chip{transition:var(--ic-easing-transition-fast)}}.chip.small{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.chip.large{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}.label{padding:0 var(--ic-space-xs)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}ic-tooltip:focus-within{z-index:1}.filled{--chip-bg-color:var(\n --chip-custom-color,\n var(--ic-chip-background-filled-default)\n );--ic-typography-color:var(\n --chip-custom-foreground-color,\n var(--ic-chip-label)\n );color:var(--chip-custom-foreground-color, var(--ic-chip-label))}.filled.disabled{--chip-bg-color:var(--ic-chip-background-filled-inactive)}:host(.ic-chip-dark-text){--chip-custom-foreground-color:var(--ic-architectural-black)}:host(.ic-chip-light-text){--chip-custom-foreground-color:var(--ic-architectural-white)}:host(.ic-chip-dark-text) .chip.filled.hovered:not(:focus-within){--chip-hover-bg:var(--ic-action-dark-bg-hover)}:host(.ic-chip-dark-text) .chip.filled:focus-within{--chip-pressed-bg:var(--ic-action-dark-bg-pressed)}:host(.ic-chip-light-text) .chip.filled.hovered:not(:focus-within){--chip-hover-bg:var(--ic-action-light-bg-hover)}:host(.ic-chip-light-text) .chip.filled:focus-within{--chip-pressed-bg:var(--ic-action-light-bg-pressed)}.outlined{color:var(--ic-chip-label);border-color:var(--chip-custom-color, var(--ic-chip-outline));padding:calc(var(--ic-space-xxs));--ic-typography-color:var(--ic-chip-label)}.outlined.disabled{border:var(--ic-border-disabled);border-color:var(--ic-chip-outline-inactive)}.chip.disabled ic-typography{--ic-typography-color:var(--ic-chip-label-inactive)}.dismiss-icon{border:none;border-radius:50%;padding:0;color:currentcolor;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs))}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-chip-icon-inactive)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-chip-icon-inactive)}.outlined.non-transparent{background-color:var(--ic-chip-outline-background)}:host .chip.hovered:not(:focus-within){background-image:linear-gradient(var(--chip-hover-bg) 0 0)}:host .chip:focus-within{background-image:linear-gradient(var(--chip-pressed-bg) 0 0)}@media (forced-colors: active){.chip{border:var(--ic-border-hc)}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{--ic-typography-color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}';const h=class{constructor(t){i(this,t);this.icDismiss=e(this,"icDismiss",7);this.inAGGrid=false;this.dismissAction=()=>{this.icDismiss.emit()};this.mouseEnterHandler=()=>{this.hovered=true};this.mouseLeaveHandler=()=>{this.hovered=false};this.setChipColour=()=>{const i=r(this.customColor);if(i){const{r:e,g:t,b:o,a}=i;this.customColorClass=(e*299+t*587+o*114)/1e3>133.3505?"ic-chip-dark-text":"ic-chip-light-text";this.el.setAttribute("style",`--chip-custom-color: rgba(${e}, ${t}, ${o}, ${a});`)}else{this.customColorClass=""}};this.customColorClass="";this.hovered=false;this.visible=true;this.customColor=null;this.disabled=false;this.dismissible=false;this.label=undefined;this.size="medium";this.theme="inherit";this.transparentBackground=true;this.variant="filled"}customColorHandler(){this.setChipColour()}componentWillLoad(){s(this.disabled,this.el);this.customColorHandler()}componentWillRender(){if(c(this.el)){this.inAGGrid=true}}componentDidLoad(){n([{prop:this.label,propName:"label"}],"Chip")}handleClick(){this.visible=!this.visible}async setFocus(){var i;(i=this.el.shadowRoot.querySelector("button"))===null||i===void 0?void 0:i.focus()}render(){const{label:i,variant:e,size:a,dismissible:r,visible:s,disabled:c,hovered:n,theme:p,customColorClass:h}=this;return t(o,{class:{[`ic-theme-${p}`]:p!=="inherit",[`${h}`]:e==="filled"&&h!==""}},s&&t("div",{class:{chip:true,[`${e}`]:true,[`${a}`]:true,disabled:c,dismissible:r,hovered:n,"non-transparent":this.variant==="outlined"&&!this.transparentBackground}},l(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("ic-typography",{variant:"label","apply-vertical-margins":false,class:{label:true,"in-ag-grid":this.inAGGrid}},t("span",null,i)),r&&t("ic-tooltip",{label:"Dismiss",target:"dismiss-icon",class:{"tooltip-disabled":c}},t("button",{id:"dismiss-icon",class:"dismiss-icon","aria-label":`Dismiss ${i} chip`,disabled:c,tabindex:c?-1:0,onClick:this.dismissAction,onMouseEnter:this.mouseEnterHandler,onMouseLeave:this.mouseLeaveHandler,innerHTML:d})),l(this.el,"badge")&&t("slot",{name:"badge"})))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{customColor:["customColorHandler"]}}};h.style=p;export{h as ic_chip};
2
+ //# sourceMappingURL=p-878df16f.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icChipCss","Chip","constructor","hostRef","this","inAGGrid","dismissAction","icDismiss","emit","mouseEnterHandler","hovered","mouseLeaveHandler","setChipColour","colorRGBA","convertToRGBA","customColor","r","g","b","a","customColorClass","el","setAttribute","visible","disabled","dismissible","label","undefined","size","theme","transparentBackground","variant","customColorHandler","componentWillLoad","removeDisabledFalse","componentWillRender","isElInAGGrid","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","handleClick","setFocus","_a","shadowRoot","querySelector","focus","render","h","Host","class","chip","isSlotUsed","name","target","id","tabindex","onClick","onMouseEnter","onMouseLeave","innerHTML","dismissIcon","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","../web-components/dist/collection/components/ic-chip/ic-chip.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n}\n\n.chip {\n --chip-bg-color: transparent;\n --chip-hover-bg: var(--ic-chip-action-hover);\n --chip-pressed-bg: var(--ic-chip-action-pressed);\n\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n text-align: left;\n text-decoration: none;\n position: relative;\n background-color: var(--chip-bg-color);\n border: var(--ic-border-width) solid transparent;\n justify-content: space-between;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .chip {\n transition: var(--ic-easing-transition-fast);\n }\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n --chip-bg-color: var(\n --chip-custom-color,\n var(--ic-chip-background-filled-default)\n );\n --ic-typography-color: var(\n --chip-custom-foreground-color,\n var(--ic-chip-label)\n );\n\n color: var(--chip-custom-foreground-color, var(--ic-chip-label));\n}\n\n.filled.disabled {\n --chip-bg-color: var(--ic-chip-background-filled-inactive);\n}\n\n:host(.ic-chip-dark-text) {\n --chip-custom-foreground-color: var(--ic-architectural-black);\n}\n\n:host(.ic-chip-light-text) {\n --chip-custom-foreground-color: var(--ic-architectural-white);\n}\n\n:host(.ic-chip-dark-text) .chip.filled.hovered:not(:focus-within) {\n --chip-hover-bg: var(--ic-action-dark-bg-hover);\n}\n\n:host(.ic-chip-dark-text) .chip.filled:focus-within {\n --chip-pressed-bg: var(--ic-action-dark-bg-pressed);\n}\n\n:host(.ic-chip-light-text) .chip.filled.hovered:not(:focus-within) {\n --chip-hover-bg: var(--ic-action-light-bg-hover);\n}\n\n:host(.ic-chip-light-text) .chip.filled:focus-within {\n --chip-pressed-bg: var(--ic-action-light-bg-pressed);\n}\n\n.outlined {\n color: var(--ic-chip-label);\n border-color: var(--chip-custom-color, var(--ic-chip-outline));\n padding: calc(var(--ic-space-xxs));\n\n --ic-typography-color: var(--ic-chip-label);\n}\n\n.outlined.disabled {\n border: var(--ic-border-disabled);\n border-color: var(--ic-chip-outline-inactive);\n}\n\n.chip.disabled ic-typography {\n --ic-typography-color: var(--ic-chip-label-inactive);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n color: currentcolor;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n width: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-chip-icon-inactive);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-chip-icon-inactive);\n}\n\n.outlined.non-transparent {\n background-color: var(--ic-chip-outline-background);\n}\n\n:host .chip.hovered:not(:focus-within) {\n background-image: linear-gradient(var(--chip-hover-bg) 0 0);\n}\n\n:host .chip:focus-within {\n background-image: linear-gradient(var(--chip-pressed-bg) 0 0);\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-border-hc);\n }\n\n .chip.disabled {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n --ic-typography-color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import { h, Host, } from \"@stencil/core\";\nimport { onComponentRequiredPropUndefined, isSlotUsed, removeDisabledFalse, convertToRGBA, isElInAGGrid, } from \"../../utils/helpers\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n * @slot badge - Badge component overlaying the top right of the chip.\n */\nexport class Chip {\n constructor() {\n this.inAGGrid = false;\n this.dismissAction = () => {\n this.icDismiss.emit();\n };\n this.mouseEnterHandler = () => {\n this.hovered = true;\n };\n this.mouseLeaveHandler = () => {\n this.hovered = false;\n };\n this.setChipColour = () => {\n const colorRGBA = convertToRGBA(this.customColor);\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n this.customColorClass =\n (r * 299 + g * 587 + b * 114) / 1000 > 133.3505\n ? \"ic-chip-dark-text\"\n : \"ic-chip-light-text\";\n this.el.setAttribute(\"style\", `--chip-custom-color: rgba(${r}, ${g}, ${b}, ${a});`);\n }\n else {\n this.customColorClass = \"\";\n }\n };\n this.customColorClass = \"\";\n this.hovered = false;\n this.visible = true;\n this.customColor = null;\n this.disabled = false;\n this.dismissible = false;\n this.label = undefined;\n this.size = \"medium\";\n this.theme = \"inherit\";\n this.transparentBackground = true;\n this.variant = \"filled\";\n }\n customColorHandler() {\n this.setChipColour();\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n this.customColorHandler();\n }\n componentWillRender() {\n if (isElInAGGrid(this.el)) {\n this.inAGGrid = true;\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.label, propName: \"label\" }], \"Chip\");\n }\n handleClick() {\n this.visible = !this.visible;\n }\n /**\n * Sets focus on the chip.\n */\n async setFocus() {\n var _a;\n (_a = this.el.shadowRoot.querySelector(\"button\")) === null || _a === void 0 ? void 0 : _a.focus();\n }\n render() {\n const { label, variant, size, dismissible, visible, disabled, hovered, theme, customColorClass, } = this;\n return (h(Host, { class: {\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [`${customColorClass}`]: variant === \"filled\" && customColorClass !== \"\",\n } }, visible && (h(\"div\", { class: {\n chip: true,\n [`${variant}`]: true,\n [`${size}`]: true,\n disabled,\n dismissible,\n hovered,\n \"non-transparent\": this.variant === \"outlined\" && !this.transparentBackground,\n } }, isSlotUsed(this.el, \"icon\") && (h(\"div\", { class: \"icon\" }, h(\"slot\", { name: \"icon\" }))), h(\"ic-typography\", { variant: \"label\", \"apply-vertical-margins\": false, class: { label: true, \"in-ag-grid\": this.inAGGrid } }, h(\"span\", null, label)), dismissible && (h(\"ic-tooltip\", { label: \"Dismiss\", target: \"dismiss-icon\", class: { \"tooltip-disabled\": disabled } }, h(\"button\", { id: \"dismiss-icon\", class: \"dismiss-icon\", \"aria-label\": `Dismiss ${label} chip`, disabled: disabled, tabindex: disabled ? -1 : 0, onClick: this.dismissAction, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, innerHTML: dismissIcon }))), isSlotUsed(this.el, \"badge\") && h(\"slot\", { name: \"badge\" })))));\n }\n static get is() { return \"ic-chip\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-chip.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-chip.css\"]\n };\n }\n static get properties() {\n return {\n \"customColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})`\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom chip colour. This will override the theme colour.\\nCan be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"attribute\": \"custom-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the chip will appear disabled.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"dismissible\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the chip will have a close button at the end to dismiss it.\"\n },\n \"attribute\": \"dismissible\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text rendered within the chip.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the chip.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"dark\\\" | \\\"light\\\" | \\\"inherit\\\"\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the chip to the dark or light theme colors. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\\nSetting the \\\"customColor\\\" prop will override this.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"transparentBackground\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the outlined variant of chip will have a transparent background rather than the theme defined color.\"\n },\n \"attribute\": \"transparent-background\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcEmphasisType\",\n \"resolved\": \"\\\"filled\\\" | \\\"outlined\\\"\",\n \"references\": {\n \"IcEmphasisType\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcEmphasisType\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The emphasis of the chip.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"filled\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"customColorClass\": {},\n \"hovered\": {},\n \"visible\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icDismiss\",\n \"name\": \"icDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Is emitted when the user dismisses the chip.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the chip.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"customColor\",\n \"methodName\": \"customColorHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icDismiss\",\n \"method\": \"handleClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-chip.js.map\n"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G,O,CAE9F,MAAAC,GACI,MAAMrB,MAAEA,EAAKK,QAAEA,EAAOH,KAAEA,EAAIH,YAAEA,EAAWF,QAAEA,EAAOC,SAAEA,EAAQd,QAAEA,EAAOmB,MAAEA,EAAKT,iBAAEA,GAAsBhB,KACpG,OAAQ4C,EAAEC,EAAM,CAAEC,MAAO,CACjB,CAAC,YAAYrB,KAAUA,IAAU,UACjC,CAAC,GAAGT,KAAqBW,IAAY,UAAYX,IAAqB,KACrEG,GAAYyB,EAAE,MAAO,CAAEE,MAAO,CAC/BC,KAAM,KACN,CAAC,GAAGpB,KAAY,KAChB,CAAC,GAAGH,KAAS,KACbJ,WACAC,cACAf,UACA,kBAAmBN,KAAK2B,UAAY,aAAe3B,KAAK0B,wBACvDsB,EAAWhD,KAAKiB,GAAI,SAAY2B,EAAE,MAAO,CAAEE,MAAO,QAAUF,EAAE,OAAQ,CAAEK,KAAM,UAAaL,EAAE,gBAAiB,CAAEjB,QAAS,QAAS,yBAA0B,MAAOmB,MAAO,CAAExB,MAAO,KAAM,aAActB,KAAKC,WAAc2C,EAAE,OAAQ,KAAMtB,IAASD,GAAgBuB,EAAE,aAAc,CAAEtB,MAAO,UAAW4B,OAAQ,eAAgBJ,MAAO,CAAE,mBAAoB1B,IAAcwB,EAAE,SAAU,CAAEO,GAAI,eAAgBL,MAAO,eAAgB,aAAc,WAAWxB,SAAcF,SAAUA,EAAUgC,SAAUhC,GAAY,EAAI,EAAGiC,QAASrD,KAAKE,cAAeoD,aAActD,KAAKK,kBAAmBkD,aAAcvD,KAAKO,kBAAmBiD,UAAWC,KAAkBT,EAAWhD,KAAKiB,GAAI,UAAY2B,EAAE,OAAQ,CAAEK,KAAM,W,CAIhsB,yBAAWS,GAAmB,OAAO,IAAK,C"}
@@ -0,0 +1,2 @@
1
+ const n=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"];const t=["ic-alert"];const e={"ic-alert":["ic-link"]};var s;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(s||(s={}));var o;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(o||(o={}));var r;(function(n){n[n["January"]=0]="January";n[n["February"]=1]="February";n[n["March"]=2]="March";n[n["April"]=3]="April";n[n["May"]=4]="May";n[n["June"]=5]="June";n[n["July"]=6]="July";n[n["August"]=7]="August";n[n["September"]=8]="September";n[n["October"]=9]="October";n[n["November"]=10]="November";n[n["December"]=11]="December"})(r||(r={}));var c;(function(n){n[n["Sun"]=0]="Sun";n[n["Mon"]=1]="Mon";n[n["Tue"]=2]="Tue";n[n["Wed"]=3]="Wed";n[n["Thu"]=4]="Thu";n[n["Fri"]=5]="Fri";n[n["Sat"]=6]="Sat"})(c||(c={}));var a;(function(n){n[n["Sunday"]=0]="Sunday";n[n["Monday"]=1]="Monday";n[n["Tuesday"]=2]="Tuesday";n[n["Wednesday"]=3]="Wednesday";n[n["Thursday"]=4]="Thursday";n[n["Friday"]=5]="Friday";n[n["Saturday"]=6]="Saturday"})(a||(a={}));var i;(function(n){n[n["Sunday"]=0]="Sunday";n[n["Monday"]=1]="Monday";n[n["Tuesday"]=2]="Tuesday";n[n["Wednesday"]=3]="Wednesday";n[n["Thursday"]=4]="Thursday";n[n["Friday"]=5]="Friday";n[n["Saturday"]=6]="Saturday"})(i||(i={}));const u=n=>{const t=[];Object.values(n).forEach((n=>{if(isNaN(Number(n))){const e=n;t.push(e)}}));return t};const l=(n,t)=>{let e;return(...s)=>{const o=t();clearTimeout(e);e=setTimeout(n,o,...s)}};const d=(n,t,e,s,o)=>{if(e!==undefined&&(n||N(t))){const n=t.querySelectorAll("input.ic-input");const r=Array.from(n);const c=r.filter((n=>t===n.parentElement));let a=c[0];if(a===null||a===undefined){a=t.ownerDocument.createElement("input");a.type="hidden";a.classList.add("ic-input");t.appendChild(a)}a.disabled=o;a.name=e;if(s instanceof Date){a.value=s?s.toISOString():null}else{a.value=s||""}}};const f=(s,r=null)=>{var c;const a=s.parentElement||s.getRootNode().host.parentElement;const i=a.closest(n.join(","));if(i!==null){const n=i.tagName.toLowerCase();const a=s.tagName.toLowerCase();if((c=e[n])===null||c===void 0?void 0:c.includes(a)){return o.Default}else if(r!==null&&!t.includes(n)){return r}else if(i.classList.contains(o.Dark)){return o.Dark}return o.Light}return o.Default};const p=n=>n?n.trim().length===0:true;const y=n=>n!==undefined?n:null;const b=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const m=n=>{const t=n.firstElementChild;if(t!==null){const e=t.assignedElements?t.assignedElements():t.childNodes;return e.length?e:n.tagName?[n]:null}else{return n===null?null:[n]}};({XS:Number(b("--ic-breakpoint-xs").replace("px","")),S:Number(b("--ic-breakpoint-sm").replace("px","")),M:Number(b("--ic-breakpoint-md").replace("px","")),L:Number(b("--ic-breakpoint-lg").replace("px","")),XL:Number(b("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200});const v=(n,t)=>Array.from(n.children).some((n=>n.getAttribute("slot")===t));const N=n=>!!n.shadowRoot&&!!n.attachShadow;const x=n=>n+"-helper-text";const S=n=>n+"-validation-text";const h=(n,t,e)=>`${t?x(n):""} ${e?S(n):""}`.trim();const g=(n,t=16)=>`${1/t*parseInt(n)}rem`;const k=n=>/^-?\d+$/.test(n);const T=(n,t)=>{for(let e=0;e<n.length;e++){const{prop:s,propName:o}=n[e];if(s===null||s===undefined){console.error(`No ${o} specified for ${t} component - prop '${o}' (web components) / '${$(o)}' (react) required`)}}};const $=n=>{n=n.toLowerCase();const t=n.split("-");let e=t[0];for(let n=1;n<t.length;n++){e+=t[n].substring(0,1).toUpperCase()+t[n].substring(1)}return e};const w=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const M=n=>n.closest("FORM");const F=(n,t)=>{const e=M(n);if(e!==null){e.addEventListener("reset",t)}};const A=(n,t)=>{const e=M(n);if(e!==null){e.removeEventListener("reset",t)}};const D=(n,t)=>{if(!n){t.removeAttribute("disabled")}};const O=n=>n.charAt(0).toUpperCase()+n.slice(1);const j=(n,t,e)=>{const s=n=>Array.from(n).some((n=>n.slot===e));return s(n)||s(t)};const I=(n,t,e)=>{const s={};const o=t.map((n=>n.index));let r=0;Object.keys(n).forEach((c=>{if(o.includes(r)){s[t[o.indexOf(r)].key]=e;r++}s[c]=n[c];r++}));return s};export{o as I,p as a,I as b,j as c,l as d,m as e,a as f,f as g,r as h,v as i,i as j,c as k,y as l,h as m,A as n,T as o,g as p,F as q,D as r,u as s,k as t,s as u,d as v,O as w,w as x};
2
+ //# sourceMappingURL=p-89be0a21.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["IC_BLOCK_COLOR_COMPONENTS","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","IcInformationStatus","IcThemeForegroundEnum","IcDateInputMonths","IcShortDayNames","IcDayNames","IcWeekDays","stringEnumToArray","theEnum","arr","Object","values","forEach","val","isNaN","Number","str","push","dynamicDebounce","func","getDelay","timer","args","delay","clearTimeout","setTimeout","renderHiddenInput","always","container","name","value","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","getThemeFromContext","themeFromEvent","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","_a","includes","Default","contains","Dark","Light","isEmptyString","trim","length","isPropDefined","prop","getCssProperty","cssVar","getComputedStyle","document","documentElement","getPropertyValue","getSlotElements","slot","slotContent","firstElementChild","elements","assignedElements","childNodes","XS","replace","S","M","L","XL","UNDEFINED","isSlotUsed","element","slotName","children","some","child","getAttribute","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","pxToRem","px","base","parseInt","isNumeric","test","onComponentRequiredPropUndefined","props","component","i","propName","console","error","kebabToCamelCase","kebabCase","individualWords","split","camelCase","substring","toUpperCase","checkResizeObserver","callbackFn","window","ResizeObserver","getForm","addFormResetListener","form","addEventListener","removeFormResetListener","removeEventListener","removeDisabledFalse","removeAttribute","capitalize","text","charAt","slice","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","addDataToPosition","dataObject","newKeys","newValue","newData","newIndexes","map","key","index","controlledIndex","keys","dataKey","indexOf"],"sources":["src/utils/constants.ts","src/utils/types.ts","src/utils/helpers.ts"],"sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import {\n IcPaginationLabelTypes,\n IcPaginationTypes,\n IcPaginationAlignmentOptions,\n} from \"../components\";\n\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcThemeForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcThemeForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcTheme = {\n mode: IcThemeForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport interface IcPaginationBarOptions {\n itemsPerPageOptions?: { label: string; value: string }[];\n rangeLabelType?: IcPaginationLabelTypes;\n type?: IcPaginationTypes;\n showItemsPerPageControl?: boolean;\n showGoToPageControl?: boolean;\n alignment?: IcPaginationAlignmentOptions;\n appearance?: IcThemeForeground;\n itemLabel?: string;\n pageLabel?: string;\n hideRangeLabel?: boolean;\n hideAllFromItemsPerPage?: boolean;\n}\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcDateFormat = \"DD/MM/YYYY\" | \"MM/DD/YYYY\" | \"YYYY/MM/DD\";\n\nexport enum IcDateInputMonths {\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n}\n\nexport enum IcShortDayNames {\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n}\n\nexport enum IcDayNames {\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n}\n\nexport enum IcWeekDays {\n Sunday = 0,\n Monday = 1,\n Tuesday = 2,\n Wednesday = 3,\n Thursday = 4,\n Friday = 5,\n Saturday = 6,\n}\n\nexport interface IcValueEventDetail {\n value: string | string[];\n keyPressed?: string;\n}\n","/**\n * To investigate:\n * IcColorRGBA works via @ukic/web-components but IcThemeForeground does not even though they are exported\n * from @ukic/web-components in the same file. Why?\n */\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"@ukic/web-components\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\"; // Using @ukic/web-components/dist/types/utils/constants does not work so duplicated constants into canary package\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"./types\"; // Using @ukic/web-components/dist/types/utils/types does not work so duplicated constants into canary package\nimport { EventEmitter } from \"@stencil/core\";\nimport { IcDataTableDataType } from \"../interface\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\nexport const dynamicDebounce = (\n func: (...args: unknown[]) => void,\n getDelay: () => number\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n const delay = getDelay();\n clearTimeout(timer);\n timer = setTimeout(func, delay, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | Date | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : null;\n } else {\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean =>\n value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground =>\n getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean =>\n Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean =>\n !!el.shadowRoot && !!el.attachShadow;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator ? navigator.maxTouchPoints > 0 : false;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === \"anywhere\"\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\n};\n\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean =>\n element.scrollWidth > element.clientWidth;\n\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\nexport const isNumeric = (value: string): boolean => {\n return /^-?\\d+$/.test(value);\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement => el.closest(\"FORM\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean => {\n return window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n};\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const capitalize = (text: string): string => {\n return text.charAt(0).toUpperCase() + text.slice(1);\n};\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) => (node as Element).slot === slotName);\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const addDataToPosition = (\n dataObject: IcDataTableDataType,\n newKeys: { key: string; index: number }[],\n newValue: unknown\n): IcDataTableDataType => {\n const newData: IcDataTableDataType = {};\n const newIndexes = newKeys.map((key) => key.index);\n let controlledIndex = 0; // When a new key is added to the data, need to increment the index to account for this new object value\n\n Object.keys(dataObject).forEach((dataKey) => {\n if (newIndexes.includes(controlledIndex)) {\n newData[newKeys[newIndexes.indexOf(controlledIndex)].key] = newValue;\n controlledIndex++;\n }\n newData[dataKey] = dataObject[dataKey];\n controlledIndex++;\n });\n return newData;\n};\n"],"mappings":"AAkEO,MAAMA,EAA4B,CACvC,UACA,oBACA,YACA,qBACA,YAGK,MAAMC,EAA4B,CAAC,YAMnC,MAAMC,EAA+C,CAC1D,WAAY,CAAC,Y,ICnDHC,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,iBACAA,EAAA,oBACD,EAJD,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as a}from"./p-8455d1bb.js";import{f as r,q as s}from"./p-9397b15b.js";const n='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative;color:var(--ic-typography-color, var(--ic-color-primary-text))}:host(.ic-typography-vertical-margins-h1){margin:0 0 var(--ic-space-xl)}:host(.ic-typography-vertical-margins-h2){margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}:host(.ic-typography-vertical-margins-h3){margin:var(--ic-space-xl) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-h4){margin:var(--ic-space-lg) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-subtitle-large),:host(.ic-typography-vertical-margins-subtitle-small),:host(.ic-typography-vertical-margins-body),:host(.ic-typography-vertical-margins-code-large),:host(.ic-typography-vertical-margins-code-small),:host(.ic-typography-vertical-margins-code-extra-small){margin:0 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-caption),:host(.ic-typography-vertical-margins-caption-uppercase){margin:0 0 var(--ic-space-xs)}:host(.ic-typography-vertical-margins-h2:first-child),:host(.ic-typography-vertical-margins-h3:first-child),:host(.ic-typography-vertical-margins-h4:first-child){margin-top:0}:host(.ic-typography-h1){font:var(--ic-font-h1) !important}:host(.ic-typography-h2){font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-h3){font:var(--ic-font-h3)}:host(.ic-typography-h4){font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-large){font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-small){font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-body){font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-caption){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-caption-uppercase){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}:host(.ic-typography-label){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-label-uppercase){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}:host(.ic-typography-code-large){font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-code-small){font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-code-extra-small){font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-badge){font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-badge-small){font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-no-wrap){white-space:nowrap}:host ::slotted(h1),:host ::slotted(h2),:host ::slotted(h3),:host ::slotted(h4),:host ::slotted(h5),:host ::slotted(h6),:host ::slotted(p),:host ::slotted(label){font:inherit;letter-spacing:inherit}.trunc-wrapper{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden;padding-right:var(--ellipsis-padding-right, 0)}.trunc-btn{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}.trunc-btn:hover,.trunc-btn.focus{outline:none;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none;cursor:pointer}:host(.ic-typography-strikethrough){text-decoration:line-through}:host(.ic-typography-underline){text-decoration:underline}:host(.ic-typography-underline.ic-typography-strikethrough){text-decoration:line-through underline}:host(.ic-typography-italic){font-style:italic !important}:host(.ic-typography-bold){font-weight:var(--ic-font-weight-bold)}:host(.ic-theme-dark),:host(.ic-theme-light){--ic-typography-color:var(--ic-color-primary-text)}:host(.in-ag-grid),:host(.in-ag-grid) ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@supports (text-underline-offset: 25%){.trunc-btn:hover,.trunc-btn.focus{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}';const c=class{constructor(e){t(this,e);this.typographyTruncationExpandToggle=i(this,"typographyTruncationExpandToggle",7);this.focusBtnFromKeyboard=true;this.inAGGrid=false;this.lastMarkerTop=0;this.lastWidth=0;this.resizeObserver=null;this.truncatedHeight=0;this.toggleExpanded=t=>{t.stopPropagation();this.expanded=!this.expanded;this.typographyTruncationExpandToggle.emit({expanded:this.expanded,typographyEl:this.el})};this.checkMarkerPosition=(t,i)=>{if(i-t<this.truncatedHeight){this.truncated=false;this.expanded=false}else{this.truncated=true}};this.getElementTop=t=>t.getClientRects?t.getClientRects()[0].top:0;this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeInterval);this.resizeInterval=window.setTimeout(this.resizeObserverCallback,50)}));this.resizeObserver.observe(this.truncWrapperEl)};this.resizeObserverCallback=()=>{if(this.lastWidth===this.el.clientWidth){return}if(this.truncatedHeight===0){this.checkMaxLines(this.el.clientHeight);return}const t=this.getElementTop(this.marker);if(t===this.lastMarkerTop){return}this.checkMarkerPosition(this.getElementTop(this.el),t);this.lastMarkerTop=t;this.lastWidth=this.el.clientWidth};this.truncButtonFocus=()=>{if(this.focusBtnFromKeyboard){this.truncButtonFocussed=true}};this.truncButtonBlur=()=>{this.focusBtnFromKeyboard=true;this.truncButtonFocussed=false};this.truncButtonFocusFromMouse=()=>{this.focusBtnFromKeyboard=false};this.truncated=false;this.truncButtonFocussed=false;this.applyVerticalMargins=false;this.bold=false;this.italic=false;this.maxLines=undefined;this.strikethrough=false;this.theme="inherit";this.underline=false;this.variant="body";this.expanded=false}watchExpandedHandler(){this.el.setAttribute("style",`--truncation-max-lines: ${this.expanded?"initial":this.maxLines}`)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}async resetTruncation(){if(this.truncated){this.truncated=false;this.maxLines=0;this.el.removeAttribute("max-lines");this.expanded=false;this.el.removeAttribute("style")}}componentDidLoad(){var t,i;if((this.variant==="body"||((i=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||i===void 0?void 0:i.tagName)==="IC-TOOLTIP")&&this.maxLines>0){const t=document.createElement("span");t.style.visibility="hidden";this.el.appendChild(t);this.marker=t;this.lastWidth=this.el.clientWidth;this.checkMaxLines(this.el.clientHeight);r(this.runResizeObserver)}}componentWillRender(){if(s(this.el)){this.inAGGrid=true}}async checkMaxLines(t){const i=Math.floor(t/24);if(i>this.maxLines){this.el.setAttribute("style",`--truncation-max-lines: ${this.maxLines}`);this.truncatedHeight=this.el.clientHeight;this.truncated=true}}async setShowHideExpanded(t){this.expanded=t}render(){var t,i;const{variant:a,applyVerticalMargins:r,maxLines:s,truncated:n,expanded:c,strikethrough:h,underline:l,italic:p,bold:d,theme:g}=this;return e(o,{class:{[`ic-typography-${a}`]:true,[`ic-typography-vertical-margins-${a}`]:r,["ic-typography-bold"]:d,["ic-typography-italic"]:p,["ic-typography-strikethrough"]:h,["ic-typography-underline"]:l,["in-ag-grid"]:this.inAGGrid,[`ic-theme-${g}`]:g!=="inherit"}},(a==="body"||((i=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||i===void 0?void 0:i.tagName)==="IC-TOOLTIP")&&s>0?e("div",{class:"trunc-wrapper",ref:t=>this.truncWrapperEl=t},e("slot",null)):e("slot",null),a==="body"&&s>0&&n&&e("button",{class:{"trunc-btn":true,focus:this.truncButtonFocussed},onFocus:this.truncButtonFocus,onBlur:this.truncButtonBlur,onMouseDown:this.truncButtonFocusFromMouse,onClick:this.toggleExpanded},c?"See less":"See more"))}get el(){return a(this)}static get watchers(){return{expanded:["watchExpandedHandler"]}}};c.style=n;export{c as ic_typography};
2
- //# sourceMappingURL=p-306def43.entry.js.map
1
+ import{r as t,c as i,h as e,H as o,g as a}from"./p-8455d1bb.js";import{f as r,q as s}from"./p-043cf5de.js";const n='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative;color:var(--ic-typography-color, var(--ic-color-text-primary))}:host(.ic-typography-vertical-margins-h1){margin:0 0 var(--ic-space-xl)}:host(.ic-typography-vertical-margins-h2){margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}:host(.ic-typography-vertical-margins-h3){margin:var(--ic-space-xl) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-h4){margin:var(--ic-space-lg) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-subtitle-large),:host(.ic-typography-vertical-margins-subtitle-small),:host(.ic-typography-vertical-margins-body),:host(.ic-typography-vertical-margins-code-large),:host(.ic-typography-vertical-margins-code-small),:host(.ic-typography-vertical-margins-code-extra-small){margin:0 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-caption),:host(.ic-typography-vertical-margins-caption-uppercase){margin:0 0 var(--ic-space-xs)}:host(.ic-typography-vertical-margins-h2:first-child),:host(.ic-typography-vertical-margins-h3:first-child),:host(.ic-typography-vertical-margins-h4:first-child){margin-top:0}:host(.ic-typography-h1){font:var(--ic-font-h1) !important}:host(.ic-typography-h2){font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-h3){font:var(--ic-font-h3)}:host(.ic-typography-h4){font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-large){font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-small){font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-body){font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-caption){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-caption-uppercase){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}:host(.ic-typography-label){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-label-uppercase){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}:host(.ic-typography-code-large){font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-code-small){font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-code-extra-small){font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-badge){font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-badge-small){font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-no-wrap){white-space:nowrap}:host ::slotted(h1),:host ::slotted(h2),:host ::slotted(h3),:host ::slotted(h4),:host ::slotted(h5),:host ::slotted(h6),:host ::slotted(p),:host ::slotted(label){font:inherit;letter-spacing:inherit}.trunc-wrapper{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden;padding-right:var(--ellipsis-padding-right, 0)}.trunc-btn{border:none;background:none;padding:0;color:var(--ic-color-text-primary);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}.trunc-btn:hover,.trunc-btn.focus{outline:none;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none;cursor:pointer}:host(.ic-typography-strikethrough){text-decoration:line-through}:host(.ic-typography-underline){text-decoration:underline}:host(.ic-typography-underline.ic-typography-strikethrough){text-decoration:line-through underline}:host(.ic-typography-italic){font-style:italic !important}:host(.ic-typography-bold){font-weight:var(--ic-font-weight-bold)}:host(.ic-theme-dark),:host(.ic-theme-light){--ic-typography-color:var(--ic-color-text-primary)}:host(.in-ag-grid),:host(.in-ag-grid) ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@supports (text-underline-offset: 25%){.trunc-btn:hover,.trunc-btn.focus{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}';const c=class{constructor(e){t(this,e);this.typographyTruncationExpandToggle=i(this,"typographyTruncationExpandToggle",7);this.focusBtnFromKeyboard=true;this.inAGGrid=false;this.lastMarkerTop=0;this.lastWidth=0;this.resizeObserver=null;this.truncatedHeight=0;this.toggleExpanded=t=>{t.stopPropagation();this.expanded=!this.expanded;this.typographyTruncationExpandToggle.emit({expanded:this.expanded,typographyEl:this.el})};this.checkMarkerPosition=(t,i)=>{if(i-t<this.truncatedHeight){this.truncated=false;this.expanded=false}else{this.truncated=true}};this.getElementTop=t=>t.getClientRects&&t.getClientRects()[0]?t.getClientRects()[0].top:0;this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeInterval);this.resizeInterval=window.setTimeout(this.resizeObserverCallback,50)}));this.resizeObserver.observe(this.truncWrapperEl)};this.resizeObserverCallback=()=>{if(this.lastWidth===this.el.clientWidth){return}if(this.truncatedHeight===0){this.checkMaxLines(this.el.clientHeight);return}const t=this.getElementTop(this.marker);if(t===this.lastMarkerTop){return}this.checkMarkerPosition(this.getElementTop(this.el),t);this.lastMarkerTop=t;this.lastWidth=this.el.clientWidth};this.truncButtonFocus=()=>{if(this.focusBtnFromKeyboard){this.truncButtonFocussed=true}};this.truncButtonBlur=()=>{this.focusBtnFromKeyboard=true;this.truncButtonFocussed=false};this.truncButtonFocusFromMouse=()=>{this.focusBtnFromKeyboard=false};this.truncated=false;this.truncButtonFocussed=false;this.applyVerticalMargins=false;this.bold=false;this.italic=false;this.maxLines=undefined;this.strikethrough=false;this.theme="inherit";this.underline=false;this.variant="body";this.expanded=false}watchExpandedHandler(){this.el.setAttribute("style",`--truncation-max-lines: ${this.expanded?"initial":this.maxLines}`)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}async resetTruncation(){if(this.truncated){this.truncated=false;this.maxLines=0;this.el.removeAttribute("max-lines");this.expanded=false;this.el.removeAttribute("style")}}componentDidLoad(){var t,i;if((this.variant==="body"||((i=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||i===void 0?void 0:i.tagName)==="IC-TOOLTIP")&&this.maxLines>0){const t=document.createElement("span");t.style.visibility="hidden";this.el.appendChild(t);this.marker=t;this.lastWidth=this.el.clientWidth;this.checkMaxLines(this.el.clientHeight);r(this.runResizeObserver)}}componentWillRender(){if(s(this.el)){this.inAGGrid=true}}async checkMaxLines(t){const i=Math.floor(t/24);if(i>this.maxLines){this.el.setAttribute("style",`--truncation-max-lines: ${this.maxLines}`);this.truncatedHeight=this.el.clientHeight;this.truncated=true}}async setShowHideExpanded(t){this.expanded=t}render(){var t,i;const{variant:a,applyVerticalMargins:r,maxLines:s,truncated:n,expanded:c,strikethrough:h,underline:l,italic:p,bold:d,theme:g}=this;return e(o,{class:{[`ic-typography-${a}`]:true,[`ic-typography-vertical-margins-${a}`]:r,["ic-typography-bold"]:d,["ic-typography-italic"]:p,["ic-typography-strikethrough"]:h,["ic-typography-underline"]:l,["in-ag-grid"]:this.inAGGrid,[`ic-theme-${g}`]:g!=="inherit"}},(a==="body"||((i=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||i===void 0?void 0:i.tagName)==="IC-TOOLTIP")&&s>0?e("div",{class:"trunc-wrapper",ref:t=>this.truncWrapperEl=t},e("slot",null)):e("slot",null),a==="body"&&s>0&&n&&e("button",{class:{"trunc-btn":true,focus:this.truncButtonFocussed},onFocus:this.truncButtonFocus,onBlur:this.truncButtonBlur,onMouseDown:this.truncButtonFocusFromMouse,onClick:this.toggleExpanded},c?"See less":"See more"))}get el(){return a(this)}static get watchers(){return{expanded:["watchExpandedHandler"]}}};c.style=n;export{c as ic_typography};
2
+ //# sourceMappingURL=p-8bec76d1.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icTypographyCss","Typography","constructor","hostRef","this","focusBtnFromKeyboard","inAGGrid","lastMarkerTop","lastWidth","resizeObserver","truncatedHeight","toggleExpanded","ev","stopPropagation","expanded","typographyTruncationExpandToggle","emit","typographyEl","el","checkMarkerPosition","elTop","markerTop","truncated","getElementTop","getClientRects","top","runResizeObserver","ResizeObserver","clearTimeout","resizeInterval","window","setTimeout","resizeObserverCallback","observe","truncWrapperEl","clientWidth","checkMaxLines","clientHeight","marker","truncButtonFocus","truncButtonFocussed","truncButtonBlur","truncButtonFocusFromMouse","applyVerticalMargins","bold","italic","maxLines","undefined","strikethrough","theme","underline","variant","watchExpandedHandler","setAttribute","disconnectedCallback","disconnect","resetTruncation","removeAttribute","componentDidLoad","_a","_b","getRootNode","host","tagName","document","createElement","style","visibility","appendChild","checkResizeObserver","componentWillRender","isElInAGGrid","height","numLines","Math","floor","setShowHideExpanded","render","h","Host","class","ref","focus","onFocus","onBlur","onMouseDown","onClick"],"sources":["../web-components/dist/collection/components/ic-typography/ic-typography.css?tag=ic-typography&encapsulation=shadow","../web-components/dist/collection/components/ic-typography/ic-typography.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: block;\n position: relative;\n color: var(--ic-typography-color, var(--ic-color-text-primary));\n}\n\n:host(.ic-typography-vertical-margins-h1) {\n margin: 0 0 var(--ic-space-xl);\n}\n\n:host(.ic-typography-vertical-margins-h2) {\n margin: var(--ic-space-xxl) 0 var(--ic-space-lg);\n}\n\n:host(.ic-typography-vertical-margins-h3) {\n margin: var(--ic-space-xl) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-h4) {\n margin: var(--ic-space-lg) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small) {\n margin: 0 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase) {\n margin: 0 0 var(--ic-space-xs);\n}\n\n:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child) {\n margin-top: 0;\n}\n\n:host(.ic-typography-h1) {\n font: var(--ic-font-h1) !important;\n}\n\n:host(.ic-typography-h2) {\n font: var(--ic-font-h2);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-h3) {\n font: var(--ic-font-h3);\n}\n\n:host(.ic-typography-h4) {\n font: var(--ic-font-h4);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-large) {\n font: var(--ic-font-subtitle-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-small) {\n font: var(--ic-font-subtitle-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-body) {\n font: var(--ic-font-body);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-caption) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-caption-uppercase) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-label) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-label-uppercase) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-code-large) {\n font: var(--ic-font-code-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-code-small) {\n font: var(--ic-font-code-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-code-extra-small) {\n font: var(--ic-font-code-extra-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-badge) {\n font: var(--ic-font-badge);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-badge-small) {\n font: var(--ic-font-badge-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-no-wrap) {\n white-space: nowrap;\n}\n\n:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label) {\n font: inherit;\n letter-spacing: inherit;\n}\n\n.trunc-wrapper {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n line-clamp: var(--truncation-max-lines, initial);\n -webkit-line-clamp: var(--truncation-max-lines, initial);\n overflow: hidden;\n padding-right: var(--ellipsis-padding-right, 0);\n}\n\n.trunc-btn {\n border: none;\n background: none;\n padding: 0;\n color: var(--ic-color-text-primary);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n.trunc-btn:hover,\n.trunc-btn.focus {\n outline: none;\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n cursor: pointer;\n}\n\n:host(.ic-typography-strikethrough) {\n text-decoration: line-through;\n}\n\n:host(.ic-typography-underline) {\n text-decoration: underline;\n}\n\n:host(.ic-typography-underline.ic-typography-strikethrough) {\n text-decoration: line-through underline;\n}\n\n:host(.ic-typography-italic) {\n font-style: italic !important;\n}\n\n:host(.ic-typography-bold) {\n font-weight: var(--ic-font-weight-bold);\n}\n\n:host(.ic-theme-dark),\n:host(.ic-theme-light) {\n --ic-typography-color: var(--ic-color-text-primary);\n}\n\n:host(.in-ag-grid),\n:host(.in-ag-grid) ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n@supports (text-underline-offset: 25%) {\n .trunc-btn:hover,\n .trunc-btn.focus {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host,\n .trunc-btn {\n color: var(--ic-architectural-white);\n }\n} */\n","import { h, Host, } from \"@stencil/core\";\nimport { checkResizeObserver, isElInAGGrid } from \"../../utils/helpers\";\nexport class Typography {\n constructor() {\n this.focusBtnFromKeyboard = true;\n this.inAGGrid = false;\n this.lastMarkerTop = 0;\n this.lastWidth = 0;\n this.resizeObserver = null;\n this.truncatedHeight = 0;\n this.toggleExpanded = (ev) => {\n ev.stopPropagation();\n this.expanded = !this.expanded;\n this.typographyTruncationExpandToggle.emit({\n expanded: this.expanded,\n typographyEl: this.el,\n });\n };\n this.checkMarkerPosition = (elTop, markerTop) => {\n if (markerTop - elTop < this.truncatedHeight) {\n this.truncated = false;\n this.expanded = false;\n }\n else {\n this.truncated = true;\n }\n };\n this.getElementTop = (el) => {\n return el.getClientRects && el.getClientRects()[0]\n ? el.getClientRects()[0].top\n : 0;\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeInterval);\n this.resizeInterval = window.setTimeout(this.resizeObserverCallback, 50);\n });\n this.resizeObserver.observe(this.truncWrapperEl);\n };\n this.resizeObserverCallback = () => {\n if (this.lastWidth === this.el.clientWidth) {\n return;\n }\n if (this.truncatedHeight === 0) {\n this.checkMaxLines(this.el.clientHeight);\n return;\n }\n const markerTop = this.getElementTop(this.marker);\n if (markerTop === this.lastMarkerTop) {\n return;\n }\n this.checkMarkerPosition(this.getElementTop(this.el), markerTop);\n this.lastMarkerTop = markerTop;\n this.lastWidth = this.el.clientWidth;\n };\n this.truncButtonFocus = () => {\n if (this.focusBtnFromKeyboard) {\n this.truncButtonFocussed = true;\n }\n };\n this.truncButtonBlur = () => {\n this.focusBtnFromKeyboard = true;\n this.truncButtonFocussed = false;\n };\n this.truncButtonFocusFromMouse = () => {\n this.focusBtnFromKeyboard = false;\n };\n this.truncated = false;\n this.truncButtonFocussed = false;\n this.applyVerticalMargins = false;\n this.bold = false;\n this.italic = false;\n this.maxLines = undefined;\n this.strikethrough = false;\n this.theme = \"inherit\";\n this.underline = false;\n this.variant = \"body\";\n this.expanded = false;\n }\n watchExpandedHandler() {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.expanded ? \"initial\" : this.maxLines}`);\n }\n disconnectedCallback() {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n /**\n * @internal This is used by data table to remove all truncation in certain events\n */\n async resetTruncation() {\n if (this.truncated) {\n this.truncated = false;\n this.maxLines = 0;\n this.el.removeAttribute(\"max-lines\");\n this.expanded = false;\n this.el.removeAttribute(\"style\");\n }\n }\n componentDidLoad() {\n var _a, _b;\n if ((this.variant === \"body\" ||\n ((_b = (_a = this.el.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.tagName) ===\n \"IC-TOOLTIP\") &&\n this.maxLines > 0) {\n const marker = document.createElement(\"span\");\n marker.style.visibility = \"hidden\";\n this.el.appendChild(marker);\n this.marker = marker;\n this.lastWidth = this.el.clientWidth;\n this.checkMaxLines(this.el.clientHeight);\n checkResizeObserver(this.runResizeObserver);\n }\n }\n componentWillRender() {\n if (isElInAGGrid(this.el)) {\n this.inAGGrid = true;\n }\n }\n /**\n * @internal This checks if the number of lines of text exceeds the maxLines prop. If so, set the line clamp CSS to the max lines\n * @param height - text container height\n */\n async checkMaxLines(height) {\n //24 is the height of a single line\n const numLines = Math.floor(height / 24);\n if (numLines > this.maxLines) {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.maxLines}`);\n this.truncatedHeight = this.el.clientHeight;\n this.truncated = true;\n }\n }\n /**\n * @internal This method makes it possible to set the expanded status of truncated text outside of ic-typography component\n */\n async setShowHideExpanded(expanded) {\n this.expanded = expanded;\n }\n render() {\n var _a, _b;\n const { variant, applyVerticalMargins, maxLines, truncated, expanded, strikethrough, underline, italic, bold, theme, } = this;\n return (h(Host, { class: {\n [`ic-typography-${variant}`]: true,\n [`ic-typography-vertical-margins-${variant}`]: applyVerticalMargins,\n [\"ic-typography-bold\"]: bold,\n [\"ic-typography-italic\"]: italic,\n [\"ic-typography-strikethrough\"]: strikethrough,\n [\"ic-typography-underline\"]: underline,\n [\"in-ag-grid\"]: this.inAGGrid,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n } }, (variant === \"body\" ||\n ((_b = (_a = this.el.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.tagName) ===\n \"IC-TOOLTIP\") &&\n maxLines > 0 ? (h(\"div\", { class: \"trunc-wrapper\", ref: (el) => (this.truncWrapperEl = el) }, h(\"slot\", null))) : (h(\"slot\", null)), variant === \"body\" && maxLines > 0 && truncated && (h(\"button\", { class: { \"trunc-btn\": true, focus: this.truncButtonFocussed }, onFocus: this.truncButtonFocus, onBlur: this.truncButtonBlur, onMouseDown: this.truncButtonFocusFromMouse, onClick: this.toggleExpanded }, expanded ? \"See less\" : \"See more\"))));\n }\n static get is() { return \"ic-typography\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-typography.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-typography.css\"]\n };\n }\n static get properties() {\n return {\n \"applyVerticalMargins\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, appropriate top and bottom margins will be applied to the typography.\"\n },\n \"attribute\": \"apply-vertical-margins\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"bold\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the typography will have a bold font weight.\\nNote: This will have no impact on variants that already use an equivalent or higher font weight (h1, h2, and subtitle-large).\"\n },\n \"attribute\": \"bold\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"italic\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the typography will have an italic font style.\"\n },\n \"attribute\": \"italic\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"maxLines\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The number of lines to display before truncating the text, only used for the 'body' variant.\"\n },\n \"attribute\": \"max-lines\",\n \"reflect\": false\n },\n \"strikethrough\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the typography will have a line through it.\"\n },\n \"attribute\": \"strikethrough\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the text color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"underline\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the typography will have a line under it.\"\n },\n \"attribute\": \"underline\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcTypographyVariants\",\n \"resolved\": \"\\\"badge\\\" | \\\"badge-small\\\" | \\\"body\\\" | \\\"caption\\\" | \\\"caption-uppercase\\\" | \\\"code-extra-small\\\" | \\\"code-large\\\" | \\\"code-small\\\" | \\\"h1\\\" | \\\"h2\\\" | \\\"h3\\\" | \\\"h4\\\" | \\\"label\\\" | \\\"label-uppercase\\\" | \\\"subtitle-large\\\" | \\\"subtitle-small\\\"\",\n \"references\": {\n \"IcTypographyVariants\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcTypographyVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ICDS typography style to use.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"body\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"truncated\": {},\n \"truncButtonFocussed\": {},\n \"expanded\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"typographyTruncationExpandToggle\",\n \"name\": \"typographyTruncationExpandToggle\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emits and event when the typography truncation button has been clicked.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"{\\n expanded: boolean;\\n typographyEl: HTMLIcTypographyElement;\\n }\",\n \"resolved\": \"{ expanded: boolean; typographyEl: HTMLIcTypographyElement; }\",\n \"references\": {\n \"HTMLIcTypographyElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcTypographyElement\"\n }\n }\n }\n }];\n }\n static get methods() {\n return {\n \"resetTruncation\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"This is used by data table to remove all truncation in certain events\"\n }]\n }\n },\n \"checkMaxLines\": {\n \"complexType\": {\n \"signature\": \"(height: number) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"height\",\n \"type\": \"number\",\n \"docs\": \"- text container height\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"This checks if the number of lines of text exceeds the maxLines prop. If so, set the line clamp CSS to the max lines\"\n }, {\n \"name\": \"param\",\n \"text\": \"height - text container height\"\n }]\n }\n },\n \"setShowHideExpanded\": {\n \"complexType\": {\n \"signature\": \"(expanded: boolean) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"expanded\",\n \"type\": \"boolean\",\n \"docs\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"This method makes it possible to set the expanded status of truncated text outside of ic-typography component\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"expanded\",\n \"methodName\": \"watchExpandedHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-typography.js.map\n"],"mappings":"2GAAA,MAAMA,EAAkB,qrN,MCEXC,EAAU,MACnB,WAAAC,CAAAC,G,6FACIC,KAAKC,qBAAuB,KAC5BD,KAAKE,SAAW,MAChBF,KAAKG,cAAgB,EACrBH,KAAKI,UAAY,EACjBJ,KAAKK,eAAiB,KACtBL,KAAKM,gBAAkB,EACvBN,KAAKO,eAAkBC,IACnBA,EAAGC,kBACHT,KAAKU,UAAYV,KAAKU,SACtBV,KAAKW,iCAAiCC,KAAK,CACvCF,SAAU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Y,I,EAMzB,yBAAMsD,CAAoB9D,GACtBV,KAAKU,SAAWA,C,CAEpB,MAAA+D,GACI,IAAIlB,EAAIC,EACR,MAAMT,QAAEA,EAAOR,qBAAEA,EAAoBG,SAAEA,EAAQxB,UAAEA,EAASR,SAAEA,EAAQkC,cAAEA,EAAaE,UAAEA,EAASL,OAAEA,EAAMD,KAAEA,EAAIK,MAAEA,GAAW7C,KACzH,OAAQ0E,EAAEC,EAAM,CAAEC,MAAO,CACjB,CAAC,iBAAiB7B,KAAY,KAC9B,CAAC,kCAAkCA,KAAYR,EAC/C,CAAC,sBAAuBC,EACxB,CAAC,wBAAyBC,EAC1B,CAAC,+BAAgCG,EACjC,CAAC,2BAA4BE,EAC7B,CAAC,cAAe9C,KAAKE,SACrB,CAAC,YAAY2C,KAAUA,IAAU,aAC/BE,IAAY,UAChBS,GAAMD,EAAKvD,KAAKc,GAAG2C,iBAAmB,MAAQF,SAAY,OAAS,EAAIA,EAAGG,QAAU,MAAQF,SAAY,OAAS,EAAIA,EAAGG,WACtH,eACJjB,EAAW,EAAKgC,EAAE,MAAO,CAAEE,MAAO,gBAAiBC,IAAM/D,GAAQd,KAAK8B,eAAiBhB,GAAO4D,EAAE,OAAQ,OAAWA,EAAE,OAAQ,MAAQ3B,IAAY,QAAUL,EAAW,GAAKxB,GAAcwD,EAAE,SAAU,CAAEE,MAAO,CAAE,YAAa,KAAME,MAAO9E,KAAKoC,qBAAuB2C,QAAS/E,KAAKmC,iBAAkB6C,OAAQhF,KAAKqC,gBAAiB4C,YAAajF,KAAKsC,0BAA2B4C,QAASlF,KAAKO,gBAAkBG,EAAW,WAAa,Y"}
@@ -0,0 +1,2 @@
1
+ import{r as i,h as t,H as e,g as o}from"./p-8455d1bb.js";import{D as s,g as n,e as a,x as r}from"./p-043cf5de.js";import{C as h}from"./p-170ddfc2.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-typography-color:currentcolor}:host(.in-side-menu){border-bottom:var(--ic-border-width) solid var(--ic-architectural-200);padding:var(--ic-space-md) 0}:host .navigation-group{height:100%;width:-moz-fit-content;width:fit-content;color:var(--ic-theme-text);display:flex;align-items:center;justify-content:center;padding:0 var(--ic-space-md) var(--ic-space-xxs);transition:var(--ic-easing-transition-slow);position:relative;background:none;border:none;white-space:nowrap}:host(.in-side-menu) .navigation-group{height:2.5rem;width:100%;text-align:left}:host(.in-side-menu) .navigation-group .ic-typography-label{width:11.875rem}:host(.in-side-menu) .navigation-group-side-menu{color:var(--ic-action-default);justify-content:flex-start;padding:0 var(--ic-space-md) 0 var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-collapsed,:host(.in-side-menu) .navigation-group-side-menu-expanded{color:var(--ic-action-default);justify-content:flex-start;padding-left:var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-expanded{margin-bottom:var(--ic-space-xs)}:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,:host(.in-side-menu) .navigation-group-side-menu-expanded::after{border-style:solid;border-width:0.125em 0.125em 0 0;content:"";display:inline-block;height:0.45em;left:0.75em;position:relative;top:-0.1em;transform:rotate(135deg);vertical-align:top;width:0.45em}:host(.in-side-menu) .navigation-group-side-menu-expanded::after{top:0.15em;transform:rotate(-45deg)}:host .navigation-group:hover,:host .navigation-group:active,:host .selected{background-color:var(--ic-architectural-20);color:var(--ic-color-text-primary-light);outline:none;cursor:pointer}:host(:not(.in-side-menu)) .navigation-group:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);z-index:var(--ic-z-index-navigation-item);transition:box-shadow var(--ic-easing-transition-fast)}:host(.in-side-menu) .navigation-group-side-menu:hover,:host(.in-side-menu) .navigation-group-side-menu:active,:host(.in-side-menu) .navigation-group-side-menu:focus{background-color:var(--ic-architectural-20);color:var(--ic-action-default);cursor:auto;box-shadow:none;outline:none}:host(.in-side-menu) .navigation-group-side-menu:focus{outline:var(--ic-hc-focus-outline)}:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus){background-color:var(--ic-action-dark-bg-hover);color:var(--ic-action-default);cursor:pointer}:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus){background-color:var(--ic-action-dark-bg-pressed);color:var(--ic-action-default)}:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus{color:var(--ic-action-default);box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline)}:host .navigation-group-dropdown{background-color:var(--ic-architectural-20);border-bottom:var(--ic-border-default);position:absolute;left:0;right:0;padding:var(--ic-space-xs) var(--ic-space-md);box-shadow:0 0.375rem 0.5rem -0.375rem rgba(0 0 0 / 20%);z-index:calc(var(--ic-z-index-navigation-item) - 1)}:host .navigation-group-dropdown-items-list{list-style:none;display:flex;flex-flow:column wrap;align-content:flex-start;padding-left:var(--ic-space-md);max-height:16.5rem}:host .chevron-toggle-icon-wrapper{display:flex;align-items:center}:host .chevron-toggle-icon-wrapper svg{transform:rotate(90deg);height:var(--ic-space-lg);width:var(--ic-space-lg)}:host .chevron-toggle-icon-closed svg{transform:rotate(-90deg)}:host(.ic-navigation-group-expanded) .grouped-links-wrapper{height:var(--navigation-child-items-height, auto) !important;transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.ic-navigation-group-side-nav) .link,:host(.ic-navigation-group-side-nav) ::slotted(a){height:var(--navigation-child-items-height, auto)}:host(.ic-navigation-group-collapsed) .grouped-links-wrapper{height:0;transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.ic-navigation-group-side-nav) .navigation-group{height:var(--navigation-group-height);width:var(--navigation-group-width);justify-content:var(--navigation-group-justify-content);padding-right:var(--navigation-group-expand-toggle-padding)}:host(.ic-navigation-group-side-nav) .navigation-group:hover,:host(.ic-navigation-group-side-nav) .navigation-group:active,:host(.ic-navigation-group-side-nav) .selected{background-color:var(--navigation-group-hover);color:var(--navigation-group-text-hover)}:host(.ic-navigation-group-side-nav) .navigation-group:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background:none}:host(.ic-navigation-group-side-nav) .ic-typography-caption{position:var(--navigation-group-title-position);left:var(--navigation-group-title-position-left);white-space:nowrap}';const c=class{constructor(e){i(this,e);this.allGroupedNavigationItems=[];this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS=100;this.IC_NAVIGATION_ITEM="ic-navigation-item";this.mouseGate=false;this.nodeName="IC-NAVIGATION-GROUP";this.GROUPED_LINKS_WRAPPER_CLASS=".grouped-links-wrapper";this.sideNavExpandHandler=i=>{this.isSideNavExpanded=i.detail.sideNavExpanded;const t=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);if(!t)return;if(this.isSideNavExpanded){if(this.expanded&&this.expandedNavItemsHeight){this.setGroupedLinksElementHeight(t,this.expandedNavItemsHeight)}else if(this.expanded){setTimeout((()=>{this.expandedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(t,this.expandedNavItemsHeight)}),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}}else{if(this.expanded&&this.collapsedNavItemsHeight){this.setGroupedLinksElementHeight(t,this.collapsedNavItemsHeight)}else if(this.expanded){setTimeout((()=>{this.collapsedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(t,this.collapsedNavItemsHeight)}),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}}};this.topNavResizedHandler=({detail:i})=>{var t;const{size:e}=i;if(e!==this.deviceSize){this.deviceSize=e;this.inTopNavSideMenu=e<=(((t=this.parentEl)===null||t===void 0?void 0:t.customMobileBreakpoint)||s.L)}};this.setGroupedNavItemTabIndex=i=>{this.el.querySelectorAll(this.IC_NAVIGATION_ITEM).forEach((t=>{const e=t.shadowRoot.querySelector("a")||t.querySelector("a");if(e){e.setAttribute("tabindex",i)}}))};this.toggleGroupedLinkWrapperHeight=(i,t)=>{if(!i)return;if(t){if(this.isSideNavExpanded){this.setGroupedLinksElementHeight(i,this.expandedNavItemsHeight)}else{this.setGroupedLinksElementHeight(i,this.collapsedNavItemsHeight)}this.setGroupedNavItemTabIndex("0")}else{i.style.setProperty("--navigation-child-items-height","0");this.setGroupedNavItemTabIndex("-1")}};this.toggleExpanded=()=>{this.expanded=!this.expanded;const i=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);this.toggleGroupedLinkWrapperHeight(i,this.expanded)};this.handleClick=i=>{if(this.navigationType==="top"&&i.detail){this.toggleDropdown()}else{this.toggleExpanded()}};this.handleBlur=i=>{const t=i.relatedTarget;if(!this.el.contains(t)){this.hideDropdown()}};this.handleTopNavKeydown=i=>{if(i.key===" "||i.key==="Enter"){this.toggleDropdown()}else if(!this.inTopNavSideMenu&&i.key==="Escape"){this.hideDropdown()}};this.handleKeydown=i=>{if(i.key==="Enter"||i.key===" "||i.key==="Escape"){switch(this.navigationType){case"top":this.handleTopNavKeydown(i);break;case"side":this.toggleExpanded();i.preventDefault();break;default:this.toggleExpanded();break}}};this.handleMouseLeave=i=>{const t=i.relatedTarget;this.mouseGate=false;if(!this.el.contains(t)&&t!==this.dropdown&&document.activeElement!==this.el&&!this.el.contains(document.activeElement)&&(t===null||t===void 0?void 0:t.nodeName)===this.nodeName&&this.dropdownOpen===true){this.mouseGate=true;this.hideDropdown()}else if(!this.el.contains(t)&&t!==this.dropdown&&!this.el.contains(document.activeElement)){this.mouseGate=false;setTimeout((()=>{this.dropdownOpen?this.hideDropdown():null}),500)}};this.handleMouseEnter=i=>{const t=i.relatedTarget;document.addEventListener("keydown",this.handleKeydown);if((t===null||t===void 0?void 0:t.nodeName)===this.nodeName&&this.mouseGate===true){this.showDropdown()}else if(this.dropdownOpen===false&&t!==null&&this.mouseGate===false){this.mouseGate=true;setTimeout((()=>{this.mouseGate&&this.showDropdown()}),500)}};this.renderDropdownGroupedLinks=()=>t("div",{class:{["navigation-group-dropdown"]:!this.inTopNavSideMenu,["navigation-group-dropdown-side-menu"]:this.inTopNavSideMenu,["selected"]:this.dropdownOpen&&!this.inTopNavSideMenu},onMouseLeave:!this.inTopNavSideMenu?this.handleMouseLeave:null,ref:i=>this.dropdown=i},t("nav",{class:{["navigation-group-dropdown-items"]:!this.inTopNavSideMenu}},t("ul",null,t("slot",null))));this.renderGroupedLinks=()=>t("ul",{class:"grouped-links-wrapper"},t("slot",null));this.getNavigationChildItemsHeight=()=>{let i=0;this.allGroupedNavigationItems.forEach((t=>{i+=t.offsetHeight}));return`${i}px`};this.setInitialGroupedLinksWrapperHeight=()=>{const i=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);if(!i)return;if(!this.isSideNavExpanded&&!this.collapsedNavItemsHeight&&this.expanded){this.collapsedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(i,this.collapsedNavItemsHeight)}if(this.isSideNavExpanded&&this.expanded){this.expandedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(i,this.expandedNavItemsHeight)}};this.renderNavigationItems=()=>{if(this.dropdownOpen||this.inTopNavSideMenu&&!this.expandable){return this.renderDropdownGroupedLinks()}if(this.navigationType!=="top"){return this.renderGroupedLinks()}return null};this.deviceSize=s.XL;this.dropdownOpen=false;this.expanded=true;this.focusStyle=n();this.inTopNavSideMenu=false;this.navigationType=undefined;this.parentEl=undefined;this.expandable=false;this.label=undefined}disconnectedCallback(){if(this.navigationType==="side"){this.parentEl.removeEventListener("icSideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.removeEventListener("icTopNavResized",this.topNavResizedHandler)}}componentWillLoad(){this.deviceSize=a();const{navType:i,parent:t}=r(this.el);this.navigationType=i;this.parentEl=t;if(this.navigationType==="side"){this.parentEl.addEventListener("icSideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.addEventListener("icTopNavResized",this.topNavResizedHandler);if(this.deviceSize<=this.parentEl.customMobileBreakpoint)this.inTopNavSideMenu=true}}componentDidLoad(){this.allGroupedNavigationItems=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}childBlurHandler(){this.hideDropdown()}navItemClickHandler(){this.hideDropdown()}themeChangeHandler(i){const t=i.detail;this.focusStyle=t.mode}async setFocus(){if(this.groupEl){this.groupEl.focus()}}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}showDropdown(){if(!this.dropdownOpen){this.toggleDropdown()}}hideDropdown(){document.removeEventListener("keydown",this.handleKeydown);if(this.dropdownOpen){this.toggleDropdown()}}setGroupedLinksElementHeight(i,t){i.style.setProperty("--navigation-child-items-height",t)}render(){const{label:i,dropdownOpen:o,inTopNavSideMenu:s,expandable:n}=this;return t(e,{class:{["in-side-menu"]:s,"ic-navigation-group-expanded":this.expanded,"ic-navigation-group-collapsed":!this.expanded,["ic-navigation-group-side-nav"]:this.navigationType==="side"},role:"listitem"},t("button",{onMouseEnter:!s&&this.navigationType==="top"&&this.handleMouseEnter,onMouseLeave:this.navigationType==="top"&&this.handleMouseLeave,tabindex:s&&!n?"-1":"0",onBlur:this.handleBlur,onClick:n?this.handleClick:null,onKeyDown:this.handleKeydown,class:{["navigation-group"]:true,[this.focusStyle]:!s,["navigation-group-side-menu"]:s&&!n,["navigation-group-side-menu-collapsed"]:s&&n&&!o,["navigation-group-side-menu-expanded"]:s&&n&&o,["selected"]:o&&!s},ref:i=>this.groupEl=i,"aria-expanded":`${o||this.expanded}`,"aria-haspopup":`${!s&&this.navigationType==="top"}`},t("ic-typography",{variant:this.navigationType==="side"?"caption":"label"},i),this.navigationType==="side"&&n&&t("div",{class:{"chevron-toggle-icon-wrapper":true,"chevron-toggle-icon-closed":this.expanded},innerHTML:h})),this.renderNavigationItems())}static get delegatesFocus(){return true}get el(){return o(this)}};c.style=d;export{c as ic_navigation_group};
2
+ //# sourceMappingURL=p-94141606.entry.js.map