@ukic/web-components 3.25.0 → 3.27.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 (328) hide show
  1. package/components/OpenInNew.js +5 -0
  2. package/components/OpenInNew.js.map +1 -0
  3. package/components/check-icon.js +8 -0
  4. package/components/check-icon.js.map +1 -0
  5. package/components/chevron-icon.js +8 -0
  6. package/components/chevron-icon.js.map +1 -0
  7. package/components/close-icon.js +10 -0
  8. package/components/close-icon.js.map +1 -0
  9. package/components/constants.js +184 -0
  10. package/components/constants.js.map +1 -0
  11. package/components/custom-elements.d.ts +2 -0
  12. package/components/helpers.js +547 -0
  13. package/components/helpers.js.map +1 -0
  14. package/components/ic-accordion-group.d.ts +11 -0
  15. package/components/ic-accordion-group.js +191 -0
  16. package/components/ic-accordion-group.js.map +1 -0
  17. package/components/ic-accordion.d.ts +11 -0
  18. package/components/ic-accordion.js +188 -0
  19. package/components/ic-accordion.js.map +1 -0
  20. package/components/ic-action-chip.d.ts +11 -0
  21. package/components/ic-action-chip.js +164 -0
  22. package/components/ic-action-chip.js.map +1 -0
  23. package/components/ic-alert.d.ts +11 -0
  24. package/components/ic-alert.js +193 -0
  25. package/components/ic-alert.js.map +1 -0
  26. package/components/ic-back-to-top.d.ts +11 -0
  27. package/components/ic-back-to-top.js +216 -0
  28. package/components/ic-back-to-top.js.map +1 -0
  29. package/components/ic-badge.d.ts +11 -0
  30. package/components/ic-badge.js +222 -0
  31. package/components/ic-badge.js.map +1 -0
  32. package/components/ic-breadcrumb-group.d.ts +11 -0
  33. package/components/ic-breadcrumb-group.js +278 -0
  34. package/components/ic-breadcrumb-group.js.map +1 -0
  35. package/components/ic-breadcrumb.d.ts +11 -0
  36. package/components/ic-breadcrumb.js +8 -0
  37. package/components/ic-breadcrumb.js.map +1 -0
  38. package/components/ic-breadcrumb2.js +145 -0
  39. package/components/ic-breadcrumb2.js.map +1 -0
  40. package/components/ic-button.d.ts +11 -0
  41. package/components/ic-button.js +8 -0
  42. package/components/ic-button.js.map +1 -0
  43. package/components/ic-button2.js +509 -0
  44. package/components/ic-button2.js.map +1 -0
  45. package/components/ic-card-horizontal.d.ts +11 -0
  46. package/components/ic-card-horizontal.js +214 -0
  47. package/components/ic-card-horizontal.js.map +1 -0
  48. package/components/ic-card-vertical.d.ts +11 -0
  49. package/components/ic-card-vertical.js +219 -0
  50. package/components/ic-card-vertical.js.map +1 -0
  51. package/components/ic-checkbox-group.d.ts +11 -0
  52. package/components/ic-checkbox-group.js +198 -0
  53. package/components/ic-checkbox-group.js.map +1 -0
  54. package/components/ic-checkbox.d.ts +11 -0
  55. package/components/ic-checkbox.js +202 -0
  56. package/components/ic-checkbox.js.map +1 -0
  57. package/components/ic-chip.d.ts +11 -0
  58. package/components/ic-chip.js +183 -0
  59. package/components/ic-chip.js.map +1 -0
  60. package/components/ic-classification-banner.d.ts +11 -0
  61. package/components/ic-classification-banner.js +102 -0
  62. package/components/ic-classification-banner.js.map +1 -0
  63. package/components/ic-data-list.d.ts +11 -0
  64. package/components/ic-data-list.js +63 -0
  65. package/components/ic-data-list.js.map +1 -0
  66. package/components/ic-data-row.d.ts +11 -0
  67. package/components/ic-data-row.js +115 -0
  68. package/components/ic-data-row.js.map +1 -0
  69. package/components/ic-dialog.d.ts +11 -0
  70. package/components/ic-dialog.js +366 -0
  71. package/components/ic-dialog.js.map +1 -0
  72. package/components/ic-divider.d.ts +11 -0
  73. package/components/ic-divider.js +8 -0
  74. package/components/ic-divider.js.map +1 -0
  75. package/components/ic-divider2.js +148 -0
  76. package/components/ic-divider2.js.map +1 -0
  77. package/components/ic-empty-state.d.ts +11 -0
  78. package/components/ic-empty-state.js +82 -0
  79. package/components/ic-empty-state.js.map +1 -0
  80. package/components/ic-footer-link-group.d.ts +11 -0
  81. package/components/ic-footer-link-group.js +101 -0
  82. package/components/ic-footer-link-group.js.map +1 -0
  83. package/components/ic-footer-link.d.ts +11 -0
  84. package/components/ic-footer-link.js +95 -0
  85. package/components/ic-footer-link.js.map +1 -0
  86. package/components/ic-footer.d.ts +11 -0
  87. package/components/ic-footer.js +156 -0
  88. package/components/ic-footer.js.map +1 -0
  89. package/components/ic-hero.d.ts +11 -0
  90. package/components/ic-hero.js +145 -0
  91. package/components/ic-hero.js.map +1 -0
  92. package/components/ic-horizontal-scroll.d.ts +11 -0
  93. package/components/ic-horizontal-scroll.js +8 -0
  94. package/components/ic-horizontal-scroll.js.map +1 -0
  95. package/components/ic-horizontal-scroll2.js +240 -0
  96. package/components/ic-horizontal-scroll2.js.map +1 -0
  97. package/components/ic-input-component-container.d.ts +11 -0
  98. package/components/ic-input-component-container.js +8 -0
  99. package/components/ic-input-component-container.js.map +1 -0
  100. package/components/ic-input-component-container2.js +95 -0
  101. package/components/ic-input-component-container2.js.map +1 -0
  102. package/components/ic-input-container.d.ts +11 -0
  103. package/components/ic-input-container.js +8 -0
  104. package/components/ic-input-container.js.map +1 -0
  105. package/components/ic-input-container2.js +47 -0
  106. package/components/ic-input-container2.js.map +1 -0
  107. package/components/ic-input-label.d.ts +11 -0
  108. package/components/ic-input-label.js +8 -0
  109. package/components/ic-input-label.js.map +1 -0
  110. package/components/ic-input-label2.js +121 -0
  111. package/components/ic-input-label2.js.map +1 -0
  112. package/components/ic-input-validation.d.ts +11 -0
  113. package/components/ic-input-validation.js +8 -0
  114. package/components/ic-input-validation.js.map +1 -0
  115. package/components/ic-input-validation2.js +90 -0
  116. package/components/ic-input-validation2.js.map +1 -0
  117. package/components/ic-layout-grid-item.d.ts +11 -0
  118. package/components/ic-layout-grid-item.js +95 -0
  119. package/components/ic-layout-grid-item.js.map +1 -0
  120. package/components/ic-layout-grid.d.ts +11 -0
  121. package/components/ic-layout-grid.js +188 -0
  122. package/components/ic-layout-grid.js.map +1 -0
  123. package/components/ic-link.d.ts +11 -0
  124. package/components/ic-link.js +8 -0
  125. package/components/ic-link.js.map +1 -0
  126. package/components/ic-link2.js +135 -0
  127. package/components/ic-link2.js.map +1 -0
  128. package/components/ic-loading-indicator.d.ts +11 -0
  129. package/components/ic-loading-indicator.js +8 -0
  130. package/components/ic-loading-indicator.js.map +1 -0
  131. package/components/ic-loading-indicator2.js +278 -0
  132. package/components/ic-loading-indicator2.js.map +1 -0
  133. package/components/ic-menu-group.d.ts +11 -0
  134. package/components/ic-menu-group.js +47 -0
  135. package/components/ic-menu-group.js.map +1 -0
  136. package/components/ic-menu-item.d.ts +11 -0
  137. package/components/ic-menu-item.js +8 -0
  138. package/components/ic-menu-item.js.map +1 -0
  139. package/components/ic-menu-item2.js +171 -0
  140. package/components/ic-menu-item2.js.map +1 -0
  141. package/components/ic-menu.d.ts +11 -0
  142. package/components/ic-menu.js +8 -0
  143. package/components/ic-menu.js.map +1 -0
  144. package/components/ic-menu2.js +2590 -0
  145. package/components/ic-menu2.js.map +1 -0
  146. package/components/ic-navigation-button.d.ts +11 -0
  147. package/components/ic-navigation-button.js +175 -0
  148. package/components/ic-navigation-button.js.map +1 -0
  149. package/components/ic-navigation-group.d.ts +11 -0
  150. package/components/ic-navigation-group.js +326 -0
  151. package/components/ic-navigation-group.js.map +1 -0
  152. package/components/ic-navigation-item.d.ts +11 -0
  153. package/components/ic-navigation-item.js +294 -0
  154. package/components/ic-navigation-item.js.map +1 -0
  155. package/components/ic-navigation-menu.d.ts +11 -0
  156. package/components/ic-navigation-menu.js +8 -0
  157. package/components/ic-navigation-menu.js.map +1 -0
  158. package/components/ic-navigation-menu2.js +188 -0
  159. package/components/ic-navigation-menu2.js.map +1 -0
  160. package/components/ic-page-header.d.ts +11 -0
  161. package/components/ic-page-header.js +196 -0
  162. package/components/ic-page-header.js.map +1 -0
  163. package/components/ic-pagination-bar.d.ts +11 -0
  164. package/components/ic-pagination-bar.js +523 -0
  165. package/components/ic-pagination-bar.js.map +1 -0
  166. package/components/ic-pagination-item.d.ts +11 -0
  167. package/components/ic-pagination-item.js +8 -0
  168. package/components/ic-pagination-item.js.map +1 -0
  169. package/components/ic-pagination-item2.js +107 -0
  170. package/components/ic-pagination-item2.js.map +1 -0
  171. package/components/ic-pagination.d.ts +11 -0
  172. package/components/ic-pagination.js +8 -0
  173. package/components/ic-pagination.js.map +1 -0
  174. package/components/ic-pagination2.js +379 -0
  175. package/components/ic-pagination2.js.map +1 -0
  176. package/components/ic-popover-menu.d.ts +11 -0
  177. package/components/ic-popover-menu.js +369 -0
  178. package/components/ic-popover-menu.js.map +1 -0
  179. package/components/ic-radio-group.d.ts +11 -0
  180. package/components/ic-radio-group.js +317 -0
  181. package/components/ic-radio-group.js.map +1 -0
  182. package/components/ic-radio-option.d.ts +11 -0
  183. package/components/ic-radio-option.js +211 -0
  184. package/components/ic-radio-option.js.map +1 -0
  185. package/components/ic-search-bar.d.ts +11 -0
  186. package/components/ic-search-bar.js +719 -0
  187. package/components/ic-search-bar.js.map +1 -0
  188. package/components/ic-section-container.d.ts +11 -0
  189. package/components/ic-section-container.js +8 -0
  190. package/components/ic-section-container.js.map +1 -0
  191. package/components/ic-section-container2.js +50 -0
  192. package/components/ic-section-container2.js.map +1 -0
  193. package/components/ic-select.d.ts +11 -0
  194. package/components/ic-select.js +8 -0
  195. package/components/ic-select.js.map +1 -0
  196. package/components/ic-select2.js +806 -0
  197. package/components/ic-select2.js.map +1 -0
  198. package/components/ic-side-navigation.d.ts +11 -0
  199. package/components/ic-side-navigation.js +568 -0
  200. package/components/ic-side-navigation.js.map +1 -0
  201. package/components/ic-skeleton.d.ts +11 -0
  202. package/components/ic-skeleton.js +81 -0
  203. package/components/ic-skeleton.js.map +1 -0
  204. package/components/ic-skip-link.d.ts +11 -0
  205. package/components/ic-skip-link.js +91 -0
  206. package/components/ic-skip-link.js.map +1 -0
  207. package/components/ic-status-tag.d.ts +11 -0
  208. package/components/ic-status-tag.js +85 -0
  209. package/components/ic-status-tag.js.map +1 -0
  210. package/components/ic-step.d.ts +11 -0
  211. package/components/ic-step.js +200 -0
  212. package/components/ic-step.js.map +1 -0
  213. package/components/ic-stepper.d.ts +11 -0
  214. package/components/ic-stepper.js +340 -0
  215. package/components/ic-stepper.js.map +1 -0
  216. package/components/ic-switch.d.ts +11 -0
  217. package/components/ic-switch.js +164 -0
  218. package/components/ic-switch.js.map +1 -0
  219. package/components/ic-tab-context.d.ts +11 -0
  220. package/components/ic-tab-context.js +275 -0
  221. package/components/ic-tab-context.js.map +1 -0
  222. package/components/ic-tab-group.d.ts +11 -0
  223. package/components/ic-tab-group.js +89 -0
  224. package/components/ic-tab-group.js.map +1 -0
  225. package/components/ic-tab-panel.d.ts +11 -0
  226. package/components/ic-tab-panel.js +63 -0
  227. package/components/ic-tab-panel.js.map +1 -0
  228. package/components/ic-tab.d.ts +11 -0
  229. package/components/ic-tab.js +143 -0
  230. package/components/ic-tab.js.map +1 -0
  231. package/components/ic-text-field.d.ts +11 -0
  232. package/components/ic-text-field.js +8 -0
  233. package/components/ic-text-field.js.map +1 -0
  234. package/components/ic-text-field2.js +532 -0
  235. package/components/ic-text-field2.js.map +1 -0
  236. package/components/ic-theme.d.ts +11 -0
  237. package/components/ic-theme.js +105 -0
  238. package/components/ic-theme.js.map +1 -0
  239. package/components/ic-toast-region.d.ts +11 -0
  240. package/components/ic-toast-region.js +76 -0
  241. package/components/ic-toast-region.js.map +1 -0
  242. package/components/ic-toast.d.ts +11 -0
  243. package/components/ic-toast.js +295 -0
  244. package/components/ic-toast.js.map +1 -0
  245. package/components/ic-toggle-button-group.d.ts +11 -0
  246. package/components/ic-toggle-button-group.js +323 -0
  247. package/components/ic-toggle-button-group.js.map +1 -0
  248. package/components/ic-toggle-button.d.ts +11 -0
  249. package/components/ic-toggle-button.js +235 -0
  250. package/components/ic-toggle-button.js.map +1 -0
  251. package/components/ic-tooltip.d.ts +11 -0
  252. package/components/ic-tooltip.js +8 -0
  253. package/components/ic-tooltip.js.map +1 -0
  254. package/components/ic-tooltip2.js +2078 -0
  255. package/components/ic-tooltip2.js.map +1 -0
  256. package/components/ic-top-navigation.d.ts +11 -0
  257. package/components/ic-top-navigation.js +320 -0
  258. package/components/ic-top-navigation.js.map +1 -0
  259. package/components/ic-typography.d.ts +11 -0
  260. package/components/ic-typography.js +8 -0
  261. package/components/ic-typography.js.map +1 -0
  262. package/components/ic-typography2.js +228 -0
  263. package/components/ic-typography2.js.map +1 -0
  264. package/components/index.d.ts +33 -0
  265. package/components/index.js +4 -0
  266. package/components/index.js.map +1 -0
  267. package/components/package.json +9 -0
  268. package/dist/cjs/core.cjs.js +1 -1
  269. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  270. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +63 -37
  271. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  272. package/dist/cjs/ic-pagination_3.cjs.entry.js +17 -17
  273. package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -1
  274. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  275. package/dist/cjs/ic-top-navigation.cjs.entry.js +12 -8
  276. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  277. package/dist/cjs/loader.cjs.js +1 -1
  278. package/dist/collection/components/ic-menu/ic-menu.css +19 -0
  279. package/dist/collection/components/ic-menu/ic-menu.js +62 -36
  280. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  281. package/dist/collection/components/ic-menu/ic-menu.types.js.map +1 -1
  282. package/dist/collection/components/ic-select/ic-select.js +17 -17
  283. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  284. package/dist/collection/components/ic-select/ic-select_(single).stories.js +54 -0
  285. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +33 -9
  286. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  287. package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +26 -0
  288. package/dist/components/ic-menu2.js +63 -37
  289. package/dist/components/ic-menu2.js.map +1 -1
  290. package/dist/components/ic-page-header.js.map +1 -1
  291. package/dist/components/ic-popover-menu.js.map +1 -1
  292. package/dist/components/ic-radio-group.js.map +1 -1
  293. package/dist/components/ic-radio-option.js.map +1 -1
  294. package/dist/components/ic-select2.js +17 -17
  295. package/dist/components/ic-select2.js.map +1 -1
  296. package/dist/components/ic-top-navigation.js +13 -8
  297. package/dist/components/ic-top-navigation.js.map +1 -1
  298. package/dist/core/core.esm.js +1 -1
  299. package/dist/core/core.esm.js.map +1 -1
  300. package/dist/core/{p-46e5a58b.entry.js → p-12474095.entry.js} +2 -2
  301. package/dist/core/p-12474095.entry.js.map +1 -0
  302. package/dist/core/p-98dee727.entry.js.map +1 -1
  303. package/dist/core/p-d1220d2a.entry.js.map +1 -1
  304. package/dist/core/p-e0b66371.entry.js +2 -0
  305. package/dist/core/p-e0b66371.entry.js.map +1 -0
  306. package/dist/core/{p-171a19bf.entry.js → p-fdc4376e.entry.js} +2 -2
  307. package/dist/core/p-fdc4376e.entry.js.map +1 -0
  308. package/dist/esm/core.js +1 -1
  309. package/dist/esm/ic-button_3.entry.js.map +1 -1
  310. package/dist/esm/ic-input-component-container_3.entry.js +63 -37
  311. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  312. package/dist/esm/ic-pagination_3.entry.js +17 -17
  313. package/dist/esm/ic-pagination_3.entry.js.map +1 -1
  314. package/dist/esm/ic-section-container.entry.js.map +1 -1
  315. package/dist/esm/ic-top-navigation.entry.js +12 -8
  316. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  317. package/dist/esm/loader.js +1 -1
  318. package/dist/types/components/ic-menu/ic-menu.types.d.ts +1 -0
  319. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +4 -1
  320. package/dist/types/components.d.ts +10 -2
  321. package/hydrate/index.js +93 -62
  322. package/hydrate/index.mjs +93 -62
  323. package/package.json +4 -2
  324. package/vscode-data.json +5 -1
  325. package/dist/core/p-171a19bf.entry.js.map +0 -1
  326. package/dist/core/p-343670b4.entry.js +0 -2
  327. package/dist/core/p-343670b4.entry.js.map +0 -1
  328. package/dist/core/p-46e5a58b.entry.js.map +0 -1
