@4sh/ui-kit 0.1.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 (202) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +7 -0
  3. package/README.md +229 -0
  4. package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
  5. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
  6. package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
  7. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
  8. package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
  9. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
  10. package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
  11. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
  12. package/fesm2022/4sh-ui-kit-types.mjs +12 -0
  13. package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
  14. package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
  15. package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
  16. package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
  17. package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
  18. package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
  19. package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
  20. package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
  21. package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
  22. package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
  23. package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
  24. package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
  25. package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
  26. package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
  27. package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
  28. package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
  29. package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
  30. package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
  31. package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
  32. package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
  33. package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
  34. package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
  35. package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
  36. package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
  37. package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
  38. package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
  39. package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
  40. package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
  41. package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
  42. package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
  43. package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
  44. package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
  45. package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
  46. package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
  47. package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
  48. package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
  49. package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
  50. package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
  51. package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
  52. package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
  53. package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
  54. package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
  55. package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
  56. package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
  57. package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
  58. package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
  59. package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
  60. package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
  61. package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
  62. package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
  63. package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
  64. package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
  65. package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
  66. package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
  67. package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
  68. package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
  69. package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
  70. package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
  71. package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
  72. package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
  73. package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
  74. package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
  75. package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
  76. package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
  77. package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
  78. package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
  79. package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
  80. package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
  81. package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
  82. package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
  83. package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
  84. package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
  85. package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
  86. package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
  87. package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
  88. package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
  89. package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
  90. package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
  91. package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
  92. package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
  93. package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
  94. package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
  95. package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
  96. package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
  97. package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
  98. package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
  99. package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
  100. package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
  101. package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
  102. package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
  103. package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
  104. package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
  105. package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
  106. package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
  107. package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
  108. package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
  109. package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
  110. package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
  111. package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
  112. package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
  113. package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
  114. package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
  115. package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
  116. package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
  117. package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
  118. package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
  119. package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
  120. package/fesm2022/4sh-ui-kit.mjs +16 -0
  121. package/fesm2022/4sh-ui-kit.mjs.map +1 -0
  122. package/package.json +287 -0
  123. package/styles/base/_base.scss +19 -0
  124. package/styles/base/_motion.scss +144 -0
  125. package/styles/base/_typography.scss +99 -0
  126. package/styles/generated/_tokens-breakpoint.scss +8 -0
  127. package/styles/generated/_tokens-metrics.scss +37 -0
  128. package/styles/generated/_tokens-primitives.scss +284 -0
  129. package/styles/generated/_tokens-responsive.scss +99 -0
  130. package/styles/generated/_tokens-semantics.scss +1274 -0
  131. package/styles/generated/_tokens-styles.scss +35 -0
  132. package/styles/generated/_tokens-transitions.scss +11 -0
  133. package/styles/generated/_tokens-typography.scss +14 -0
  134. package/styles/generated/_tokens.scss +10 -0
  135. package/styles/index.scss +25 -0
  136. package/styles/settings/_ui-config.scss +67 -0
  137. package/styles/utils/_functions.scss +67 -0
  138. package/styles/utils/_helpers.scss +129 -0
  139. package/styles/utils/_mixins.scss +186 -0
  140. package/styles/utils/_motion.scss +47 -0
  141. package/styles/utils/_overlay.scss +26 -0
  142. package/styles/utils.scss +15 -0
  143. package/styles.css +1 -0
  144. package/types/4sh-ui-kit-forms.d.ts +259 -0
  145. package/types/4sh-ui-kit-motion.d.ts +111 -0
  146. package/types/4sh-ui-kit-overlay.d.ts +31 -0
  147. package/types/4sh-ui-kit-theming.d.ts +54 -0
  148. package/types/4sh-ui-kit-types.d.ts +13 -0
  149. package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
  150. package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
  151. package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
  152. package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
  153. package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
  154. package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
  155. package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
  156. package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
  157. package/types/4sh-ui-kit-ui-button.d.ts +91 -0
  158. package/types/4sh-ui-kit-ui-card.d.ts +102 -0
  159. package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
  160. package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
  161. package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
  162. package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
  163. package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
  164. package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
  165. package/types/4sh-ui-kit-ui-field.d.ts +53 -0
  166. package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
  167. package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
  168. package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
  169. package/types/4sh-ui-kit-ui-image.d.ts +88 -0
  170. package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
  171. package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
  172. package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
  173. package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
  174. package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
  175. package/types/4sh-ui-kit-ui-input.d.ts +78 -0
  176. package/types/4sh-ui-kit-ui-label.d.ts +36 -0
  177. package/types/4sh-ui-kit-ui-link.d.ts +72 -0
  178. package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
  179. package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
  180. package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
  181. package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
  182. package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
  183. package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
  184. package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
  185. package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
  186. package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
  187. package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
  188. package/types/4sh-ui-kit-ui-select.d.ts +392 -0
  189. package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
  190. package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
  191. package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
  192. package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
  193. package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
  194. package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
  195. package/types/4sh-ui-kit-ui-table.d.ts +570 -0
  196. package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
  197. package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
  198. package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
  199. package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
  200. package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
  201. package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
  202. package/types/4sh-ui-kit.d.ts +4 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"4sh-ui-kit-ui-link.mjs","sources":["../../../projects/ui-kit/ui-link/src/lib/ui-link.ts","../../../projects/ui-kit/ui-link/src/lib/ui-link.html","../../../projects/ui-kit/ui-link/src/public-api.ts","../../../projects/ui-kit/ui-link/src/4sh-ui-kit-ui-link.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n input,\n isDevMode,\n output,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { UiIcon } from '@4sh/ui-kit/ui-icon';\n\nexport type LinkSize = 'default' | 'small';\n\n/**\n * ui-link — inline textual link (renders a real <a>), for prose / navigation.\n *\n * Choose by semantics, not appearance:\n * • Something that NAVIGATES (URL/route) → this component, or `ui-button`\n * with `href`/`routerLink` when it must look like a button.\n * • Something that triggers an ACTION (submit, open a modal…) → `ui-button`.\n *\n * Accepts a plain `href` (external) or a `routerLink` (internal navigation).\n * Interactive states (hover/focus/pressed) are CSS-driven, never Angular props.\n */\n@Component({\n selector: 'ui-link',\n imports: [UiIcon, RouterLink, NgTemplateOutlet],\n templateUrl: './ui-link.html',\n styleUrl: './ui-link.scss',\n host: { '[style.display]': \"'inline-flex'\" },\n})\nexport class UiLink {\n /** Visible link text (optional when using projected content or icon-only). */\n label = input<string>();\n ariaLabel = input<string>();\n size = input<LinkSize>('default');\n\n // --- Destination -----------------------------------------------------\n /** External / plain URL. */\n href = input<string>();\n /** Angular router target (internal navigation, uses RouterLink). */\n routerLink = input<string | unknown[]>();\n /** Anchor target (e.g. \"_blank\"). */\n target = input<string>();\n /** Anchor rel. Defaults to \"noopener noreferrer\" for external links. */\n rel = input<string>();\n /** Convenience for external links: sets target=\"_blank\" + a safe rel. */\n external = input(false, { transform: booleanAttribute });\n\n // --- Icons (presence-based, same as ui-button) -----------------------\n /** FontAwesome icon name shown before the text. */\n iconLeft = input<string>();\n /** FontAwesome icon name shown after the text. */\n iconRight = input<string>();\n\n disabled = input(false, { transform: booleanAttribute });\n tabindex = input<number>();\n /** aria-current exposed on the anchor (e.g. \"page\" for the current breadcrumb item). */\n ariaCurrent = input<string>();\n\n /** Emitted on click (never when disabled). Navigation stays native. */\n linkClick = output<MouseEvent>();\n /** Fired when the link receives focus. */\n linkFocus = output<FocusEvent>();\n /** Fired when the link loses focus. */\n linkBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly hostEl = viewChild.required<ElementRef<HTMLAnchorElement>>('host');\n\n constructor() {\n // A11y safeguard: an icon-only link must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.isIconOnly() && !this.accessibleLabel()) {\n console.warn(\n '[ui-link] Icon-only link has no accessible name: provide `ariaLabel` (or `label`).',\n );\n }\n });\n }\n }\n\n /** @ignore Icon size follows the text size. */\n protected readonly iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'));\n\n /** @ignore No visible text but at least one icon → icon-only. */\n protected readonly isIconOnly = computed(\n () => !this.label() && (!!this.iconLeft() || !!this.iconRight()),\n );\n\n /** @ignore Link mode uses the Angular RouterLink directive. */\n protected readonly useRouterLink = computed(() => this.routerLink() != null);\n\n /** @ignore Effective anchor target (external forces _blank). */\n protected readonly computedTarget = computed(() => this.target() ?? (this.external() ? '_blank' : null));\n\n /** @ignore Anchor rel: explicit, or a safe default for _blank / external. */\n protected readonly computedRel = computed(() => {\n if (this.rel()) return this.rel()!;\n if (this.computedTarget() === '_blank') return 'noopener noreferrer';\n return null;\n });\n\n /** @ignore Tabindex: -1 when disabled (an <a> has no native disabled). */\n protected readonly linkTabindex = computed(() => (this.disabled() ? -1 : (this.tabindex() ?? null)));\n\n /** @ignore Accessible name: explicit, or the label when icon-only. */\n protected readonly accessibleLabel = computed(() => {\n if (this.ariaLabel()) return this.ariaLabel()!;\n if (this.isIconOnly()) return this.label() ?? null;\n return null;\n });\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-link'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isIconOnly()) c.push('_icon-only');\n if (this.disabled()) c.push('_disabled');\n return c.join(' ');\n });\n\n /** Sets the focus on the link (useful for controlling focus programmatically). */\n focus(options?: FocusOptions): void {\n this.hostEl().nativeElement.focus(options);\n }\n\n /** @ignore */\n protected onClick(event: MouseEvent): void {\n if (this.disabled()) {\n event.preventDefault();\n return;\n }\n this.linkClick.emit(event);\n }\n}\n","@if (useRouterLink()) {\n <a\n #host\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n} @else {\n <a\n #host\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n}\n\n<ng-template #inner>\n @if (iconLeft()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconLeft()!\" [size]=\"iconSize()\" />\n }\n\n <span class=\"ui-link-content\">\n @if (label() && !isIconOnly()) {\n <span class=\"ui-link-label\">{{ label() }}</span>\n }\n <ng-content />\n </span>\n\n @if (iconRight()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconRight()!\" [size]=\"iconSize()\" />\n }\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-link\n */\n\nexport * from './lib/ui-link';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAiBA;;;;;;;;;;AAUG;MAQU,MAAM,CAAA;AAuCjB,IAAA,WAAA,GAAA;;AArCA,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;AACvB,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;QAC3B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,SAAS;iFAAC;;;AAIjC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAU;;AAEtB,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAAsB;;AAExC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK;8FAAU;;AAExB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAU;;QAErB,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;;AAIxD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK;gGAAU;;AAE1B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;QAE3B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACxD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK;gGAAU;;AAE1B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAU;;QAG7B,IAAA,CAAA,SAAS,GAAG,MAAM,EAAc;;QAEhC,IAAA,CAAA,SAAS,GAAG,MAAM,EAAc;;QAEhC,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAc;;AAGd,QAAA,IAAA,CAAA,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAgC,MAAM;mFAAC;;QAgBhE,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;qFAAC;;QAGvE,IAAA,CAAA,UAAU,GAAG,QAAQ,CACtC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;uFACjE;;QAGkB,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI;0FAAC;;QAGzD,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,QAAQ,EAAE,GAAG,QAAQ,GAAG,IAAI,CAAC;2FAAC;;AAGrF,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;YAC7C,IAAI,IAAI,CAAC,GAAG,EAAE;AAAE,gBAAA,OAAO,IAAI,CAAC,GAAG,EAAG;AAClC,YAAA,IAAI,IAAI,CAAC,cAAc,EAAE,KAAK,QAAQ;AAAE,gBAAA,OAAO,qBAAqB;AACpE,YAAA,OAAO,IAAI;QACb,CAAC;wFAAC;;QAGiB,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;yFAAC;;AAGjF,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAC,MAAK;YACjD,IAAI,IAAI,CAAC,SAAS,EAAE;AAAE,gBAAA,OAAO,IAAI,CAAC,SAAS,EAAG;YAC9C,IAAI,IAAI,CAAC,UAAU,EAAE;AAAE,gBAAA,OAAO,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI;AAClD,YAAA,OAAO,IAAI;QACb,CAAC;4FAAC;;AAGiB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,YAAA,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;AACrB,YAAA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,SAAS;gBAAE,CAAC,CAAC,IAAI,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE,CAAC;YACxD,IAAI,IAAI,CAAC,UAAU,EAAE;AAAE,gBAAA,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;YAC3C,IAAI,IAAI,CAAC,QAAQ,EAAE;AAAE,gBAAA,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;AACxC,YAAA,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACpB,CAAC;oFAAC;;QAjDA,IAAI,SAAS,EAAE,EAAE;YACf,MAAM,CAAC,MAAK;gBACV,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE;AAChD,oBAAA,OAAO,CAAC,IAAI,CACV,oFAAoF,CACrF;gBACH;AACF,YAAA,CAAC,CAAC;QACJ;IACF;;AA2CA,IAAA,KAAK,CAAC,OAAsB,EAAA;QAC1B,IAAI,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC;IAC5C;;AAGU,IAAA,OAAO,CAAC,KAAiB,EAAA;AACjC,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB,KAAK,CAAC,cAAc,EAAE;YACtB;QACF;AACA,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;IAC5B;8GAxGW,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,07DCnCnB,ohDAoDA,EAAA,MAAA,EAAA,CAAA,owCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDtBY,MAAM,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,YAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,UAAU,kPAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKnC,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EAAA,OAAA,EACV,CAAC,MAAM,EAAE,UAAU,EAAE,gBAAgB,CAAC,EAAA,IAAA,EAGzC,EAAE,iBAAiB,EAAE,eAAe,EAAE,EAAA,QAAA,EAAA,ohDAAA,EAAA,MAAA,EAAA,CAAA,owCAAA,CAAA,EAAA;28CAuCgC,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExEpF;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,484 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, model, numberAttribute, output, contentChild, computed, viewChild, signal, viewChildren, inject, effect, Component } from '@angular/core';
3
+ import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
4
+ import { RouterLink, RouterLinkActive } from '@angular/router';
5
+ import * as i1 from '@angular/cdk/overlay';
6
+ import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
7
+ import { UiIcon } from '@4sh/ui-kit/ui-icon';
8
+ import { UiMotion } from '@4sh/ui-kit/motion';
9
+ import { closeOnNavigation } from '@4sh/ui-kit/overlay';
10
+ import { UiSeparator } from '@4sh/ui-kit/ui-separator';
11
+
12
+ /** Process-wide counter for unique menu ids (aria wiring). */
13
+ let nextUid = 0;
14
+ /** Trigger ↔ panel gap — keep aligned with `$overlay-panel-offset` (ui-config). */
15
+ const OVERLAY_OFFSET = 8;
16
+ /**
17
+ * ui-menu — headless navigation / command menu, static or popup.
18
+ *
19
+ * Driven by a declarative `items` model ({@link UiMenuItem}): labeled groups
20
+ * with separators, collapsible submenus (nested groups are toggleable by
21
+ * default, override per item with `toggleable`), commands, router links and
22
+ * external URLs. The open/closed state of toggleable groups is controllable
23
+ * (and two-way bindable) through `expandedKeys`, keyed by the items' `id`.
24
+ *
25
+ * `popup` mode renders the panel in a CDK overlay anchored to the element
26
+ * that triggered `toggle(event)` / `show(event)`.
27
+ *
28
+ * Styled 100% with the `navigation.*` tokens; the panel shell shares the
29
+ * structural `overlay-panel` recipe with the other floating panels.
30
+ *
31
+ * Customisation: `#item` template (menuitem content, `$implicit` = item),
32
+ * `#submenuheader` (group headers), `#start` / `#end` slots around the list.
33
+ */
34
+ class UiMenu {
35
+ constructor() {
36
+ /** Menu entries (see {@link UiMenuItem}). */
37
+ this.items = input([], /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
39
+ /** Popup mode: the panel opens in an overlay via `toggle(event)` / `show(event)`. */
40
+ this.popup = input(false, { ...(ngDevMode ? { debugName: "popup" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
41
+ /**
42
+ * Open/closed state of the toggleable groups, keyed by item `id`
43
+ * (`{ [id]: boolean }`). Two-way bindable; a key absent from the map
44
+ * falls back to the item's own `expanded`, then to closed.
45
+ */
46
+ this.expandedKeys = model({}, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "expandedKeys" }] : /* istanbul ignore next */ []));
48
+ /** Accessible name of the menu list. */
49
+ this.ariaLabel = input(/* @ts-ignore */
50
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
51
+ /** id of an external element labelling the menu list. */
52
+ this.ariaLabelledBy = input(/* @ts-ignore */
53
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
54
+ /** Extra class(es) applied to the panel (scoped custom styling). */
55
+ this.styleClass = input(/* @ts-ignore */
56
+ ...(ngDevMode ? [undefined, { debugName: "styleClass" }] : /* istanbul ignore next */ []));
57
+ /** Color family: `high` (default) or `low` navigation tokens. */
58
+ this.level = input('high', /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
60
+ /** Density: `default`, or `small` for compact action menus ("…" buttons). */
61
+ this.size = input('default', /* @ts-ignore */
62
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
63
+ /** Group rendering: `inline` sections/accordions (default) or `flyout` cascading side panels. */
64
+ this.submenus = input('inline', /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "submenus" }] : /* istanbul ignore next */ []));
66
+ /** Animate the popup entrance and the submenu collapse (reduced-motion always wins). */
67
+ this.motion = input(true, { ...(ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
68
+ /** Auto-flip the popup above the trigger when space is lacking below. */
69
+ this.autoFlip = input(true, { ...(ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
70
+ /** Tabindex of the menu's roving tab stop. */
71
+ this.tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
72
+ /** Emitted when the popup opens. */
73
+ this.opened = output();
74
+ /** Emitted when the popup closes. */
75
+ this.closed = output();
76
+ /** Emitted when a leaf item is clicked / keyboard-activated (never when disabled). */
77
+ this.itemClick = output();
78
+ /** Menuitem content template, provided programmatically (embedding components like ui-context-menu). */
79
+ this.itemTemplate = input(/* @ts-ignore */
80
+ ...(ngDevMode ? [undefined, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
81
+ /** Group-header content template, provided programmatically (embedding components). */
82
+ this.submenuHeaderTemplate = input(/* @ts-ignore */
83
+ ...(ngDevMode ? [undefined, { debugName: "submenuHeaderTemplate" }] : /* istanbul ignore next */ []));
84
+ /** Custom menuitem content: `<ng-template #item let-item>`. */
85
+ this.itemTemplateContent = contentChild('item', /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "itemTemplateContent" }] : /* istanbul ignore next */ []));
87
+ /** Custom group-header content: `<ng-template #submenuheader let-item>`. */
88
+ this.submenuHeaderTemplateContent = contentChild('submenuheader', /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "submenuHeaderTemplateContent" }] : /* istanbul ignore next */ []));
90
+ /** @ignore Input wins over the projected `#item` template. */
91
+ this.resolvedItemTemplate = computed(() => this.itemTemplate() ?? this.itemTemplateContent(), /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "resolvedItemTemplate" }] : /* istanbul ignore next */ []));
93
+ /** @ignore Input wins over the projected `#submenuheader` template. */
94
+ this.resolvedSubmenuHeaderTemplate = computed(() => this.submenuHeaderTemplate() ?? this.submenuHeaderTemplateContent(), /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "resolvedSubmenuHeaderTemplate" }] : /* istanbul ignore next */ []));
96
+ /** Free content rendered before the list. */
97
+ this.startTemplate = contentChild('start', /* @ts-ignore */
98
+ ...(ngDevMode ? [{ debugName: "startTemplate" }] : /* istanbul ignore next */ []));
99
+ /** Free content rendered after the list. */
100
+ this.endTemplate = contentChild('end', /* @ts-ignore */
101
+ ...(ngDevMode ? [{ debugName: "endTemplate" }] : /* istanbul ignore next */ []));
102
+ /** @ignore Panel root (overlay or inline) — keyboard focus queries. */
103
+ this.panelEl = viewChild('panel', /* @ts-ignore */
104
+ ...(ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []));
105
+ /** Unique id of the panel (public: wire the trigger's `aria-controls` to it). */
106
+ this.uid = `ui-menu-${nextUid++}`;
107
+ /** @ignore Popup open state. */
108
+ this.popupOpen = signal(false, /* @ts-ignore */
109
+ ...(ngDevMode ? [{ debugName: "popupOpen" }] : /* istanbul ignore next */ []));
110
+ /** @ignore Element the overlay is anchored to (the `toggle(event)` trigger). */
111
+ this.overlayOrigin = signal(null, /* @ts-ignore */
112
+ ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
113
+ /** @ignore Key of the node owning the roving tabindex. */
114
+ this.focusedKey = signal(null, /* @ts-ignore */
115
+ ...(ngDevMode ? [{ debugName: "focusedKey" }] : /* istanbul ignore next */ []));
116
+ /** @ignore Key of the open flyout submenu (one per level; children have their own). */
117
+ this.openFlyoutKey = signal(null, /* @ts-ignore */
118
+ ...(ngDevMode ? [{ debugName: "openFlyoutKey" }] : /* istanbul ignore next */ []));
119
+ /** @ignore Nested flyout menus rendered by this instance (matched by `items` reference). */
120
+ this.childMenus = viewChildren(UiMenu, /* @ts-ignore */
121
+ ...(ngDevMode ? [{ debugName: "childMenus" }] : /* istanbul ignore next */ []));
122
+ /** @ignore All connected overlays of this instance (popup + flyouts). */
123
+ this.connectedOverlays = viewChildren(CdkConnectedOverlay, /* @ts-ignore */
124
+ ...(ngDevMode ? [{ debugName: "connectedOverlays" }] : /* istanbul ignore next */ []));
125
+ /** @ignore */
126
+ this.doc = inject(DOCUMENT);
127
+ /** @ignore Below the trigger, flipping above when `autoFlip` and space is lacking. */
128
+ this.overlayPositions = computed(() => {
129
+ const below = { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: OVERLAY_OFFSET };
130
+ const above = { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -OVERLAY_OFFSET };
131
+ return this.autoFlip() ? [below, above] : [below];
132
+ }, /* @ts-ignore */
133
+ ...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
134
+ /** @ignore Flyout panel beside its parent item: right-start first, then flips.
135
+ * The vertical offset aligns the child's first item with the parent item. */
136
+ this.flyoutPositions = [
137
+ { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetY: -OVERLAY_OFFSET },
138
+ { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetY: -OVERLAY_OFFSET },
139
+ { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetY: OVERLAY_OFFSET },
140
+ { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetY: OVERLAY_OFFSET },
141
+ ];
142
+ /** @ignore Resolved render tree (kinds, keys, expanded state). */
143
+ this.nodes = computed(() => this.buildNodes(this.items(), this.uid, 0), /* @ts-ignore */
144
+ ...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
145
+ /** @ignore Keys of the focusable entries, in visual order (roving focus path). */
146
+ this.focusableKeys = computed(() => {
147
+ const keys = [];
148
+ const walk = (nodes) => {
149
+ for (const node of nodes) {
150
+ if (node.kind === 'separator')
151
+ continue;
152
+ if ((node.kind === 'item' || node.kind === 'flyout') && !node.item.disabled)
153
+ keys.push(node.key);
154
+ if (node.kind === 'toggle' && !node.item.disabled) {
155
+ keys.push(node.key);
156
+ if (node.expanded)
157
+ walk(node.children);
158
+ }
159
+ if (node.kind === 'header')
160
+ walk(node.children);
161
+ }
162
+ };
163
+ walk(this.nodes());
164
+ return keys;
165
+ }, /* @ts-ignore */
166
+ ...(ngDevMode ? [{ debugName: "focusableKeys" }] : /* istanbul ignore next */ []));
167
+ /** @ignore Node owning the tab stop: last focused, else first focusable. */
168
+ this.tabStopKey = computed(() => {
169
+ const keys = this.focusableKeys();
170
+ const focused = this.focusedKey();
171
+ return focused && keys.includes(focused) ? focused : (keys[0] ?? null);
172
+ }, /* @ts-ignore */
173
+ ...(ngDevMode ? [{ debugName: "tabStopKey" }] : /* istanbul ignore next */ []));
174
+ /** @ignore */
175
+ this.panelClasses = computed(() => {
176
+ const c = ['ui-menu', `_${this.level()}`];
177
+ if (this.size() !== 'default')
178
+ c.push(`_${this.size()}`);
179
+ if (this.popup())
180
+ c.push('_popup');
181
+ if (!this.motion())
182
+ c.push('_no-motion');
183
+ const extra = this.styleClass();
184
+ if (extra)
185
+ c.push(extra);
186
+ return c.join(' ');
187
+ }, /* @ts-ignore */
188
+ ...(ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []));
189
+ // A menu declared in an app shell outlives the routed view: dismiss its
190
+ // floating panels rather than carrying them over to the next page.
191
+ closeOnNavigation(() => {
192
+ this.hide();
193
+ this.closeFlyouts();
194
+ });
195
+ // Keep floating panels GLUED to their scrolling anchors: while the popup
196
+ // or a flyout is open, re-apply the overlay positions on any scroll (the
197
+ // CDK reposition scroll strategy proved unreliable in zoneless contexts).
198
+ effect((onCleanup) => {
199
+ const active = this.popupOpen() || this.openFlyoutKey() !== null;
200
+ if (!active || typeof window === 'undefined')
201
+ return;
202
+ // Deferred a macrotask: when this menu is itself in an overlay (context
203
+ // menu / popup), ITS panel is re-anchored during the next change
204
+ // detection — flyouts must re-read their origin AFTER that move.
205
+ const handler = () => setTimeout(() => {
206
+ // The trigger can be gone while the menu lives on (its page was
207
+ // destroyed): re-positioning on a detached origin measures 0×0 and
208
+ // would snap the panel to the top-left corner.
209
+ if (this.popupOpen() && this.overlayOrigin()?.isConnected === false) {
210
+ this.hide();
211
+ return;
212
+ }
213
+ for (const overlay of this.connectedOverlays()) {
214
+ if (overlay.open)
215
+ overlay.overlayRef?.updatePosition();
216
+ }
217
+ });
218
+ this.doc.addEventListener('scroll', handler, { capture: true, passive: true });
219
+ onCleanup(() => this.doc.removeEventListener('scroll', handler, true));
220
+ });
221
+ }
222
+ // --- Popup ------------------------------------------------------------
223
+ /** Toggles the popup relative to the event's `currentTarget`. */
224
+ toggle(event) {
225
+ this.popupOpen() ? this.hide() : this.show(event);
226
+ }
227
+ /** Opens the popup anchored to the event's `currentTarget`. */
228
+ show(event) {
229
+ if (!this.popup() || this.popupOpen())
230
+ return;
231
+ this.overlayOrigin.set((event.currentTarget ?? event.target));
232
+ this.popupOpen.set(true);
233
+ this.opened.emit();
234
+ this.queueFocusTabStop();
235
+ }
236
+ /** Moves focus onto the menu's roving tab stop (first focusable entry). */
237
+ focusFirst() {
238
+ this.queueFocusTabStop();
239
+ }
240
+ /** Closes the popup. */
241
+ hide(focusTrigger = false) {
242
+ if (!this.popupOpen())
243
+ return;
244
+ this.popupOpen.set(false);
245
+ this.focusedKey.set(null);
246
+ this.openFlyoutKey.set(null);
247
+ this.closed.emit();
248
+ if (focusTrigger)
249
+ this.overlayOrigin()?.focus?.();
250
+ }
251
+ /** Closes any open flyout submenu (recursively, children detach with their parent). */
252
+ closeFlyouts() {
253
+ this.openFlyoutKey.set(null);
254
+ }
255
+ // --- Interactions -------------------------------------------------------
256
+ /** @ignore Leaf activation: command + itemClick, popup auto-close. */
257
+ onItemClick(event, node) {
258
+ const item = node.item;
259
+ if (item.disabled) {
260
+ event.preventDefault();
261
+ return;
262
+ }
263
+ if (!item.url && !item.routerLink)
264
+ event.preventDefault();
265
+ this.focusedKey.set(node.key);
266
+ item.command?.({ originalEvent: event, item });
267
+ this.itemClick.emit({ originalEvent: event, item });
268
+ if (this.popup())
269
+ this.hide(true);
270
+ }
271
+ // --- Flyout submenus ------------------------------------------------------
272
+ /** @ignore Click on a flyout parent item: toggle its side panel. */
273
+ onFlyoutClick(node) {
274
+ if (node.item.disabled)
275
+ return;
276
+ this.focusedKey.set(node.key);
277
+ this.openFlyoutKey.update((key) => (key === node.key ? null : node.key));
278
+ }
279
+ /** @ignore Hovering an entry: open its flyout, or close the sibling one. */
280
+ onEntryHover(node) {
281
+ if (node.kind === 'flyout' && !node.item.disabled)
282
+ this.openFlyoutKey.set(node.key);
283
+ else
284
+ this.openFlyoutKey.set(null);
285
+ }
286
+ /** @ignore `ArrowLeft`/`Escape` inside a flyout panel: close it, focus its parent item. */
287
+ onFlyoutPanelKeydown(event, node) {
288
+ if (event.key !== 'ArrowLeft' && event.key !== 'Escape')
289
+ return;
290
+ event.preventDefault();
291
+ event.stopPropagation();
292
+ this.openFlyoutKey.set(null);
293
+ this.focusByKey(node.key);
294
+ }
295
+ /** @ignore Activation bubbling up from a flyout submenu: re-emit and close. */
296
+ onChildItemClick(event) {
297
+ this.itemClick.emit(event);
298
+ this.openFlyoutKey.set(null);
299
+ if (this.popup())
300
+ this.hide(true);
301
+ }
302
+ /** @ignore Open a flyout and move focus onto its first entry. The overlay
303
+ * attaches after change detection: retry over macrotasks (NOT rAF — it
304
+ * never fires in throttled/background tabs). */
305
+ openFlyoutAndFocus(node, attempts = 20) {
306
+ this.openFlyoutKey.set(node.key);
307
+ setTimeout(() => {
308
+ // Nested menus are view children; match ours by its `items` reference.
309
+ const menu = this.childMenus().find((child) => child.items() === node.item.items);
310
+ if (menu)
311
+ menu.focusFirst();
312
+ else if (attempts > 0)
313
+ this.openFlyoutAndFocus(node, attempts - 1);
314
+ });
315
+ }
316
+ /** @ignore Expand/collapse a toggleable group (updates `expandedKeys`). */
317
+ onToggleClick(node) {
318
+ if (node.item.disabled)
319
+ return;
320
+ this.focusedKey.set(node.key);
321
+ this.setExpanded(node, !node.expanded);
322
+ }
323
+ /** @ignore */
324
+ setExpanded(node, expanded) {
325
+ if (node.expanded === expanded)
326
+ return;
327
+ this.expandedKeys.update((keys) => ({ ...keys, [node.key]: expanded }));
328
+ }
329
+ /** @ignore Roving keyboard navigation (WAI-ARIA menu pattern). */
330
+ onListKeydown(event) {
331
+ const keys = this.focusableKeys();
332
+ if (!keys.length)
333
+ return;
334
+ const currentKey = this.currentFocusKey(event);
335
+ const index = currentKey ? keys.indexOf(currentKey) : -1;
336
+ switch (event.key) {
337
+ case 'ArrowDown':
338
+ event.preventDefault();
339
+ this.focusByKey(keys[(index + 1) % keys.length]);
340
+ break;
341
+ case 'ArrowUp':
342
+ event.preventDefault();
343
+ this.focusByKey(keys[(index - 1 + keys.length) % keys.length]);
344
+ break;
345
+ case 'Home':
346
+ event.preventDefault();
347
+ this.focusByKey(keys[0]);
348
+ break;
349
+ case 'End':
350
+ event.preventDefault();
351
+ this.focusByKey(keys[keys.length - 1]);
352
+ break;
353
+ case 'ArrowRight':
354
+ case 'ArrowLeft': {
355
+ const node = currentKey ? this.findNode(currentKey) : null;
356
+ if (node?.kind === 'toggle') {
357
+ event.preventDefault();
358
+ this.setExpanded(node, event.key === 'ArrowRight');
359
+ }
360
+ else if (node?.kind === 'flyout') {
361
+ event.preventDefault();
362
+ if (event.key === 'ArrowRight')
363
+ this.openFlyoutAndFocus(node);
364
+ else
365
+ this.openFlyoutKey.set(null);
366
+ }
367
+ break;
368
+ }
369
+ case ' ': {
370
+ // Space activates anchors too (native only on buttons).
371
+ const target = event.target;
372
+ if (target.tagName === 'A') {
373
+ event.preventDefault();
374
+ target.click();
375
+ }
376
+ break;
377
+ }
378
+ case 'Escape':
379
+ if (this.popup()) {
380
+ event.preventDefault();
381
+ this.hide(true);
382
+ }
383
+ break;
384
+ }
385
+ }
386
+ /** @ignore */
387
+ onEntryFocus(node) {
388
+ this.focusedKey.set(node.key);
389
+ }
390
+ /** @ignore Popup outside interaction: ignore events landing in ANY overlay
391
+ * (our flyout side panels are separate overlay elements). */
392
+ onPopupOutsideClick(event) {
393
+ if (event.target instanceof Element && event.target.closest('.cdk-overlay-container'))
394
+ return;
395
+ this.hide();
396
+ }
397
+ /** @ignore id of a header label (aria-labelledby of its group). */
398
+ headerId(node) {
399
+ return `${this.uid}-${node.key}-label`;
400
+ }
401
+ /** @ignore id of a collapsible group (aria-controls of its toggle). */
402
+ groupId(node) {
403
+ return `${this.uid}-${node.key}-group`;
404
+ }
405
+ // --- Internals ----------------------------------------------------------
406
+ /** @ignore */
407
+ buildNodes(items, parentKey, depth) {
408
+ const expandedKeys = this.expandedKeys();
409
+ return items
410
+ .filter((item) => item.visible !== false)
411
+ .map((item, index) => {
412
+ const key = item.id ?? `${parentKey}_${index}`;
413
+ if (item.separator) {
414
+ return { item, key, kind: 'separator', children: [], expanded: false, depth };
415
+ }
416
+ if (item.items) {
417
+ // Flyout mode: every group becomes a cascading side panel.
418
+ if (this.submenus() === 'flyout') {
419
+ return { item, key, kind: 'flyout', children: [], expanded: false, depth };
420
+ }
421
+ const toggleable = item.toggleable ?? depth > 0;
422
+ const expanded = toggleable ? (expandedKeys[key] ?? item.expanded ?? false) : true;
423
+ return {
424
+ item,
425
+ key,
426
+ kind: toggleable ? 'toggle' : 'header',
427
+ children: this.buildNodes(item.items, key, depth + 1),
428
+ expanded,
429
+ depth,
430
+ };
431
+ }
432
+ return { item, key, kind: 'item', children: [], expanded: false, depth };
433
+ });
434
+ }
435
+ /** @ignore */
436
+ findNode(key, nodes = this.nodes()) {
437
+ for (const node of nodes) {
438
+ if (node.key === key)
439
+ return node;
440
+ const found = this.findNode(key, node.children);
441
+ if (found)
442
+ return found;
443
+ }
444
+ return null;
445
+ }
446
+ /** @ignore Key of the entry currently holding DOM focus. */
447
+ currentFocusKey(event) {
448
+ const el = event.target.closest?.('[data-key]');
449
+ return el?.getAttribute('data-key') ?? this.focusedKey();
450
+ }
451
+ /** @ignore Move DOM focus (and the tab stop) to the entry with the given key. */
452
+ focusByKey(key) {
453
+ if (!key)
454
+ return;
455
+ this.focusedKey.set(key);
456
+ this.panelEl()
457
+ ?.nativeElement.querySelector(`[data-key="${CSS.escape(key)}"]`)
458
+ ?.focus();
459
+ }
460
+ /** @ignore Focus the roving tab stop once the panel is rendered
461
+ * (macrotask, not rAF: rAF never fires in throttled/background tabs). */
462
+ queueFocusTabStop() {
463
+ setTimeout(() => this.focusByKey(this.tabStopKey() ?? undefined));
464
+ }
465
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
466
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: UiMenu, isStandalone: true, selector: "ui-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, popup: { classPropertyName: "popup", publicName: "popup", isSignal: true, isRequired: false, transformFunction: null }, expandedKeys: { classPropertyName: "expandedKeys", publicName: "expandedKeys", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, submenus: { classPropertyName: "submenus", publicName: "submenus", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, submenuHeaderTemplate: { classPropertyName: "submenuHeaderTemplate", publicName: "submenuHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedKeys: "expandedKeysChange", opened: "opened", closed: "closed", itemClick: "itemClick" }, host: { properties: { "style.display": "popup() ? 'contents' : 'block'" } }, queries: [{ propertyName: "itemTemplateContent", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "submenuHeaderTemplateContent", first: true, predicate: ["submenuheader"], descendants: true, isSignal: true }, { propertyName: "startTemplate", first: true, predicate: ["start"], descendants: true, isSignal: true }, { propertyName: "endTemplate", first: true, predicate: ["end"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "childMenus", predicate: UiMenu, descendants: true, isSignal: true }, { propertyName: "connectedOverlays", predicate: CdkConnectedOverlay, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Menu panel: shared between inline render and the CDK overlay popup. -->\n<ng-template #panelTpl>\n <div\n #panel\n [class]=\"panelClasses()\"\n [attr.id]=\"uid\"\n [uiMotion]=\"'slide-down'\"\n [motionDisabled]=\"!motion()\"\n #panelMotion=\"uiMotion\"\n [motionOnInsert]=\"popup()\"\n >\n @if (startTemplate(); as tpl) {\n <div class=\"ui-menu-start\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n <!-- ARIA menu pattern: keyboard delegated to the role=\"menu\" container, focus\n lives on the items (roving tabindex). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <ul\n class=\"ui-menu-list\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n (keydown)=\"onListKeydown($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n </ul>\n\n @if (endTemplate(); as tpl) {\n <div class=\"ui-menu-end\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Recursive node list (separator | header section | toggleable group | leaf item). -->\n<ng-template #nodesTpl let-nodes>\n @for (node of nodes; track node.key) {\n @switch (node.kind) {\n @case ('separator') {\n <li class=\"ui-menu-separator\" role=\"separator\" aria-hidden=\"true\">\n <ui-separator></ui-separator>\n </li>\n }\n\n @case ('header') {\n <li class=\"ui-menu-section\" role=\"none\" [class]=\"node.item.styleClass ?? ''\">\n <span class=\"ui-menu-header\" [attr.id]=\"headerId(node)\">\n @if (resolvedSubmenuHeaderTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: node.item }\" />\n } @else {\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-menu-item-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-menu-item-label\">{{ node.item.label }}</span>\n }\n </span>\n <ul class=\"ui-menu-group\" role=\"group\" [attr.aria-labelledby]=\"headerId(node)\">\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </li>\n }\n\n @case ('toggle') {\n <li class=\"ui-menu-entry\" role=\"none\" [class]=\"node.item.styleClass ?? ''\">\n <button\n type=\"button\"\n class=\"ui-menu-action _toggle\"\n role=\"menuitem\"\n [attr.data-key]=\"node.key\"\n [attr.aria-expanded]=\"node.expanded\"\n [attr.aria-controls]=\"groupId(node)\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [disabled]=\"node.item.disabled ?? false\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onToggleClick(node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n @if (resolvedSubmenuHeaderTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: node.item }\" />\n } @else {\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-menu-item-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-menu-item-label\">{{ node.item.label }}</span>\n }\n <!-- `_open`, not `_expanded`: a global helper class `._expanded` (width:100%) exists. -->\n <ui-icon class=\"ui-menu-chevron\" [class._open]=\"node.expanded\" name=\"chevron-down\" size=\"sm\" />\n </button>\n <div class=\"ui-menu-collapse\" [class._open]=\"node.expanded\" [attr.id]=\"groupId(node)\" [attr.inert]=\"node.expanded ? null : ''\">\n <div class=\"ui-menu-collapse-inner\">\n <ul class=\"ui-menu-group _nested\" role=\"group\">\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n </li>\n }\n\n @case ('flyout') {\n <li class=\"ui-menu-entry\" role=\"none\" [class]=\"node.item.styleClass ?? ''\" cdkOverlayOrigin #flyoutOrigin=\"cdkOverlayOrigin\">\n <button\n type=\"button\"\n class=\"ui-menu-action _has-sub\"\n [class._sub-open]=\"openFlyoutKey() === node.key\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n [attr.data-key]=\"node.key\"\n [attr.aria-expanded]=\"openFlyoutKey() === node.key\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [disabled]=\"node.item.disabled ?? false\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onFlyoutClick(node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n @if (resolvedItemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: node.item }\" />\n } @else {\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-menu-item-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-menu-item-label\">{{ node.item.label }}</span>\n }\n <ui-icon class=\"ui-menu-chevron\" name=\"chevron-right\" size=\"sm\" />\n </button>\n\n <!-- Cascading side panel: a nested menu in its own overlay, anchored to the item. -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"flyoutOrigin\"\n [cdkConnectedOverlayOpen]=\"openFlyoutKey() === node.key\"\n [cdkConnectedOverlayPositions]=\"flyoutPositions\"\n >\n <!-- Flyout: keyboard delegated to the panel, focus lives on the items. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-menu-flyout\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"!motion()\"\n #flyoutMotion=\"uiMotion\"\n motionOnInsert\n (keydown)=\"onFlyoutPanelKeydown($event, node)\"\n >\n <ui-menu\n [items]=\"node.item.items ?? []\"\n [level]=\"level()\"\n [size]=\"size()\"\n [motion]=\"motion()\"\n submenus=\"flyout\"\n styleClass=\"_floating\"\n [itemTemplate]=\"resolvedItemTemplate()\"\n [submenuHeaderTemplate]=\"resolvedSubmenuHeaderTemplate()\"\n [ariaLabel]=\"node.item.label\"\n (itemClick)=\"onChildItemClick($event)\"\n />\n </div>\n </ng-template>\n </li>\n }\n\n @case ('item') {\n <li class=\"ui-menu-entry\" role=\"none\" [class]=\"node.item.styleClass ?? ''\">\n <!-- Shared menuitem content (icon + label, or the #item template). -->\n <ng-template #content>\n @if (resolvedItemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: node.item }\" />\n } @else {\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-menu-item-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-menu-item-label\">{{ node.item.label }}</span>\n }\n </ng-template>\n\n @if (node.item.routerLink !== undefined && !node.item.disabled) {\n <a\n class=\"ui-menu-action\"\n role=\"menuitem\"\n [attr.data-key]=\"node.key\"\n [routerLink]=\"node.item.routerLink\"\n [queryParams]=\"node.item.queryParams ?? null\"\n [queryParamsHandling]=\"node.item.queryParamsHandling ?? null\"\n routerLinkActive=\"_active\"\n [routerLinkActiveOptions]=\"{ exact: node.item.routerLinkActiveExact ?? false }\"\n [attr.target]=\"node.item.target || null\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onItemClick($event, node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else if (node.item.url && !node.item.disabled) {\n <a\n class=\"ui-menu-action\"\n role=\"menuitem\"\n [attr.data-key]=\"node.key\"\n [attr.href]=\"node.item.url\"\n [attr.target]=\"node.item.target || null\"\n [attr.rel]=\"node.item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onItemClick($event, node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"ui-menu-action\"\n role=\"menuitem\"\n [attr.data-key]=\"node.key\"\n [disabled]=\"node.item.disabled ?? false\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onItemClick($event, node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n </li>\n }\n }\n }\n</ng-template>\n\n@if (popup()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"popupOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"hide()\"\n (overlayOutsideClick)=\"onPopupOutsideClick($event)\"\n (detach)=\"hide()\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n} @else {\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n}\n", styles: [".ui-menu{display:flex;flex-direction:column;gap:var(--units-2xs);padding:var(--units-sm);box-sizing:border-box;border:var(--stroke-default) solid var(--ui-overlay-stroke, transparent);border-radius:var(--ui-overlay-radius, var(--radius-default));background-color:var(--ui-overlay-surface, var(--global-background-default));box-shadow:var(--ui-overlay-shadow, var(--shadow-default-md));font-family:var(--fontfamily-base);border:none;min-width:13.125rem}.ui-menu .ui-menu-action{min-height:2.5rem;padding:0 var(--units-md);font-size:var(--size-typography-text-default)}.ui-menu .ui-menu-header{min-height:2rem;padding:0 var(--units-md);font-size:var(--size-typography-text-md)}.ui-menu._popup,.ui-menu._floating{width:max-content;max-width:calc(100vw - var(--units-lg));max-height:calc(100vh - var(--units-lg));overflow:auto}.ui-menu-list,.ui-menu-group{display:flex;flex-direction:column;gap:var(--units-2xs);margin:0;padding:0;list-style:none}.ui-menu-group._nested{padding-left:var(--units-default)}.ui-menu-section,.ui-menu-entry{display:flex;flex-direction:column;gap:var(--units-2xs)}.ui-menu._small{min-width:10rem}.ui-menu._small .ui-menu-action{min-height:2rem;padding:0 var(--units-sm);font-size:var(--size-typography-text-md)}.ui-menu._small .ui-menu-header{min-height:1.5rem;padding:0 var(--units-sm);font-size:var(--size-typography-text-sm)}.ui-menu-header{display:flex;align-items:center;gap:var(--units-sm);font-weight:var(--weight-bold);-webkit-user-select:none;user-select:none}.ui-menu-action{display:flex;align-items:center;gap:var(--units-sm);box-sizing:border-box;width:100%;border:none;border-radius:var(--radius-sm);background:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);font-weight:var(--weight-regular);line-height:1.2;text-align:left;text-decoration:none;cursor:pointer;transition:background-color var(--transition-default) var(--transition-easeinout),color var(--transition-default) var(--transition-easeinout),box-shadow var(--transition-default) var(--transition-easeinout)}.ui-menu-action:focus-visible{outline:none;box-shadow:inset 0 0 0 var(--units-2xs) var(--global-border-focus)}.ui-menu-action:disabled{cursor:not-allowed}.ui-menu-item-icon,.ui-menu-chevron{flex-shrink:0;line-height:0}.ui-menu-item-label{flex:1 1 auto;min-width:0}.ui-menu-chevron{margin-left:auto;transition:rotate var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-menu-chevron._open{rotate:180deg}.ui-menu-flyout{display:block}.ui-menu-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms),opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-menu-collapse._open{grid-template-rows:1fr;opacity:1}.ui-menu-collapse-inner{min-height:0;overflow:hidden}.ui-menu._no-motion .ui-menu-collapse,.ui-menu._no-motion .ui-menu-chevron{transition:none}.ui-menu-separator{border:none}.ui-menu-start,.ui-menu-end{padding:var(--units-2xs) var(--units-md)}.ui-menu._high .ui-menu-header,.ui-menu._high .ui-menu-action{color:var(--navigation-high-content-default)}.ui-menu._high .ui-menu-action:hover:not(:disabled){background-color:var(--navigation-high-surface-hover);color:var(--navigation-high-content-hover)}.ui-menu._high .ui-menu-action:active:not(:disabled){background-color:var(--navigation-high-surface-active);color:var(--navigation-high-content-active)}.ui-menu._high .ui-menu-action._sub-open:not(:disabled){background-color:var(--navigation-high-surface-hover);color:var(--navigation-high-content-hover)}.ui-menu._high .ui-menu-action._active{background-color:var(--navigation-high-surface-active);color:var(--navigation-high-content-active)}.ui-menu._high .ui-menu-action:disabled{background-color:var(--navigation-high-surface-disabled);color:var(--navigation-high-content-disabled)}.ui-menu._low .ui-menu-header,.ui-menu._low .ui-menu-action{color:var(--navigation-low-content-default)}.ui-menu._low .ui-menu-action:hover:not(:disabled){background-color:var(--navigation-low-surface-hover);color:var(--navigation-low-content-hover)}.ui-menu._low .ui-menu-action:active:not(:disabled){background-color:var(--navigation-low-surface-active);color:var(--navigation-low-content-active)}.ui-menu._low .ui-menu-action._sub-open:not(:disabled){background-color:var(--navigation-low-surface-hover);color:var(--navigation-low-content-hover)}.ui-menu._low .ui-menu-action._active{background-color:var(--navigation-low-surface-active);color:var(--navigation-low-content-active)}.ui-menu._low .ui-menu-action:disabled{background-color:var(--navigation-low-surface-disabled);color:var(--navigation-low-content-disabled)}\n"], dependencies: [{ kind: "component", type: UiMenu, selector: "ui-menu", inputs: ["items", "popup", "expandedKeys", "ariaLabel", "ariaLabelledBy", "styleClass", "level", "size", "submenus", "motion", "autoFlip", "tabindex", "itemTemplate", "submenuHeaderTemplate"], outputs: ["expandedKeysChange", "opened", "closed", "itemClick"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }, { kind: "component", type: UiSeparator, selector: "ui-separator", inputs: ["label", "orientation", "variant", "size", "labelAlign", "ariaLabel"] }] }); }
467
+ }
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiMenu, decorators: [{
469
+ type: Component,
470
+ args: [{ selector: 'ui-menu', imports: [NgTemplateOutlet, OverlayModule, RouterLink, RouterLinkActive, UiIcon, UiMotion, UiSeparator], host: {
471
+ '[style.display]': "popup() ? 'contents' : 'block'",
472
+ }, template: "<!-- Menu panel: shared between inline render and the CDK overlay popup. -->\n<ng-template #panelTpl>\n <div\n #panel\n [class]=\"panelClasses()\"\n [attr.id]=\"uid\"\n [uiMotion]=\"'slide-down'\"\n [motionDisabled]=\"!motion()\"\n #panelMotion=\"uiMotion\"\n [motionOnInsert]=\"popup()\"\n >\n @if (startTemplate(); as tpl) {\n <div class=\"ui-menu-start\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n <!-- ARIA menu pattern: keyboard delegated to the role=\"menu\" container, focus\n lives on the items (roving tabindex). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <ul\n class=\"ui-menu-list\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n (keydown)=\"onListKeydown($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n </ul>\n\n @if (endTemplate(); as tpl) {\n <div class=\"ui-menu-end\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Recursive node list (separator | header section | toggleable group | leaf item). -->\n<ng-template #nodesTpl let-nodes>\n @for (node of nodes; track node.key) {\n @switch (node.kind) {\n @case ('separator') {\n <li class=\"ui-menu-separator\" role=\"separator\" aria-hidden=\"true\">\n <ui-separator></ui-separator>\n </li>\n }\n\n @case ('header') {\n <li class=\"ui-menu-section\" role=\"none\" [class]=\"node.item.styleClass ?? ''\">\n <span class=\"ui-menu-header\" [attr.id]=\"headerId(node)\">\n @if (resolvedSubmenuHeaderTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: node.item }\" />\n } @else {\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-menu-item-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-menu-item-label\">{{ node.item.label }}</span>\n }\n </span>\n <ul class=\"ui-menu-group\" role=\"group\" [attr.aria-labelledby]=\"headerId(node)\">\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </li>\n }\n\n @case ('toggle') {\n <li class=\"ui-menu-entry\" role=\"none\" [class]=\"node.item.styleClass ?? ''\">\n <button\n type=\"button\"\n class=\"ui-menu-action _toggle\"\n role=\"menuitem\"\n [attr.data-key]=\"node.key\"\n [attr.aria-expanded]=\"node.expanded\"\n [attr.aria-controls]=\"groupId(node)\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [disabled]=\"node.item.disabled ?? false\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onToggleClick(node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n @if (resolvedSubmenuHeaderTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: node.item }\" />\n } @else {\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-menu-item-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-menu-item-label\">{{ node.item.label }}</span>\n }\n <!-- `_open`, not `_expanded`: a global helper class `._expanded` (width:100%) exists. -->\n <ui-icon class=\"ui-menu-chevron\" [class._open]=\"node.expanded\" name=\"chevron-down\" size=\"sm\" />\n </button>\n <div class=\"ui-menu-collapse\" [class._open]=\"node.expanded\" [attr.id]=\"groupId(node)\" [attr.inert]=\"node.expanded ? null : ''\">\n <div class=\"ui-menu-collapse-inner\">\n <ul class=\"ui-menu-group _nested\" role=\"group\">\n <ng-container [ngTemplateOutlet]=\"nodesTpl\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n </li>\n }\n\n @case ('flyout') {\n <li class=\"ui-menu-entry\" role=\"none\" [class]=\"node.item.styleClass ?? ''\" cdkOverlayOrigin #flyoutOrigin=\"cdkOverlayOrigin\">\n <button\n type=\"button\"\n class=\"ui-menu-action _has-sub\"\n [class._sub-open]=\"openFlyoutKey() === node.key\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n [attr.data-key]=\"node.key\"\n [attr.aria-expanded]=\"openFlyoutKey() === node.key\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [disabled]=\"node.item.disabled ?? false\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onFlyoutClick(node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n @if (resolvedItemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: node.item }\" />\n } @else {\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-menu-item-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-menu-item-label\">{{ node.item.label }}</span>\n }\n <ui-icon class=\"ui-menu-chevron\" name=\"chevron-right\" size=\"sm\" />\n </button>\n\n <!-- Cascading side panel: a nested menu in its own overlay, anchored to the item. -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"flyoutOrigin\"\n [cdkConnectedOverlayOpen]=\"openFlyoutKey() === node.key\"\n [cdkConnectedOverlayPositions]=\"flyoutPositions\"\n >\n <!-- Flyout: keyboard delegated to the panel, focus lives on the items. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-menu-flyout\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"!motion()\"\n #flyoutMotion=\"uiMotion\"\n motionOnInsert\n (keydown)=\"onFlyoutPanelKeydown($event, node)\"\n >\n <ui-menu\n [items]=\"node.item.items ?? []\"\n [level]=\"level()\"\n [size]=\"size()\"\n [motion]=\"motion()\"\n submenus=\"flyout\"\n styleClass=\"_floating\"\n [itemTemplate]=\"resolvedItemTemplate()\"\n [submenuHeaderTemplate]=\"resolvedSubmenuHeaderTemplate()\"\n [ariaLabel]=\"node.item.label\"\n (itemClick)=\"onChildItemClick($event)\"\n />\n </div>\n </ng-template>\n </li>\n }\n\n @case ('item') {\n <li class=\"ui-menu-entry\" role=\"none\" [class]=\"node.item.styleClass ?? ''\">\n <!-- Shared menuitem content (icon + label, or the #item template). -->\n <ng-template #content>\n @if (resolvedItemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: node.item }\" />\n } @else {\n @if (node.item.icon; as icon) {\n <ui-icon class=\"ui-menu-item-icon\" [name]=\"icon\" size=\"sm\" />\n }\n <span class=\"ui-menu-item-label\">{{ node.item.label }}</span>\n }\n </ng-template>\n\n @if (node.item.routerLink !== undefined && !node.item.disabled) {\n <a\n class=\"ui-menu-action\"\n role=\"menuitem\"\n [attr.data-key]=\"node.key\"\n [routerLink]=\"node.item.routerLink\"\n [queryParams]=\"node.item.queryParams ?? null\"\n [queryParamsHandling]=\"node.item.queryParamsHandling ?? null\"\n routerLinkActive=\"_active\"\n [routerLinkActiveOptions]=\"{ exact: node.item.routerLinkActiveExact ?? false }\"\n [attr.target]=\"node.item.target || null\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onItemClick($event, node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else if (node.item.url && !node.item.disabled) {\n <a\n class=\"ui-menu-action\"\n role=\"menuitem\"\n [attr.data-key]=\"node.key\"\n [attr.href]=\"node.item.url\"\n [attr.target]=\"node.item.target || null\"\n [attr.rel]=\"node.item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onItemClick($event, node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"ui-menu-action\"\n role=\"menuitem\"\n [attr.data-key]=\"node.key\"\n [disabled]=\"node.item.disabled ?? false\"\n [attr.aria-label]=\"node.item.ariaLabel || null\"\n [attr.title]=\"node.item.title || null\"\n [attr.tabindex]=\"node.key === tabStopKey() ? tabindex() : -1\"\n (click)=\"onItemClick($event, node)\"\n (mouseenter)=\"onEntryHover(node)\"\n (focus)=\"onEntryFocus(node)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n </li>\n }\n }\n }\n</ng-template>\n\n@if (popup()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"popupOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"hide()\"\n (overlayOutsideClick)=\"onPopupOutsideClick($event)\"\n (detach)=\"hide()\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n} @else {\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n}\n", styles: [".ui-menu{display:flex;flex-direction:column;gap:var(--units-2xs);padding:var(--units-sm);box-sizing:border-box;border:var(--stroke-default) solid var(--ui-overlay-stroke, transparent);border-radius:var(--ui-overlay-radius, var(--radius-default));background-color:var(--ui-overlay-surface, var(--global-background-default));box-shadow:var(--ui-overlay-shadow, var(--shadow-default-md));font-family:var(--fontfamily-base);border:none;min-width:13.125rem}.ui-menu .ui-menu-action{min-height:2.5rem;padding:0 var(--units-md);font-size:var(--size-typography-text-default)}.ui-menu .ui-menu-header{min-height:2rem;padding:0 var(--units-md);font-size:var(--size-typography-text-md)}.ui-menu._popup,.ui-menu._floating{width:max-content;max-width:calc(100vw - var(--units-lg));max-height:calc(100vh - var(--units-lg));overflow:auto}.ui-menu-list,.ui-menu-group{display:flex;flex-direction:column;gap:var(--units-2xs);margin:0;padding:0;list-style:none}.ui-menu-group._nested{padding-left:var(--units-default)}.ui-menu-section,.ui-menu-entry{display:flex;flex-direction:column;gap:var(--units-2xs)}.ui-menu._small{min-width:10rem}.ui-menu._small .ui-menu-action{min-height:2rem;padding:0 var(--units-sm);font-size:var(--size-typography-text-md)}.ui-menu._small .ui-menu-header{min-height:1.5rem;padding:0 var(--units-sm);font-size:var(--size-typography-text-sm)}.ui-menu-header{display:flex;align-items:center;gap:var(--units-sm);font-weight:var(--weight-bold);-webkit-user-select:none;user-select:none}.ui-menu-action{display:flex;align-items:center;gap:var(--units-sm);box-sizing:border-box;width:100%;border:none;border-radius:var(--radius-sm);background:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);font-weight:var(--weight-regular);line-height:1.2;text-align:left;text-decoration:none;cursor:pointer;transition:background-color var(--transition-default) var(--transition-easeinout),color var(--transition-default) var(--transition-easeinout),box-shadow var(--transition-default) var(--transition-easeinout)}.ui-menu-action:focus-visible{outline:none;box-shadow:inset 0 0 0 var(--units-2xs) var(--global-border-focus)}.ui-menu-action:disabled{cursor:not-allowed}.ui-menu-item-icon,.ui-menu-chevron{flex-shrink:0;line-height:0}.ui-menu-item-label{flex:1 1 auto;min-width:0}.ui-menu-chevron{margin-left:auto;transition:rotate var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-menu-chevron._open{rotate:180deg}.ui-menu-flyout{display:block}.ui-menu-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms),opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-menu-collapse._open{grid-template-rows:1fr;opacity:1}.ui-menu-collapse-inner{min-height:0;overflow:hidden}.ui-menu._no-motion .ui-menu-collapse,.ui-menu._no-motion .ui-menu-chevron{transition:none}.ui-menu-separator{border:none}.ui-menu-start,.ui-menu-end{padding:var(--units-2xs) var(--units-md)}.ui-menu._high .ui-menu-header,.ui-menu._high .ui-menu-action{color:var(--navigation-high-content-default)}.ui-menu._high .ui-menu-action:hover:not(:disabled){background-color:var(--navigation-high-surface-hover);color:var(--navigation-high-content-hover)}.ui-menu._high .ui-menu-action:active:not(:disabled){background-color:var(--navigation-high-surface-active);color:var(--navigation-high-content-active)}.ui-menu._high .ui-menu-action._sub-open:not(:disabled){background-color:var(--navigation-high-surface-hover);color:var(--navigation-high-content-hover)}.ui-menu._high .ui-menu-action._active{background-color:var(--navigation-high-surface-active);color:var(--navigation-high-content-active)}.ui-menu._high .ui-menu-action:disabled{background-color:var(--navigation-high-surface-disabled);color:var(--navigation-high-content-disabled)}.ui-menu._low .ui-menu-header,.ui-menu._low .ui-menu-action{color:var(--navigation-low-content-default)}.ui-menu._low .ui-menu-action:hover:not(:disabled){background-color:var(--navigation-low-surface-hover);color:var(--navigation-low-content-hover)}.ui-menu._low .ui-menu-action:active:not(:disabled){background-color:var(--navigation-low-surface-active);color:var(--navigation-low-content-active)}.ui-menu._low .ui-menu-action._sub-open:not(:disabled){background-color:var(--navigation-low-surface-hover);color:var(--navigation-low-content-hover)}.ui-menu._low .ui-menu-action._active{background-color:var(--navigation-low-surface-active);color:var(--navigation-low-content-active)}.ui-menu._low .ui-menu-action:disabled{background-color:var(--navigation-low-surface-disabled);color:var(--navigation-low-content-disabled)}\n"] }]
473
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], popup: [{ type: i0.Input, args: [{ isSignal: true, alias: "popup", required: false }] }], expandedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedKeys", required: false }] }, { type: i0.Output, args: ["expandedKeysChange"] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], submenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "submenus", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], submenuHeaderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "submenuHeaderTemplate", required: false }] }], itemTemplateContent: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], submenuHeaderTemplateContent: [{ type: i0.ContentChild, args: ['submenuheader', { isSignal: true }] }], startTemplate: [{ type: i0.ContentChild, args: ['start', { isSignal: true }] }], endTemplate: [{ type: i0.ContentChild, args: ['end', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], childMenus: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => UiMenu), { isSignal: true }] }], connectedOverlays: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }] }] } });
474
+
475
+ /*
476
+ * Public API Surface of ui-kit/ui-menu
477
+ */
478
+
479
+ /**
480
+ * Generated bundle index. Do not edit.
481
+ */
482
+
483
+ export { UiMenu };
484
+ //# sourceMappingURL=4sh-ui-kit-ui-menu.mjs.map