@tectra-ng/ui 0.1.2 → 0.1.4

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 (135) hide show
  1. package/README.md +36 -19
  2. package/accordion/README.md +61 -0
  3. package/analog-clock/README.md +31 -0
  4. package/breadcrumb/README.md +57 -0
  5. package/countdown/README.md +45 -0
  6. package/datepicker/README.md +109 -0
  7. package/export/README.md +79 -0
  8. package/export-font/OFL.txt +93 -0
  9. package/export-font/README.md +7 -0
  10. package/fesm2022/tectra-ng-ui-accordion.mjs +980 -0
  11. package/fesm2022/tectra-ng-ui-accordion.mjs.map +1 -0
  12. package/fesm2022/tectra-ng-ui-analog-clock.mjs +386 -0
  13. package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -0
  14. package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
  15. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  16. package/fesm2022/tectra-ng-ui-breadcrumb.mjs +382 -0
  17. package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -0
  18. package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
  19. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  20. package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
  21. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  22. package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
  23. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  24. package/fesm2022/tectra-ng-ui-countdown.mjs +513 -0
  25. package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-ui-datepicker.mjs +2640 -0
  27. package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-export-font.mjs +7 -0
  29. package/fesm2022/tectra-ng-ui-export-font.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-ui-export.mjs +2574 -0
  31. package/fesm2022/tectra-ng-ui-export.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-ui-field.mjs +1 -1
  33. package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
  34. package/fesm2022/tectra-ng-ui-file-upload.mjs +1452 -0
  35. package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-ui-input-group.mjs +2 -2
  37. package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -1
  38. package/fesm2022/tectra-ng-ui-input.mjs +2 -2
  39. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  40. package/fesm2022/tectra-ng-ui-label.mjs +4 -4
  41. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
  42. package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
  43. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
  44. package/fesm2022/tectra-ng-ui-menubar.mjs +742 -0
  45. package/fesm2022/tectra-ng-ui-menubar.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-ui-month-calendar.mjs +601 -0
  47. package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
  49. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  50. package/fesm2022/tectra-ng-ui-panel-menu.mjs +610 -0
  51. package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -0
  52. package/fesm2022/tectra-ng-ui-scroll-panel.mjs +319 -0
  53. package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -0
  54. package/fesm2022/tectra-ng-ui-select.mjs +2 -2
  55. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  56. package/fesm2022/tectra-ng-ui-sparkline.mjs +240 -0
  57. package/fesm2022/tectra-ng-ui-sparkline.mjs.map +1 -0
  58. package/fesm2022/tectra-ng-ui-splitter.mjs +750 -0
  59. package/fesm2022/tectra-ng-ui-splitter.mjs.map +1 -0
  60. package/fesm2022/tectra-ng-ui-stat-tiles.mjs +661 -0
  61. package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -0
  62. package/fesm2022/tectra-ng-ui-stepper.mjs +1166 -0
  63. package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -0
  64. package/fesm2022/tectra-ng-ui-table.mjs +195 -71
  65. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  66. package/fesm2022/tectra-ng-ui-tabs.mjs +1218 -0
  67. package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -0
  68. package/fesm2022/tectra-ng-ui-textarea.mjs +4 -1
  69. package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -1
  70. package/fesm2022/tectra-ng-ui-timeline.mjs +407 -0
  71. package/fesm2022/tectra-ng-ui-timeline.mjs.map +1 -0
  72. package/fesm2022/tectra-ng-ui-toolbar.mjs +348 -0
  73. package/fesm2022/tectra-ng-ui-toolbar.mjs.map +1 -0
  74. package/fesm2022/tectra-ng-ui-tree-select.mjs +2 -2
  75. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  76. package/fesm2022/tectra-ng-ui-tree-table.mjs +80 -2
  77. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
  78. package/field/README.md +1 -1
  79. package/file-upload/README.md +85 -0
  80. package/menubar/README.md +51 -0
  81. package/month-calendar/README.md +46 -0
  82. package/package.json +80 -4
  83. package/panel-menu/README.md +45 -0
  84. package/scroll-panel/README.md +35 -0
  85. package/sparkline/README.md +27 -0
  86. package/splitter/README.md +62 -0
  87. package/stat-tiles/README.md +53 -0
  88. package/stepper/README.md +66 -0
  89. package/table/README.md +1 -1
  90. package/tabs/README.md +69 -0
  91. package/timeline/README.md +42 -0
  92. package/toolbar/README.md +35 -0
  93. package/types/tectra-ng-ui-accordion.d.ts +304 -0
  94. package/types/tectra-ng-ui-accordion.d.ts.map +1 -0
  95. package/types/tectra-ng-ui-analog-clock.d.ts +127 -0
  96. package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -0
  97. package/types/tectra-ng-ui-breadcrumb.d.ts +157 -0
  98. package/types/tectra-ng-ui-breadcrumb.d.ts.map +1 -0
  99. package/types/tectra-ng-ui-countdown.d.ts +150 -0
  100. package/types/tectra-ng-ui-countdown.d.ts.map +1 -0
  101. package/types/tectra-ng-ui-datepicker.d.ts +801 -0
  102. package/types/tectra-ng-ui-datepicker.d.ts.map +1 -0
  103. package/types/tectra-ng-ui-export-font.d.ts +5 -0
  104. package/types/tectra-ng-ui-export-font.d.ts.map +1 -0
  105. package/types/tectra-ng-ui-export.d.ts +427 -0
  106. package/types/tectra-ng-ui-export.d.ts.map +1 -0
  107. package/types/tectra-ng-ui-file-upload.d.ts +527 -0
  108. package/types/tectra-ng-ui-file-upload.d.ts.map +1 -0
  109. package/types/tectra-ng-ui-menubar.d.ts +201 -0
  110. package/types/tectra-ng-ui-menubar.d.ts.map +1 -0
  111. package/types/tectra-ng-ui-month-calendar.d.ts +287 -0
  112. package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -0
  113. package/types/tectra-ng-ui-panel-menu.d.ts +244 -0
  114. package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -0
  115. package/types/tectra-ng-ui-scroll-panel.d.ts +94 -0
  116. package/types/tectra-ng-ui-scroll-panel.d.ts.map +1 -0
  117. package/types/tectra-ng-ui-sparkline.d.ts +80 -0
  118. package/types/tectra-ng-ui-sparkline.d.ts.map +1 -0
  119. package/types/tectra-ng-ui-splitter.d.ts +226 -0
  120. package/types/tectra-ng-ui-splitter.d.ts.map +1 -0
  121. package/types/tectra-ng-ui-stat-tiles.d.ts +287 -0
  122. package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -0
  123. package/types/tectra-ng-ui-stepper.d.ts +446 -0
  124. package/types/tectra-ng-ui-stepper.d.ts.map +1 -0
  125. package/types/tectra-ng-ui-table.d.ts +2 -4
  126. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  127. package/types/tectra-ng-ui-tabs.d.ts +420 -0
  128. package/types/tectra-ng-ui-tabs.d.ts.map +1 -0
  129. package/types/tectra-ng-ui-textarea.d.ts +1 -0
  130. package/types/tectra-ng-ui-textarea.d.ts.map +1 -1
  131. package/types/tectra-ng-ui-timeline.d.ts +129 -0
  132. package/types/tectra-ng-ui-timeline.d.ts.map +1 -0
  133. package/types/tectra-ng-ui-toolbar.d.ts +85 -0
  134. package/types/tectra-ng-ui-toolbar.d.ts.map +1 -0
  135. package/types/tectra-ng-ui-tree-table.d.ts.map +1 -1
