@ukic/web-components 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (554) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-fc4016d2.js → helpers-931fd72e.js} +30 -32
  3. package/dist/cjs/helpers-931fd72e.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-accordion.cjs.entry.js +10 -8
  6. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +2 -2
  8. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +3 -3
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js +3 -3
  13. package/dist/cjs/ic-button_3.cjs.entry.js +138 -145
  14. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -2
  16. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -5
  18. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-checkbox.cjs.entry.js +8 -13
  20. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
  23. package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
  24. package/dist/cjs/ic-dialog.cjs.entry.js +2 -2
  25. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-empty-state.cjs.entry.js +3 -3
  27. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
  29. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-hero.cjs.entry.js +7 -6
  31. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -6
  33. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +33 -27
  34. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-input-label_2.cjs.entry.js +36 -13
  36. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-link.cjs.entry.js +12 -22
  38. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  40. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-navigation-button.cjs.entry.js +31 -39
  42. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-navigation-group.cjs.entry.js +121 -166
  44. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-navigation-item.cjs.entry.js +65 -62
  46. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
  48. package/dist/cjs/ic-page-header.cjs.entry.js +7 -7
  49. package/dist/cjs/ic-pagination-item.cjs.entry.js +2 -2
  50. package/dist/cjs/ic-pagination.cjs.entry.js +5 -5
  51. package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -6
  52. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-radio-group.cjs.entry.js +6 -6
  54. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-radio-option.cjs.entry.js +5 -5
  56. package/dist/cjs/ic-search-bar.cjs.entry.js +68 -34
  57. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  59. package/dist/cjs/ic-select.cjs.entry.js +142 -218
  60. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-side-navigation.cjs.entry.js +35 -17
  62. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  64. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  65. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  66. package/dist/cjs/ic-step.cjs.entry.js +14 -14
  67. package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
  68. package/dist/cjs/ic-switch.cjs.entry.js +6 -6
  69. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  72. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  73. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-text-field.cjs.entry.js +16 -11
  75. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-theme.cjs.entry.js +2 -2
  77. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  78. package/dist/cjs/ic-toast.cjs.entry.js +4 -4
  79. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +54 -68
  80. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-toggle-button.cjs.entry.js +62 -64
  82. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-top-navigation.cjs.entry.js +74 -66
  84. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-typography.cjs.entry.js +3 -3
  86. package/dist/cjs/loader.cjs.js +1 -1
  87. package/dist/collection/ag-theme-icds.css +24 -4
  88. package/dist/collection/components/ic-accordion/ic-accordion.js +9 -7
  89. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  90. package/dist/collection/components/ic-accordion/ic-accordion.stories.js +1 -1
  91. package/dist/collection/components/ic-alert/ic-alert.css +4 -0
  92. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +2 -2
  93. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +2 -2
  94. package/dist/collection/components/ic-button/ic-button.css +0 -8
  95. package/dist/collection/components/ic-button/ic-button.js +3 -3
  96. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  97. package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +3 -0
  98. package/dist/collection/components/ic-checkbox/ic-checkbox.css +9 -1
  99. package/dist/collection/components/ic-checkbox/ic-checkbox.js +6 -11
  100. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  101. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +10 -2
  102. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +6 -3
  103. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  104. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +22 -0
  105. package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
  106. package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
  107. package/dist/collection/components/ic-dialog/ic-dialog.js +1 -1
  108. package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
  109. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
  110. package/dist/collection/components/ic-hero/ic-hero.css +13 -4
  111. package/dist/collection/components/ic-hero/ic-hero.js +5 -4
  112. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  113. package/dist/collection/components/ic-hero/ic-hero.stories.js +1 -0
  114. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
  115. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
  116. package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
  117. package/dist/collection/components/ic-input-label/ic-input-label.css +2 -1
  118. package/dist/collection/components/ic-input-label/ic-input-label.js +31 -8
  119. package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
  120. package/dist/collection/components/ic-input-validation/ic-input-validation.js +3 -3
  121. package/dist/collection/components/ic-link/ic-link.js +12 -25
  122. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  123. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +3 -3
  124. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +210 -211
  125. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
  126. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.stories.js +1 -1
  127. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.types.js.map +1 -1
  128. package/dist/collection/components/ic-menu/ic-menu.js +94 -47
  129. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  130. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  131. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +38 -47
  132. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  133. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +144 -170
  134. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  135. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +10 -14
  136. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +80 -74
  137. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  138. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
  139. package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
  140. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  141. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
  142. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +3 -0
  143. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
  144. package/dist/collection/components/ic-radio-group/ic-radio-group.css +10 -2
  145. package/dist/collection/components/ic-radio-group/ic-radio-group.js +7 -4
  146. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  147. package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +22 -0
  148. package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
  149. package/dist/collection/components/ic-search-bar/ic-search-bar.js +96 -34
  150. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  151. package/dist/collection/components/ic-search-bar/ic-search-bar.stories.js +29 -18
  152. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  153. package/dist/collection/components/ic-select/ic-select.js +197 -271
  154. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  155. package/dist/collection/components/ic-select/ic-select_(multi).stories.js +21 -13
  156. package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +21 -13
  157. package/dist/collection/components/ic-select/ic-select_(single).stories.js +47 -30
  158. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +54 -16
  159. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  160. package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +390 -0
  161. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  162. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  163. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  164. package/dist/collection/components/ic-step/ic-step.js +13 -13
  165. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  166. package/dist/collection/components/ic-switch/ic-switch.css +1 -4
  167. package/dist/collection/components/ic-switch/ic-switch.js +5 -4
  168. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  169. package/dist/collection/components/ic-switch/ic-switch.stories.js +8 -1
  170. package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -1
  171. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  172. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  173. package/dist/collection/components/ic-text-field/ic-text-field.js +21 -14
  174. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  175. package/dist/collection/components/ic-text-field/ic-text-field.stories.js +12 -1
  176. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  177. package/dist/collection/components/ic-toast/ic-toast.js +3 -3
  178. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  179. package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +40 -7
  180. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +80 -82
  181. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  182. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +79 -88
  183. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
  184. package/dist/collection/components/ic-tooltip/ic-tooltip.js +2 -2
  185. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +1 -0
  186. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +89 -81
  187. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  188. package/dist/collection/components/ic-typography/ic-typography.js +2 -2
  189. package/dist/collection/utils/constants.js +1 -1
  190. package/dist/collection/utils/constants.js.map +1 -1
  191. package/dist/collection/utils/helpers.js +27 -30
  192. package/dist/collection/utils/helpers.js.map +1 -1
  193. package/dist/components/helpers.js +29 -32
  194. package/dist/components/helpers.js.map +1 -1
  195. package/dist/components/ic-accordion.js +9 -7
  196. package/dist/components/ic-accordion.js.map +1 -1
  197. package/dist/components/ic-alert.js +1 -1
  198. package/dist/components/ic-alert.js.map +1 -1
  199. package/dist/components/ic-breadcrumb-group.js +2 -2
  200. package/dist/components/ic-breadcrumb2.js +2 -2
  201. package/dist/components/ic-button2.js +4 -4
  202. package/dist/components/ic-button2.js.map +1 -1
  203. package/dist/components/ic-card-vertical.js +1 -1
  204. package/dist/components/ic-card-vertical.js.map +1 -1
  205. package/dist/components/ic-checkbox-group.js +4 -4
  206. package/dist/components/ic-checkbox-group.js.map +1 -1
  207. package/dist/components/ic-checkbox.js +7 -12
  208. package/dist/components/ic-checkbox.js.map +1 -1
  209. package/dist/components/ic-data-list.js +2 -2
  210. package/dist/components/ic-data-row.js +2 -2
  211. package/dist/components/ic-dialog.js +1 -1
  212. package/dist/components/ic-empty-state.js +2 -2
  213. package/dist/components/ic-footer-link.js +2 -2
  214. package/dist/components/ic-hero.js +6 -5
  215. package/dist/components/ic-hero.js.map +1 -1
  216. package/dist/components/ic-horizontal-scroll2.js +5 -5
  217. package/dist/components/ic-input-component-container2.js +3 -3
  218. package/dist/components/ic-input-container2.js +2 -2
  219. package/dist/components/ic-input-label2.js +33 -10
  220. package/dist/components/ic-input-label2.js.map +1 -1
  221. package/dist/components/ic-input-validation2.js +3 -3
  222. package/dist/components/ic-link2.js +12 -24
  223. package/dist/components/ic-link2.js.map +1 -1
  224. package/dist/components/ic-loading-indicator2.js +139 -143
  225. package/dist/components/ic-loading-indicator2.js.map +1 -1
  226. package/dist/components/ic-menu-group.js +1 -1
  227. package/dist/components/ic-menu2.js +30 -22
  228. package/dist/components/ic-menu2.js.map +1 -1
  229. package/dist/components/ic-navigation-button.js +32 -41
  230. package/dist/components/ic-navigation-button.js.map +1 -1
  231. package/dist/components/ic-navigation-group.js +122 -167
  232. package/dist/components/ic-navigation-group.js.map +1 -1
  233. package/dist/components/ic-navigation-item.js +68 -63
  234. package/dist/components/ic-navigation-item.js.map +1 -1
  235. package/dist/components/ic-navigation-menu2.js +5 -5
  236. package/dist/components/ic-page-header.js +6 -6
  237. package/dist/components/ic-pagination-item2.js +2 -2
  238. package/dist/components/ic-pagination.js +4 -4
  239. package/dist/components/ic-popover-menu.js +5 -5
  240. package/dist/components/ic-popover-menu.js.map +1 -1
  241. package/dist/components/ic-radio-group.js +5 -5
  242. package/dist/components/ic-radio-group.js.map +1 -1
  243. package/dist/components/ic-radio-option.js +4 -4
  244. package/dist/components/ic-radio-option.js.map +1 -1
  245. package/dist/components/ic-search-bar.js +72 -34
  246. package/dist/components/ic-search-bar.js.map +1 -1
  247. package/dist/components/ic-section-container2.js +2 -2
  248. package/dist/components/ic-select.js +141 -217
  249. package/dist/components/ic-select.js.map +1 -1
  250. package/dist/components/ic-side-navigation.js +36 -17
  251. package/dist/components/ic-side-navigation.js.map +1 -1
  252. package/dist/components/ic-skeleton.js +2 -2
  253. package/dist/components/ic-skip-link.js +2 -2
  254. package/dist/components/ic-status-tag.js +2 -2
  255. package/dist/components/ic-step.js +13 -13
  256. package/dist/components/ic-stepper.js +2 -2
  257. package/dist/components/ic-switch.js +5 -5
  258. package/dist/components/ic-switch.js.map +1 -1
  259. package/dist/components/ic-tab-context.js +1 -1
  260. package/dist/components/ic-tab-group.js +2 -2
  261. package/dist/components/ic-tab-panel.js +2 -2
  262. package/dist/components/ic-tab-panel.js.map +1 -1
  263. package/dist/components/ic-text-field.js +17 -11
  264. package/dist/components/ic-text-field.js.map +1 -1
  265. package/dist/components/ic-theme.js +2 -2
  266. package/dist/components/ic-toast-region.js +1 -1
  267. package/dist/components/ic-toast.js +4 -4
  268. package/dist/components/ic-toggle-button-group.js +53 -67
  269. package/dist/components/ic-toggle-button-group.js.map +1 -1
  270. package/dist/components/ic-toggle-button.js +62 -64
  271. package/dist/components/ic-toggle-button.js.map +1 -1
  272. package/dist/components/ic-tooltip2.js +2 -2
  273. package/dist/components/ic-top-navigation.js +75 -67
  274. package/dist/components/ic-top-navigation.js.map +1 -1
  275. package/dist/components/ic-typography2.js +2 -2
  276. package/dist/core/ag-theme-icds.css +24 -4
  277. package/dist/core/core.css +29 -25
  278. package/dist/core/core.esm.js +1 -1
  279. package/dist/core/core.esm.js.map +1 -1
  280. package/dist/core/{p-b371a498.entry.js → p-0f3a56bb.entry.js} +2 -2
  281. package/dist/core/p-0f3a56bb.entry.js.map +1 -0
  282. package/dist/core/{p-72c117b6.entry.js → p-0f86ea09.entry.js} +2 -2
  283. package/dist/core/p-1228fd8c.entry.js +2 -0
  284. package/dist/core/{p-b8da5c07.entry.js.map → p-1228fd8c.entry.js.map} +1 -1
  285. package/dist/core/p-1286b234.entry.js +2 -0
  286. package/dist/core/p-1286b234.entry.js.map +1 -0
  287. package/dist/core/{p-8c4f7c63.entry.js → p-13e65198.entry.js} +2 -2
  288. package/dist/core/{p-fbf57f0a.entry.js → p-20a6dc40.entry.js} +2 -2
  289. package/dist/core/p-20a6dc40.entry.js.map +1 -0
  290. package/dist/core/{p-cdf56a5d.entry.js → p-21ed856c.entry.js} +2 -2
  291. package/dist/core/p-21ed856c.entry.js.map +1 -0
  292. package/dist/core/p-226406d6.entry.js +2 -0
  293. package/dist/core/{p-70a6cff1.entry.js → p-24bb2265.entry.js} +2 -2
  294. package/dist/core/{p-d45d66c0.entry.js → p-2b342b23.entry.js} +2 -2
  295. package/dist/core/p-334672c1.entry.js +2 -0
  296. package/dist/core/p-334672c1.entry.js.map +1 -0
  297. package/dist/core/{p-8b5022bc.entry.js → p-3448c713.entry.js} +2 -2
  298. package/dist/core/p-37900547.entry.js +2 -0
  299. package/dist/core/p-37900547.entry.js.map +1 -0
  300. package/dist/core/p-3abaa877.entry.js +2 -0
  301. package/dist/core/p-3abaa877.entry.js.map +1 -0
  302. package/dist/core/{p-ef36181d.entry.js → p-3afc2870.entry.js} +2 -2
  303. package/dist/core/{p-aad10013.entry.js → p-3d7d2ff4.entry.js} +2 -2
  304. package/dist/core/p-41bb4db1.entry.js +2 -0
  305. package/dist/core/p-41bb4db1.entry.js.map +1 -0
  306. package/dist/core/{p-788c96ac.entry.js → p-44902a33.entry.js} +2 -2
  307. package/dist/core/{p-628c32b8.entry.js → p-476eac8c.entry.js} +2 -2
  308. package/dist/core/{p-9479f272.entry.js → p-49ca3f54.entry.js} +2 -2
  309. package/dist/core/{p-ebab7a9e.entry.js → p-4dfc41e7.entry.js} +2 -2
  310. package/dist/core/{p-83764268.entry.js → p-5026eeaf.entry.js} +2 -2
  311. package/dist/core/{p-2c17cc67.entry.js → p-54ea7120.entry.js} +2 -2
  312. package/dist/core/{p-a17499ff.entry.js → p-5b2bf9bb.entry.js} +2 -2
  313. package/dist/core/{p-0a436c47.entry.js → p-5d9b23ce.entry.js} +2 -2
  314. package/dist/core/p-5d9b23ce.entry.js.map +1 -0
  315. package/dist/core/{p-c9a4fe37.entry.js → p-5f9d1977.entry.js} +2 -2
  316. package/dist/core/p-5f9d1977.entry.js.map +1 -0
  317. package/dist/core/{p-1b2690b4.entry.js → p-6c10e1a2.entry.js} +2 -2
  318. package/dist/core/p-6c10e1a2.entry.js.map +1 -0
  319. package/dist/core/{p-1440847f.entry.js → p-6cb81f35.entry.js} +2 -2
  320. package/dist/core/{p-df88ff5b.entry.js → p-6dd73165.entry.js} +2 -2
  321. package/dist/core/p-7ead8535.entry.js +2 -0
  322. package/dist/core/p-7ead8535.entry.js.map +1 -0
  323. package/dist/core/{p-c8cf1ad5.entry.js → p-831e884c.entry.js} +2 -2
  324. package/dist/core/{p-267a19d4.entry.js → p-85f735ed.entry.js} +2 -2
  325. package/dist/core/p-89f493f3.entry.js +2 -0
  326. package/dist/core/p-89f493f3.entry.js.map +1 -0
  327. package/dist/core/{p-00bc353b.entry.js → p-8da025b5.entry.js} +2 -2
  328. package/dist/core/p-990c37aa.entry.js +2 -0
  329. package/dist/core/p-990c37aa.entry.js.map +1 -0
  330. package/dist/core/p-9e039aba.entry.js +2 -0
  331. package/dist/core/p-9e039aba.entry.js.map +1 -0
  332. package/dist/core/{p-bc2ca778.entry.js → p-9e051db4.entry.js} +2 -2
  333. package/dist/core/{p-a0161990.entry.js → p-9edc5973.entry.js} +2 -2
  334. package/dist/core/{p-2c371198.entry.js → p-a14025cc.entry.js} +2 -2
  335. package/dist/core/p-a7286727.entry.js +2 -0
  336. package/dist/core/p-a7286727.entry.js.map +1 -0
  337. package/dist/core/{p-c4663e1a.entry.js → p-ab4e8b4a.entry.js} +2 -2
  338. package/dist/core/{p-42a7d0b6.entry.js → p-ab7a5536.entry.js} +2 -2
  339. package/dist/core/{p-26dfc4db.entry.js → p-ac73cfb8.entry.js} +2 -2
  340. package/dist/core/{p-f0388d68.entry.js → p-ad374f0b.entry.js} +2 -2
  341. package/dist/core/p-ad374f0b.entry.js.map +1 -0
  342. package/dist/core/{p-513628ef.entry.js → p-b08bb522.entry.js} +2 -2
  343. package/dist/core/{p-1be17f22.entry.js → p-b1b27b7e.entry.js} +2 -2
  344. package/dist/core/p-b40ecf16.js +2 -0
  345. package/dist/core/p-b40ecf16.js.map +1 -0
  346. package/dist/core/{p-10e1e227.entry.js → p-b59007a3.entry.js} +2 -2
  347. package/dist/core/{p-16f55230.entry.js → p-b811c7a1.entry.js} +2 -2
  348. package/dist/core/p-b811c7a1.entry.js.map +1 -0
  349. package/dist/core/p-bae2df5e.entry.js +2 -0
  350. package/dist/core/p-bae2df5e.entry.js.map +1 -0
  351. package/dist/core/{p-bdc72446.entry.js → p-c8555360.entry.js} +2 -2
  352. package/dist/core/{p-a4f9b5bf.entry.js → p-ced2e6ca.entry.js} +2 -2
  353. package/dist/core/{p-9ca147f3.entry.js → p-d281c3cf.entry.js} +2 -2
  354. package/dist/core/p-d32c377d.entry.js +2 -0
  355. package/dist/core/p-d32c377d.entry.js.map +1 -0
  356. package/dist/core/p-d4a77f80.entry.js +2 -0
  357. package/dist/core/p-d4a77f80.entry.js.map +1 -0
  358. package/dist/core/{p-9c47521d.entry.js → p-d7476f6d.entry.js} +2 -2
  359. package/dist/core/{p-1838d1e9.entry.js → p-e107d1dd.entry.js} +2 -2
  360. package/dist/core/p-e506ec91.entry.js +2 -0
  361. package/dist/core/p-e506ec91.entry.js.map +1 -0
  362. package/dist/core/{p-b9459ba2.entry.js → p-fc5661ac.entry.js} +2 -2
  363. package/dist/core/p-fca45edb.entry.js +2 -0
  364. package/dist/core/p-fca45edb.entry.js.map +1 -0
  365. package/dist/esm/core.js +1 -1
  366. package/dist/esm/{helpers-f2ffaa7c.js → helpers-91abc444.js} +30 -33
  367. package/dist/esm/helpers-91abc444.js.map +1 -0
  368. package/dist/esm/ic-accordion-group.entry.js +1 -1
  369. package/dist/esm/ic-accordion.entry.js +10 -8
  370. package/dist/esm/ic-accordion.entry.js.map +1 -1
  371. package/dist/esm/ic-alert.entry.js +2 -2
  372. package/dist/esm/ic-alert.entry.js.map +1 -1
  373. package/dist/esm/ic-back-to-top.entry.js +1 -1
  374. package/dist/esm/ic-badge.entry.js +1 -1
  375. package/dist/esm/ic-breadcrumb-group.entry.js +3 -3
  376. package/dist/esm/ic-breadcrumb.entry.js +3 -3
  377. package/dist/esm/ic-button_3.entry.js +138 -145
  378. package/dist/esm/ic-button_3.entry.js.map +1 -1
  379. package/dist/esm/ic-card-vertical.entry.js +2 -2
  380. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  381. package/dist/esm/ic-checkbox-group.entry.js +5 -5
  382. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  383. package/dist/esm/ic-checkbox.entry.js +8 -13
  384. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  385. package/dist/esm/ic-chip.entry.js +1 -1
  386. package/dist/esm/ic-data-list.entry.js +2 -2
  387. package/dist/esm/ic-data-row.entry.js +3 -3
  388. package/dist/esm/ic-dialog.entry.js +2 -2
  389. package/dist/esm/ic-divider.entry.js +1 -1
  390. package/dist/esm/ic-empty-state.entry.js +3 -3
  391. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  392. package/dist/esm/ic-footer-link.entry.js +3 -3
  393. package/dist/esm/ic-footer.entry.js +1 -1
  394. package/dist/esm/ic-hero.entry.js +7 -6
  395. package/dist/esm/ic-hero.entry.js.map +1 -1
  396. package/dist/esm/ic-horizontal-scroll.entry.js +6 -6
  397. package/dist/esm/ic-input-component-container_3.entry.js +33 -27
  398. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  399. package/dist/esm/ic-input-label_2.entry.js +36 -13
  400. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  401. package/dist/esm/ic-link.entry.js +12 -22
  402. package/dist/esm/ic-link.entry.js.map +1 -1
  403. package/dist/esm/ic-menu-group.entry.js +2 -2
  404. package/dist/esm/ic-menu-item.entry.js +1 -1
  405. package/dist/esm/ic-navigation-button.entry.js +31 -39
  406. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  407. package/dist/esm/ic-navigation-group.entry.js +121 -166
  408. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  409. package/dist/esm/ic-navigation-item.entry.js +65 -62
  410. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  411. package/dist/esm/ic-navigation-menu.entry.js +5 -5
  412. package/dist/esm/ic-page-header.entry.js +7 -7
  413. package/dist/esm/ic-pagination-item.entry.js +2 -2
  414. package/dist/esm/ic-pagination.entry.js +5 -5
  415. package/dist/esm/ic-popover-menu.entry.js +6 -6
  416. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  417. package/dist/esm/ic-radio-group.entry.js +6 -6
  418. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  419. package/dist/esm/ic-radio-option.entry.js +5 -5
  420. package/dist/esm/ic-search-bar.entry.js +68 -34
  421. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  422. package/dist/esm/ic-section-container.entry.js +2 -2
  423. package/dist/esm/ic-select.entry.js +142 -218
  424. package/dist/esm/ic-select.entry.js.map +1 -1
  425. package/dist/esm/ic-side-navigation.entry.js +35 -17
  426. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  427. package/dist/esm/ic-skeleton.entry.js +2 -2
  428. package/dist/esm/ic-skip-link.entry.js +2 -2
  429. package/dist/esm/ic-status-tag.entry.js +3 -3
  430. package/dist/esm/ic-step.entry.js +14 -14
  431. package/dist/esm/ic-stepper.entry.js +3 -3
  432. package/dist/esm/ic-switch.entry.js +6 -6
  433. package/dist/esm/ic-switch.entry.js.map +1 -1
  434. package/dist/esm/ic-tab-context.entry.js +1 -1
  435. package/dist/esm/ic-tab-group.entry.js +3 -3
  436. package/dist/esm/ic-tab-panel.entry.js +2 -2
  437. package/dist/esm/ic-tab.entry.js +1 -1
  438. package/dist/esm/ic-text-field.entry.js +16 -11
  439. package/dist/esm/ic-text-field.entry.js.map +1 -1
  440. package/dist/esm/ic-theme.entry.js +2 -2
  441. package/dist/esm/ic-toast-region.entry.js +1 -1
  442. package/dist/esm/ic-toast.entry.js +4 -4
  443. package/dist/esm/ic-toggle-button-group.entry.js +54 -68
  444. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  445. package/dist/esm/ic-toggle-button.entry.js +62 -64
  446. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  447. package/dist/esm/ic-top-navigation.entry.js +75 -67
  448. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  449. package/dist/esm/ic-typography.entry.js +3 -3
  450. package/dist/esm/loader.js +1 -1
  451. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +3 -0
  452. package/dist/types/components/ic-input-label/ic-input-label.d.ts +2 -0
  453. package/dist/types/components/ic-link/ic-link.d.ts +2 -3
  454. package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +28 -32
  455. package/dist/types/components/ic-loading-indicator/ic-loading-indicator.types.d.ts +2 -0
  456. package/dist/types/components/ic-menu/ic-menu.d.ts +19 -12
  457. package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +8 -5
  458. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +8 -19
  459. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +9 -7
  460. package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +3 -0
  461. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +13 -0
  462. package/dist/types/components/ic-select/ic-select.d.ts +37 -38
  463. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +5 -0
  464. package/dist/types/components/ic-switch/ic-switch.d.ts +1 -0
  465. package/dist/types/components/ic-text-field/ic-text-field.d.ts +4 -2
  466. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +10 -11
  467. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +10 -12
  468. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +10 -8
  469. package/dist/types/components.d.ts +122 -94
  470. package/dist/types/utils/constants.d.ts +1 -1
  471. package/dist/types/utils/helpers.d.ts +1 -1
  472. package/hydrate/index.js +1047 -1100
  473. package/hydrate/index.mjs +1047 -1100
  474. package/package.json +3 -5
  475. package/vscode-data.json +16 -4
  476. package/dist/cjs/helpers-fc4016d2.js.map +0 -1
  477. package/dist/core/p-0a436c47.entry.js.map +0 -1
  478. package/dist/core/p-15b7adaf.entry.js +0 -2
  479. package/dist/core/p-15b7adaf.entry.js.map +0 -1
  480. package/dist/core/p-16f55230.entry.js.map +0 -1
  481. package/dist/core/p-18714198.entry.js +0 -2
  482. package/dist/core/p-18714198.entry.js.map +0 -1
  483. package/dist/core/p-1b2690b4.entry.js.map +0 -1
  484. package/dist/core/p-206c2a26.entry.js +0 -2
  485. package/dist/core/p-206c2a26.entry.js.map +0 -1
  486. package/dist/core/p-2e44cf53.entry.js +0 -2
  487. package/dist/core/p-2e44cf53.entry.js.map +0 -1
  488. package/dist/core/p-730d2f6e.entry.js +0 -2
  489. package/dist/core/p-730d2f6e.entry.js.map +0 -1
  490. package/dist/core/p-7fb79e87.entry.js +0 -2
  491. package/dist/core/p-7fb79e87.entry.js.map +0 -1
  492. package/dist/core/p-8242c24f.js +0 -2
  493. package/dist/core/p-8242c24f.js.map +0 -1
  494. package/dist/core/p-910f5f14.entry.js +0 -2
  495. package/dist/core/p-910f5f14.entry.js.map +0 -1
  496. package/dist/core/p-9cfc2bac.entry.js +0 -2
  497. package/dist/core/p-9cfc2bac.entry.js.map +0 -1
  498. package/dist/core/p-b371a498.entry.js.map +0 -1
  499. package/dist/core/p-b7568944.entry.js +0 -2
  500. package/dist/core/p-b7568944.entry.js.map +0 -1
  501. package/dist/core/p-b8da5c07.entry.js +0 -2
  502. package/dist/core/p-ba600947.entry.js +0 -2
  503. package/dist/core/p-ba600947.entry.js.map +0 -1
  504. package/dist/core/p-c45023b7.entry.js +0 -2
  505. package/dist/core/p-c45023b7.entry.js.map +0 -1
  506. package/dist/core/p-c9a4fe37.entry.js.map +0 -1
  507. package/dist/core/p-cdf56a5d.entry.js.map +0 -1
  508. package/dist/core/p-d6c50565.entry.js +0 -2
  509. package/dist/core/p-d6c50565.entry.js.map +0 -1
  510. package/dist/core/p-d975bf2f.entry.js +0 -2
  511. package/dist/core/p-d975bf2f.entry.js.map +0 -1
  512. package/dist/core/p-dede4974.entry.js +0 -2
  513. package/dist/core/p-dede4974.entry.js.map +0 -1
  514. package/dist/core/p-e86a6d2d.entry.js +0 -2
  515. package/dist/core/p-eeab3a2e.entry.js +0 -2
  516. package/dist/core/p-eeab3a2e.entry.js.map +0 -1
  517. package/dist/core/p-f0388d68.entry.js.map +0 -1
  518. package/dist/core/p-fbf57f0a.entry.js.map +0 -1
  519. package/dist/esm/helpers-f2ffaa7c.js.map +0 -1
  520. /package/dist/core/{p-72c117b6.entry.js.map → p-0f86ea09.entry.js.map} +0 -0
  521. /package/dist/core/{p-8c4f7c63.entry.js.map → p-13e65198.entry.js.map} +0 -0
  522. /package/dist/core/{p-e86a6d2d.entry.js.map → p-226406d6.entry.js.map} +0 -0
  523. /package/dist/core/{p-70a6cff1.entry.js.map → p-24bb2265.entry.js.map} +0 -0
  524. /package/dist/core/{p-d45d66c0.entry.js.map → p-2b342b23.entry.js.map} +0 -0
  525. /package/dist/core/{p-8b5022bc.entry.js.map → p-3448c713.entry.js.map} +0 -0
  526. /package/dist/core/{p-ef36181d.entry.js.map → p-3afc2870.entry.js.map} +0 -0
  527. /package/dist/core/{p-aad10013.entry.js.map → p-3d7d2ff4.entry.js.map} +0 -0
  528. /package/dist/core/{p-788c96ac.entry.js.map → p-44902a33.entry.js.map} +0 -0
  529. /package/dist/core/{p-628c32b8.entry.js.map → p-476eac8c.entry.js.map} +0 -0
  530. /package/dist/core/{p-9479f272.entry.js.map → p-49ca3f54.entry.js.map} +0 -0
  531. /package/dist/core/{p-ebab7a9e.entry.js.map → p-4dfc41e7.entry.js.map} +0 -0
  532. /package/dist/core/{p-83764268.entry.js.map → p-5026eeaf.entry.js.map} +0 -0
  533. /package/dist/core/{p-2c17cc67.entry.js.map → p-54ea7120.entry.js.map} +0 -0
  534. /package/dist/core/{p-a17499ff.entry.js.map → p-5b2bf9bb.entry.js.map} +0 -0
  535. /package/dist/core/{p-1440847f.entry.js.map → p-6cb81f35.entry.js.map} +0 -0
  536. /package/dist/core/{p-df88ff5b.entry.js.map → p-6dd73165.entry.js.map} +0 -0
  537. /package/dist/core/{p-c8cf1ad5.entry.js.map → p-831e884c.entry.js.map} +0 -0
  538. /package/dist/core/{p-267a19d4.entry.js.map → p-85f735ed.entry.js.map} +0 -0
  539. /package/dist/core/{p-00bc353b.entry.js.map → p-8da025b5.entry.js.map} +0 -0
  540. /package/dist/core/{p-bc2ca778.entry.js.map → p-9e051db4.entry.js.map} +0 -0
  541. /package/dist/core/{p-a0161990.entry.js.map → p-9edc5973.entry.js.map} +0 -0
  542. /package/dist/core/{p-2c371198.entry.js.map → p-a14025cc.entry.js.map} +0 -0
  543. /package/dist/core/{p-c4663e1a.entry.js.map → p-ab4e8b4a.entry.js.map} +0 -0
  544. /package/dist/core/{p-42a7d0b6.entry.js.map → p-ab7a5536.entry.js.map} +0 -0
  545. /package/dist/core/{p-26dfc4db.entry.js.map → p-ac73cfb8.entry.js.map} +0 -0
  546. /package/dist/core/{p-513628ef.entry.js.map → p-b08bb522.entry.js.map} +0 -0
  547. /package/dist/core/{p-1be17f22.entry.js.map → p-b1b27b7e.entry.js.map} +0 -0
  548. /package/dist/core/{p-10e1e227.entry.js.map → p-b59007a3.entry.js.map} +0 -0
  549. /package/dist/core/{p-bdc72446.entry.js.map → p-c8555360.entry.js.map} +0 -0
  550. /package/dist/core/{p-a4f9b5bf.entry.js.map → p-ced2e6ca.entry.js.map} +0 -0
  551. /package/dist/core/{p-9ca147f3.entry.js.map → p-d281c3cf.entry.js.map} +0 -0
  552. /package/dist/core/{p-9c47521d.entry.js.map → p-d7476f6d.entry.js.map} +0 -0
  553. /package/dist/core/{p-1838d1e9.entry.js.map → p-e107d1dd.entry.js.map} +0 -0
  554. /package/dist/core/{p-b9459ba2.entry.js.map → p-fc5661ac.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
2
- import { k as getBrandForegroundAppearance, b as inheritAttributes, o as onComponentRequiredPropUndefined, i as isSlotUsed, I as IC_INHERITED_ARIA, e as IcBrandForegroundEnum } from './helpers.js';
2
+ import { b as inheritAttributes, o as onComponentRequiredPropUndefined, k as getBrandForegroundAppearance, L as IC_BLOCK_COLOR_COMPONENTS, e as IcBrandForegroundEnum, i as isSlotUsed, I as IC_INHERITED_ARIA } from './helpers.js';
3
3
  import { d as defineCustomElement$5 } from './ic-button2.js';
4
4
  import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
5
5
  import { d as defineCustomElement$3 } from './ic-tooltip2.js';
@@ -16,7 +16,6 @@ const NavigationButton = /*@__PURE__*/ proxyCustomElement(class NavigationButton
16
16
  this.__attachShadow();
17
17
  this.inheritedAttributes = {};
18
18
  this.hostMutationObserver = null;
19
- this.initialAppearance = getBrandForegroundAppearance();
20
19
  /**
21
20
  * The display mode.
22
21
  */
@@ -29,7 +28,9 @@ const NavigationButton = /*@__PURE__*/ proxyCustomElement(class NavigationButton
29
28
  * Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
30
29
  */
31
30
  this.theme = "inherit";
32
- // triggered when attributes of host element change
31
+ /**
32
+ * Triggered when attributes of host element change
33
+ */
33
34
  this.hostMutationCallback = (mutationList) => {
34
35
  let forceComponentUpdate = false;
35
36
  mutationList.forEach(({ attributeName }) => {
@@ -50,6 +51,7 @@ const NavigationButton = /*@__PURE__*/ proxyCustomElement(class NavigationButton
50
51
  this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);
51
52
  }
52
53
  componentDidLoad() {
54
+ this.updateTheme();
53
55
  onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Navigation Button");
54
56
  this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
55
57
  this.hostMutationObserver.observe(this.el, {
@@ -57,8 +59,9 @@ const NavigationButton = /*@__PURE__*/ proxyCustomElement(class NavigationButton
57
59
  });
58
60
  }
59
61
  componentWillRender() {
60
- const iconEl = this.el.querySelector(`[slot="icon"]`);
61
- iconEl !== null && iconEl.setAttribute("viewBox", "0 0 24 24");
62
+ var _a;
63
+ (_a = this.el
64
+ .querySelector(`[slot="icon"]`)) === null || _a === void 0 ? void 0 : _a.setAttribute("viewBox", "0 0 24 24");
62
65
  }
63
66
  disconnectedCallback() {
64
67
  var _a;
@@ -70,51 +73,40 @@ const NavigationButton = /*@__PURE__*/ proxyCustomElement(class NavigationButton
70
73
  navBarMenuCloseHandler() {
71
74
  this.mode = "navbar";
72
75
  }
73
- brandChangeHandler(ev) {
74
- this.initialAppearance = ev.detail.mode;
76
+ brandChangeHandler({ detail: { mode } }) {
77
+ this.updateTheme(mode);
75
78
  }
76
79
  /**
77
80
  * Sets focus on the native `button`.
78
81
  */
79
82
  async setFocus() {
80
- if (this.buttonEl) {
81
- this.buttonEl.focus();
82
- }
83
+ var _a;
84
+ (_a = this.buttonEl) === null || _a === void 0 ? void 0 : _a.setFocus();
85
+ }
86
+ updateTheme(mode = getBrandForegroundAppearance()) {
87
+ var _a;
88
+ if ((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.closest(IC_BLOCK_COLOR_COMPONENTS))
89
+ return;
90
+ this.theme =
91
+ mode === IcBrandForegroundEnum.Light
92
+ ? IcBrandForegroundEnum.Dark
93
+ : IcBrandForegroundEnum.Light;
83
94
  }
84
95
  render() {
85
- const { href, target, rel, download, referrerpolicy } = this;
86
- let label = "";
87
- let className = "";
88
- let variant = "icon";
89
- let appearance = this.initialAppearance;
90
- let size = "large";
91
- let fullWidth = false;
92
- let disableTooltip = false;
93
- if (this.mode === "menu") {
94
- label = this.label;
95
- variant = "tertiary";
96
- appearance = IcBrandForegroundEnum.Default;
97
- size = "medium";
98
- fullWidth = true;
99
- className = "popout-menu-button";
100
- disableTooltip = true;
101
- }
96
+ const { download, href, inheritedAttributes, label, mode, referrerpolicy, rel, target, theme, } = this;
97
+ const isMenuMode = mode === "menu";
102
98
  const buttonProps = {
103
- variant,
104
- appearance,
105
- size,
106
- href,
107
- target,
108
- rel,
109
99
  download,
100
+ href,
110
101
  referrerpolicy,
111
- fullWidth,
112
- disableTooltip,
102
+ rel,
103
+ target,
104
+ theme,
113
105
  };
114
- return (h(Host, { key: 'a750cb73987d5c9d0c7bcdb6ece9807bcc688c9f', class: {
115
- ["in-side-menu"]: this.mode === "menu",
116
- [`ic-theme-${this.theme}`]: this.theme !== "inherit",
117
- } }, h("ic-button", Object.assign({ key: 'd55eb3e8c54c6bb76e61044af2a5b1a2dddafbf6', class: className, "aria-label": variant == "icon" ? this.label : null, ref: (el) => (this.buttonEl = el) }, buttonProps, this.inheritedAttributes, { monochrome: this.mode !== "menu", theme: getBrandForegroundAppearance() == "light" ? "light" : "dark" }), label, h("slot", { key: '4193d9cd02c05a3b12946233cb86256e2c729abc', slot: "left-icon", name: "icon" }), isSlotUsed(this.el, "badge") && h("slot", { key: 'a53d6158424e97fddc62b25006f6060b2cbee4c5', name: "badge" }))));
106
+ return (h(Host, { key: '341c602f37816c5bd021d7d2457a60cc48ec0a4d', class: {
107
+ "in-side-menu": isMenuMode,
108
+ [`ic-theme-${theme}`]: theme !== "inherit",
109
+ } }, h("ic-button", Object.assign({ key: '7f122b31c8584bc6ccea93220a60f1a7754f7985', ref: (el) => (this.buttonEl = el), class: { "popout-menu-button": isMenuMode }, "aria-label": !isMenuMode ? label : null, disableTooltip: isMenuMode, fullWidth: isMenuMode, monochrome: !isMenuMode, size: isMenuMode ? "medium" : "large", variant: isMenuMode ? "tertiary" : "icon" }, buttonProps, inheritedAttributes), isMenuMode ? label : "", h("slot", { key: '68d45cf8961f30491f610d5c009da84350611c1b', slot: "left-icon", name: "icon" }), isSlotUsed(this.el, "badge") && h("slot", { key: '43740c1e00ca73197b6d121b6ccf6df550d3b5c7', name: "badge" }))));
118
110
  }
119
111
  static get delegatesFocus() { return true; }
120
112
  get el() { return this; }
@@ -127,8 +119,7 @@ const NavigationButton = /*@__PURE__*/ proxyCustomElement(class NavigationButton
127
119
  "referrerpolicy": [1],
128
120
  "rel": [1],
129
121
  "target": [1],
130
- "theme": [1],
131
- "initialAppearance": [32],
122
+ "theme": [1025],
132
123
  "mode": [32],
133
124
  "setFocus": [64]
134
125
  }, [[4, "icNavigationMenuOpened", "navBarMenuOpenHandler"], [4, "icNavigationMenuClosed", "navBarMenuCloseHandler"], [4, "brandChange", "brandChangeHandler"]]]);
@@ -1 +1 @@
1
- {"file":"ic-navigation-button.js","mappings":"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","names":[],"sources":["src/components/ic-navigation-button/ic-navigation-button.css?tag=ic-navigation-button&encapsulation=shadow","src/components/ic-navigation-button/ic-navigation-button.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n margin-right: var(--ic-space-xs);\n list-style: none;\n}\n\n:host(.in-side-menu) {\n margin-right: 0;\n}\n\n:host::part(button) {\n height: 100%;\n min-height: 2.5rem;\n}\n\n:host(.in-side-menu) ::part(button) {\n color: var(--ic-top-navigation-icon-active);\n}\n\n:host(.in-side-menu) ::part(button):hover {\n color: var(--ic-top-navigation-icon-hover);\n background-color: var(--ic-top-navigation-icon-hover-background);\n}\n\n:host(.in-side-menu) ::part(button):active {\n color: var(--ic-top-navigation-icon-pressed);\n background-color: var(--ic-top-navigation-icon-pressed-background);\n}\n\n:host(.in-side-menu) ::slotted(ic-badge) {\n margin-left: var(--ic-space-xs);\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n State,\n h,\n Listen,\n Method,\n forceUpdate,\n} from \"@stencil/core\";\n\nimport {\n getBrandForegroundAppearance,\n inheritAttributes,\n onComponentRequiredPropUndefined,\n isSlotUsed,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcBrandForegroundNoDefault,\n IcThemeMode,\n} from \"../../utils/types\";\nimport { IcNavButtonModes } from \"./ic-navigation-button.types\";\n\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n */\n\n@Component({\n tag: \"ic-navigation-button\",\n styleUrl: \"ic-navigation-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class NavigationButton {\n private buttonEl?: HTMLIcButtonElement;\n private inheritedAttributes: { [k: string]: string } = {};\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcNavigationButtonElement;\n\n @State() initialAppearance: IcBrandForegroundNoDefault | IcBrandForeground =\n getBrandForegroundAppearance();\n /**\n * The display mode.\n */\n @State() mode: IcNavButtonModes = \"navbar\";\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * The label info to display.\n */\n @Prop() label!: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Navigation Button\"\n );\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n\n componentWillRender(): void {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n iconEl !== null && iconEl.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n @Listen(\"icNavigationMenuOpened\", { target: \"document\" })\n navBarMenuOpenHandler(): void {\n this.mode = \"menu\";\n }\n\n @Listen(\"icNavigationMenuClosed\", { target: \"document\" })\n navBarMenuCloseHandler(): void {\n this.mode = \"navbar\";\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler(ev: CustomEvent<IcBrand>): void {\n this.initialAppearance = ev.detail.mode;\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute && MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const { href, target, rel, download, referrerpolicy } = this;\n\n let label = \"\";\n let className = \"\";\n let variant: \"icon\" | \"tertiary\" = \"icon\";\n let appearance: IcBrandForeground | IcBrandForegroundEnum.Default =\n this.initialAppearance;\n let size: \"medium\" | \"large\" = \"large\";\n let fullWidth = false;\n let disableTooltip = false;\n\n if (this.mode === \"menu\") {\n label = this.label;\n variant = \"tertiary\";\n appearance = IcBrandForegroundEnum.Default;\n size = \"medium\";\n fullWidth = true;\n className = \"popout-menu-button\";\n disableTooltip = true;\n }\n\n const buttonProps = {\n variant,\n appearance,\n size,\n href,\n target,\n rel,\n download,\n referrerpolicy,\n fullWidth,\n disableTooltip,\n };\n\n return (\n <Host\n class={{\n [\"in-side-menu\"]: this.mode === \"menu\",\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }}\n >\n <ic-button\n class={className}\n aria-label={variant == \"icon\" ? this.label : null}\n ref={(el) => (this.buttonEl = el)}\n {...buttonProps}\n {...this.inheritedAttributes}\n monochrome={this.mode !== \"menu\"}\n theme={getBrandForegroundAppearance() == \"light\" ? \"light\" : \"dark\"}\n >\n {label}\n <slot slot=\"left-icon\" name=\"icon\"></slot>\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </ic-button>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-navigation-button.js","mappings":"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","names":[],"sources":["src/components/ic-navigation-button/ic-navigation-button.css?tag=ic-navigation-button&encapsulation=shadow","src/components/ic-navigation-button/ic-navigation-button.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n margin-right: var(--ic-space-xs);\n list-style: none;\n}\n\n:host(.in-side-menu) {\n margin-right: 0;\n}\n\n:host::part(button) {\n height: 100%;\n min-height: 2.5rem;\n}\n\n:host(.in-side-menu) ::part(button) {\n color: var(--ic-top-navigation-icon-active);\n}\n\n:host(.in-side-menu) ::part(button):hover {\n color: var(--ic-top-navigation-icon-hover);\n background-color: var(--ic-top-navigation-icon-hover-background);\n}\n\n:host(.in-side-menu) ::part(button):active {\n color: var(--ic-top-navigation-icon-pressed);\n background-color: var(--ic-top-navigation-icon-pressed-background);\n}\n\n:host(.in-side-menu) ::slotted(ic-badge) {\n margin-left: var(--ic-space-xs);\n}\n","import {\n Component,\n Element,\n Host,\n Listen,\n Method,\n Prop,\n State,\n forceUpdate,\n h,\n} from \"@stencil/core\";\n\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_INHERITED_ARIA,\n} from \"../../utils/constants\";\nimport {\n getBrandForegroundAppearance,\n inheritAttributes,\n isSlotUsed,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport {\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n} from \"../../utils/types\";\nimport { IcNavButtonModes } from \"./ic-navigation-button.types\";\n\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n */\n\n@Component({\n tag: \"ic-navigation-button\",\n styleUrl: \"ic-navigation-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class NavigationButton {\n private buttonEl?: HTMLIcButtonElement;\n private inheritedAttributes: { [k: string]: string } = {};\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcNavigationButtonElement;\n\n /**\n * The display mode.\n */\n @State() mode: IcNavButtonModes = \"navbar\";\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download: string | boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * The label info to display.\n */\n @Prop() label!: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop({ mutable: true }) theme: IcThemeMode = \"inherit\";\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Navigation Button\"\n );\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n\n componentWillRender(): void {\n this.el\n .querySelector(`[slot=\"icon\"]`)\n ?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n @Listen(\"icNavigationMenuOpened\", { target: \"document\" })\n navBarMenuOpenHandler(): void {\n this.mode = \"menu\";\n }\n\n @Listen(\"icNavigationMenuClosed\", { target: \"document\" })\n navBarMenuCloseHandler(): void {\n this.mode = \"navbar\";\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail: { mode } }: CustomEvent<IcBrand>): void {\n this.updateTheme(mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.setFocus();\n }\n\n /**\n * Triggered when attributes of host element change\n */\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute && MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private updateTheme(\n mode: IcBrandForeground = getBrandForegroundAppearance()\n ) {\n if (this.el.parentElement?.closest(IC_BLOCK_COLOR_COMPONENTS)) return;\n\n this.theme =\n mode === IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n }\n\n render() {\n const {\n download,\n href,\n inheritedAttributes,\n label,\n mode,\n referrerpolicy,\n rel,\n target,\n theme,\n } = this;\n\n const isMenuMode = mode === \"menu\";\n\n const buttonProps = {\n download,\n href,\n referrerpolicy,\n rel,\n target,\n theme,\n };\n\n return (\n <Host\n class={{\n \"in-side-menu\": isMenuMode,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <ic-button\n ref={(el) => (this.buttonEl = el)}\n class={{ \"popout-menu-button\": isMenuMode }}\n aria-label={!isMenuMode ? label : null}\n disableTooltip={isMenuMode}\n fullWidth={isMenuMode}\n monochrome={!isMenuMode}\n size={isMenuMode ? \"medium\" : \"large\"}\n variant={isMenuMode ? \"tertiary\" : \"icon\"}\n {...buttonProps}\n {...inheritedAttributes}\n >\n {isMenuMode ? label : \"\"}\n <slot slot=\"left-icon\" name=\"icon\"></slot>\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </ic-button>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,11 +1,14 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { D as DEVICE_SIZES, k as getBrandForegroundAppearance, n as getCurrentDeviceSize, L as getNavItemParentDetails } from './helpers.js';
2
+ import { D as DEVICE_SIZES, k as getBrandForegroundAppearance, n as getCurrentDeviceSize, M as getNavItemParentDetails } from './helpers.js';
3
3
  import { c as chevronIcon } from './chevron-icon.js';
4
4
  import { d as defineCustomElement$2 } from './ic-typography2.js';
5
5
 
6
6
  const icNavigationGroupCss = "/*! 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\n var(--ic-divider-background-monochrome);padding:var(--ic-space-md) 0}:host .navigation-group{height:100%;width:-moz-fit-content;width:fit-content;color:var(--ic-brand-text-color);display:flex;gap:var(--ic-space-xxs);align-items:center;justify-content:center;padding:0 var(--ic-space-md);transition:var(--ic-easing-transition-slow);position:relative;background:none;border:none;text-align:left;box-sizing:border-box}: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(.in-side-menu) .navigation-group{min-height:2.5rem;width:100%;gap:1.25rem}:host(.in-side-menu) .navigation-group .ic-typography-label{width:100%}:host(.in-side-menu:not(.ic-navigation-group-expandable)) .navigation-group,:host(.in-side-menu) .navigation-group-side-menu-collapsed,:host(.in-side-menu) .navigation-group-side-menu-expanded{color:var(--ic-top-navigation-nav-group-link);justify-content:flex-start;padding:var(--ic-space-xs) 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;min-height:0.45em;position:relative;top:-0.1em;transform:rotate(135deg);vertical-align:top;min-width:0.45em}:host(.in-side-menu) .navigation-group-side-menu-expanded::after{top:0.15em;transform:rotate(-45deg)}: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-expanded:hover:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus){background-color:var(--ic-top-navigation-nav-group-hover);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-top-navigation-nav-group-pressed)}:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);background:none}:host .navigation-group-dropdown{background-color:var(--ic-top-navigation-menu-background);border-bottom:var(--ic-space-1px) solid var(--ic-top-navigation-menu-border);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{min-height:var(--navigation-group-height);min-width:100%;width:var(--navigation-group-width, auto);justify-content:var(--navigation-group-justify-content);padding:var(--ic-space-md) var(--navigation-group-expand-toggle-padding)\n var(--ic-space-xs) var(--ic-space-md)}:host(.ic-navigation-group-side-nav:not(.ic-navigation-group-expandable)) .navigation-group{padding-right:var(--ic-space-md)}: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:not(.ic-navigation-group-expandable)) .navigation-group:hover,:host(.ic-navigation-group-side-nav:not(.ic-navigation-group-expandable)) .navigation-group:active,:host(.in-side-menu:not(.ic-navigation-group-expandable)) .navigation-group:hover,:host(.in-side-menu:not(.ic-navigation-group-expandable)) .navigation-group:active{background:none;cursor:auto}: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)}";
7
7
  const IcNavigationGroupStyle0 = icNavigationGroupCss;
8
8
 
9
+ const IC_NAVIGATION_ITEM = "ic-navigation-item";
10
+ const DYNAMIC_GROUPED_LINKS_HEIGHT_MS = 100;
11
+ const NODE_NAME = "IC-NAVIGATION-GROUP";
9
12
  const NavigationGroup = /*@__PURE__*/ proxyCustomElement(class NavigationGroup extends HTMLElement {
10
13
  constructor() {
11
14
  super();
@@ -13,99 +16,75 @@ const NavigationGroup = /*@__PURE__*/ proxyCustomElement(class NavigationGroup e
13
16
  this.__attachShadow();
14
17
  this.navigationGroupOpened = createEvent(this, "navigationGroupOpened", 7);
15
18
  this.navigationGroupExpanded = createEvent(this, "navigationGroupExpanded", 7);
16
- this.allGroupedNavigationItems = [];
17
- this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS = 100;
18
- this.IC_NAVIGATION_ITEM = "ic-navigation-item";
19
+ this.allGroupedNavigationItemHeights = "";
20
+ this.collapsedNavItemsHeight = null;
21
+ this.expandedNavItemsHeight = null;
19
22
  this.mouseGate = false;
20
- this.nodeName = "IC-NAVIGATION-GROUP";
21
- this.GROUPED_LINKS_WRAPPER_CLASS = ".grouped-links-wrapper";
22
23
  this.deviceSize = DEVICE_SIZES.XL;
23
24
  this.dropdownOpen = false;
24
- this.expanded = true;
25
25
  this.focusStyle = getBrandForegroundAppearance();
26
26
  this.inTopNavSideMenu = false;
27
+ this.isSideNavExpanded = false;
27
28
  /**
28
29
  * If `true`, the group will be expandable when in an ic-side-navigation component, or, when in an ic-top-navigation component, in the side menu displayed at small screen sizes.
29
30
  */
30
31
  this.expandable = false;
32
+ /**
33
+ * If `true`, the expandable group will be expanded by default when in an ic-side-navigation component. To enable this prop, `expandable` must also be set to `true`.
34
+ */
35
+ this.expanded = true;
31
36
  /**
32
37
  * Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
33
38
  */
34
39
  this.theme = "inherit";
35
40
  this.sideNavExpandHandler = (event) => {
36
- var _a;
37
41
  this.isSideNavExpanded = event.detail.sideNavExpanded;
38
- const linkWrapper = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);
39
- if (!linkWrapper)
42
+ if (!this.linkWrapper || !this.expanded)
40
43
  return;
41
- if (this.isSideNavExpanded) {
42
- if (this.expanded && this.expandedNavItemsHeight) {
43
- this.setGroupedLinksElementHeight(linkWrapper, this.expandedNavItemsHeight);
44
- }
45
- else if (this.expanded) {
46
- setTimeout(() => {
47
- this.expandedNavItemsHeight = this.getNavigationChildItemsHeight();
48
- this.setGroupedLinksElementHeight(linkWrapper, this.expandedNavItemsHeight);
49
- }, this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS);
50
- }
44
+ const navItemsHeight = this.isSideNavExpanded
45
+ ? this.expandedNavItemsHeight
46
+ : this.collapsedNavItemsHeight;
47
+ if (navItemsHeight) {
48
+ this.setGroupedLinksElementHeight(navItemsHeight);
51
49
  }
52
50
  else {
53
- if (this.expanded && this.collapsedNavItemsHeight) {
54
- this.setGroupedLinksElementHeight(linkWrapper, this.collapsedNavItemsHeight);
55
- }
56
- else if (this.expanded) {
57
- setTimeout(() => {
58
- this.collapsedNavItemsHeight = this.getNavigationChildItemsHeight();
59
- this.setGroupedLinksElementHeight(linkWrapper, this.collapsedNavItemsHeight);
60
- }, this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS);
61
- }
51
+ setTimeout(() => {
52
+ if (this.isSideNavExpanded) {
53
+ this.expandedNavItemsHeight = this.allGroupedNavigationItemHeights;
54
+ }
55
+ else {
56
+ this.collapsedNavItemsHeight = this.allGroupedNavigationItemHeights;
57
+ }
58
+ this.setGroupedLinksElementHeight(this.allGroupedNavigationItemHeights);
59
+ }, DYNAMIC_GROUPED_LINKS_HEIGHT_MS);
62
60
  }
63
61
  };
64
- this.topNavResizedHandler = ({ detail, }) => {
62
+ this.topNavResizedHandler = ({ detail: { size }, }) => {
65
63
  var _a;
66
- const { size } = detail;
67
- if (size !== this.deviceSize) {
68
- this.deviceSize = size;
69
- this.inTopNavSideMenu =
70
- size <=
71
- (((_a = this.parentEl) === null || _a === void 0 ? void 0 : _a.customMobileBreakpoint) || DEVICE_SIZES.L);
72
- }
64
+ if (size === this.deviceSize)
65
+ return;
66
+ this.deviceSize = size;
67
+ this.inTopNavSideMenu =
68
+ size <=
69
+ (((_a = this.parentEl) === null || _a === void 0 ? void 0 : _a.customMobileBreakpoint) ||
70
+ DEVICE_SIZES.L);
73
71
  };
74
- this.setGroupedNavItemTabIndex = (tabIndexValue) => {
75
- this.el
76
- .querySelectorAll(this.IC_NAVIGATION_ITEM)
77
- .forEach((navigationItem) => {
72
+ this.toggleExpanded = () => {
73
+ this.expanded = !this.expanded;
74
+ if (!this.linkWrapper)
75
+ return;
76
+ this.setGroupedLinksElementHeight(!this.expanded
77
+ ? "0"
78
+ : this.isSideNavExpanded
79
+ ? this.expandedNavItemsHeight
80
+ : this.collapsedNavItemsHeight);
81
+ this.el.querySelectorAll(IC_NAVIGATION_ITEM).forEach((navigationItem) => {
78
82
  var _a;
79
83
  const navItem = ((_a = navigationItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("a")) ||
80
84
  navigationItem.querySelector("a");
81
- if (navItem) {
82
- navItem.setAttribute("tabindex", tabIndexValue);
83
- }
85
+ navItem === null || navItem === void 0 ? void 0 : navItem.setAttribute("tabindex", this.expanded ? "0" : "-1");
84
86
  });
85
87
  };
86
- this.toggleGroupedLinkWrapperHeight = (wrapper, expanded) => {
87
- if (!wrapper)
88
- return;
89
- if (expanded) {
90
- if (this.isSideNavExpanded) {
91
- this.setGroupedLinksElementHeight(wrapper, this.expandedNavItemsHeight);
92
- }
93
- else {
94
- this.setGroupedLinksElementHeight(wrapper, this.collapsedNavItemsHeight);
95
- }
96
- this.setGroupedNavItemTabIndex("0");
97
- }
98
- else {
99
- wrapper.style.setProperty("--navigation-child-items-height", "0");
100
- this.setGroupedNavItemTabIndex("-1");
101
- }
102
- };
103
- this.toggleExpanded = () => {
104
- var _a;
105
- this.expanded = !this.expanded;
106
- const linkWrapper = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);
107
- this.toggleGroupedLinkWrapperHeight(linkWrapper, this.expanded);
108
- };
109
88
  this.handleClick = (ev) => {
110
89
  if (this.navigationType === "top" && ev.detail) {
111
90
  this.toggleDropdown();
@@ -115,50 +94,46 @@ const NavigationGroup = /*@__PURE__*/ proxyCustomElement(class NavigationGroup e
115
94
  }
116
95
  };
117
96
  this.handleBlur = (ev) => {
118
- const target = ev.relatedTarget;
119
- if (!this.el.contains(target)) {
120
- this.hideDropdown();
121
- }
122
- };
123
- this.handleTopNavKeydown = (ev) => {
124
- if (ev.key === " " || ev.key === "Enter") {
125
- this.toggleDropdown();
126
- }
127
- else if (!this.inTopNavSideMenu && ev.key === "Escape") {
97
+ if (!this.el.contains(ev.relatedTarget)) {
128
98
  this.hideDropdown();
129
99
  }
130
100
  };
131
101
  this.handleKeydown = (ev) => {
132
- if (ev.key === "Enter" || ev.key === " " || ev.key === "Escape") {
133
- switch (this.navigationType) {
134
- case "top":
135
- this.handleTopNavKeydown(ev);
136
- break;
137
- case "side":
138
- this.toggleExpanded();
139
- ev.preventDefault();
140
- break;
141
- default:
142
- this.toggleExpanded();
143
- break;
144
- }
102
+ const { key } = ev;
103
+ if (key !== "Enter" && key !== " " && key !== "Escape")
104
+ return;
105
+ switch (this.navigationType) {
106
+ case "top":
107
+ if (key === " " || key === "Enter") {
108
+ this.toggleDropdown();
109
+ }
110
+ else if (!this.inTopNavSideMenu) {
111
+ this.hideDropdown();
112
+ }
113
+ break;
114
+ case "side":
115
+ this.toggleExpanded();
116
+ ev.preventDefault();
117
+ break;
118
+ default:
119
+ this.toggleExpanded();
120
+ break;
145
121
  }
146
122
  };
147
123
  this.handleMouseLeave = (ev) => {
148
124
  const relTarget = ev.relatedTarget;
149
125
  this.mouseGate = false;
150
- if (!this.el.contains(relTarget) &&
151
- relTarget !== this.dropdown &&
152
- document.activeElement !== this.el &&
153
- !this.el.contains(document.activeElement) &&
154
- (relTarget === null || relTarget === void 0 ? void 0 : relTarget.nodeName) === this.nodeName &&
155
- this.dropdownOpen === true) {
126
+ if (this.el.contains(relTarget) ||
127
+ relTarget === this.dropdown ||
128
+ this.el.contains(document.activeElement))
129
+ return;
130
+ if (document.activeElement !== this.el &&
131
+ (relTarget === null || relTarget === void 0 ? void 0 : relTarget.nodeName) === NODE_NAME &&
132
+ this.dropdownOpen) {
156
133
  this.mouseGate = true;
157
134
  this.hideDropdown();
158
135
  }
159
- else if (!this.el.contains(relTarget) &&
160
- relTarget !== this.dropdown &&
161
- !this.el.contains(document.activeElement)) {
136
+ else {
162
137
  this.mouseGate = false;
163
138
  setTimeout(() => {
164
139
  this.dropdownOpen ? this.hideDropdown() : null;
@@ -168,63 +143,38 @@ const NavigationGroup = /*@__PURE__*/ proxyCustomElement(class NavigationGroup e
168
143
  this.handleMouseEnter = (ev) => {
169
144
  const relTarget = ev.relatedTarget;
170
145
  document.addEventListener("keydown", this.handleKeydown);
171
- if ((relTarget === null || relTarget === void 0 ? void 0 : relTarget.nodeName) === this.nodeName && this.mouseGate === true) {
146
+ if ((relTarget === null || relTarget === void 0 ? void 0 : relTarget.nodeName) === NODE_NAME && this.mouseGate) {
172
147
  this.showDropdown();
173
148
  }
174
- else if (this.dropdownOpen === false &&
175
- relTarget !== null &&
176
- this.mouseGate === false) {
149
+ else if (!this.dropdownOpen && !this.mouseGate) {
177
150
  this.mouseGate = true;
178
151
  setTimeout(() => {
179
- this.mouseGate && this.showDropdown();
152
+ if (this.mouseGate)
153
+ this.showDropdown();
180
154
  }, 500);
181
155
  }
182
156
  };
183
- this.renderDropdownGroupedLinks = () => (h("div", { class: {
184
- ["navigation-group-dropdown"]: !this.inTopNavSideMenu,
185
- ["navigation-group-dropdown-side-menu"]: this.inTopNavSideMenu,
186
- ["selected"]: this.dropdownOpen && !this.inTopNavSideMenu,
187
- }, onMouseLeave: !this.inTopNavSideMenu ? this.handleMouseLeave : undefined, ref: (el) => (this.dropdown = el) }, h("nav", { class: {
188
- ["navigation-group-dropdown-items"]: !this.inTopNavSideMenu,
189
- }, "aria-labelledby": "nav-group-title" }, h("ul", null, h("slot", null)))));
190
- this.renderGroupedLinks = () => (h("ul", { class: "grouped-links-wrapper" }, h("slot", null)));
191
- /**
192
- * Gets the total height of navigation links to improve
193
- * smoothness of expand/collapse animations
194
- */
195
- this.getNavigationChildItemsHeight = () => {
196
- let navigationChildItemsHeight = 0;
197
- this.allGroupedNavigationItems.forEach((navItem) => {
198
- navigationChildItemsHeight += navItem.offsetHeight;
199
- });
200
- return `${navigationChildItemsHeight}px`;
201
- };
202
- this.setInitialGroupedLinksWrapperHeight = () => {
203
- var _a;
204
- const linkWrapper = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);
205
- if (!linkWrapper)
206
- return;
207
- if (!this.isSideNavExpanded &&
208
- !this.collapsedNavItemsHeight &&
209
- this.expanded) {
210
- this.collapsedNavItemsHeight = this.getNavigationChildItemsHeight();
211
- this.setGroupedLinksElementHeight(linkWrapper, this.collapsedNavItemsHeight);
212
- }
213
- if (this.isSideNavExpanded && this.expanded) {
214
- this.expandedNavItemsHeight = this.getNavigationChildItemsHeight();
215
- this.setGroupedLinksElementHeight(linkWrapper, this.expandedNavItemsHeight);
216
- }
217
- };
218
157
  this.renderGroupTitleText = () => (h("ic-typography", { id: "nav-group-title", variant: this.navigationType === "side" ? "caption" : "label" }, this.label));
219
158
  this.renderNavigationItems = () => {
220
159
  if (this.dropdownOpen || (this.inTopNavSideMenu && !this.expandable)) {
221
- return this.renderDropdownGroupedLinks();
160
+ return (h("div", { class: {
161
+ [this.inTopNavSideMenu
162
+ ? "navigation-group-dropdown-side-menu"
163
+ : "navigation-group-dropdown"]: true,
164
+ selected: this.dropdownOpen && !this.inTopNavSideMenu,
165
+ }, onMouseLeave: !this.inTopNavSideMenu ? this.handleMouseLeave : undefined, ref: (el) => (this.dropdown = el) }, h("nav", { class: {
166
+ "navigation-group-dropdown-items": !this.inTopNavSideMenu,
167
+ }, "aria-labelledby": "nav-group-title" }, h("ul", null, h("slot", null)))));
222
168
  }
223
169
  if (this.navigationType !== "top") {
224
- return this.renderGroupedLinks();
170
+ return (h("ul", { ref: (el) => (this.linkWrapper = el), class: "grouped-links-wrapper" }, h("slot", null)));
225
171
  }
226
172
  return null;
227
173
  };
174
+ this.setGroupedLinksElementHeight = (height) => {
175
+ var _a;
176
+ (_a = this.linkWrapper) === null || _a === void 0 ? void 0 : _a.style.setProperty("--navigation-child-items-height", height);
177
+ };
228
178
  }
229
179
  disconnectedCallback() {
230
180
  var _a, _b;
@@ -252,12 +202,20 @@ const NavigationGroup = /*@__PURE__*/ proxyCustomElement(class NavigationGroup e
252
202
  }
253
203
  }
254
204
  componentDidLoad() {
255
- this.allGroupedNavigationItems = Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));
205
+ this.allGroupedNavigationItemHeights = `${Array.from(this.el.querySelectorAll(IC_NAVIGATION_ITEM)).reduce((childrenHeights, { offsetHeight }) => childrenHeights + offsetHeight, 0)}px`;
256
206
  /**
257
207
  * debounce is required as the incorrect height was retrieved instantly after
258
208
  * componentDidLoad is invoked.
259
209
  */
260
- setTimeout(() => this.setInitialGroupedLinksWrapperHeight(), this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS);
210
+ setTimeout(() => {
211
+ if (!this.linkWrapper || !this.expanded)
212
+ return;
213
+ if (!this.isSideNavExpanded)
214
+ this.collapsedNavItemsHeight = this.allGroupedNavigationItemHeights;
215
+ else
216
+ this.expandedNavItemsHeight = this.allGroupedNavigationItemHeights;
217
+ this.setGroupedLinksElementHeight(this.allGroupedNavigationItemHeights);
218
+ }, DYNAMIC_GROUPED_LINKS_HEIGHT_MS);
261
219
  }
262
220
  childBlurHandler() {
263
221
  this.hideDropdown();
@@ -277,14 +235,14 @@ const NavigationGroup = /*@__PURE__*/ proxyCustomElement(class NavigationGroup e
277
235
  * Sets focus on the nav item.
278
236
  */
279
237
  async setFocus() {
280
- if (this.groupEl) {
281
- this.groupEl.focus();
282
- }
238
+ var _a;
239
+ (_a = this.groupEl) === null || _a === void 0 ? void 0 : _a.focus();
283
240
  }
284
241
  toggleDropdown() {
285
242
  this.dropdownOpen = !this.dropdownOpen;
286
- this.inTopNavSideMenu &&
243
+ if (this.inTopNavSideMenu) {
287
244
  this.navigationGroupExpanded.emit({ expanded: this.dropdownOpen });
245
+ }
288
246
  }
289
247
  showDropdown() {
290
248
  if (!this.dropdownOpen) {
@@ -300,43 +258,40 @@ const NavigationGroup = /*@__PURE__*/ proxyCustomElement(class NavigationGroup e
300
258
  this.toggleDropdown();
301
259
  }
302
260
  }
303
- setGroupedLinksElementHeight(groupedNavItemWrapper, height) {
304
- groupedNavItemWrapper.style.setProperty("--navigation-child-items-height", height);
305
- }
306
261
  render() {
307
- const { dropdownOpen, expanded, inTopNavSideMenu, expandable } = this;
262
+ const { dropdownOpen, expanded, inTopNavSideMenu, expandable, theme, isSideNavExpanded, focusStyle, } = this;
263
+ const getExpandedClassSuffix = (prop) => prop ? "expanded" : "collapsed";
308
264
  const navGroupTitleClassNames = {
309
- ["navigation-group"]: true,
310
- [this.focusStyle]: !inTopNavSideMenu,
311
- ["navigation-group-side-menu-collapsed"]: inTopNavSideMenu && !!expandable && !dropdownOpen,
312
- ["navigation-group-side-menu-expanded"]: inTopNavSideMenu && !!expandable && dropdownOpen,
313
- ["selected"]: dropdownOpen && !inTopNavSideMenu,
265
+ "navigation-group": true,
266
+ [focusStyle]: !inTopNavSideMenu,
267
+ [`navigation-group-side-menu-${getExpandedClassSuffix(dropdownOpen)}`]: inTopNavSideMenu && expandable,
268
+ selected: dropdownOpen && !inTopNavSideMenu,
314
269
  };
315
270
  const isSideNav = this.navigationType === "side";
316
271
  const isTopNav = this.navigationType === "top";
272
+ const isTopNavDesktop = !inTopNavSideMenu && isTopNav;
317
273
  const ariaExpanded = (isSideNav && expanded) || (isTopNav && dropdownOpen);
318
- return (h(Host, { key: 'd89ce479bb2f5142a2ef6dd2284229a73367c916', class: {
319
- ["in-side-menu"]: inTopNavSideMenu,
320
- "ic-navigation-group-expanded": expanded,
321
- "ic-navigation-group-collapsed": !expanded,
322
- ["ic-navigation-group-side-nav"]: isSideNav,
323
- [`ic-theme-${this.theme}`]: this.theme !== "inherit",
324
- ["ic-navigation-group-expandable"]: !!expandable,
325
- }, role: "listitem" }, this.expandable || (!inTopNavSideMenu && isTopNav) ? (h("button", { onMouseEnter: !inTopNavSideMenu && isTopNav ? this.handleMouseEnter : undefined, onMouseLeave: isTopNav ? this.handleMouseLeave : undefined, onBlur: this.handleBlur, onClick: this.handleClick, onKeyDown: this.handleKeydown, class: navGroupTitleClassNames, ref: (el) => (this.groupEl = el), "aria-expanded": `${ariaExpanded}`, "aria-haspopup": `${!inTopNavSideMenu && isTopNav}` }, this.renderGroupTitleText(), isSideNav && expandable && (h("div", { class: {
274
+ return (h(Host, { key: '1c16958eaa37fb0d37d04178e7bd2d469af832f6', class: {
275
+ "in-side-menu": inTopNavSideMenu,
276
+ "ic-navigation-group-expandable": expandable,
277
+ "ic-navigation-group-side-nav": isSideNav,
278
+ [`ic-navigation-group-${getExpandedClassSuffix(expanded)}`]: true,
279
+ [`ic-theme-${theme}`]: theme !== "inherit",
280
+ }, role: "listitem" }, expandable || isTopNavDesktop ? (h("button", { onMouseEnter: isTopNavDesktop ? this.handleMouseEnter : undefined, onMouseLeave: isTopNav ? this.handleMouseLeave : undefined, onBlur: this.handleBlur, onClick: this.handleClick, onKeyDown: this.handleKeydown, class: navGroupTitleClassNames, ref: (el) => (this.groupEl = el), "aria-expanded": `${ariaExpanded}`, "aria-haspopup": `${isTopNavDesktop}` }, this.renderGroupTitleText(), isSideNav && expandable && (h("div", { class: {
326
281
  "chevron-toggle-icon-wrapper": true,
327
- "chevron-toggle-icon-closed": expanded,
328
- }, innerHTML: chevronIcon })))) : isSideNav && !this.isSideNavExpanded ? null : (h("div", { class: navGroupTitleClassNames }, this.renderGroupTitleText())), this.renderNavigationItems()));
282
+ "chevron-toggle-icon-closed": !!expanded,
283
+ }, innerHTML: chevronIcon })))) : ((!isSideNav || isSideNavExpanded) && (h("div", { class: navGroupTitleClassNames }, this.renderGroupTitleText()))), this.renderNavigationItems()));
329
284
  }
330
285
  static get delegatesFocus() { return true; }
331
286
  get el() { return this; }
332
287
  static get style() { return IcNavigationGroupStyle0; }
333
288
  }, [17, "ic-navigation-group", {
334
289
  "expandable": [4],
290
+ "expanded": [1028],
335
291
  "label": [1],
336
292
  "theme": [1],
337
293
  "deviceSize": [32],
338
294
  "dropdownOpen": [32],
339
- "expanded": [32],
340
295
  "focusStyle": [32],
341
296
  "inTopNavSideMenu": [32],
342
297
  "navigationType": [32],