@@ -0,0 +1,568 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { c as closeIcon } from './close-icon.js';
3
+ import { c as chevronIcon } from './chevron-icon.js';
4
+ import { O as getCssProperty, q as getCurrentDeviceSize, D as DEVICE_SIZES, l as getBrandForegroundAppearance, i as isSlotUsed, G as isEmptyString, c as checkResizeObserver, o as onComponentRequiredPropUndefined, e as renderDynamicChildSlots, I as IcBrandForegroundEnum, H as hasClassificationBanner, m as isPropDefined } from './helpers.js';
5
+ import { d as defineCustomElement$6 } from './ic-button2.js';
6
+ import { d as defineCustomElement$5 } from './ic-divider2.js';
7
+ import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
8
+ import { d as defineCustomElement$3 } from './ic-tooltip2.js';
9
+ import { d as defineCustomElement$2 } from './ic-typography2.js';
10
+
11
+ const menuIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
12
+ <path d="M0 0h24v24H0V0z" fill="none" />
13
+ <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />
14
+ <title>menu icon</title>
15
+ </svg>
16
+ `;
17
+
18
+ const icSideNavigationCss = ":host{display:block;--ic-typography-color:currentcolor;--side-navigation-position:fixed;--side-navigation-position-left:0;--side-navigation-position-top:var(--ic-space-xxl);--side-navigation-height:var(--ic-space-xxl);--sm-side-navigation-top-bar-height:3.5rem;--sm-side-navigation-collapsed-labels-width:6rem;--sm-side-navigation-expand-transition-duration:var(\n --ic-transition-duration-slow\n );--side-navigation-width:20rem;--sm-side-navigation-bottom-bar-height:3.5rem;--keyline-lighten:var(--ic-space-1px) solid var(--ic-side-navigation-keyline);--keyline-darken:var(--ic-space-1px) solid var(--ic-state-layer-darken-20);--ic-button-secondary-text-monochrome:var(--ic-brand-text-color);--ic-button-secondary-border-monochrome:var(--ic-brand-text-color);z-index:var(--ic-z-index-side-navigation)}:host>*{box-sizing:border-box}.side-navigation{display:flex;flex-direction:column;width:var(--side-navigation-width);color:var(--ic-side-navigation-text);position:var(--side-navigation-position);top:var(--side-navigation-position-top);left:calc(var(--side-navigation-width) * -1);bottom:0;background-color:var(--ic-side-navigation-background);z-index:var(--ic-z-index-side-navigation)}:host(.ic-side-navigation-inline) .side-navigation{position:absolute;height:100%}:host(.anchor-right) .side-navigation{right:calc(var(--side-navigation-width) * -1)}.classification-spacing{margin-bottom:var(--ic-space-lg)}.navigation-list{padding:0;margin:0;list-style:none}.side-navigation-inner{background-color:var(--ic-side-navigation-background);display:flex;flex-direction:column;flex:1 1 4rem;overflow:auto}:host(.ic-side-navigation-inline) .side-navigation-inner{flex:1}:host(.xs-menu-open) .side-navigation{transition:left var(--ic-easing-transition-slow);left:0}:host(:has(.xs-menu-open,.xs-menu-close)) ::slotted(ic-navigation-item){--navigation-item-side-nav-right:var(--ic-space-xl)}:host(.xs-menu-close) .side-navigation{left:calc(var(--side-navigation-width) * -1);transition:left var(--ic-easing-transition-slow)}:host(.xs-menu-close) .side-navigation>*{visibility:hidden}:host(.anchor-right.xs-menu-open) .side-navigation{right:0;left:auto}:host(.anchor-right.xs-menu-close) .side-navigation{right:calc(var(--side-navigation-width) * -1);left:auto;transition:right var(--ic-easing-transition-slow)}.bottom-wrapper{border-top:var(--keyline-lighten);bottom:0;left:0;z-index:2;background-color:var(--ic-side-navigation-background);display:flex;flex-direction:column}:host(.ic-side-navigation-inline) .bottom-wrapper{position:sticky}:host(.ic-side-navigation-dark) .bottom-wrapper{border-top:var(--keyline-darken)}.top-bar{display:flex;flex-direction:row;align-items:center;min-height:var(--side-navigation-height);padding:var(--ic-space-xs);box-sizing:border-box;background-color:var(--ic-side-navigation-background);position:fixed;top:0;left:0;right:0;border-bottom:var(--keyline-lighten);box-shadow:var(--ic-elevation-overlay);z-index:2;overflow:hidden;visibility:visible}:host(.ic-side-navigation-inline) .top-bar{position:absolute}:host(.ic-side-navigation-dark) .top-bar{border-bottom:var(--keyline-darken)}.top-bar.dark a:focus{box-shadow:var(--ic-border-focus)}.app-title-wrapper{display:flex;margin-left:var(--ic-space-xs);border-left:var(--keyline-lighten);padding-left:var(--ic-space-xxs);color:var(--ic-side-navigation-text);align-items:center}:host(.ic-side-navigation-dark) .app-title-wrapper{border-left:var(--keyline-darken)}.app-title-wrapper ic-typography h1{margin:0}@media screen and (min-width: 340px){.app-title-wrapper ic-typography{margin-left:var(--ic-space-xs)}}:host .title-link{display:flex;align-items:center;transition:box-shadow var(--ic-easing-transition-fast),\n background-color var(--ic-easing-transition-fast);text-decoration:none;padding:var(--ic-space-xxs);color:var(--ic-side-navigation-text)}:host .title-link:visited,:host .title-link:active{color:var(--ic-side-navigation-text)}slot[name=\"app-title\"]::slotted(a),slot[name=\"app-icon\"]::slotted(a){color:var(--ic-side-navigation-text);outline:none;text-decoration:none;display:flex}slot[name=\"app-title\"]::slotted(ic-typography),slot[name=\"app-title\"]::slotted(a){margin-left:var(--ic-space-xs) !important}slot[name=\"app-title\"]::slotted(a){font:var(--ic-font-subtitle-small)}:host .title-link:hover{border-radius:var(--ic-border-radius);background-color:var(--ic-side-navigation-hover)}:host .title-link:active{background-color:var(--ic-side-navigation-pressed)}:host .title-link:focus,:host .title-link:focus-within{border-radius:var(--ic-border-radius);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);background-color:transparent}:host .title-link ic-typography{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.app-title-wrapper ::slotted(svg){fill:var(--ic-side-navigation-text)}.app-icon-container{display:none}.button-label{display:flex;align-items:center}.mobile-top-bar-menu-icon{display:flex}.menu-button{width:6.5rem}.app-status-wrapper{inset:0 var(--ic-space-sm) 0 3.5rem;width:auto;display:flex;gap:var(--ic-space-xs);padding:var(--ic-space-sm) 0;justify-content:flex-end;align-items:flex-end;pointer-events:none;height:-moz-fit-content;height:fit-content;margin:0 var(--ic-space-xs)}.app-status-wrapper .app-version{display:flex;overflow-wrap:break-word;padding-bottom:var(--ic-space-xxs)}.app-status-wrapper .app-status{display:flex;border-radius:1rem;background-color:var(--ic-side-navigation-text);color:var(--ic-side-navigation-status-tag-text);padding:var(--ic-space-xxs) var(--ic-space-lg);min-width:1rem}.app-status-wrapper .app-status-text{overflow-wrap:break-word}:host(.ic-side-navigation-dark) .app-status-wrapper .app-status{--ic-typography-color:var(--ic-architectural-white)}.navigation-landmark-title{position:absolute;width:var(--ic-space-1px);height:var(--ic-space-1px);padding:0;margin:calc(-1 * var(--ic-space-1px));overflow:hidden}::slotted(ic-navigation-group){--navigation-group-height:2.75rem;--navigation-group-justify-content:space-between;--navigation-group-hover:var(--ic-side-navigation-hover);--navigation-group-text-hover:var(--ic-side-navigation-text);--navigation-item-child-height:3.5rem;--navigation-item-child-active:var(--ic-action-dark-bg-pressed);--navigation-item-child-color:var(--ic-side-navigation-text);--navigation-group-expand-toggle-padding:0.25rem}::slotted(ic-navigation-item),::slotted(ic-navigation-group){--navigation-item-justify-content:flex-start;--navigation-item-min-height:56px;--navigation-item-height:auto}.bottom-side-nav{position:relative;align-content:flex-end;min-height:var(--sm-side-navigation-top-bar-height)}.bottom-side-nav ic-divider{position:absolute;top:0}.primary-navigation{flex:1;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:none}.primary-navigation::-webkit-scrollbar{display:none}.primary-navigation,.secondary-navigation{overflow-x:hidden}.bottom-side-nav .menu-expand-button{position:absolute;display:none}.menu-visibility-visible{visibility:visible;width:100%}.app-title-show{min-width:15.5rem}:host(.side-display){display:flex;flex-direction:column;height:100vh;position:var(--side-navigation-position);left:0;top:0;bottom:0}:host(.side-display) .app-icon-container{height:40px;display:flex;align-items:center}:host(.side-display) .top-bar{--side-navigation-height:var(--sm-side-navigation-top-bar-height);position:relative;padding:0;box-shadow:none}:host(.ic-side-navigation-inline.side-display) .top-bar{position:sticky}:host(.anchor-right.side-display) .top-bar{box-shadow:0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%)}:host(.anchor-right.side-display) .bottom-wrapper{box-shadow:0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%)}:host(.side-display) .side-navigation,:host(.side-display) .top-bar{width:var(--sm-side-navigation-top-bar-height)}:host(.sm-collapsed.side-display){width:var(--sm-side-navigation-top-bar-height);transition:width var(--ic-easing-transition-slow)}:host(.sm-collapsed.collapsed-labels.side-display){width:var(--sm-side-navigation-collapsed-labels-width)}:host(.sm-expanded.side-display){width:var(--side-navigation-width);transition:width var(--ic-easing-transition-slow);box-shadow:var(--ic-elevation-overlay)}:host(.side-display) .side-navigation{--side-navigation-position-top:0;flex:1;position:relative;top:auto;left:auto;bottom:auto}:host(.ic-side-navigation-inline.side-display) .side-navigation{position:relative}:host(.anchor-right.side-display) .side-navigation{left:auto;right:0}:host(.side-display) .app-title-wrapper{margin-left:0;border-left:none;padding:var(--ic-space-xs) var(--ic-space-sm)}:host(.side-display) .app-title-wrapper ::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.side-display) .app-title-wrapper ic-typography{font-weight:var(--ic-font-weight-semibold)}:host(.sm-collapsed.side-display) .app-title-wrapper ic-typography{position:absolute;left:-9999px;opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.sm-collapsed.side-display) .app-title-wrapper ic-typography:dir(rtl){right:-9999px}:host(.sm-expanded.side-display) ic-typography{position:relative;left:0}:host(.sm-expanded.side-display) :is(.side-navigation,.top-bar){width:var(--side-navigation-width);transition:width var(--ic-easing-transition-slow)}:host(.sm-collapsed.side-display) :is(.side-navigation,.top-bar){width:var(--sm-side-navigation-top-bar-height);transition:width var(--ic-easing-transition-slow)}:host(.anchor-right.sm-expanded.side-display) :is(.side-navigation,.top-bar){left:auto;right:0}:host(.side-display) .app-status-wrapper,:host(.sm-collapsed.side-display) .app-status-wrapper{display:none;margin-left:0}:host(.sm-expanded.side-display) .app-status-wrapper{display:flex;max-width:16rem;margin-right:calc(var(--ic-space-xxxs) + var(--ic-space-xs))}:host(.side-display) .bottom-side-nav{justify-items:flex-end;align-items:flex-end;justify-content:flex-end;display:flex;outline:none}:host(.side-display) .bottom-side-nav .menu-expand-button{padding-left:var(--ic-space-md);height:var(--sm-side-navigation-top-bar-height);width:100%;color:var(--ic-side-navigation-text);background-color:transparent;outline:var(--ic-hc-focus-outline);border:none;cursor:pointer;display:flex;transition:var(--ic-easing-transition-fast)}:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button{height:100%}:host(.side-display) .bottom-side-nav .menu-expand-button svg{justify-items:flex-start;align-self:center;display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.side-display) .bottom-side-nav .menu-expand-button:hover{background-color:var(--ic-side-navigation-hover)}:host(.side-display) .bottom-side-nav .menu-expand-button:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background-color:transparent}:host(.sm-collapsed.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(1);transition:transform var(--ic-easing-transition-slow)}:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(-1);transition:transform var(--ic-easing-transition-slow);align-self:flex-end;margin-bottom:0.875rem}:host(.anchor-right.sm-collapsed.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(-1)}:host(.anchor-right.sm-expanded.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(1)}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-item){--navigation-item-label-opacity:1}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-item),:host(.sm-collapsed.side-display) ::slotted(ic-navigation-group){--navigation-item-label-opacity:0;--navigation-item-min-height:3.5rem;--navigation-item-height:3.5rem}:host(.sm-expanded.side-display) ::slotted(ic-navigation-item),:host(.sm-expanded.side-display) ::slotted(ic-navigation-group){--navigation-item-label-opacity:1;--navigation-item-height:auto;--navigation-item-min-height:3.5rem;--navigation-item-width:20rem;--navigation-item-side-nav-right:var(--ic-space-xl);--navigation-group-width:20rem}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-group){--navigation-group-title-position:absolute;--navigation-group-title-position-left:-9999px;--navigation-group-title-opacity:none}:host(.sm-expanded.side-display) ::slotted(ic-navigation-group){--navigation-group-title-position:relative;--navigation-group-title-position-left:0;--navigation-group-expand-toggle-padding:0.25rem;--navigation-group-title-opacity:flex}:host(.sm-collapsed.collapsed-labels.side-display) .side-navigation,:host(.sm-collapsed.collapsed-labels.side-display) .top-bar{width:var(--sm-side-navigation-collapsed-labels-width)}:host(.sm-collapsed.collapsed-labels.side-display) .menu-expand-button{padding:0}:host(.sm-collapsed.collapsed-labels.side-display) .app-title-wrapper{width:100%;justify-content:center}:host(.sm-collapsed.collapsed-labels.side-display) ::slotted(ic-navigation-group){--navigation-group-justify-content:center;--navigation-item-label-opacity:1;--navigation-group-item-min-width:100%;--navigation-group-expand-toggle-padding:1rem}:host(.collapsed-labels.side-display) .bottom-side-nav .menu-expand-button{justify-content:center}:host(.side-display) .collapsed-icon-labels-start{visibility:hidden;opacity:0}:host(.side-display) .collapsed-icon-labels-end{visibility:visible;opacity:1;transition:visibility 0s, opacity var(--ic-easing-transition-slow)}@media screen and (max-width: 419px){.top-bar{height:var(--side-navigation-height)}}@media screen and (max-width: 319px){.side-navigation{width:100%}}@media screen and (min-width: 340px){.app-icon-container{display:flex}}@media screen and (min-width: 577px){:host(.sm-collapsed) slot[name=\"app-title\"]::slotted(ic-typography),:host(.sm-collapsed) slot[name=\"app-title\"]::slotted(a){position:absolute;left:-9999px;opacity:0;transition:opacity var(--ic-easing-transition-slow)}@media (prefers-reduced-motion: reduce){:host(.sm-collapsed) slot[name=\"app-title\"]::slotted(ic-typography),:host(.sm-collapsed) slot[name=\"app-title\"]::slotted(a){transition:none}}:host(.sm-collapsed) slot[name=\"app-title\"]:dir(rtl)::slotted(ic-typography),:host(.sm-collapsed) slot[name=\"app-title\"]:dir(rtl)::slotted(a){right:-9999px}:host(.sm-expanded) slot[name=\"app-title\"]::slotted(a){font:var(--ic-font-h3) !important;font-weight:var(--ic-font-weight-semibold) !important;margin-left:var(--ic-space-xs) !important}}@media screen and (min-width: 993px){:host(.side-display){position:sticky;left:auto;top:0;bottom:0}:host(.sm-expanded.side-display){box-shadow:none}}@media (forced-colors: active){.side-navigation,.top-bar{border-right:var(--ic-border-hc)}.menu-expand-button{color:Highlight !important}slot[name=\"app-icon\"]::slotted(svg){fill:currentcolor}}@media (prefers-reduced-motion: reduce){:host(.xs-menu-open) .side-navigation,:host(.xs-menu-close) .side-navigation,:host(.anchor-right.xs-menu-close) .side-navigation,:host .title-link,:host(.sm-collapsed.side-display),:host(.sm-expanded.side-display),:host(.sm-collapsed.side-display) .app-title-wrapper ic-typography,:host(.sm-collapsed.side-display) :is(.side-navigation,.top-bar),:host(.sm-expanded.side-display) :is(.side-navigation,.top-bar),:host(.side-display) .bottom-side-nav .menu-expand-button,:host(.sm-collapsed.side-display) .bottom-side-nav .menu-expand-button svg,:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button svg,:host(.side-display) .collapsed-icon-labels-end{transition:none}}";
19
+ const IcSideNavigationStyle0 = icSideNavigationCss;
20
+
21
+ const SideNavigation = /*@__PURE__*/ proxyCustomElement(class SideNavigation extends HTMLElement {
22
+ constructor() {
23
+ super();
24
+ this.__registerHost();
25
+ this.__attachShadow();
26
+ this.icSideNavExpanded = createEvent(this, "icSideNavExpanded", 7);
27
+ this.ANIMATION_DURATION = window.matchMedia("(prefers-reduced-motion: reduce)").matches
28
+ ? 0
29
+ : parseInt(getCssProperty("--ic-transition-duration-slow")) || 0;
30
+ this.COLLAPSED_ICON_LABELS_END = "collapsed-icon-labels-end";
31
+ this.COLLAPSED_ICON_LABELS_START = "collapsed-icon-labels-start";
32
+ this.IC_NAVIGATION_ITEM = "ic-navigation-item";
33
+ this.hostMutationObserver = null;
34
+ this.resizeObserver = null;
35
+ this.deviceSize = getCurrentDeviceSize();
36
+ this.deviceSizeAppTitle = DEVICE_SIZES.S;
37
+ this.foregroundColor = getBrandForegroundAppearance();
38
+ this.hasSecondaryNavigation = false;
39
+ this.menuExpanded = false;
40
+ this.menuOpen = false;
41
+ /**
42
+ * If `true`, the side navigation will close when a navigation item is clicked. This behaviour is only applicable on larger device sizes.
43
+ */
44
+ this.closeOnNavItemClick = false;
45
+ /**
46
+ * If `true`, the icon and label will appear when side navigation is collapsed.
47
+ */
48
+ this.collapsedIconLabels = false;
49
+ /**
50
+ * If `true`, automatic parent wrapper styling will be disabled.
51
+ */
52
+ this.disableAutoParentStyling = false;
53
+ /**
54
+ * If `true`, the side navigation will not display as a top bar on small devices.
55
+ */
56
+ this.disableTopBarBehaviour = false;
57
+ /**
58
+ * If `true`, the side navigation will display in an expanded state.
59
+ */
60
+ this.expanded = false;
61
+ /**
62
+ * The URL that the app title link points to.
63
+ */
64
+ this.href = "/";
65
+ /**
66
+ * @internal If `true`, side navigation will be contained by its parent element.
67
+ */
68
+ this.inline = false;
69
+ /**
70
+ * The short title of the app to be displayed at small screen sizes in place of the app title.
71
+ */
72
+ this.shortAppTitle = "";
73
+ /**
74
+ * If `true`, the menu expand button will be removed (PLEASE NOTE: This takes effect on screen sizes 992px and above).
75
+ */
76
+ this.static = false;
77
+ this.emitSideNavigationExpanded = (objDetails) => {
78
+ this.icSideNavExpanded.emit({
79
+ sideNavExpanded: objDetails.sideNavExpanded,
80
+ sideNavMobile: !!objDetails.sideNavMobile,
81
+ });
82
+ };
83
+ this.toggleMenu = () => {
84
+ this.menuOpen = !this.menuOpen;
85
+ this.setMobileMenuAriaAttributes(this.menuOpen);
86
+ this.arrangeSlottedNavigationItem(this.menuOpen);
87
+ this.setToggleMenuFlyoutMenuVisibility(this.menuOpen);
88
+ this.emitSideNavigationExpanded({
89
+ sideNavExpanded: this.menuOpen,
90
+ sideNavMobile: true,
91
+ });
92
+ };
93
+ this.setToggleMenuFlyoutMenuVisibility = (menuOpen) => {
94
+ var _a;
95
+ const sideNav = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("#side-navigation");
96
+ const sideNavInner = sideNav.querySelector(".side-navigation-inner");
97
+ const bottomWrapper = sideNav.querySelector(".bottom-wrapper");
98
+ const menuVisibilityVisible = "menu-visibility-visible";
99
+ if (menuOpen) {
100
+ bottomWrapper.classList.add(menuVisibilityVisible);
101
+ sideNavInner.classList.add(menuVisibilityVisible);
102
+ }
103
+ else {
104
+ setTimeout(() => {
105
+ sideNavInner.classList.remove(menuVisibilityVisible);
106
+ bottomWrapper.classList.remove(menuVisibilityVisible);
107
+ }, this.ANIMATION_DURATION);
108
+ }
109
+ };
110
+ this.setMobileMenuAriaAttributes = (menuOpen) => {
111
+ if (this.menuButton) {
112
+ this.menuButton.setAttribute("aria-expanded", `${menuOpen}`);
113
+ this.menuButton.setAttribute("aria-label", `${menuOpen ? "Close" : "Open"} navigation menu`);
114
+ }
115
+ };
116
+ this.setAndRemoveNoWrapAfterMenuExpanded = () => {
117
+ var _a;
118
+ const appTitle = ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".title-link ic-typography")) ||
119
+ this.el.querySelector("[slot='app-title']");
120
+ appTitle === null || appTitle === void 0 ? void 0 : appTitle.classList.add("ic-typography-no-wrap");
121
+ setTimeout(() => {
122
+ appTitle === null || appTitle === void 0 ? void 0 : appTitle.classList.remove("ic-typography-no-wrap");
123
+ }, this.ANIMATION_DURATION);
124
+ };
125
+ this.toggleMenuExpanded = (expanded) => {
126
+ var _a, _b, _c, _d;
127
+ this.menuExpanded = expanded;
128
+ if (this.menuExpanded) {
129
+ this.setAndRemoveNoWrapAfterMenuExpanded();
130
+ (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".app-title-inner-wrapper")) === null || _b === void 0 ? void 0 : _b.classList.add("app-title-show");
131
+ }
132
+ else {
133
+ this.el.style.setProperty("--navigation-item-width", "320px");
134
+ (_d = (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector(".app-title-inner-wrapper")) === null || _d === void 0 ? void 0 : _d.classList.remove("app-title-show");
135
+ this.el.addEventListener("transitionend", (e) => {
136
+ if (e.propertyName === "width") {
137
+ this.el.style.setProperty("--navigation-item-width", null);
138
+ }
139
+ });
140
+ }
141
+ this.arrangeSlottedNavigationItem(this.menuExpanded);
142
+ this.displayTooltipWithExpandedLongLabel(this.menuExpanded);
143
+ if (this.collapsedIconLabels) {
144
+ this.animateCollapsedIconLabels();
145
+ }
146
+ this.setExpandedButtonHeight();
147
+ this.emitSideNavigationExpanded({ sideNavExpanded: this.menuExpanded });
148
+ };
149
+ /**
150
+ * In order to style nested slotted elements (e.g. using React Router components), this method
151
+ * rearranges the a tag and labels and adds inline styling expand/collapsed animations as external CSS classes are not
152
+ * do not take affect.
153
+ * @param menuExpanded boolean - true or false depending on side navigation state
154
+ */
155
+ this.arrangeSlottedNavigationItem = (menuExpanded) => {
156
+ const navItems = this.el.querySelectorAll("ic-navigation-item");
157
+ navItems.forEach((navItem) => {
158
+ var _a;
159
+ const isNamedSlot = isSlotUsed(navItem, "navigation-item");
160
+ const isUnnamedSlot = navItem.children[0] && !navItem.children[0].getAttribute("slot");
161
+ if (isNamedSlot || isUnnamedSlot) {
162
+ let navItemSlot;
163
+ if (isNamedSlot) {
164
+ navItemSlot = navItem.querySelector("[slot='navigation-item']");
165
+ }
166
+ else {
167
+ navItemSlot = navItem.children[0];
168
+ }
169
+ const iconWrapper = document.createElement("div");
170
+ const icon = navItemSlot === null || navItemSlot === void 0 ? void 0 : navItemSlot.querySelector("svg");
171
+ const badge = navItemSlot === null || navItemSlot === void 0 ? void 0 : navItemSlot.querySelector("ic-badge");
172
+ const label = (_a = navItem.textContent) === null || _a === void 0 ? void 0 : _a.trim();
173
+ const icTypography = document.createElement("ic-typography");
174
+ icTypography.classList.add("ic-typography-label", "hydrated", "navigation-item-side-nav-slotted-text");
175
+ iconWrapper.style.position = "relative";
176
+ iconWrapper.style.height = "var(--ic-space-lg)";
177
+ icon && iconWrapper.append(icon);
178
+ badge && iconWrapper.append(badge);
179
+ if (label) {
180
+ icTypography.textContent = label;
181
+ }
182
+ if (navItemSlot) {
183
+ navItemSlot.textContent = "";
184
+ navItemSlot.append(iconWrapper);
185
+ navItemSlot.append(icTypography);
186
+ }
187
+ if (this.collapsedIconLabels) {
188
+ this.styleSlottedCollapsedIconLabels(!!menuExpanded, icTypography);
189
+ }
190
+ else {
191
+ this.styleSlottedIconLabels(!!menuExpanded, icTypography);
192
+ }
193
+ }
194
+ });
195
+ };
196
+ this.styleSlottedCollapsedIconLabels = (menuExpanded, icTypography) => {
197
+ if (menuExpanded) {
198
+ icTypography.style.marginTop = "0";
199
+ icTypography.style.whiteSpace = "nowrap";
200
+ icTypography.style.overflow = "hidden";
201
+ icTypography.style.textOverflow = "ellipsis";
202
+ }
203
+ else {
204
+ icTypography.style.marginTop = "10px";
205
+ icTypography.style.whiteSpace = "nowrap";
206
+ icTypography.style.overflow = "hidden";
207
+ icTypography.style.textOverflow = "ellipsis";
208
+ }
209
+ };
210
+ this.setExpandedButtonHeight = () => {
211
+ var _a;
212
+ const appStatusWrapper = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("#side-navigation > .bottom-wrapper > .bottom-side-nav > .app-status-wrapper");
213
+ if (appStatusWrapper.offsetHeight !== 0) {
214
+ this.el.style.setProperty("--sm-side-navigation-bottom-bar-height", `${appStatusWrapper.offsetHeight}px`);
215
+ }
216
+ };
217
+ this.styleSlottedIconLabels = (menuExpanded, icTypography) => {
218
+ if (menuExpanded) {
219
+ icTypography.style.opacity = "1";
220
+ icTypography.style.visibility = "visible";
221
+ if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
222
+ icTypography.style.transition =
223
+ "visibility 0s, opacity var(--ic-easing-transition-slow)";
224
+ }
225
+ }
226
+ else {
227
+ icTypography.style.opacity = "0";
228
+ icTypography.style.visibility = "hidden";
229
+ if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
230
+ icTypography.style.transition =
231
+ "visibility 0s, opacity var(--ic-easing-transition-slow)";
232
+ }
233
+ }
234
+ };
235
+ this.transitionHandler = (type) => {
236
+ var _a, _b;
237
+ const primaryNavigationWrapper = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".primary-navigation");
238
+ const secondaryNavigationWrapper = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(".bottom-wrapper > .secondary-navigation");
239
+ const classToRemove = type === "start"
240
+ ? this.COLLAPSED_ICON_LABELS_END
241
+ : this.COLLAPSED_ICON_LABELS_START;
242
+ const classToAdd = type === "start"
243
+ ? this.COLLAPSED_ICON_LABELS_START
244
+ : this.COLLAPSED_ICON_LABELS_END;
245
+ if (primaryNavigationWrapper) {
246
+ primaryNavigationWrapper.classList.remove(classToRemove);
247
+ primaryNavigationWrapper.classList.add(classToAdd);
248
+ }
249
+ if (secondaryNavigationWrapper) {
250
+ secondaryNavigationWrapper.classList.remove(classToRemove);
251
+ secondaryNavigationWrapper.classList.add(classToAdd);
252
+ }
253
+ };
254
+ this.transitionEndHandler = () => {
255
+ this.transitionHandler("end");
256
+ };
257
+ this.animateCollapsedIconLabels = () => {
258
+ this.transitionHandler("start");
259
+ this.transitionEndHandler();
260
+ this.el.addEventListener("transitionend", this.transitionEndHandler);
261
+ };
262
+ this.paddingIconWidth = (navItems) => {
263
+ const navItemLink = (navItems[0].shadowRoot &&
264
+ (navItems[0].shadowRoot.querySelector("ic-tooltip a") ||
265
+ navItems[0].shadowRoot.querySelector("ic-tooltip div"))) ||
266
+ navItems[0].querySelector("a") ||
267
+ navItems[0].querySelector("div");
268
+ const navItemSVG = navItems[0].querySelector("svg");
269
+ if (navItemLink && navItemSVG) {
270
+ const navStyles = {
271
+ gap: window.getComputedStyle(navItemLink).gap,
272
+ iconWidth: window.getComputedStyle(navItemSVG).width,
273
+ paddingLeft: window.getComputedStyle(navItemLink).paddingLeft,
274
+ };
275
+ return Object.values(navStyles).reduce((prev, curr) => {
276
+ return (prev += parseInt(curr));
277
+ }, 0);
278
+ }
279
+ return 0;
280
+ };
281
+ this.displayTooltipWithExpandedLongLabel = (menuExpanded) => {
282
+ let timer;
283
+ if (menuExpanded) {
284
+ timer = setTimeout(() => {
285
+ const sideNavWidth = this.el.clientWidth;
286
+ const navigationItems = Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));
287
+ const paddingIconDelta = navigationItems.length
288
+ ? this.paddingIconWidth(navigationItems)
289
+ : 0;
290
+ navigationItems.forEach((navigationItem) => {
291
+ var _a, _b;
292
+ const icTypographyScrollWidth = ((_a = (navigationItem.shadowRoot &&
293
+ navigationItem.shadowRoot.querySelector("ic-tooltip .link ic-typography.ic-typography-label"))) === null || _a === void 0 ? void 0 : _a.scrollWidth) ||
294
+ ((_b = navigationItem.querySelector("ic-typography.ic-typography-label")) === null || _b === void 0 ? void 0 : _b.scrollWidth);
295
+ if (icTypographyScrollWidth &&
296
+ icTypographyScrollWidth > sideNavWidth - paddingIconDelta) {
297
+ navigationItem.setAttribute("display-navigation-tooltip", "true");
298
+ }
299
+ });
300
+ }, this.ANIMATION_DURATION);
301
+ }
302
+ else {
303
+ clearTimeout(timer);
304
+ const navigationItems = Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));
305
+ navigationItems.forEach((navigationItem) => {
306
+ navigationItem.setAttribute("display-navigation-tooltip", "false");
307
+ });
308
+ }
309
+ };
310
+ this.setMenuExpanded = (expanded) => {
311
+ this.menuExpanded = expanded;
312
+ };
313
+ this.handleNavItemClicked = () => {
314
+ if (!this.menuOpen &&
315
+ this.deviceSize > DEVICE_SIZES.S &&
316
+ this.menuExpanded) {
317
+ setTimeout(() => {
318
+ this.toggleMenuExpanded(false);
319
+ }, 0);
320
+ }
321
+ };
322
+ /**
323
+ * As the mobile top bar is fixed, a padding top is required
324
+ * to push main content down the height of the mobile top bar
325
+ * @param value - padding-top css value
326
+ */
327
+ this.setParentPaddingTop = (value) => {
328
+ var _a;
329
+ (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.style.setProperty("padding-top", value);
330
+ };
331
+ this.setParentPaddingLeft = (value) => {
332
+ var _a;
333
+ (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.style.setProperty("padding-left", value);
334
+ };
335
+ this.renderAppTitle = (isAppNameSubtitleVariant) => {
336
+ const displayShortAppTitle = this.deviceSize <= DEVICE_SIZES.S && !isEmptyString(this.shortAppTitle);
337
+ return (h("ic-typography", { variant: displayShortAppTitle || isAppNameSubtitleVariant
338
+ ? "subtitle-small"
339
+ : "h3", "aria-label": displayShortAppTitle
340
+ ? `${this.appTitle} (${this.shortAppTitle})`
341
+ : undefined }, h("h1", null, displayShortAppTitle ? this.shortAppTitle : this.appTitle)));
342
+ };
343
+ this.resizeObserverCallback = (currSize) => {
344
+ var _a, _b, _c, _d;
345
+ this.deviceSize = currSize;
346
+ const isSDeviceEnableTop = currSize === DEVICE_SIZES.S && !this.disableTopBarBehaviour;
347
+ if (!this.disableAutoParentStyling) {
348
+ const topBarHeight = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".top-bar")) === null || _b === void 0 ? void 0 : _b.scrollHeight;
349
+ this.setParentPaddingTop(isSDeviceEnableTop ? `${topBarHeight}px` : "0");
350
+ if (isSDeviceEnableTop)
351
+ this.setParentPaddingLeft("0");
352
+ if (isSDeviceEnableTop && this.inline) {
353
+ (_c = this.el.parentElement) === null || _c === void 0 ? void 0 : _c.style.setProperty("height", `calc(100% - ${topBarHeight}px)`);
354
+ }
355
+ else if (!isSDeviceEnableTop) {
356
+ (_d = this.el.parentElement) === null || _d === void 0 ? void 0 : _d.style.setProperty("height", "100%");
357
+ }
358
+ }
359
+ const notSmallDisableTop = currSize > DEVICE_SIZES.S || this.disableTopBarBehaviour;
360
+ if (!this.disableAutoParentStyling) {
361
+ const paddingLeft = `calc(var(--ic-space-xxl) ${this.collapsedIconLabels ? "* 2" : "+ var(--ic-space-xs)"})`;
362
+ if (currSize > DEVICE_SIZES.L) {
363
+ this.setParentPaddingTop("0");
364
+ this.setParentPaddingLeft("0");
365
+ }
366
+ else if (notSmallDisableTop &&
367
+ currSize <= DEVICE_SIZES.M &&
368
+ this.static) {
369
+ this.setParentPaddingLeft(paddingLeft);
370
+ }
371
+ else if (notSmallDisableTop && currSize <= DEVICE_SIZES.L) {
372
+ this.setParentPaddingLeft(this.static && this.menuExpanded
373
+ ? "calc(var(--ic-space-xl) * 10)"
374
+ : paddingLeft);
375
+ }
376
+ }
377
+ };
378
+ this.runResizeObserver = () => {
379
+ this.resizeObserver = new ResizeObserver(() => {
380
+ const currSize = getCurrentDeviceSize();
381
+ this.deviceSizeAppTitle = currSize;
382
+ this.resizeObserverCallback(currSize);
383
+ });
384
+ this.resizeObserver.observe(document.body, { box: "content-box" });
385
+ };
386
+ this.setCollapsedIconLabels = () => {
387
+ const navigationItems = Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));
388
+ navigationItems.forEach((navigationItem) => {
389
+ navigationItem.setAttribute("collapsed-icon-label", "true");
390
+ });
391
+ };
392
+ this.styleSlottedCollapsedIconLabel = () => {
393
+ const dynamicSlottedIcTypographyComps = Array.from(this.el.querySelectorAll(".navigation-item-side-nav-slotted-text"));
394
+ dynamicSlottedIcTypographyComps.forEach((icTypography) => {
395
+ var _a, _b;
396
+ if ((_b = (_a = icTypography.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.classList.contains("navigation-item-side-nav-collapsed-with-label")) {
397
+ icTypography.style.whiteSpace = "nowrap";
398
+ icTypography.style.overflow = "hidden";
399
+ icTypography.style.textOverflow = "ellipsis";
400
+ icTypography.style.marginTop = "10px";
401
+ }
402
+ });
403
+ };
404
+ this.renderTopBar = ({ isSDevice, foregroundColor, menuOpen, href, isAppNameSubtitleVariant, }) => {
405
+ const hasTitle = this.appTitle !== "" && isPropDefined(this.appTitle);
406
+ const Component = isSlotUsed(this.el, "app-title") ? "div" : "a";
407
+ const attrs = Component == "a" && {
408
+ href: href,
409
+ };
410
+ return (h("div", { class: {
411
+ "top-bar": true,
412
+ [this.foregroundColor]: true,
413
+ } }, isSDevice && (h("nav", { "aria-labelledby": "menu-navigation-toggle-button-landmark", "aria-hidden": "false" }, h("ic-button", { "aria-label": "Open navigation menu", class: "menu-button", id: "menu-button", variant: "secondary", size: "small", "full-width": "true", theme: foregroundColor == "default" || foregroundColor == "light"
414
+ ? "light"
415
+ : "dark", monochrome: true, onClick: this.toggleMenu, ariaOwnsId: "side-navigation", "aria-haspopup": "true", "aria-expanded": "false", ref: (el) => (this.menuButton = el) }, h("span", { class: "mobile-top-bar-menu-icon", slot: "left-icon", innerHTML: menuOpen ? closeIcon : menuIcon }), menuOpen ? "Close" : "Menu"), h("span", { id: "menu-navigation-toggle-button-landmark", class: "navigation-landmark-title", "aria-hidden": "true" }, "Navigation menu toggle button"))), h("div", { class: "app-title-wrapper" }, (hasTitle || isSlotUsed(this.el, "app-title")) && (h(Component, Object.assign({}, attrs, { class: "title-link" }), h("div", { class: "app-icon-container", "aria-hidden": "true" }, h("slot", { name: "app-icon" })), h("div", { class: "app-title-inner-wrapper" }, isSlotUsed(this.el, "app-title") ? (h("slot", { name: "app-title" })) : (this.renderAppTitle(isAppNameSubtitleVariant))))))));
416
+ };
417
+ }
418
+ watchExpandedHandler() {
419
+ this.toggleMenuExpanded(this.expanded);
420
+ }
421
+ componentWillLoad() {
422
+ this.setMenuExpanded(this.expanded);
423
+ if (this.collapsedIconLabels) {
424
+ this.setCollapsedIconLabels();
425
+ }
426
+ this.hasSecondaryNavigation = isSlotUsed(this.el, "secondary-navigation");
427
+ }
428
+ componentDidLoad() {
429
+ this.emitSideNavigationExpanded({
430
+ sideNavExpanded: this.menuExpanded,
431
+ sideNavMobile: this.deviceSize === DEVICE_SIZES.S && !this.disableTopBarBehaviour,
432
+ });
433
+ checkResizeObserver(this.runResizeObserver);
434
+ this.styleSlottedCollapsedIconLabel();
435
+ this.arrangeSlottedNavigationItem(this.menuExpanded);
436
+ this.displayTooltipWithExpandedLongLabel(this.menuExpanded);
437
+ this.setExpandedButtonHeight();
438
+ if (this.closeOnNavItemClick) {
439
+ this.el.addEventListener("navItemClicked", this.handleNavItemClicked);
440
+ }
441
+ !isSlotUsed(this.el, "app-title") &&
442
+ onComponentRequiredPropUndefined([{ prop: this.appTitle, propName: "app-title" }], "Side Navigation");
443
+ this.hostMutationObserver = new MutationObserver((mutationList) => {
444
+ renderDynamicChildSlots(mutationList, ["primary-navigation", "secondary-navigation"], this);
445
+ this.arrangeSlottedNavigationItem(this.menuExpanded);
446
+ });
447
+ this.hostMutationObserver.observe(this.el, {
448
+ childList: true,
449
+ });
450
+ }
451
+ disconnectedCallback() {
452
+ var _a, _b;
453
+ if (this.resizeObserver !== null) {
454
+ this.resizeObserver.disconnect();
455
+ }
456
+ (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
457
+ (_b = this.el) === null || _b === void 0 ? void 0 : _b.removeEventListener("transitionend", this.transitionEndHandler);
458
+ if (this.closeOnNavItemClick) {
459
+ this.el.removeEventListener("navItemClicked", this.handleNavItemClicked);
460
+ }
461
+ }
462
+ brandChangeHandler({ detail }) {
463
+ this.foregroundColor = detail.mode;
464
+ }
465
+ render() {
466
+ const { appTitle, menuOpen, foregroundColor, menuExpanded, href, status, version, collapsedIconLabels, inline, } = this;
467
+ const isSDevice = !this.disableTopBarBehaviour && this.deviceSize === DEVICE_SIZES.S;
468
+ const isSDeviceDisableTop = this.disableTopBarBehaviour && this.deviceSize === DEVICE_SIZES.S;
469
+ const isMdDevice = this.deviceSize === DEVICE_SIZES.M;
470
+ const isLgDevice = this.deviceSize >= DEVICE_SIZES.L;
471
+ const isAppNameSubtitleVariant = this.deviceSizeAppTitle === DEVICE_SIZES.S;
472
+ const displayExpandBtn = isMdDevice || isSDeviceDisableTop || (isLgDevice && !this.static);
473
+ const topBarProps = {
474
+ isSDevice,
475
+ foregroundColor,
476
+ menuOpen,
477
+ href: href,
478
+ isAppNameSubtitleVariant,
479
+ appTitle: appTitle || "",
480
+ };
481
+ return (h(Host, { key: '467270372cb15a90984978cb333a6756c7ffcb8d', class: {
482
+ "xs-menu-open": menuOpen && isSDevice,
483
+ "xs-menu-close": !menuOpen && isSDevice,
484
+ "sm-collapsed": !isSDevice && !menuExpanded,
485
+ "sm-expanded": !isSDevice && menuExpanded,
486
+ "side-display": this.deviceSize > DEVICE_SIZES.S || !!this.disableTopBarBehaviour,
487
+ [`ic-side-navigation-${IcBrandForegroundEnum.Dark}`]: foregroundColor === IcBrandForegroundEnum.Dark,
488
+ ["collapsed-labels"]: !isSDevice && !menuExpanded && !!collapsedIconLabels,
489
+ ["ic-side-navigation-inline"]: !!inline,
490
+ } }, isSDevice && this.renderTopBar(Object.assign({}, topBarProps)), h("div", { key: '51b75422befcc62a8b9a866ab9ab7c58b799db2c', class: "side-navigation", id: "side-navigation" }, !isSDevice && this.renderTopBar(Object.assign({}, topBarProps)), h("div", { key: 'fbcb14963d2ce5567297bdf794d1dd5f7a6209bb', class: "side-navigation-inner" }, isSlotUsed(this.el, "primary-navigation") && (h("nav", { key: '24da45c7237f1152c1e93db9b928120bcca1ba14', class: "primary-navigation", "aria-labelledby": "primary-navigation-landmark" }, h("span", { key: 'e57f1521e37ecc9b770b35339059564ff23fe945', "aria-hidden": "true", class: "navigation-landmark-title", id: "primary-navigation-landmark" }, "Primary"), h("ul", { key: '88ffcdc33e0ebb348a3f8851dfb85020625293d7', class: "navigation-list" }, h("slot", { key: '91243f0760b0a67226f4c83a0393f669443ee356', name: "primary-navigation" }))))), h("div", { key: '77eaa1bf6bd8951c5a77902c75b0664aa36f0b44', class: {
491
+ ["bottom-wrapper"]: true,
492
+ ["classification-spacing"]: hasClassificationBanner(),
493
+ } }, isSlotUsed(this.el, "secondary-navigation") && (h("nav", { key: 'ad66580f2b2f753f4ce2d1be8128fdcb5fb69c9f', class: "secondary-navigation", "aria-labelledby": "secondary-navigation-landmark" }, h("span", { key: '3f503502795535166e14d6d52ee1b8f72dfe9551', "aria-hidden": "true", class: "navigation-landmark-title", id: "secondary-navigation-landmark" }, "Secondary"), h("ul", { key: 'cfd5af2f79b1ca9e309fc160c5b4b00385f017d2', class: "navigation-list" }, h("slot", { key: 'a975b85e39c977ea241a976df63699337f6507d7', name: "secondary-navigation" })))), h("div", { key: 'b0f3f81a20589100389495ded413bf1bfe09e096', class: "bottom-side-nav" }, this.hasSecondaryNavigation && h("ic-divider", { key: '3ee7716a6a6ed2e8f776b9ba376a54274c84f873' }), displayExpandBtn && (h("button", { key: 'c7f04012bfcb7f727431a9d7e6e53d714cc49e5e', class: "menu-expand-button", innerHTML: chevronIcon, onClick: () => this.toggleMenuExpanded(!this.menuExpanded), "aria-label": `${menuExpanded ? "Collapse" : "Expand"} side navigation` })), h("div", { key: 'a3d90469e6d05790dd84a00ea1e4c4c35ecb8955', class: "app-status-wrapper" }, status && (h("div", { key: '6dddec89dbd4e81f2d5b0132c648e53e72092d14', class: {
494
+ ["app-status"]: true,
495
+ } }, h("ic-typography", { key: '21635fd5640f74861ede6840073a112753d13a29', "aria-label": "app tag", variant: "label-uppercase", class: "app-status-text" }, status))), version && (h("ic-typography", { key: '7a95df03f61c13f2a6ed23e43be42959ae98fd88', variant: "label", class: "app-version", "aria-label": "app version" }, version))))))));
496
+ }
497
+ get el() { return this; }
498
+ static get watchers() { return {
499
+ "expanded": ["watchExpandedHandler"]
500
+ }; }
501
+ static get style() { return IcSideNavigationStyle0; }
502
+ }, [1, "ic-side-navigation", {
503
+ "appTitle": [1, "app-title"],
504
+ "closeOnNavItemClick": [4, "close-on-nav-item-click"],
505
+ "collapsedIconLabels": [4, "collapsed-icon-labels"],
506
+ "disableAutoParentStyling": [4, "disable-auto-parent-styling"],
507
+ "disableTopBarBehaviour": [4, "disable-top-bar-behaviour"],
508
+ "expanded": [4],
509
+ "href": [1],
510
+ "inline": [4],
511
+ "shortAppTitle": [1, "short-app-title"],
512
+ "static": [4],
513
+ "status": [1],
514
+ "version": [1],
515
+ "deviceSize": [32],
516
+ "deviceSizeAppTitle": [32],
517
+ "foregroundColor": [32],
518
+ "hasSecondaryNavigation": [32],
519
+ "menuExpanded": [32],
520
+ "menuOpen": [32]
521
+ }, [[4, "brandChange", "brandChangeHandler"]], {
522
+ "expanded": ["watchExpandedHandler"]
523
+ }]);
524
+ function defineCustomElement$1() {
525
+ if (typeof customElements === "undefined") {
526
+ return;
527
+ }
528
+ const components = ["ic-side-navigation", "ic-button", "ic-divider", "ic-loading-indicator", "ic-tooltip", "ic-typography"];
529
+ components.forEach(tagName => { switch (tagName) {
530
+ case "ic-side-navigation":
531
+ if (!customElements.get(tagName)) {
532
+ customElements.define(tagName, SideNavigation);
533
+ }
534
+ break;
535
+ case "ic-button":
536
+ if (!customElements.get(tagName)) {
537
+ defineCustomElement$6();
538
+ }
539
+ break;
540
+ case "ic-divider":
541
+ if (!customElements.get(tagName)) {
542
+ defineCustomElement$5();
543
+ }
544
+ break;
545
+ case "ic-loading-indicator":
546
+ if (!customElements.get(tagName)) {
547
+ defineCustomElement$4();
548
+ }
549
+ break;
550
+ case "ic-tooltip":
551
+ if (!customElements.get(tagName)) {
552
+ defineCustomElement$3();
553
+ }
554
+ break;
555
+ case "ic-typography":
556
+ if (!customElements.get(tagName)) {
557
+ defineCustomElement$2();
558
+ }
559
+ break;
560
+ } });
561
+ }
562
+
563
+ const IcSideNavigation = SideNavigation;
564
+ const defineCustomElement = defineCustomElement$1;
565
+
566
+ export { IcSideNavigation, defineCustomElement };
567
+
568
+ //# sourceMappingURL=ic-side-navigation.js.map