@@ -0,0 +1,610 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, effect, inject, input, model, numberAttribute, output, signal, untracked } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { toSignal } from "@angular/core/rxjs-interop";
5
+ import { NavigationEnd, Router, RouterLink, containsTree } from "@angular/router";
6
+ import { uniqueId } from "@tectra-ng/core/a11y";
7
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
8
+ import { optionalBoolean } from "@tectra-ng/core/utils";
9
+ import { TxIcon, TxIconRegistry } from "@tectra-ng/icons";
10
+ import { toStyleObject } from "@tectra-ng/themes";
11
+ import { TxBadge } from "@tectra-ng/ui/badge";
12
+ import { filter, map } from "rxjs";
13
+ var TxPanelMenuItemTemplate = class TxPanelMenuItemTemplate {
14
+ template = inject(TemplateRef);
15
+ static ngTemplateContextGuard(_directive, context) {
16
+ return !!context;
17
+ }
18
+ static ɵfac = i0.ɵɵngDeclareFactory({
19
+ minVersion: "12.0.0",
20
+ version: "22.2.3",
21
+ ngImport: i0,
22
+ type: TxPanelMenuItemTemplate,
23
+ deps: [],
24
+ target: i0.ɵɵFactoryTarget.Directive
25
+ });
26
+ static ɵdir = i0.ɵɵngDeclareDirective({
27
+ minVersion: "14.0.0",
28
+ version: "22.2.3",
29
+ type: TxPanelMenuItemTemplate,
30
+ isStandalone: true,
31
+ selector: "ng-template[txPanelMenuItem]",
32
+ ngImport: i0
33
+ });
34
+ };
35
+ i0.ɵɵngDeclareClassMetadata({
36
+ minVersion: "12.0.0",
37
+ version: "22.2.3",
38
+ ngImport: i0,
39
+ type: TxPanelMenuItemTemplate,
40
+ decorators: [{
41
+ type: Directive,
42
+ args: [{ selector: "ng-template[txPanelMenuItem]" }]
43
+ }]
44
+ });
45
+ const SUBSET_MATCH = {
46
+ paths: "subset",
47
+ queryParams: "ignored",
48
+ matrixParams: "ignored",
49
+ fragment: "ignored"
50
+ };
51
+ const EXACT_MATCH = {
52
+ paths: "exact",
53
+ queryParams: "exact",
54
+ matrixParams: "ignored",
55
+ fragment: "ignored"
56
+ };
57
+ var TxPanelMenu = class TxPanelMenu {
58
+ router = inject(Router, { optional: true });
59
+ host = inject(ElementRef).nativeElement;
60
+ txIconRegistry = inject(TxIconRegistry);
61
+ baseId = uniqueId("tx-panel-menu");
62
+ model = input([], ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
63
+ variant = input("panel", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
64
+ multiple = input(false, {
65
+ ...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
66
+ transform: booleanAttribute
67
+ });
68
+ expandedKeys = model({}, ...ngDevMode ? [{ debugName: "expandedKeys" }] : /* istanbul ignore next */ []);
69
+ badgeMax = input(99, {
70
+ ...ngDevMode ? { debugName: "badgeMax" } : /* istanbul ignore next */ {},
71
+ transform: numberAttribute
72
+ });
73
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
74
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
75
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
76
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
77
+ unstyled = input(void 0, {
78
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
79
+ transform: optionalBoolean
80
+ });
81
+ itemClick = output();
82
+ itemTemplate = contentChild(TxPanelMenuItemTemplate, ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
83
+ focusKey = signal(null, ...ngDevMode ? [{ debugName: "focusKey" }] : /* istanbul ignore next */ []);
84
+ isUnstyled = injectUnstyled(this.unstyled);
85
+ passThrough = injectPassThrough("panelMenu", this, this.pt, this.ptOptions);
86
+ hostStyle = computed(() => ({
87
+ ...toStyleObject(this.dt(), "--tx-panel-menu"),
88
+ ...this.passThrough().root?.style
89
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
90
+ nodes = computed(() => this.build(this.model(), null), ...ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []);
91
+ blocks = computed(() => this.nodes().map((node) => this.variant() === "sidebar" && !node.children.length && !node.separator ? {
92
+ node,
93
+ tree: [node],
94
+ titled: false
95
+ } : {
96
+ node,
97
+ tree: node.children,
98
+ titled: true
99
+ }), ...ngDevMode ? [{ debugName: "blocks" }] : /* istanbul ignore next */ []);
100
+ url = this.router ? toSignal(this.router.events.pipe(filter((event) => event instanceof NavigationEnd), map(() => this.router?.url ?? "")), { initialValue: this.router.url }) : signal("");
101
+ activeKeys = computed(() => {
102
+ const active = /* @__PURE__ */ new Set();
103
+ const current = this.currentTree();
104
+ if (!current) return active;
105
+ const visit = (nodes) => {
106
+ for (const node of nodes) {
107
+ if (this.matches(node.item, current)) active.add(node.key);
108
+ visit(node.children);
109
+ }
110
+ };
111
+ visit(this.nodes());
112
+ return active;
113
+ }, ...ngDevMode ? [{ debugName: "activeKeys" }] : /* istanbul ignore next */ []);
114
+ activeAncestors = computed(() => {
115
+ const keys = /* @__PURE__ */ new Set();
116
+ const visit = (nodes) => {
117
+ for (const node of nodes) {
118
+ if (this.activeKeys().has(node.key)) node.ancestors.forEach((key) => keys.add(key));
119
+ visit(node.children);
120
+ }
121
+ };
122
+ visit(this.nodes());
123
+ return [...keys].sort().join("|");
124
+ }, ...ngDevMode ? [{ debugName: "activeAncestors" }] : /* istanbul ignore next */ []);
125
+ constructor() {
126
+ effect(() => {
127
+ const ancestors = this.activeAncestors();
128
+ if (!ancestors) return;
129
+ untracked(() => {
130
+ const open = Object.fromEntries(ancestors.split("|").map((key) => [key, true]));
131
+ const current = this.expandedKeys();
132
+ const next = this.multiple() ? {
133
+ ...current,
134
+ ...open
135
+ } : open;
136
+ if (Object.keys(next).some((key) => current[key] !== next[key]) || !this.multiple() && Object.keys(current).some((key) => current[key] && !next[key])) this.expandedKeys.set(next);
137
+ });
138
+ });
139
+ }
140
+ isExpanded(node) {
141
+ if (this.variant() === "sidebar" && node.level === 0) return true;
142
+ return this.expandedKeys()[node.key] ?? node.item.expanded ?? false;
143
+ }
144
+ isActive(node) {
145
+ return this.activeKeys().has(node.key);
146
+ }
147
+ toggle(node) {
148
+ if (!node.children.length || node.item.disabled) return;
149
+ const open = !this.isExpanded(node);
150
+ const keys = { ...this.expandedKeys() };
151
+ if (open && !this.multiple() && (this.variant() === "sidebar" || node.level === 0)) {
152
+ for (const sibling of node.parent ? node.parent.children : this.nodes()) if (sibling !== node) keys[sibling.key] = false;
153
+ }
154
+ keys[node.key] = open;
155
+ this.expandedKeys.set(keys);
156
+ }
157
+ linkKind(node) {
158
+ const item = node.item;
159
+ if (node.children.length || item.disabled) return "none";
160
+ if (item.routerLink !== void 0 && this.router) return "router";
161
+ return item.url !== void 0 || item.routerLink !== void 0 ? "url" : "none";
162
+ }
163
+ href(item) {
164
+ if (item.url !== void 0) return item.url;
165
+ const commands = item.routerLink;
166
+ return typeof commands === "string" ? commands : (commands ?? []).join("/");
167
+ }
168
+ routerCommands(item) {
169
+ return item.routerLink ?? [];
170
+ }
171
+ iconName(icon) {
172
+ return icon && this.txIconRegistry.has(icon) ? icon : null;
173
+ }
174
+ badgeText(item) {
175
+ const badge = item.badge;
176
+ if (badge === void 0 || badge === null || badge === "") return "";
177
+ if (this.variant() === "sidebar" && typeof badge === "number") {
178
+ if (badge <= 0) return "";
179
+ return badge > this.badgeMax() ? `${this.badgeMax()}+` : String(badge);
180
+ }
181
+ return String(badge);
182
+ }
183
+ ariaLevel(node) {
184
+ return Math.max(node.level, 1);
185
+ }
186
+ context(node) {
187
+ return {
188
+ $implicit: node.item,
189
+ item: node.item,
190
+ level: node.level,
191
+ active: this.isActive(node),
192
+ expanded: node.children.length ? this.isExpanded(node) : false,
193
+ hasSubmenu: node.children.length > 0
194
+ };
195
+ }
196
+ tabKey(tree) {
197
+ const visible = this.visible(tree).filter((node) => !node.item.disabled);
198
+ const focus = this.focusKey();
199
+ return (visible.find((node) => node.key === focus) ?? visible.find((node) => this.isActive(node)) ?? visible[0])?.key ?? null;
200
+ }
201
+ onItemClick(node, event) {
202
+ if (node.item.disabled) {
203
+ event.preventDefault();
204
+ return;
205
+ }
206
+ this.focusKey.set(node.key);
207
+ if (node.children.length) this.toggle(node);
208
+ const itemEvent = {
209
+ item: node.item,
210
+ originalEvent: event
211
+ };
212
+ node.item.command?.(itemEvent);
213
+ this.itemClick.emit(itemEvent);
214
+ }
215
+ onHeaderKeydown(event) {
216
+ const headers = Array.from(this.host.querySelectorAll(".tx-panel-menu__header")).filter((header) => !header.hasAttribute("disabled") && header.closest(".tx-panel-menu") === this.host);
217
+ const current = headers.indexOf(event.currentTarget);
218
+ let target;
219
+ switch (event.key) {
220
+ case "ArrowDown":
221
+ target = headers[Math.min(current + 1, headers.length - 1)];
222
+ break;
223
+ case "ArrowUp":
224
+ target = headers[Math.max(current - 1, 0)];
225
+ break;
226
+ case "Home":
227
+ target = headers[0];
228
+ break;
229
+ case "End":
230
+ target = headers[headers.length - 1];
231
+ break;
232
+ default: return;
233
+ }
234
+ event.preventDefault();
235
+ target?.focus();
236
+ }
237
+ onTreeKeydown(event, tree) {
238
+ const element = event.target.closest("[role=\"treeitem\"]");
239
+ const visible = this.visible(tree).filter((node) => !node.item.disabled);
240
+ const index = visible.findIndex((node) => node.id === element?.id);
241
+ const node = visible[index];
242
+ if (!node) return;
243
+ let target;
244
+ switch (event.key) {
245
+ case "ArrowDown":
246
+ target = visible[index + 1];
247
+ break;
248
+ case "ArrowUp":
249
+ target = visible[index - 1];
250
+ break;
251
+ case "Home":
252
+ target = visible[0];
253
+ break;
254
+ case "End":
255
+ target = visible[visible.length - 1];
256
+ break;
257
+ case "ArrowRight":
258
+ if (node.children.length && !this.isExpanded(node)) this.toggle(node);
259
+ else if (node.children.length) target = node.children.find((child) => !child.separator && !child.item.disabled);
260
+ break;
261
+ case "ArrowLeft":
262
+ if (node.children.length && this.isExpanded(node)) this.toggle(node);
263
+ else if (node.parent && tree.includes(node) === false) target = node.parent;
264
+ break;
265
+ case "Enter":
266
+ case " ":
267
+ event.preventDefault();
268
+ element?.click();
269
+ return;
270
+ default: return;
271
+ }
272
+ event.preventDefault();
273
+ if (target) this.focusNode(target);
274
+ }
275
+ focusNode(node) {
276
+ this.focusKey.set(node.key);
277
+ this.host.querySelector(`#${node.id}`)?.focus();
278
+ }
279
+ visible(nodes) {
280
+ return nodes.flatMap((node) => node.separator ? [] : [node, ...node.children.length && this.isExpanded(node) ? this.visible(node.children) : []]);
281
+ }
282
+ currentTree() {
283
+ const router = this.router;
284
+ const url = this.url();
285
+ return router ? router.parseUrl(url) : null;
286
+ }
287
+ matches(item, current) {
288
+ const router = this.router;
289
+ if (!router || item.routerLink === void 0) return false;
290
+ const commands = typeof item.routerLink === "string" ? [item.routerLink] : [...item.routerLink];
291
+ const target = router.createUrlTree(commands, {
292
+ queryParams: item.queryParams,
293
+ fragment: item.fragment
294
+ });
295
+ const options = item.routerLinkActiveOptions;
296
+ const match = options && "exact" in options ? options.exact ? EXACT_MATCH : SUBSET_MATCH : {
297
+ ...SUBSET_MATCH,
298
+ ...options
299
+ };
300
+ return containsTree(current, target, match);
301
+ }
302
+ build(items, parent) {
303
+ return items.filter((item) => item.visible !== false).map((item, index) => {
304
+ const key = item.id ?? (parent ? `${parent.key}-${index}` : `${index}`);
305
+ const node = {
306
+ item,
307
+ key,
308
+ id: `${this.baseId}-${key.replace(/[^\w-]/g, "_")}`,
309
+ level: parent ? parent.level + 1 : 0,
310
+ ancestors: parent ? [...parent.ancestors, parent.key] : [],
311
+ parent,
312
+ children: [],
313
+ separator: Boolean(item.separator)
314
+ };
315
+ node.children = item.items ? this.build(item.items, node) : [];
316
+ return node;
317
+ });
318
+ }
319
+ static ɵfac = i0.ɵɵngDeclareFactory({
320
+ minVersion: "12.0.0",
321
+ version: "22.2.3",
322
+ ngImport: i0,
323
+ type: TxPanelMenu,
324
+ deps: [],
325
+ target: i0.ɵɵFactoryTarget.Component
326
+ });
327
+ static ɵcmp = i0.ɵɵngDeclareComponent({
328
+ minVersion: "17.0.0",
329
+ version: "22.2.3",
330
+ type: TxPanelMenu,
331
+ isStandalone: true,
332
+ selector: "tx-panel-menu",
333
+ inputs: {
334
+ model: {
335
+ classPropertyName: "model",
336
+ publicName: "model",
337
+ isSignal: true,
338
+ isRequired: false,
339
+ transformFunction: null
340
+ },
341
+ variant: {
342
+ classPropertyName: "variant",
343
+ publicName: "variant",
344
+ isSignal: true,
345
+ isRequired: false,
346
+ transformFunction: null
347
+ },
348
+ multiple: {
349
+ classPropertyName: "multiple",
350
+ publicName: "multiple",
351
+ isSignal: true,
352
+ isRequired: false,
353
+ transformFunction: null
354
+ },
355
+ expandedKeys: {
356
+ classPropertyName: "expandedKeys",
357
+ publicName: "expandedKeys",
358
+ isSignal: true,
359
+ isRequired: false,
360
+ transformFunction: null
361
+ },
362
+ badgeMax: {
363
+ classPropertyName: "badgeMax",
364
+ publicName: "badgeMax",
365
+ isSignal: true,
366
+ isRequired: false,
367
+ transformFunction: null
368
+ },
369
+ ariaLabel: {
370
+ classPropertyName: "ariaLabel",
371
+ publicName: "ariaLabel",
372
+ isSignal: true,
373
+ isRequired: false,
374
+ transformFunction: null
375
+ },
376
+ dt: {
377
+ classPropertyName: "dt",
378
+ publicName: "dt",
379
+ isSignal: true,
380
+ isRequired: false,
381
+ transformFunction: null
382
+ },
383
+ pt: {
384
+ classPropertyName: "pt",
385
+ publicName: "pt",
386
+ isSignal: true,
387
+ isRequired: false,
388
+ transformFunction: null
389
+ },
390
+ ptOptions: {
391
+ classPropertyName: "ptOptions",
392
+ publicName: "ptOptions",
393
+ isSignal: true,
394
+ isRequired: false,
395
+ transformFunction: null
396
+ },
397
+ unstyled: {
398
+ classPropertyName: "unstyled",
399
+ publicName: "unstyled",
400
+ isSignal: true,
401
+ isRequired: false,
402
+ transformFunction: null
403
+ }
404
+ },
405
+ outputs: {
406
+ expandedKeys: "expandedKeysChange",
407
+ itemClick: "itemClick"
408
+ },
409
+ host: {
410
+ properties: {
411
+ "class": "passThrough().root?.class",
412
+ "style": "hostStyle()",
413
+ "attr.data-styled": "!isUnstyled() || null",
414
+ "attr.data-variant": "variant()",
415
+ "attr.role": "ariaLabel() ? \"navigation\" : null",
416
+ "attr.aria-label": "ariaLabel() ?? null"
417
+ },
418
+ classAttribute: "tx-panel-menu"
419
+ },
420
+ queries: [{
421
+ propertyName: "itemTemplate",
422
+ first: true,
423
+ predicate: TxPanelMenuItemTemplate,
424
+ descendants: true,
425
+ isSignal: true
426
+ }],
427
+ ngImport: i0,
428
+ template: "@for (block of blocks(); track block.node.key) {\n @let node = block.node;\n @if (node.separator) {\n <div role=\"separator\" class=\"tx-panel-menu__separator\" [class]=\"passThrough().separator?.class\" [style]=\"passThrough().separator?.style\"></div>\n } @else if (variant() === 'sidebar') {\n @if (block.titled) {\n <div class=\"tx-panel-menu__section\" [id]=\"node.id\" [class]=\"passThrough().section?.class\" [style]=\"passThrough().section?.style\">{{ node.item.label }}</div>\n }\n <ng-container *ngTemplateOutlet=\"tree; context: { $implicit: block.tree, labelledBy: block.titled ? node.id : null, label: block.titled ? null : node.item.label }\" />\n } @else {\n <div\n class=\"tx-panel-menu__panel\"\n [class.tx-panel-menu__panel--expanded]=\"node.children.length && isExpanded(node)\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"passThrough().panel?.style\"\n >\n @switch (linkKind(node)) {\n @case ('router') {\n <a\n class=\"tx-panel-menu__header\"\n [id]=\"node.id\"\n [class.tx-panel-menu__header--active]=\"isActive(node)\"\n [attr.aria-current]=\"isActive(node) ? 'page' : null\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.target]=\"node.item.target ?? null\"\n [routerLink]=\"routerCommands(node.item)\"\n [queryParams]=\"node.item.queryParams\"\n [fragment]=\"node.item.fragment\"\n [class]=\"passThrough().header?.class\"\n [style]=\"passThrough().header?.style\"\n (click)=\"onItemClick(node, $event)\"\n (keydown)=\"onHeaderKeydown($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </a>\n }\n @case ('url') {\n <a\n class=\"tx-panel-menu__header\"\n [id]=\"node.id\"\n [attr.href]=\"href(node.item)\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.target]=\"node.item.target ?? null\"\n [attr.rel]=\"node.item.target === '_blank' ? 'noopener noreferrer' : null\"\n [class]=\"passThrough().header?.class\"\n [style]=\"passThrough().header?.style\"\n (click)=\"onItemClick(node, $event)\"\n (keydown)=\"onHeaderKeydown($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </a>\n }\n @default {\n <button\n type=\"button\"\n class=\"tx-panel-menu__header\"\n [id]=\"node.id\"\n [disabled]=\"node.item.disabled ?? false\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.aria-expanded]=\"node.children.length ? isExpanded(node) : null\"\n [attr.aria-controls]=\"node.children.length ? node.id + '-content' : null\"\n [class]=\"passThrough().header?.class\"\n [style]=\"passThrough().header?.style\"\n (click)=\"onItemClick(node, $event)\"\n (keydown)=\"onHeaderKeydown($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </button>\n }\n }\n @if (node.children.length) {\n <div\n class=\"tx-panel-menu__collapse\"\n role=\"region\"\n [id]=\"node.id + '-content'\"\n [attr.aria-labelledby]=\"node.id\"\n [class.tx-panel-menu__collapse--open]=\"isExpanded(node)\"\n [attr.inert]=\"isExpanded(node) ? null : ''\"\n >\n <div class=\"tx-panel-menu__collapse-inner\">\n <ng-container *ngTemplateOutlet=\"tree; context: { $implicit: block.tree, labelledBy: node.id, label: null }\" />\n </div>\n </div>\n }\n </div>\n }\n}\n\n<ng-template #tree let-nodes let-labelledBy=\"labelledBy\" let-label=\"label\">\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- the tree items take focus; the tree handles their arrow keys -->\n <ul\n class=\"tx-panel-menu__tree\"\n role=\"tree\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-label]=\"label\"\n [class]=\"passThrough().tree?.class\"\n [style]=\"passThrough().tree?.style\"\n (keydown)=\"onTreeKeydown($event, nodes)\"\n >\n <ng-container *ngTemplateOutlet=\"branch; context: { $implicit: nodes, tree: nodes }\" />\n </ul>\n</ng-template>\n\n<ng-template #branch let-nodes let-tree=\"tree\">\n @for (node of nodes; track node.key) {\n @if (node.separator) {\n <li role=\"none\" aria-hidden=\"true\" class=\"tx-panel-menu__separator\" [class]=\"passThrough().separator?.class\" [style]=\"passThrough().separator?.style\"></li>\n } @else {\n <li role=\"none\" class=\"tx-panel-menu__node\">\n @switch (linkKind(node)) {\n @case ('router') {\n <a\n role=\"treeitem\"\n class=\"tx-panel-menu__item\"\n [id]=\"node.id\"\n [attr.data-level]=\"ariaLevel(node)\"\n [style.--_level]=\"ariaLevel(node)\"\n [class.tx-panel-menu__item--active]=\"isActive(node)\"\n [attr.tabindex]=\"tabKey(tree) === node.key ? 0 : -1\"\n [attr.aria-level]=\"ariaLevel(node)\"\n [attr.aria-selected]=\"isActive(node)\"\n [attr.aria-current]=\"isActive(node) ? 'page' : null\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.target]=\"node.item.target ?? null\"\n [routerLink]=\"routerCommands(node.item)\"\n [queryParams]=\"node.item.queryParams\"\n [fragment]=\"node.item.fragment\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"onItemClick(node, $event)\"\n (focus)=\"focusKey.set(node.key)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </a>\n }\n @case ('url') {\n <a\n role=\"treeitem\"\n class=\"tx-panel-menu__item\"\n [id]=\"node.id\"\n [attr.data-level]=\"ariaLevel(node)\"\n [style.--_level]=\"ariaLevel(node)\"\n [attr.tabindex]=\"tabKey(tree) === node.key ? 0 : -1\"\n [attr.aria-level]=\"ariaLevel(node)\"\n [attr.aria-selected]=\"false\"\n [attr.href]=\"href(node.item)\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.target]=\"node.item.target ?? null\"\n [attr.rel]=\"node.item.target === '_blank' ? 'noopener noreferrer' : null\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"onItemClick(node, $event)\"\n (focus)=\"focusKey.set(node.key)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </a>\n }\n @default {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- the tree handles the keys of its items -->\n <div\n role=\"treeitem\"\n class=\"tx-panel-menu__item\"\n [id]=\"node.id\"\n [attr.data-level]=\"ariaLevel(node)\"\n [style.--_level]=\"ariaLevel(node)\"\n [class.tx-panel-menu__item--expanded]=\"node.children.length && isExpanded(node)\"\n [attr.tabindex]=\"node.item.disabled ? null : tabKey(tree) === node.key ? 0 : -1\"\n [attr.aria-level]=\"ariaLevel(node)\"\n [attr.aria-disabled]=\"node.item.disabled || null\"\n [attr.aria-selected]=\"false\"\n [attr.aria-expanded]=\"node.children.length ? isExpanded(node) : null\"\n [attr.aria-owns]=\"node.children.length ? node.id + '-group' : null\"\n [attr.title]=\"node.item.title ?? null\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"onItemClick(node, $event)\"\n (focus)=\"focusKey.set(node.key)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </div>\n }\n }\n @if (node.children.length) {\n <div class=\"tx-panel-menu__collapse\" [class.tx-panel-menu__collapse--open]=\"isExpanded(node)\" [attr.inert]=\"isExpanded(node) ? null : ''\">\n <div class=\"tx-panel-menu__collapse-inner\">\n <ul role=\"group\" class=\"tx-panel-menu__group\" [id]=\"node.id + '-group'\">\n <ng-container *ngTemplateOutlet=\"branch; context: { $implicit: node.children, tree: tree }\" />\n </ul>\n </div>\n </div>\n }\n </li>\n }\n }\n</ng-template>\n\n<ng-template #content let-node>\n @if (itemTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template.template; context: context(node)\" />\n } @else {\n @if (variant() === 'panel' && node.children.length) {\n <tx-icon\n class=\"tx-panel-menu__submenu-icon\"\n aria-hidden=\"true\"\n name=\"chevron-down\"\n [class]=\"passThrough().submenuIcon?.class\"\n [style]=\"passThrough().submenuIcon?.style\"\n />\n } @else if (variant() === 'panel') {\n <span class=\"tx-panel-menu__submenu-icon tx-panel-menu__submenu-icon--spacer\" aria-hidden=\"true\"></span>\n }\n @if (node.item.icon; as icon) {\n <span class=\"tx-panel-menu__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(icon); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span class=\"tx-panel-menu__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ node.item.label }}</span>\n @if (badgeText(node.item); as badge) {\n @if (variant() === 'sidebar') {\n <span class=\"tx-panel-menu__badge\" [class]=\"passThrough().badge?.class\" [style]=\"passThrough().badge?.style\">{{ badge }}</span>\n } @else {\n <tx-badge class=\"tx-panel-menu__badge\" size=\"small\" severity=\"secondary\" [value]=\"badge\" [unstyled]=\"isUnstyled()\" />\n }\n }\n @if (variant() === 'sidebar' && node.item.disabled) {\n <tx-icon class=\"tx-panel-menu__lock\" aria-hidden=\"true\" name=\"lock\" [class]=\"passThrough().lock?.class\" [style]=\"passThrough().lock?.style\" />\n }\n @if (variant() === 'sidebar' && node.children.length) {\n <tx-icon\n class=\"tx-panel-menu__submenu-icon\"\n aria-hidden=\"true\"\n name=\"angle-down\"\n [class]=\"passThrough().submenuIcon?.class\"\n [style]=\"passThrough().submenuIcon?.style\"\n />\n }\n }\n</ng-template>\n",
429
+ styles: [":host{display:flex;flex-direction:column;min-width:0}.tx-panel-menu__tree,.tx-panel-menu__group{margin:0;padding:0;list-style:none}.tx-panel-menu__node{display:block}.tx-panel-menu__header,.tx-panel-menu__item{display:flex;box-sizing:border-box;align-items:center;width:100%;margin:0;border:none;background:transparent;color:inherit;font:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;outline:none}.tx-panel-menu__item[aria-disabled=true],.tx-panel-menu__header:disabled{cursor:default}.tx-panel-menu__label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:clip}.tx-panel-menu__icon,.tx-panel-menu__submenu-icon,.tx-panel-menu__lock,.tx-panel-menu__badge{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center}.tx-panel-menu__submenu-icon--spacer{width:1em;height:1em}.tx-panel-menu__collapse{display:grid;grid-template-rows:0fr}.tx-panel-menu__collapse--open{grid-template-rows:1fr}.tx-panel-menu__collapse-inner{min-height:0;overflow:hidden}.tx-panel-menu__collapse:not(.tx-panel-menu__collapse--open)>.tx-panel-menu__collapse-inner{visibility:hidden}:host([data-styled]){--_duration: var(--tx-panel-menu-transition-duration);--_expand: var(--tx-panel-menu-expand-duration) var(--tx-panel-menu-expand-easing);font-family:var(--tx-font-family);font-size:var(--tx-panel-menu-font-size);line-height:var(--tx-panel-menu-line-height)}:host([data-styled]) .tx-panel-menu__collapse{transition:grid-template-rows var(--_expand)}:host([data-styled]) .tx-panel-menu__collapse:not(.tx-panel-menu__collapse--open)>.tx-panel-menu__collapse-inner{transition:visibility 0s linear var(--tx-panel-menu-expand-duration)}:host([data-styled]) .tx-panel-menu__separator{margin:var(--tx-panel-menu-separator-margin);border-top:1px solid var(--tx-panel-menu-separator-color)}:host([data-styled][data-variant=panel]){gap:var(--tx-panel-menu-gap);color:var(--tx-panel-menu-panel-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__panel{padding:var(--tx-panel-menu-panel-padding);border:var(--tx-panel-menu-panel-border-width) solid var(--tx-panel-menu-panel-border-color);border-radius:var(--tx-panel-menu-panel-border-radius);background:var(--tx-panel-menu-panel-background)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header,:host([data-styled][data-variant=panel]) .tx-panel-menu__item{gap:var(--tx-panel-menu-item-gap);padding:var(--tx-panel-menu-item-padding);border-radius:var(--tx-panel-menu-item-border-radius);color:var(--tx-panel-menu-item-color);font-weight:var(--tx-panel-menu-item-font-weight);transition:background-color var(--_duration),color var(--_duration),opacity var(--_duration)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:not(:disabled):not([aria-disabled=true]):hover,:host([data-styled][data-variant=panel]) .tx-panel-menu__header:focus-visible,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:not(:disabled):not([aria-disabled=true]):hover,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:focus-visible{background:var(--tx-panel-menu-item-focus-background);color:var(--tx-panel-menu-item-focus-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:not(:disabled):not([aria-disabled=true]):hover .tx-panel-menu__icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__header:focus-visible .tx-panel-menu__icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:not(:disabled):not([aria-disabled=true]):hover .tx-panel-menu__icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:focus-visible .tx-panel-menu__icon{color:var(--tx-panel-menu-icon-focus-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:not(:disabled):not([aria-disabled=true]):hover .tx-panel-menu__submenu-icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__header:focus-visible .tx-panel-menu__submenu-icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:not(:disabled):not([aria-disabled=true]):hover .tx-panel-menu__submenu-icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:focus-visible .tx-panel-menu__submenu-icon{color:var(--tx-panel-menu-submenu-icon-focus-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:focus-visible,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:focus-visible{outline:var(--tx-panel-menu-item-focus-ring-width) solid var(--tx-panel-menu-item-focus-ring-color);outline-offset:var(--tx-panel-menu-item-focus-ring-offset)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:disabled,:host([data-styled][data-variant=panel]) .tx-panel-menu__header[aria-disabled=true],:host([data-styled][data-variant=panel]) .tx-panel-menu__item:disabled,:host([data-styled][data-variant=panel]) .tx-panel-menu__item[aria-disabled=true]{opacity:var(--tx-panel-menu-item-disabled-opacity)}:host([data-styled][data-variant=panel]) .tx-panel-menu__item--active,:host([data-styled][data-variant=panel]) .tx-panel-menu__header--active{background:var(--tx-panel-menu-item-active-background);color:var(--tx-panel-menu-item-active-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__tree,:host([data-styled][data-variant=panel]) .tx-panel-menu__group{display:flex;flex-direction:column;gap:var(--tx-panel-menu-list-gap)}:host([data-styled][data-variant=panel]) .tx-panel-menu__collapse-inner>.tx-panel-menu__tree,:host([data-styled][data-variant=panel]) .tx-panel-menu__group{padding-top:var(--tx-panel-menu-list-gap)}:host([data-styled][data-variant=panel]) .tx-panel-menu__group{padding-inline-start:var(--tx-panel-menu-submenu-indent)}:host([data-styled][data-variant=panel]) .tx-panel-menu__node{display:flex;flex-direction:column}:host([data-styled][data-variant=panel]) .tx-panel-menu__icon{width:var(--tx-panel-menu-icon-size);height:var(--tx-panel-menu-icon-size);color:var(--tx-panel-menu-icon-color);font-size:var(--tx-panel-menu-icon-size);transition:color var(--_duration)}:host([data-styled][data-variant=panel]) .tx-panel-menu__submenu-icon{font-size:var(--tx-panel-menu-submenu-icon-size);color:var(--tx-panel-menu-submenu-icon-color);transform:rotate(-90deg);transition:color var(--_duration),transform var(--_expand)}:host([data-styled][data-variant=panel]) .tx-panel-menu__panel--expanded>.tx-panel-menu__header .tx-panel-menu__submenu-icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item--expanded .tx-panel-menu__submenu-icon{transform:rotate(0)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__section{padding:var(--tx-panel-menu-sidebar-section-padding);color:var(--tx-panel-menu-sidebar-section-color);font-size:var(--tx-panel-menu-sidebar-section-font-size);font-weight:var(--tx-panel-menu-sidebar-section-font-weight)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item{width:auto;margin:var(--tx-panel-menu-sidebar-item-margin);padding:var(--tx-panel-menu-sidebar-item-padding);padding-inline-start:calc(var(--tx-panel-menu-sidebar-indent3) + (var(--_level) - 3) * var(--tx-panel-menu-sidebar-indent-step));border-radius:var(--tx-panel-menu-sidebar-item-border-radius);color:var(--tx-panel-menu-sidebar-item-color);font-weight:var(--tx-panel-menu-sidebar-item-font-weight);transition:background-color var(--_duration),color var(--_duration),box-shadow var(--_duration)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item[data-level=\"1\"]{padding-inline-start:var(--tx-panel-menu-sidebar-indent1)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item[data-level=\"2\"]{padding-inline-start:var(--tx-panel-menu-sidebar-indent2)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:has(.tx-panel-menu__badge){padding-inline-end:var(--tx-panel-menu-sidebar-item-badge-padding-end)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:not([aria-disabled=true]):hover{background:var(--tx-panel-menu-sidebar-item-hover-background);color:var(--tx-panel-menu-sidebar-item-hover-color)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:not([aria-disabled=true]):hover .tx-panel-menu__icon,:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:not([aria-disabled=true]):hover .tx-panel-menu__submenu-icon{color:var(--tx-panel-menu-sidebar-item-hover-color)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:focus-visible{box-shadow:var(--tx-panel-menu-sidebar-focus-shadow)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item[aria-disabled=true]{opacity:var(--tx-panel-menu-sidebar-disabled-opacity)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active,:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active:not([aria-disabled=true]):hover{background:var(--tx-panel-menu-sidebar-active-background);color:var(--tx-panel-menu-sidebar-active-color);font-weight:var(--tx-panel-menu-sidebar-active-font-weight)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active .tx-panel-menu__icon,:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active:not([aria-disabled=true]):hover .tx-panel-menu__icon{color:var(--tx-panel-menu-sidebar-active-color)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active:not([aria-disabled=true]):hover{background:var(--tx-panel-menu-sidebar-active-hover-background)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__icon{width:var(--tx-panel-menu-sidebar-icon-size);height:var(--tx-panel-menu-sidebar-icon-size);margin-inline-end:var(--tx-panel-menu-sidebar-icon-gap);color:var(--tx-panel-menu-sidebar-icon-color);font-size:var(--tx-panel-menu-sidebar-icon-size);transition:color var(--_duration)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__submenu-icon{margin-inline-start:auto;font-size:var(--tx-panel-menu-sidebar-toggler-size);transition:color var(--_duration),transform var(--_duration)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--expanded .tx-panel-menu__submenu-icon{transform:rotate(-180deg)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__badge{min-width:var(--tx-panel-menu-sidebar-badge-size);height:var(--tx-panel-menu-sidebar-badge-size);box-sizing:border-box;margin-inline-start:var(--tx-panel-menu-sidebar-badge-gap);padding:var(--tx-panel-menu-sidebar-badge-padding);border-radius:var(--tx-radius-full);background:var(--tx-panel-menu-sidebar-badge-background);color:var(--tx-panel-menu-sidebar-badge-color);font-size:var(--tx-panel-menu-sidebar-badge-font-size);font-weight:var(--tx-panel-menu-sidebar-badge-font-weight);font-variant-numeric:tabular-nums;line-height:1}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__lock{margin-inline-start:var(--tx-panel-menu-sidebar-lock-gap);color:var(--tx-panel-menu-sidebar-lock-color);font-size:var(--tx-panel-menu-sidebar-lock-size)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-panel-menu__collapse,:host([data-styled]) .tx-panel-menu__collapse:not(.tx-panel-menu__collapse--open)>.tx-panel-menu__collapse-inner,:host([data-styled]) .tx-panel-menu__header,:host([data-styled]) .tx-panel-menu__item,:host([data-styled]) .tx-panel-menu__icon,:host([data-styled]) .tx-panel-menu__submenu-icon{transition:none}}\n"],
430
+ dependencies: [
431
+ {
432
+ kind: "directive",
433
+ type: NgTemplateOutlet,
434
+ selector: "[ngTemplateOutlet]",
435
+ inputs: [
436
+ "ngTemplateOutletContext",
437
+ "ngTemplateOutlet",
438
+ "ngTemplateOutletInjector"
439
+ ]
440
+ },
441
+ {
442
+ kind: "directive",
443
+ type: RouterLink,
444
+ selector: "[routerLink]",
445
+ inputs: [
446
+ "target",
447
+ "queryParams",
448
+ "fragment",
449
+ "queryParamsHandling",
450
+ "state",
451
+ "info",
452
+ "relativeTo",
453
+ "preserveFragment",
454
+ "skipLocationChange",
455
+ "replaceUrl",
456
+ "browserUrl",
457
+ "routerLink"
458
+ ]
459
+ },
460
+ {
461
+ kind: "component",
462
+ type: TxIcon,
463
+ selector: "tx-icon",
464
+ inputs: ["name"]
465
+ },
466
+ {
467
+ kind: "component",
468
+ type: TxBadge,
469
+ selector: "tx-badge",
470
+ inputs: [
471
+ "value",
472
+ "severity",
473
+ "size",
474
+ "dt",
475
+ "pt",
476
+ "ptOptions",
477
+ "unstyled"
478
+ ]
479
+ }
480
+ ],
481
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
482
+ });
483
+ };
484
+ i0.ɵɵngDeclareClassMetadata({
485
+ minVersion: "12.0.0",
486
+ version: "22.2.3",
487
+ ngImport: i0,
488
+ type: TxPanelMenu,
489
+ decorators: [{
490
+ type: Component,
491
+ args: [{
492
+ selector: "tx-panel-menu",
493
+ imports: [
494
+ NgTemplateOutlet,
495
+ RouterLink,
496
+ TxIcon,
497
+ TxBadge
498
+ ],
499
+ changeDetection: ChangeDetectionStrategy.OnPush,
500
+ host: {
501
+ class: "tx-panel-menu",
502
+ "[class]": "passThrough().root?.class",
503
+ "[style]": "hostStyle()",
504
+ "[attr.data-styled]": "!isUnstyled() || null",
505
+ "[attr.data-variant]": "variant()",
506
+ "[attr.role]": "ariaLabel() ? \"navigation\" : null",
507
+ "[attr.aria-label]": "ariaLabel() ?? null"
508
+ },
509
+ template: "@for (block of blocks(); track block.node.key) {\n @let node = block.node;\n @if (node.separator) {\n <div role=\"separator\" class=\"tx-panel-menu__separator\" [class]=\"passThrough().separator?.class\" [style]=\"passThrough().separator?.style\"></div>\n } @else if (variant() === 'sidebar') {\n @if (block.titled) {\n <div class=\"tx-panel-menu__section\" [id]=\"node.id\" [class]=\"passThrough().section?.class\" [style]=\"passThrough().section?.style\">{{ node.item.label }}</div>\n }\n <ng-container *ngTemplateOutlet=\"tree; context: { $implicit: block.tree, labelledBy: block.titled ? node.id : null, label: block.titled ? null : node.item.label }\" />\n } @else {\n <div\n class=\"tx-panel-menu__panel\"\n [class.tx-panel-menu__panel--expanded]=\"node.children.length && isExpanded(node)\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"passThrough().panel?.style\"\n >\n @switch (linkKind(node)) {\n @case ('router') {\n <a\n class=\"tx-panel-menu__header\"\n [id]=\"node.id\"\n [class.tx-panel-menu__header--active]=\"isActive(node)\"\n [attr.aria-current]=\"isActive(node) ? 'page' : null\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.target]=\"node.item.target ?? null\"\n [routerLink]=\"routerCommands(node.item)\"\n [queryParams]=\"node.item.queryParams\"\n [fragment]=\"node.item.fragment\"\n [class]=\"passThrough().header?.class\"\n [style]=\"passThrough().header?.style\"\n (click)=\"onItemClick(node, $event)\"\n (keydown)=\"onHeaderKeydown($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </a>\n }\n @case ('url') {\n <a\n class=\"tx-panel-menu__header\"\n [id]=\"node.id\"\n [attr.href]=\"href(node.item)\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.target]=\"node.item.target ?? null\"\n [attr.rel]=\"node.item.target === '_blank' ? 'noopener noreferrer' : null\"\n [class]=\"passThrough().header?.class\"\n [style]=\"passThrough().header?.style\"\n (click)=\"onItemClick(node, $event)\"\n (keydown)=\"onHeaderKeydown($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </a>\n }\n @default {\n <button\n type=\"button\"\n class=\"tx-panel-menu__header\"\n [id]=\"node.id\"\n [disabled]=\"node.item.disabled ?? false\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.aria-expanded]=\"node.children.length ? isExpanded(node) : null\"\n [attr.aria-controls]=\"node.children.length ? node.id + '-content' : null\"\n [class]=\"passThrough().header?.class\"\n [style]=\"passThrough().header?.style\"\n (click)=\"onItemClick(node, $event)\"\n (keydown)=\"onHeaderKeydown($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </button>\n }\n }\n @if (node.children.length) {\n <div\n class=\"tx-panel-menu__collapse\"\n role=\"region\"\n [id]=\"node.id + '-content'\"\n [attr.aria-labelledby]=\"node.id\"\n [class.tx-panel-menu__collapse--open]=\"isExpanded(node)\"\n [attr.inert]=\"isExpanded(node) ? null : ''\"\n >\n <div class=\"tx-panel-menu__collapse-inner\">\n <ng-container *ngTemplateOutlet=\"tree; context: { $implicit: block.tree, labelledBy: node.id, label: null }\" />\n </div>\n </div>\n }\n </div>\n }\n}\n\n<ng-template #tree let-nodes let-labelledBy=\"labelledBy\" let-label=\"label\">\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- the tree items take focus; the tree handles their arrow keys -->\n <ul\n class=\"tx-panel-menu__tree\"\n role=\"tree\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-label]=\"label\"\n [class]=\"passThrough().tree?.class\"\n [style]=\"passThrough().tree?.style\"\n (keydown)=\"onTreeKeydown($event, nodes)\"\n >\n <ng-container *ngTemplateOutlet=\"branch; context: { $implicit: nodes, tree: nodes }\" />\n </ul>\n</ng-template>\n\n<ng-template #branch let-nodes let-tree=\"tree\">\n @for (node of nodes; track node.key) {\n @if (node.separator) {\n <li role=\"none\" aria-hidden=\"true\" class=\"tx-panel-menu__separator\" [class]=\"passThrough().separator?.class\" [style]=\"passThrough().separator?.style\"></li>\n } @else {\n <li role=\"none\" class=\"tx-panel-menu__node\">\n @switch (linkKind(node)) {\n @case ('router') {\n <a\n role=\"treeitem\"\n class=\"tx-panel-menu__item\"\n [id]=\"node.id\"\n [attr.data-level]=\"ariaLevel(node)\"\n [style.--_level]=\"ariaLevel(node)\"\n [class.tx-panel-menu__item--active]=\"isActive(node)\"\n [attr.tabindex]=\"tabKey(tree) === node.key ? 0 : -1\"\n [attr.aria-level]=\"ariaLevel(node)\"\n [attr.aria-selected]=\"isActive(node)\"\n [attr.aria-current]=\"isActive(node) ? 'page' : null\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.target]=\"node.item.target ?? null\"\n [routerLink]=\"routerCommands(node.item)\"\n [queryParams]=\"node.item.queryParams\"\n [fragment]=\"node.item.fragment\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"onItemClick(node, $event)\"\n (focus)=\"focusKey.set(node.key)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </a>\n }\n @case ('url') {\n <a\n role=\"treeitem\"\n class=\"tx-panel-menu__item\"\n [id]=\"node.id\"\n [attr.data-level]=\"ariaLevel(node)\"\n [style.--_level]=\"ariaLevel(node)\"\n [attr.tabindex]=\"tabKey(tree) === node.key ? 0 : -1\"\n [attr.aria-level]=\"ariaLevel(node)\"\n [attr.aria-selected]=\"false\"\n [attr.href]=\"href(node.item)\"\n [attr.title]=\"node.item.title ?? null\"\n [attr.target]=\"node.item.target ?? null\"\n [attr.rel]=\"node.item.target === '_blank' ? 'noopener noreferrer' : null\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"onItemClick(node, $event)\"\n (focus)=\"focusKey.set(node.key)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </a>\n }\n @default {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- the tree handles the keys of its items -->\n <div\n role=\"treeitem\"\n class=\"tx-panel-menu__item\"\n [id]=\"node.id\"\n [attr.data-level]=\"ariaLevel(node)\"\n [style.--_level]=\"ariaLevel(node)\"\n [class.tx-panel-menu__item--expanded]=\"node.children.length && isExpanded(node)\"\n [attr.tabindex]=\"node.item.disabled ? null : tabKey(tree) === node.key ? 0 : -1\"\n [attr.aria-level]=\"ariaLevel(node)\"\n [attr.aria-disabled]=\"node.item.disabled || null\"\n [attr.aria-selected]=\"false\"\n [attr.aria-expanded]=\"node.children.length ? isExpanded(node) : null\"\n [attr.aria-owns]=\"node.children.length ? node.id + '-group' : null\"\n [attr.title]=\"node.item.title ?? null\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"onItemClick(node, $event)\"\n (focus)=\"focusKey.set(node.key)\"\n >\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: node }\" />\n </div>\n }\n }\n @if (node.children.length) {\n <div class=\"tx-panel-menu__collapse\" [class.tx-panel-menu__collapse--open]=\"isExpanded(node)\" [attr.inert]=\"isExpanded(node) ? null : ''\">\n <div class=\"tx-panel-menu__collapse-inner\">\n <ul role=\"group\" class=\"tx-panel-menu__group\" [id]=\"node.id + '-group'\">\n <ng-container *ngTemplateOutlet=\"branch; context: { $implicit: node.children, tree: tree }\" />\n </ul>\n </div>\n </div>\n }\n </li>\n }\n }\n</ng-template>\n\n<ng-template #content let-node>\n @if (itemTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template.template; context: context(node)\" />\n } @else {\n @if (variant() === 'panel' && node.children.length) {\n <tx-icon\n class=\"tx-panel-menu__submenu-icon\"\n aria-hidden=\"true\"\n name=\"chevron-down\"\n [class]=\"passThrough().submenuIcon?.class\"\n [style]=\"passThrough().submenuIcon?.style\"\n />\n } @else if (variant() === 'panel') {\n <span class=\"tx-panel-menu__submenu-icon tx-panel-menu__submenu-icon--spacer\" aria-hidden=\"true\"></span>\n }\n @if (node.item.icon; as icon) {\n <span class=\"tx-panel-menu__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(icon); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span class=\"tx-panel-menu__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ node.item.label }}</span>\n @if (badgeText(node.item); as badge) {\n @if (variant() === 'sidebar') {\n <span class=\"tx-panel-menu__badge\" [class]=\"passThrough().badge?.class\" [style]=\"passThrough().badge?.style\">{{ badge }}</span>\n } @else {\n <tx-badge class=\"tx-panel-menu__badge\" size=\"small\" severity=\"secondary\" [value]=\"badge\" [unstyled]=\"isUnstyled()\" />\n }\n }\n @if (variant() === 'sidebar' && node.item.disabled) {\n <tx-icon class=\"tx-panel-menu__lock\" aria-hidden=\"true\" name=\"lock\" [class]=\"passThrough().lock?.class\" [style]=\"passThrough().lock?.style\" />\n }\n @if (variant() === 'sidebar' && node.children.length) {\n <tx-icon\n class=\"tx-panel-menu__submenu-icon\"\n aria-hidden=\"true\"\n name=\"angle-down\"\n [class]=\"passThrough().submenuIcon?.class\"\n [style]=\"passThrough().submenuIcon?.style\"\n />\n }\n }\n</ng-template>\n",
510
+ styles: [":host{display:flex;flex-direction:column;min-width:0}.tx-panel-menu__tree,.tx-panel-menu__group{margin:0;padding:0;list-style:none}.tx-panel-menu__node{display:block}.tx-panel-menu__header,.tx-panel-menu__item{display:flex;box-sizing:border-box;align-items:center;width:100%;margin:0;border:none;background:transparent;color:inherit;font:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;outline:none}.tx-panel-menu__item[aria-disabled=true],.tx-panel-menu__header:disabled{cursor:default}.tx-panel-menu__label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:clip}.tx-panel-menu__icon,.tx-panel-menu__submenu-icon,.tx-panel-menu__lock,.tx-panel-menu__badge{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center}.tx-panel-menu__submenu-icon--spacer{width:1em;height:1em}.tx-panel-menu__collapse{display:grid;grid-template-rows:0fr}.tx-panel-menu__collapse--open{grid-template-rows:1fr}.tx-panel-menu__collapse-inner{min-height:0;overflow:hidden}.tx-panel-menu__collapse:not(.tx-panel-menu__collapse--open)>.tx-panel-menu__collapse-inner{visibility:hidden}:host([data-styled]){--_duration: var(--tx-panel-menu-transition-duration);--_expand: var(--tx-panel-menu-expand-duration) var(--tx-panel-menu-expand-easing);font-family:var(--tx-font-family);font-size:var(--tx-panel-menu-font-size);line-height:var(--tx-panel-menu-line-height)}:host([data-styled]) .tx-panel-menu__collapse{transition:grid-template-rows var(--_expand)}:host([data-styled]) .tx-panel-menu__collapse:not(.tx-panel-menu__collapse--open)>.tx-panel-menu__collapse-inner{transition:visibility 0s linear var(--tx-panel-menu-expand-duration)}:host([data-styled]) .tx-panel-menu__separator{margin:var(--tx-panel-menu-separator-margin);border-top:1px solid var(--tx-panel-menu-separator-color)}:host([data-styled][data-variant=panel]){gap:var(--tx-panel-menu-gap);color:var(--tx-panel-menu-panel-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__panel{padding:var(--tx-panel-menu-panel-padding);border:var(--tx-panel-menu-panel-border-width) solid var(--tx-panel-menu-panel-border-color);border-radius:var(--tx-panel-menu-panel-border-radius);background:var(--tx-panel-menu-panel-background)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header,:host([data-styled][data-variant=panel]) .tx-panel-menu__item{gap:var(--tx-panel-menu-item-gap);padding:var(--tx-panel-menu-item-padding);border-radius:var(--tx-panel-menu-item-border-radius);color:var(--tx-panel-menu-item-color);font-weight:var(--tx-panel-menu-item-font-weight);transition:background-color var(--_duration),color var(--_duration),opacity var(--_duration)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:not(:disabled):not([aria-disabled=true]):hover,:host([data-styled][data-variant=panel]) .tx-panel-menu__header:focus-visible,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:not(:disabled):not([aria-disabled=true]):hover,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:focus-visible{background:var(--tx-panel-menu-item-focus-background);color:var(--tx-panel-menu-item-focus-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:not(:disabled):not([aria-disabled=true]):hover .tx-panel-menu__icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__header:focus-visible .tx-panel-menu__icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:not(:disabled):not([aria-disabled=true]):hover .tx-panel-menu__icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:focus-visible .tx-panel-menu__icon{color:var(--tx-panel-menu-icon-focus-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:not(:disabled):not([aria-disabled=true]):hover .tx-panel-menu__submenu-icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__header:focus-visible .tx-panel-menu__submenu-icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:not(:disabled):not([aria-disabled=true]):hover .tx-panel-menu__submenu-icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:focus-visible .tx-panel-menu__submenu-icon{color:var(--tx-panel-menu-submenu-icon-focus-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:focus-visible,:host([data-styled][data-variant=panel]) .tx-panel-menu__item:focus-visible{outline:var(--tx-panel-menu-item-focus-ring-width) solid var(--tx-panel-menu-item-focus-ring-color);outline-offset:var(--tx-panel-menu-item-focus-ring-offset)}:host([data-styled][data-variant=panel]) .tx-panel-menu__header:disabled,:host([data-styled][data-variant=panel]) .tx-panel-menu__header[aria-disabled=true],:host([data-styled][data-variant=panel]) .tx-panel-menu__item:disabled,:host([data-styled][data-variant=panel]) .tx-panel-menu__item[aria-disabled=true]{opacity:var(--tx-panel-menu-item-disabled-opacity)}:host([data-styled][data-variant=panel]) .tx-panel-menu__item--active,:host([data-styled][data-variant=panel]) .tx-panel-menu__header--active{background:var(--tx-panel-menu-item-active-background);color:var(--tx-panel-menu-item-active-color)}:host([data-styled][data-variant=panel]) .tx-panel-menu__tree,:host([data-styled][data-variant=panel]) .tx-panel-menu__group{display:flex;flex-direction:column;gap:var(--tx-panel-menu-list-gap)}:host([data-styled][data-variant=panel]) .tx-panel-menu__collapse-inner>.tx-panel-menu__tree,:host([data-styled][data-variant=panel]) .tx-panel-menu__group{padding-top:var(--tx-panel-menu-list-gap)}:host([data-styled][data-variant=panel]) .tx-panel-menu__group{padding-inline-start:var(--tx-panel-menu-submenu-indent)}:host([data-styled][data-variant=panel]) .tx-panel-menu__node{display:flex;flex-direction:column}:host([data-styled][data-variant=panel]) .tx-panel-menu__icon{width:var(--tx-panel-menu-icon-size);height:var(--tx-panel-menu-icon-size);color:var(--tx-panel-menu-icon-color);font-size:var(--tx-panel-menu-icon-size);transition:color var(--_duration)}:host([data-styled][data-variant=panel]) .tx-panel-menu__submenu-icon{font-size:var(--tx-panel-menu-submenu-icon-size);color:var(--tx-panel-menu-submenu-icon-color);transform:rotate(-90deg);transition:color var(--_duration),transform var(--_expand)}:host([data-styled][data-variant=panel]) .tx-panel-menu__panel--expanded>.tx-panel-menu__header .tx-panel-menu__submenu-icon,:host([data-styled][data-variant=panel]) .tx-panel-menu__item--expanded .tx-panel-menu__submenu-icon{transform:rotate(0)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__section{padding:var(--tx-panel-menu-sidebar-section-padding);color:var(--tx-panel-menu-sidebar-section-color);font-size:var(--tx-panel-menu-sidebar-section-font-size);font-weight:var(--tx-panel-menu-sidebar-section-font-weight)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item{width:auto;margin:var(--tx-panel-menu-sidebar-item-margin);padding:var(--tx-panel-menu-sidebar-item-padding);padding-inline-start:calc(var(--tx-panel-menu-sidebar-indent3) + (var(--_level) - 3) * var(--tx-panel-menu-sidebar-indent-step));border-radius:var(--tx-panel-menu-sidebar-item-border-radius);color:var(--tx-panel-menu-sidebar-item-color);font-weight:var(--tx-panel-menu-sidebar-item-font-weight);transition:background-color var(--_duration),color var(--_duration),box-shadow var(--_duration)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item[data-level=\"1\"]{padding-inline-start:var(--tx-panel-menu-sidebar-indent1)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item[data-level=\"2\"]{padding-inline-start:var(--tx-panel-menu-sidebar-indent2)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:has(.tx-panel-menu__badge){padding-inline-end:var(--tx-panel-menu-sidebar-item-badge-padding-end)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:not([aria-disabled=true]):hover{background:var(--tx-panel-menu-sidebar-item-hover-background);color:var(--tx-panel-menu-sidebar-item-hover-color)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:not([aria-disabled=true]):hover .tx-panel-menu__icon,:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:not([aria-disabled=true]):hover .tx-panel-menu__submenu-icon{color:var(--tx-panel-menu-sidebar-item-hover-color)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item:focus-visible{box-shadow:var(--tx-panel-menu-sidebar-focus-shadow)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item[aria-disabled=true]{opacity:var(--tx-panel-menu-sidebar-disabled-opacity)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active,:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active:not([aria-disabled=true]):hover{background:var(--tx-panel-menu-sidebar-active-background);color:var(--tx-panel-menu-sidebar-active-color);font-weight:var(--tx-panel-menu-sidebar-active-font-weight)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active .tx-panel-menu__icon,:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active:not([aria-disabled=true]):hover .tx-panel-menu__icon{color:var(--tx-panel-menu-sidebar-active-color)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--active:not([aria-disabled=true]):hover{background:var(--tx-panel-menu-sidebar-active-hover-background)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__icon{width:var(--tx-panel-menu-sidebar-icon-size);height:var(--tx-panel-menu-sidebar-icon-size);margin-inline-end:var(--tx-panel-menu-sidebar-icon-gap);color:var(--tx-panel-menu-sidebar-icon-color);font-size:var(--tx-panel-menu-sidebar-icon-size);transition:color var(--_duration)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__submenu-icon{margin-inline-start:auto;font-size:var(--tx-panel-menu-sidebar-toggler-size);transition:color var(--_duration),transform var(--_duration)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__item--expanded .tx-panel-menu__submenu-icon{transform:rotate(-180deg)}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__badge{min-width:var(--tx-panel-menu-sidebar-badge-size);height:var(--tx-panel-menu-sidebar-badge-size);box-sizing:border-box;margin-inline-start:var(--tx-panel-menu-sidebar-badge-gap);padding:var(--tx-panel-menu-sidebar-badge-padding);border-radius:var(--tx-radius-full);background:var(--tx-panel-menu-sidebar-badge-background);color:var(--tx-panel-menu-sidebar-badge-color);font-size:var(--tx-panel-menu-sidebar-badge-font-size);font-weight:var(--tx-panel-menu-sidebar-badge-font-weight);font-variant-numeric:tabular-nums;line-height:1}:host([data-styled][data-variant=sidebar]) .tx-panel-menu__lock{margin-inline-start:var(--tx-panel-menu-sidebar-lock-gap);color:var(--tx-panel-menu-sidebar-lock-color);font-size:var(--tx-panel-menu-sidebar-lock-size)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-panel-menu__collapse,:host([data-styled]) .tx-panel-menu__collapse:not(.tx-panel-menu__collapse--open)>.tx-panel-menu__collapse-inner,:host([data-styled]) .tx-panel-menu__header,:host([data-styled]) .tx-panel-menu__item,:host([data-styled]) .tx-panel-menu__icon,:host([data-styled]) .tx-panel-menu__submenu-icon{transition:none}}\n"]
511
+ }]
512
+ }],
513
+ ctorParameters: () => [],
514
+ propDecorators: {
515
+ model: [{
516
+ type: i0.Input,
517
+ args: [{
518
+ isSignal: true,
519
+ alias: "model",
520
+ required: false
521
+ }]
522
+ }],
523
+ variant: [{
524
+ type: i0.Input,
525
+ args: [{
526
+ isSignal: true,
527
+ alias: "variant",
528
+ required: false
529
+ }]
530
+ }],
531
+ multiple: [{
532
+ type: i0.Input,
533
+ args: [{
534
+ isSignal: true,
535
+ alias: "multiple",
536
+ required: false
537
+ }]
538
+ }],
539
+ expandedKeys: [{
540
+ type: i0.Input,
541
+ args: [{
542
+ isSignal: true,
543
+ alias: "expandedKeys",
544
+ required: false
545
+ }]
546
+ }, {
547
+ type: i0.Output,
548
+ args: ["expandedKeysChange"]
549
+ }],
550
+ badgeMax: [{
551
+ type: i0.Input,
552
+ args: [{
553
+ isSignal: true,
554
+ alias: "badgeMax",
555
+ required: false
556
+ }]
557
+ }],
558
+ ariaLabel: [{
559
+ type: i0.Input,
560
+ args: [{
561
+ isSignal: true,
562
+ alias: "ariaLabel",
563
+ required: false
564
+ }]
565
+ }],
566
+ dt: [{
567
+ type: i0.Input,
568
+ args: [{
569
+ isSignal: true,
570
+ alias: "dt",
571
+ required: false
572
+ }]
573
+ }],
574
+ pt: [{
575
+ type: i0.Input,
576
+ args: [{
577
+ isSignal: true,
578
+ alias: "pt",
579
+ required: false
580
+ }]
581
+ }],
582
+ ptOptions: [{
583
+ type: i0.Input,
584
+ args: [{
585
+ isSignal: true,
586
+ alias: "ptOptions",
587
+ required: false
588
+ }]
589
+ }],
590
+ unstyled: [{
591
+ type: i0.Input,
592
+ args: [{
593
+ isSignal: true,
594
+ alias: "unstyled",
595
+ required: false
596
+ }]
597
+ }],
598
+ itemClick: [{
599
+ type: i0.Output,
600
+ args: ["itemClick"]
601
+ }],
602
+ itemTemplate: [{
603
+ type: i0.ContentChild,
604
+ args: [i0.forwardRef(() => TxPanelMenuItemTemplate), { isSignal: true }]
605
+ }]
606
+ }
607
+ });
608
+ export { TxPanelMenu, TxPanelMenuItemTemplate };
609
+
610
+ //# sourceMappingURL=tectra-ng-ui-panel-menu.mjs.map